mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Palmer Dabbelt <palmer@rivosinc.com>
Subject: [PATCH 10/11] tools headers: Sync uapi/linux/prctl.h with the kernel sources
Date: Mon,  2 Dec 2024 19:53:48 -0800	[thread overview]
Message-ID: <20241203035349.1901262-11-namhyung@kernel.org> (raw)
In-Reply-To: <20241203035349.1901262-1-namhyung@kernel.org>

To pick up the changes in this cset:

  09d6775f503b393d riscv: Add support for userspace pointer masking
  91e102e79740ae43 prctl: arch-agnostic prctl for shadow stack

This addresses these perf build warnings:

  Warning: Kernel ABI header differences:
    diff -u tools/perf/trace/beauty/include/uapi/linux/prctl.h include/uapi/linux/prctl.h

Please see tools/include/uapi/README for further details.

Cc: Mark Brown <broonie@kernel.org>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 .../trace/beauty/include/uapi/linux/prctl.h   | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/tools/perf/trace/beauty/include/uapi/linux/prctl.h b/tools/perf/trace/beauty/include/uapi/linux/prctl.h
index 35791791a879b288..5c6080680cb27b19 100644
--- a/tools/perf/trace/beauty/include/uapi/linux/prctl.h
+++ b/tools/perf/trace/beauty/include/uapi/linux/prctl.h
@@ -230,7 +230,7 @@ struct prctl_mm_map {
 # define PR_PAC_APDBKEY			(1UL << 3)
 # define PR_PAC_APGAKEY			(1UL << 4)
 
-/* Tagged user address controls for arm64 */
+/* Tagged user address controls for arm64 and RISC-V */
 #define PR_SET_TAGGED_ADDR_CTRL		55
 #define PR_GET_TAGGED_ADDR_CTRL		56
 # define PR_TAGGED_ADDR_ENABLE		(1UL << 0)
@@ -244,6 +244,9 @@ struct prctl_mm_map {
 # define PR_MTE_TAG_MASK		(0xffffUL << PR_MTE_TAG_SHIFT)
 /* Unused; kept only for source compatibility */
 # define PR_MTE_TCF_SHIFT		1
+/* RISC-V pointer masking tag length */
+# define PR_PMLEN_SHIFT			24
+# define PR_PMLEN_MASK			(0x7fUL << PR_PMLEN_SHIFT)
 
 /* Control reclaim behavior when allocating memory */
 #define PR_SET_IO_FLUSHER		57
@@ -328,4 +331,26 @@ struct prctl_mm_map {
 # define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC	0x10 /* Clear the aspect on exec */
 # define PR_PPC_DEXCR_CTRL_MASK		0x1f
 
+/*
+ * Get the current shadow stack configuration for the current thread,
+ * this will be the value configured via PR_SET_SHADOW_STACK_STATUS.
+ */
+#define PR_GET_SHADOW_STACK_STATUS      74
+
+/*
+ * Set the current shadow stack configuration.  Enabling the shadow
+ * stack will cause a shadow stack to be allocated for the thread.
+ */
+#define PR_SET_SHADOW_STACK_STATUS      75
+# define PR_SHADOW_STACK_ENABLE         (1UL << 0)
+# define PR_SHADOW_STACK_WRITE		(1UL << 1)
+# define PR_SHADOW_STACK_PUSH		(1UL << 2)
+
+/*
+ * Prevent further changes to the specified shadow stack
+ * configuration.  All bits may be locked via this call, including
+ * undefined bits.
+ */
+#define PR_LOCK_SHADOW_STACK_STATUS      76
+
 #endif /* _LINUX_PRCTL_H */
-- 
2.47.0.338.g60cca15819-goog


  parent reply	other threads:[~2024-12-03  3:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03  3:53 [PATCHSET 00/11] perf tools: Sync tools and kernel headers for v6.13 Namhyung Kim
2024-12-03  3:53 ` [PATCH 01/11] tools headers: Sync uapi/drm/drm.h with the kernel sources Namhyung Kim
2024-12-03  3:53 ` [PATCH 02/11] tools headers: Sync uapi/linux/perf_event.h " Namhyung Kim
2024-12-03  3:53 ` [PATCH 03/11] tools headers: Sync uapi/linux/kvm.h " Namhyung Kim
2024-12-03  3:53 ` [PATCH 04/11] tools headers: Sync x86 kvm and cpufeature headers with the kernel Namhyung Kim
2024-12-03  3:53 ` [PATCH 05/11] tools headers: Sync arm64 kvm header with the kernel sources Namhyung Kim
2024-12-03  3:53 ` [PATCH 06/11] tools headers: Sync *xattrat syscall changes " Namhyung Kim
2024-12-03  3:53 ` [PATCH 07/11] tools headers: Sync uapi/asm-generic/mman.h " Namhyung Kim
2024-12-03  3:53 ` [PATCH 08/11] tools headers: Sync uapi/linux/fcntl.h " Namhyung Kim
2024-12-03  3:53 ` [PATCH 09/11] tools headers: Sync uapi/linux/mount.h " Namhyung Kim
2024-12-03  3:53 ` Namhyung Kim [this message]
2024-12-03  3:53 ` [PATCH 11/11] perf tools: Fix build error on generated/fs_at_flags_array.c Namhyung Kim
2024-12-03 16:43   ` James Clark
2024-12-03 21:54     ` Namhyung Kim
2024-12-04  9:39       ` James Clark
2024-12-04  9:59         ` James Clark
2024-12-04 10:00 ` [PATCHSET 00/11] perf tools: Sync tools and kernel headers for v6.13 James Clark
2024-12-05 18:56 ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241203035349.1901262-11-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=broonie@kernel.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=palmer@rivosinc.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®