From: David Hildenbrand <david@redhat.com>
To: schuster.simon@siemens-energy.com,
Dinh Nguyen <dinguyen@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org,
linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
cgroups@vger.kernel.org, linux-security-module@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-perf-users@vger.kernel.org, apparmor@lists.ubuntu.com,
selinux@vger.kernel.org, linux-alpha@vger.kernel.org,
linux-snps-arc@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-um@lists.infradead.org
Subject: Re: [PATCH v2 2/4] copy_process: pass clone_flags as u64 across calltree
Date: Mon, 1 Sep 2025 15:38:42 +0200 [thread overview]
Message-ID: <48ee3dd0-9af3-4513-aef2-25e185cce349@redhat.com> (raw)
In-Reply-To: <20250901-nios2-implement-clone3-v2-2-53fcf5577d57@siemens-energy.com>
On 01.09.25 15:09, Simon Schuster via B4 Relay wrote:
> From: Simon Schuster <schuster.simon@siemens-energy.com>
>
> With the introduction of clone3 in commit 7f192e3cd316 ("fork: add
> clone3") the effective bit width of clone_flags on all architectures was
> increased from 32-bit to 64-bit, with a new type of u64 for the flags.
> However, for most consumers of clone_flags the interface was not
> changed from the previous type of unsigned long.
>
> While this works fine as long as none of the new 64-bit flag bits
> (CLONE_CLEAR_SIGHAND and CLONE_INTO_CGROUP) are evaluated, this is still
> undesirable in terms of the principle of least surprise.
>
> Thus, this commit fixes all relevant interfaces of callees to
> sys_clone3/copy_process (excluding the architecture-specific
> copy_thread) to consistently pass clone_flags as u64, so that
> no truncation to 32-bit integers occurs on 32-bit architectures.
>
> Signed-off-by: Simon Schuster <schuster.simon@siemens-energy.com>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> block/blk-ioc.c | 2 +-
> fs/namespace.c | 2 +-
> include/linux/cgroup.h | 4 ++--
> include/linux/cred.h | 2 +-
> include/linux/iocontext.h | 6 +++---
> include/linux/ipc_namespace.h | 4 ++--
> include/linux/lsm_hook_defs.h | 2 +-
> include/linux/mnt_namespace.h | 2 +-
> include/linux/nsproxy.h | 2 +-
> include/linux/pid_namespace.h | 4 ++--
> include/linux/rseq.h | 4 ++--
> include/linux/sched/task.h | 2 +-
> include/linux/security.h | 4 ++--
> include/linux/sem.h | 4 ++--
> include/linux/time_namespace.h | 4 ++--
> include/linux/uprobes.h | 4 ++--
> include/linux/user_events.h | 4 ++--
> include/linux/utsname.h | 4 ++--
> include/net/net_namespace.h | 4 ++--
> include/trace/events/task.h | 6 +++---
> ipc/namespace.c | 2 +-
> ipc/sem.c | 2 +-
> kernel/cgroup/namespace.c | 2 +-
> kernel/cred.c | 2 +-
> kernel/events/uprobes.c | 2 +-
> kernel/fork.c | 8 ++++----
> kernel/nsproxy.c | 4 ++--
> kernel/pid_namespace.c | 2 +-
> kernel/sched/core.c | 4 ++--
> kernel/sched/fair.c | 2 +-
> kernel/sched/sched.h | 4 ++--
> kernel/time/namespace.c | 2 +-
> kernel/utsname.c | 2 +-
> net/core/net_namespace.c | 2 +-
> security/apparmor/lsm.c | 2 +-
> security/security.c | 2 +-
> security/selinux/hooks.c | 2 +-
> security/tomoyo/tomoyo.c | 2 +-
> 38 files changed, 59 insertions(+), 59 deletions(-)
>
> diff --git a/block/blk-ioc.c b/block/blk-ioc.c
> index 9fda3906e5f5..d15918d7fabb 100644
> --- a/block/blk-ioc.c
(adjust To: list)
Hopefully we caught most of them. The ones not called "clone_flags" are
a bit nasty.
We could have split of some changes (e.g., trace event), but likely not
worth it.
Thanks!
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers
David / dhildenb
next prev parent reply other threads:[~2025-09-01 13:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 13:09 [PATCH v2 0/4] nios2: Add architecture support for clone3 Simon Schuster via B4 Relay
2025-09-01 13:09 ` [PATCH v2 1/4] copy_sighand: Handle architectures where sizeof(unsigned long) < sizeof(u64) Simon Schuster via B4 Relay
2025-09-01 13:19 ` Arnd Bergmann
2025-09-01 13:24 ` David Hildenbrand
2025-09-01 13:09 ` [PATCH v2 2/4] copy_process: pass clone_flags as u64 across calltree Simon Schuster via B4 Relay
2025-09-01 13:35 ` Arnd Bergmann
2025-09-01 13:38 ` David Hildenbrand [this message]
2025-09-01 13:09 ` [PATCH v2 3/4] arch: copy_thread: pass clone_flags as u64 Simon Schuster via B4 Relay
2025-09-01 13:30 ` Arnd Bergmann
2025-09-01 13:39 ` Russell King (Oracle)
2025-09-01 13:39 ` David Hildenbrand
2025-09-01 13:51 ` Geert Uytterhoeven
2025-09-02 7:02 ` Andreas Larsson
2025-09-02 7:15 ` John Paul Adrian Glaubitz
2025-09-02 11:44 ` Andreas Larsson
2025-09-02 9:48 ` Guo Ren
2025-09-01 13:09 ` [PATCH v2 4/4] nios2: implement architecture-specific portion of sys_clone3 Simon Schuster via B4 Relay
2025-09-01 13:35 ` Arnd Bergmann
2025-09-01 13:40 ` [PATCH v2 0/4] nios2: Add architecture support for clone3 Christian Brauner
2025-09-01 13:41 ` Christian Brauner
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=48ee3dd0-9af3-4513-aef2-25e185cce349@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=apparmor@lists.ubuntu.com \
--cc=arnd@arndb.de \
--cc=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-openrisc@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=rppt@kernel.org \
--cc=schuster.simon@siemens-energy.com \
--cc=selinux@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).