From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CA4CCCD182 for ; Mon, 6 Oct 2025 12:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:Message-ID:In-Reply-To:Subject:cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fl//kCkijlzCVR9mkoTjy3hmrs7lH+dhZH4qnaeCWrc=; b=5FzKzha9+52ueNkmromOu5E/fc dzbd+jtk8wGjENGGo/7+a4JC4YDM0BuePQz6OLRYzwNIgokZUGWZjqG+Gcpz+rdPHKaGfEtq9siH7 HNl9obYsx/3pe3l0S30VJc6IXPOGIrBUNp2wFwr1MdD+EgSCxLZhe4WUMOVhZYUlwMjSgNG6NLrTw Km9qbMLtInnbrC68fmt+mXfN19TYxQxtNPRyMz+HmQ5G+dXHVHBsjxtMCaMqtI6rDEyI67SsKdLDR jIPYgKdtVKC0OYKhRIl/yGfPrVQjg0HrZMQDgnLa9Vb45YfPvMFESawf2EPliaX6U6au4P1gcJC+1 rF4wUKUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v5k8k-0000000HZ3q-2gzb; Mon, 06 Oct 2025 12:16:30 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uzGuk-00000000VGJ-3M8a; Thu, 18 Sep 2025 15:51:19 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 3015643217; Thu, 18 Sep 2025 15:51:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77DBC4CEE7; Thu, 18 Sep 2025 15:51:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758210677; bh=e6XJbeklgFNXwruDywAZe7vowNbZUbwBKpZS63m54og=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=lAxccBgHQJMGKL6W5XO/kIBHMi2AladIz8qPWx4MBG7gpBrzHZckIimBwgkALGSoK RTpLe7661eFC5B/7BhfypSLu8ciNLbjbhnW0/Uiw7F9qtuf/K/hOn+NGzmTK4Elius Puw/h1XtP570vHRTCm/o6CmMUjRekyChiJ42E7YZlGDJw6uFwLqKV4izLQfNVxc+1W 3GgwOdBMEpO6bPhXxyYgbuGAlwFII7VeYUA20OL3bsW1JzfLATB4CEE7Um16odYOB9 O8FOQqOy+9iE5VgV50GipK6qrDd5viCwdSnAqnhpyMVlV7VT8suWp23kcrZWa2l0BA qFbk69uCk7f8g== Date: Thu, 18 Sep 2025 09:51:07 -0600 (MDT) From: Paul Walmsley To: Simon Schuster cc: Dinh Nguyen , Christian Brauner , Arnd Bergmann , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Kees Cook , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Guo Ren , Oleg Nesterov , Jens Axboe , Alexander Viro , Jan Kara , Tejun Heo , Johannes Weiner , =?ISO-8859-15?Q?Michal_Koutn=FD?= , Paul Moore , Serge Hallyn , James Morris , "Serge E. Hallyn" , Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Masami Hiramatsu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Mathieu Desnoyers , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Johansen , Stephen Smalley , Ondrej Mosnacek , Kentaro Takeda , Tetsuo Handa , Richard Henderson , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Brian Cain , Huacai Chen , WANG Xuerui , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Andreas Larsson , Richard Weinberger , Anton Ivanov , Johannes Berg , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Chris Zankel , Max Filippov , 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 3/4] arch: copy_thread: pass clone_flags as u64 In-Reply-To: <20250901-nios2-implement-clone3-v2-3-53fcf5577d57@siemens-energy.com> Message-ID: References: <20250901-nios2-implement-clone3-v2-0-53fcf5577d57@siemens-energy.com> <20250901-nios2-implement-clone3-v2-3-53fcf5577d57@siemens-energy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250918_085118_875407_B5D3F9DC X-CRM114-Status: GOOD ( 16.54 ) X-Mailman-Approved-At: Mon, 06 Oct 2025 05:16:29 -0700 X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org On Mon, 1 Sep 2025, Simon Schuster via B4 Relay wrote: > From: Simon Schuster > > 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 the copy_thread > function that is called from copy_process 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 Acked-by: Paul Walmsley # for RISC-V Thanks! - Paul