Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp721991rdf; Tue, 21 Nov 2023 14:59:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfpoFJYXcANP+tLsd5ZnMVh3D7LHIc4bBHzZ7ih8NkzOVfYGKQyj8bLd0FUQw6K0tRfC2D X-Received: by 2002:a05:6a20:3ca2:b0:187:bb9c:569 with SMTP id b34-20020a056a203ca200b00187bb9c0569mr1237561pzj.5.1700607544911; Tue, 21 Nov 2023 14:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700607544; cv=none; d=google.com; s=arc-20160816; b=dLdq/GiPms/6wjzyR7HfqvczwxXwYZdvgCfoOe8ityUD/sYyH3JGoNmYjE1eoCPYHy DSAaM3u4MjEtFzML2DxmtvvOLd9gwIdLIjRJuf8wkriHhzw+KN95QhpL+HsvquaPCS3R Qjhq7c+HQNxq1bgorFD37e7B17QUY3qgO4GhNBaiFoIZpsb/GiaqOC2MuSgvz+RetEnc ZLWCNt64OL2ftk8HrChTuvVJq+2M3PCA5FD5Sd5e2IHzn4szafBE9355OqWRAjxytVLc V0uutWxozmXABCl2J5a3NCsq6Wm/zEi6cwegc7e1tnbMG7wIHi9KDovIC/jTNVYkj6+Q 3NOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=Joh8uuUk19mBxNee66MMAzQ/m9SU9DPYEeo2rbFlN7I=; fh=5Ez3Kjgle7UN/YBUEFH/GrXI4aMytfXLdaUqLTIuTcE=; b=AqvAHlha35ycGeSQztbwpQAsji1teU9P1GXjqyec9obfZDWnWEqWWkjhljGjupbl3u U3TvtiHBfIAowEDDl8w/AQ5S3Q4Z9Hx7cItpGkR5Ld5JneS8BXv1Wb5BlDZRwN1ZaDRj 8JMPi3m/pYYq91qFXIGGNOMI86L/znWsk+cPuiFkAapZNbSFmSX7r2IaT9O6Kphn4Ga5 Ez+3eQjN5XxICJNFe6tNsjeLEjIIp02KKw07AcxiyzlHXJK3kMRRmHLYi2sWVHHOqByB VpSMD5t4qurcF8THFaMz0VHT57UR7Arqbj5Vru/cgfSM3PMd+ipHzBWXznO/iwqqBzQ4 5amQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jd9pvD4E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q12-20020a63e20c000000b005b977eea853si11347837pgh.694.2023.11.21.14.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:59:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jd9pvD4E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9E061804C486; Tue, 21 Nov 2023 14:57:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234853AbjKUW5M (ORCPT + 99 others); Tue, 21 Nov 2023 17:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234775AbjKUW5D (ORCPT ); Tue, 21 Nov 2023 17:57:03 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2AC5191; Tue, 21 Nov 2023 14:56:59 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1cf6373ce31so2155055ad.0; Tue, 21 Nov 2023 14:56:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700607419; x=1701212219; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Joh8uuUk19mBxNee66MMAzQ/m9SU9DPYEeo2rbFlN7I=; b=jd9pvD4EsjHTio0o0qDAXju7073NsXRmfaOX2MLIhCGGAHELj4coEMtmG1HMyU2ag1 9FSstQ9cE+ZsM5tD35F4d6gIFIeqymUueUQaxJTVqFEZOStF7TJBvXUCu8o4H6VPd4tA Pe8afH74n9uR8zuMTyJxAKkwtJRx1JQyckIvZhSQ8du565h/T/SmQCqWiR6OUtgSLASc Xah+8ggptcoufzPz0fX6eTn/ulzqBK6XoH4p7YRK0+ol2H2w5oBgXvrufzmuXmnjR5ds 3UQoulKg3vYzLNpCp9dHnuW3x6tMsl/ypeewMDJ7rkhNa1qZ2UGQ5XUHr+u5MFnxF4uD KNBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700607419; x=1701212219; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Joh8uuUk19mBxNee66MMAzQ/m9SU9DPYEeo2rbFlN7I=; b=AqSXn+tTmkDzL6TwF+g1orMouTinMfjmR6+dd6ztXwX+8t5ZDo13kaCjwrHvBTB0Af vHAMAg/N+msXuy17mCsKoYPSJedoYpxZv+KbNnhcOjUJPKBJ0SeGwkNUfwFLbfquSjrE H0Mi3o50dkqqz/gWwQ4irMAcPFQOkXGz2jQQ3qqdzT7dQqnllBtXgosq6x7dIQmCte7j SBoXYRWEtG8nlFITRs7721AY6yMqxom81KA7xUnV67ttKAeB2T3zYUHXg931e1cHFxJu UOf9FnzgqioNPF/b9lEz8BKAWfy6iAuoIu+x38gwLVSp0L1EwdegM6IPdLXd4FlVzrdX lyKw== X-Gm-Message-State: AOJu0Yy8/eEFQXwZLEmxx9+TuUGVdTilSJCZYRfoRHiBsLbZkkoGyADO ObR2AyYO/Y3tA+fAczdF6NY= X-Received: by 2002:a17:902:da91:b0:1ce:5ca7:1070 with SMTP id j17-20020a170902da9100b001ce5ca71070mr1173646plx.16.1700607419173; Tue, 21 Nov 2023 14:56:59 -0800 (PST) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:7377:923f:1ff3:266d]) by smtp.gmail.com with ESMTPSA id m12-20020a1709026bcc00b001cc47c1c29csm8413189plt.84.2023.11.21.14.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:56:58 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Arnd Bergmann , linux-arch@vger.kernel.org Subject: [PATCH 06/14] tools headers UAPI: Update tools's copy of unistd.h header Date: Tue, 21 Nov 2023 14:56:41 -0800 Message-ID: <20231121225650.390246-6-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog In-Reply-To: <20231121225650.390246-1-namhyung@kernel.org> References: <20231121225650.390246-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 14:57:25 -0800 (PST) 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. Cc: Arnd Bergmann Cc: linux-arch@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/asm-generic/unistd.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h index 76d946445391..756b013fb832 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h @@ -816,15 +816,21 @@ __SYSCALL(__NR_process_mrelease, sys_process_mrelease) __SYSCALL(__NR_futex_waitv, sys_futex_waitv) #define __NR_set_mempolicy_home_node 450 __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) - #define __NR_cachestat 451 __SYSCALL(__NR_cachestat, sys_cachestat) - #define __NR_fchmodat2 452 __SYSCALL(__NR_fchmodat2, sys_fchmodat2) +#define __NR_map_shadow_stack 453 +__SYSCALL(__NR_map_shadow_stack, sys_map_shadow_stack) +#define __NR_futex_wake 454 +__SYSCALL(__NR_futex_wake, sys_futex_wake) +#define __NR_futex_wait 455 +__SYSCALL(__NR_futex_wait, sys_futex_wait) +#define __NR_futex_requeue 456 +__SYSCALL(__NR_futex_requeue, sys_futex_requeue) #undef __NR_syscalls -#define __NR_syscalls 453 +#define __NR_syscalls 457 /* * 32 bit systems traditionally used different -- 2.43.0.rc1.413.gea7ed67945-goog