Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Namhyung Kim" <namhyung@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 4/7] perf trace: Sync uapi/linux/sched.h with the kernel source
Date: Fri, 08 May 2026 12:30:57 +0000	[thread overview]
Message-ID: <20260508123057.98CBBC2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260507072632.37152-5-namhyung@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Build Script Regex Regression
--

commit 95b9a74eb48111bfe1440ab1eb342b9d9108af43
Author: Namhyung Kim <namhyung@kernel.org>

perf trace: Sync uapi/linux/sched.h with the kernel source

Syncs the tools copy of uapi/linux/sched.h with the kernel source to pick up
changes related to clone3 and unshare flags.

> diff --git a/tools/perf/trace/beauty/include/uapi/linux/sched.h b/tools/perf/trace/beauty/include/uapi/linux/sched.h
> index 359a14cc76a40..33a4624285cd4 100644
> --- a/tools/perf/trace/beauty/include/uapi/linux/sched.h
> +++ b/tools/perf/trace/beauty/include/uapi/linux/sched.h
> @@ -34,8 +34,12 @@
>  #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. */

Does changing these flag definitions from hexadecimal literals to bit-shifts
break the beautifier script?

Looking at tools/perf/trace/beauty/clone.sh, the script relies on matching
hexadecimal literals like (0x[[:xdigit:]]+) to extract these flags. Without
updating the regex in this patch, the script will silently fail to extract
these modified and new flags, causing them to be excluded from
clone_flags_array.c.

While a subsequent patch in the series attempts to fix this by replacing the
regex with one that exclusively matches 1ULL << X, this drops all standard
32-bit clone flags (like CLONE_VM and CLONE_FS) which remain defined as
hexadecimal literals in the header.

Could the script be updated to support both formats?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260507072632.37152-1-namhyung@kernel.org?part=4

  reply	other threads:[~2026-05-08 12:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  7:26 [PATCH v2 0/7] perf build: Update kernel headers Namhyung Kim
2026-05-07  7:26 ` [PATCH v2 1/7] perf trace: Sync linux/socket.h with the kernel source Namhyung Kim
2026-05-07  7:26 ` [PATCH v2 2/7] perf trace: Sync uapi/linux/fs.h " Namhyung Kim
2026-05-07  7:26 ` [PATCH v2 3/7] perf trace: Sync uapi/linux/mount.h " Namhyung Kim
2026-05-07  7:26 ` [PATCH v2 4/7] perf trace: Sync uapi/linux/sched.h " Namhyung Kim
2026-05-08 12:30   ` sashiko-bot [this message]
2026-05-07  7:26 ` [PATCH v2 5/7] perf build: Add make check-headers target Namhyung Kim
2026-05-07  7:26 ` [PATCH v2 6/7] perf trace: Add beautifier script for fsmount flags Namhyung Kim
2026-05-08 12:30   ` sashiko-bot
2026-05-07  7:26 ` [PATCH v2 7/7] perf trace: Update beautifier script for clone flags Namhyung Kim
2026-05-08 12:30   ` sashiko-bot

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=20260508123057.98CBBC2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=sashiko@lists.linux.dev \
    /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