From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-b2-smtp.messagingengine.com (flow-b2-smtp.messagingengine.com [202.12.124.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E7FE1C84CB; Mon, 1 Sep 2025 13:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.137 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756733510; cv=none; b=nJM4MKp75pV8uUafCX9/20BLbph7GXFZWzwx0Xky7V7H4mjUFkBLGOe9+HZ6MXmSi3xb6tFQrAjSw1xwNk/EN0Ob8OvTfNdaikQ5CuzH81eQigaoqNKwiVVKCVtuJ9/yGtWwq9jNVkA0SECuf1Ik4/9jaqBmHkablw9w+ma2re4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756733510; c=relaxed/simple; bh=Eznu89d4Wi9DxarExeHtKpzVjwvcq68i7OTy3S868gA=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=t3k4lSHyllXzWf462pGHVJIwMlt0LFQRFeONbsEASjZ/RAescQsV3kanuYd7A4wsIg7w3dz66mc9v3gQnIbbNrB6FiGjgSy20p4KbYZdlnBBH4HwJPceNe3cQOFyg5RhzgB1mGQ2Ay2f1DsIof4slTi3a9zLMk0G2UVH1rivHyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=HJOFeLbK; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=SgrxJdEp; arc=none smtp.client-ip=202.12.124.137 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="HJOFeLbK"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="SgrxJdEp" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailflow.stl.internal (Postfix) with ESMTP id DB5981300C62; Mon, 1 Sep 2025 09:31:46 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-05.internal (MEProxy); Mon, 01 Sep 2025 09:31:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1756733506; x=1756740706; bh=Eznu89d4Wi9DxarExeHtKpzVjwvcq68i7OTy3S868gA=; b= HJOFeLbKHaYEFcpujtYi0UQgoIXOL1xP4OwwynCD84swzMtLipUsunnbT4hVqPEN wVE41qx2dhs0FBl9u7JPuVJhHifoAxjGT0sJrob25NGhOnKXoveJaBFJqW4nvgog halZU6spZuFP4kbS8kc26sPVBVsv74LttHLcedp085AaoTT4gBVLCmbtd+KXgDRJ eq/kSjKLy3gTJzFeYJ4ziz+zY2pF0DOCuVPDCxmJHTv0zZaXMuetiQ92eXeOcc2F 7k+jMiBLq8BEp997KeUtRmTuyEAQWlQImm59MK8krOpJLrkQ/PRATyIs4ZDTjD9d UOMihPRQfY4LUHkKBvJ4fg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1756733506; x= 1756740706; bh=Eznu89d4Wi9DxarExeHtKpzVjwvcq68i7OTy3S868gA=; b=S grxJdEpeZNejb8yQpBRVyN+Ths0LzXhKDaDBWou1JQCaPeSjVvWd9/YmPtm77slz 0cz2VUn0flJuQpLgACGwCjuYr16Jj88RIj++Q7EJ5BZSfqGZKgr0kLHoehog9vlO L1PVI0bfQGloEyCj/gXxGtq1tskacB4mM9Qdq6CYs7C5l1Owjnxvia7IhF2yYeVD tFHw9NizDJH9T7aNo7YjjudTZwCuL4FTybBDwWInmhz/kF/lFSj0Iuz0s1u5BHRl 2/eSCTaJEfU02XDVO5TgHwhPkp6DB8xio2jzb/t45jROB5g0jH8NPrWXN00PJms4 BnrmLNG3JYC8werAD4U+Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduledvvdekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepvdehpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehvsggrsghkrgesshhushgvrdgtiidprhgtphhtthhopehmghhorh hmrghnsehsuhhsvgdruggvpdhrtghpthhtohephihsrghtohesuhhsvghrshdrshhouhhr tggvfhhorhhgvgdrjhhppdhrtghpthhtoheptghgrhhouhhpshesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrlhhphhgrsehvghgvrhdrkhgvrhhn vghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqsghlohgtkhesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgtshhkhiesvhhgvghrrdhkvghrnhgv lhdrohhrghdprhgtphhtthhopehlihhnuhigqdhfshguvghvvghlsehvghgvrhdrkhgvrh hnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqhhgvgigrghhonhesvhhgvghrrdhk vghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 68A5D700068; Mon, 1 Sep 2025 09:31:40 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A1XJ5FccVF4B Date: Mon, 01 Sep 2025 15:30:20 +0200 From: "Arnd Bergmann" To: "schuster.simon@siemens-energy.com" , "Dinh Nguyen" , "Christian Brauner" , "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" , "Benjamin Segall" , "Mel Gorman" , "Valentin Schneider" , "Kees Cook" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , guoren , "Oleg Nesterov" , "Jens Axboe" , "Alexander Viro" , "Jan Kara" , "Tejun Heo" , "Johannes Weiner" , =?UTF-8?Q?Michal_Koutn=C3=BD?= , "Paul Moore" , "Serge Hallyn" , "James Morris" , "Serge E. Hallyn" , "Anna-Maria Gleixner" , "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" 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 , 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 Message-Id: <78ca3a1f-2ed9-4450-95ef-d690cf4aace1@app.fastmail.com> In-Reply-To: <20250901-nios2-implement-clone3-v2-3-53fcf5577d57@siemens-energy.com> References: <20250901-nios2-implement-clone3-v2-0-53fcf5577d57@siemens-energy.com> <20250901-nios2-implement-clone3-v2-3-53fcf5577d57@siemens-energy.com> Subject: Re: [PATCH v2 3/4] arch: copy_thread: pass clone_flags as u64 Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, Sep 1, 2025, at 15:09, 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 Reviewed-by: Arnd Bergmann