Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2135125lqb; Mon, 27 May 2024 08:57:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUczEPSitup09kzB15xt5rAADSlnhU17gcPDfT39GfwQNngvnBY/fupaBNKCBZqzn5lQdwwd+v5ISZwXBfAwQUJyYfV1xzwlzhZDiWyxg== X-Google-Smtp-Source: AGHT+IHIKWSJvtK+BEbg+uMC92bg3mUYPHjJR4cdALSM5+ovSWtz4ncUNpyzHyFZgtEIu3drUXjR X-Received: by 2002:a05:6e02:13a3:b0:36c:7eb2:50d5 with SMTP id e9e14a558f8ab-3737b39d8b0mr110165115ab.25.1716825463701; Mon, 27 May 2024 08:57:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716825463; cv=pass; d=google.com; s=arc-20160816; b=sc6+uzb/zXAXKI1YUm0xBeOA2Du0rXhCVoRIoeeH3evD2e/Rr3RCAnwHwwce5+eLpZ M5WXiX5FUIZh7Mu8MH9szkEqjhajJ1gD8WtDBQpbeP31BzdZCA8ilhRJw/ZEz5nwNLv/ fg3g82BDvcmsFCLdaijqxskZSPdP7AC7ld+0+1VcBN3lWbupa5lmhTFzhMTAwa6hvlN4 8SLbgmzMZz7uA9513bnizyKRtx06Yfe9S9jZN3MjPPZbGWWoS/9XgJgR5UPTn3APULxO 9ijRCKszpfQNBKVhHASeVxBqEiMNriAKd8NpptMQCDWCrOt9++W+7eQrAiZRNwquM+GH +e6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=q9oESTf8CxDEu9uqm3ivQNmGp4nGalKFyHLVBgrElNw=; fh=7YIIrSXcOj/qPG3xPCo5L3abHOZedoEgQOiGmX8x9P8=; b=yHNw6azkxazOIvGGZNchpMiXau5u6IPro5WAsl7ahfCymBpTcnExRbJhSuiz8tyvYQ KmyqZXf3okR5P0MREpz29ZixRJoJeTG1kGOvtnH5XVuEBWjNzGWbYWz6yfQG+9/YiZCy agScHjEVbsD6Oqya4m0r/whHb1HMOrVC9w58VRCn92kmJFdwbeZONKVi+xXEcT7wOF+O G8WvHLu8GE7podEvHVgsIutww2M52lxiRVIX11SYIt0GtYe4Bl03wrZZH/37KfcJjGHb 9xV9gdAGrRlYLka3IlCkYkfy0sv+a8ofFytC24KD8qqQLGOjApNZCtQb4kFzrxsXckcx pH+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IxbKH5C2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191097-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6822779bd41si4609868a12.267.2024.05.27.08.57.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 08:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191097-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IxbKH5C2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191097-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 11EDC2868BF for ; Mon, 27 May 2024 15:49:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDFB761FD8; Mon, 27 May 2024 15:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IxbKH5C2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06D2A17E90A for ; Mon, 27 May 2024 15:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716824949; cv=none; b=taT28WgjIpo+O2pu7erR4wnRqJLb5DAI4+Tb+aWdPoodl5+gPvvHiNbTDG5ZFTBaNiHZRESjZ7dMXvW5cUU/XguZ1MxpnnW+WvP7rs8Hp216nYA/yxn6pNqlBcjDWMagpq7oTcfLQGnazKVG1MGTd2pEDBK4G9+sRD7wV+Lt5e0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716824949; c=relaxed/simple; bh=PTOD43twZezS1LaJReRCBTqZRcQpJg3FNX+Bc7pvXxE=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=XkRXPuXo2PeWM/Rfi5ksVzAfYMf7mXC1eiOMeWr0RTM7iPzAEhwBdUxRmt3AaYbYsBx1UTSC9ao+izFHOrpVWcLVf3K9e2ChHV3ZnwDLZfeQFrj034/sitP2aUYRCaWymZOb2tAPipANg1sEuLoMmTszHnnq4yiZnXf47I6iMeg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IxbKH5C2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11313C4AF07; Mon, 27 May 2024 15:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716824948; bh=PTOD43twZezS1LaJReRCBTqZRcQpJg3FNX+Bc7pvXxE=; h=Date:From:To:Cc:Subject:From; b=IxbKH5C2BwSP+iOUIKaBS1SI3wXJKhKcDFUkIG4T9t9UPywfcjK5Ljk/qO0lPp55t 217DLLh6BUR0hOyEtCUHB0lf7exkGCiKr+9YxJmGO5fLPA34hVX8VImzpAQCBR6CoX 3dDifS/1vT/4ds3hUzCA3lkPy08MkQ6tSjCW8ySmYv3SeWfh3s8Ci8J5rsYJT1Ous9 BNuunDrH+Rx8SdQ6ny8IQbh0QkTc0TD/Co53IIuU4MpiEGueDMJXqkBJ7VI6p9hmlf Aj3MOPUvSlG4SrPPa1gfFTwQturO3j1vm3XP/0PNgnwLybrgKjeddRuqUkpLBNsHrV M9f6khanAmVbg== Date: Mon, 27 May 2024 12:49:05 -0300 From: Arnaldo Carvalho de Melo To: linux-kernel@vger.kernel.org Cc: Adrian Hunter , Ian Rogers , Jens Axboe , Jiri Olsa , Kan Liang , Namhyung Kim Subject: [PATCH 1/1 fyi] perf beauty: Update copy of linux/socket.h with the kernel sources Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model. The way these headers are used in perf are not restricted to just including them to compile something. There are sometimes used in scripts that convert defines into string tables, etc, so some change may break one of these scripts, or new MSRs may use some different #define pattern, etc. E.g.: $ ls -1 tools/perf/trace/beauty/*.sh | head -5 tools/perf/trace/beauty/arch_errno_names.sh tools/perf/trace/beauty/drm_ioctl.sh tools/perf/trace/beauty/fadvise.sh tools/perf/trace/beauty/fsconfig.sh tools/perf/trace/beauty/fsmount.sh $ $ tools/perf/trace/beauty/fadvise.sh static const char *fadvise_advices[] = { [0] = "NORMAL", [1] = "RANDOM", [2] = "SEQUENTIAL", [3] = "WILLNEED", [4] = "DONTNEED", [5] = "NOREUSE", }; $ The tools/perf/check-headers.sh script, part of the tools/ build process, points out changes in the original files. So its important not to touch the copies in tools/ when doing changes in the original kernel headers, that will be done later, when check-headers.sh inform about the change to the perf tools hackers. To pick up the fixes in: 0645fbe760afcc53 ("net: have do_accept() take a struct proto_accept_arg argument") That just changes a function prototype, not touching things used by the perf scrape scripts such as: $ tools/perf/trace/beauty/sockaddr.sh | head -5 static const char *socket_families[] = { [0] = "UNSPEC", [1] = "LOCAL", [2] = "INET", [3] = "AX25", $ This addresses this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jens Axboe Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/trace/beauty/include/linux/socket.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/trace/beauty/include/linux/socket.h index 139c330ccf2c3bf9..89d16b90370bd412 100644 --- a/tools/perf/trace/beauty/include/linux/socket.h +++ b/tools/perf/trace/beauty/include/linux/socket.h @@ -16,6 +16,7 @@ struct cred; struct socket; struct sock; struct sk_buff; +struct proto_accept_arg; #define __sockaddr_check_size(size) \ BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) @@ -433,7 +434,7 @@ extern int __sys_recvfrom(int fd, void __user *ubuf, size_t size, extern int __sys_sendto(int fd, void __user *buff, size_t len, unsigned int flags, struct sockaddr __user *addr, int addr_len); -extern struct file *do_accept(struct file *file, unsigned file_flags, +extern struct file *do_accept(struct file *file, struct proto_accept_arg *arg, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, int flags); extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, -- 2.45.1