]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
perf trace: Sync uapi/linux/sched.h with the kernel source
authorNamhyung Kim <namhyung@kernel.org>
Sun, 10 May 2026 20:23:43 +0000 (13:23 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 14 May 2026 21:48:32 +0000 (14:48 -0700)
To pick up changes from:

 9d4e752a24f740b3 ("namespace: allow creating empty mount namespaces")
 c8134b5f13ae959d ("pidfd: add CLONE_PIDFD_AUTOKILL")
 24baca56fafc33d4 ("clone: add CLONE_NNP")
 12ae2c81b21cfaa1 ("clone: add CLONE_AUTOREAP")
 2e7af192697ef2a7 ("sched/deadline: Add reporting of runtime left & ...")

This would be used to beautify scheduler syscall arguments and not to
affect builds of other tools (e.g. objtool).

Please see tools/include/uapi/README.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/trace/beauty/include/uapi/linux/sched.h

index 359a14cc76a4038aeacef14b2915d5ce60d0cf44..33a4624285cd41798cab3e58c825602b5b5f538f 100644 (file)
 #define CLONE_IO               0x80000000      /* Clone io context */
 
 /* Flags for the clone3() syscall. */
-#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */
-#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_CLEAR_SIGHAND    (1ULL << 32) /* Clear any signal handler and reset to SIG_DFL. */
+#define CLONE_INTO_CGROUP      (1ULL << 33) /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_AUTOREAP         (1ULL << 34) /* Auto-reap child on exit. */
+#define CLONE_NNP              (1ULL << 35) /* Set no_new_privs on child. */
+#define CLONE_PIDFD_AUTOKILL   (1ULL << 36) /* Kill child when clone pidfd closes. */
+#define CLONE_EMPTY_MNTNS      (1ULL << 37) /* Create an empty mount namespace. */
 
 /*
  * cloning flags intersect with CSIGNAL so can be used with unshare and clone3
  */
 #define CLONE_NEWTIME  0x00000080      /* New time namespace */
 
+/*
+ * unshare flags share the bit space with clone flags but only apply to the
+ * unshare syscall:
+ */
+#define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
+
 #ifndef __ASSEMBLY__
 /**
  * struct clone_args - arguments for the clone3 syscall
@@ -146,4 +156,7 @@ struct clone_args {
                         SCHED_FLAG_KEEP_ALL            | \
                         SCHED_FLAG_UTIL_CLAMP)
 
+/* Only for sched_getattr() own flag param, if task is SCHED_DEADLINE */
+#define SCHED_GETATTR_FLAG_DL_DYNAMIC  0x01
+
 #endif /* _UAPI_LINUX_SCHED_H */