From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a7-smtp.messagingengine.com (flow-a7-smtp.messagingengine.com [103.168.172.142]) (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 26A453C8702; Mon, 30 Mar 2026 12:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774872855; cv=none; b=XX+/hMvFr5yLcUTIxJoA/OqaNNsVG8/FiUE6bAe/ssK6F3RO6cQMYXPc+h9P24tKDgy9K5PnSn8+MzZ9JGHWFBpuc65TRsImgRdJngHrqEfvNjq0aHcNtVHMyK4YOhtfGITiv/pkZhbCrL/D80m0yV5+yWVjGFvtXUJFSSn3F8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774872855; c=relaxed/simple; bh=CAJSu5ZRK+rJRAb/RO4Om7wfZ1iop17YwUEs1+VlH7g=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=btmhO2NWhngveXYho0lv3e1eMV/zMI0tgZ7DFWot9VWV7tKWtxZjNrN3md/ucHXfCl1biX4S9WqgJSCvghu5lYJReHJTih96ENBu1Z+I7NnXPQgeIidcEuzQOuwF/Zzn+/qfHRQgJzzK3pfJj9C/VRy/svWRNZ+/MHLWZhORUzs= 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=P7DKvh6S; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=CSeh2nn2; arc=none smtp.client-ip=103.168.172.142 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="P7DKvh6S"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="CSeh2nn2" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailflow.phl.internal (Postfix) with ESMTP id 4980C138039D; Mon, 30 Mar 2026 08:14:13 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Mon, 30 Mar 2026 08:14:13 -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=fm1; t=1774872853; x=1774880053; bh=vdwlRbDywCj3yrAkJeO/0XtIpUCTfBtP5P3/vuBUn5I=; b= P7DKvh6SIP+yQ8R66Ax+mey6RCWMDGbu4urWvNvvCMjfcDeHvP0YiffH8SShmDkd 4SxSv1o1EbjRGHmRrlm0eWr328vgn2tjR6V+Gej8mrtW8KMitkpBhH7fKQTqMUBq UnpYAWvx4osHofaLhzhsIRepEi1nUvMMzNgVSk0sD/Ei6cDVlA11wm4Rub3AAKCc 1tzDxf7l7ufNkT+LumZKXu6VRm+ToFvfRYajH65x7pzc7sWSWSPkMhv9ZK/Qy3rp /uzHTYvtAjIYYdhWcpAQxxPhQ3Jxz8kr3ZhX8NzwI5ZeG1VGwSKCgw3bOaza0kko dfZ0O+egx6t9Pv2p7yHV9w== 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=1774872853; x= 1774880053; bh=vdwlRbDywCj3yrAkJeO/0XtIpUCTfBtP5P3/vuBUn5I=; b=C Seh2nn2JXXwZUw8f8LJddm9InB6NsowQA5aApYI3XFBOHhdPH2YMshSxql9GNxcv epUWGITb/aiXA9dXvDZKu2tQmXvp6kzG+Q0VFvADjnjyi/jWmVSLl7fdsDwQbjNE EE0kp//9EBPsRdCUqZjPzUnE53xY2oLaQYKHskst0s3L6xM3xCOskJaFRsHNaMwv KyVn9G9r8jNTv8cPTbukA4AXrspuzyS5l3edvXr/ABm/zV/ViwiiLSWVR5cK0Eq0 CXOUAhpyf2PRQfa3aZ/yMCiA7G0lFNvlYGXsegzIKFPBrqzJYWe78jbFsBA7FdP8 yJ4OV4ahzrQ9XRxoNJgWA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeffeekleehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepgedupdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehjrghmihgvrdgtuhhnlhhifhhfvgesrghrmhdrtghomhdprhgtph htthhopegtrghtrghlihhnrdhmrghrihhnrghssegrrhhmrdgtohhmpdhrtghpthhtohep mhgrrhhkrdhruhhtlhgrnhgusegrrhhmrdgtohhmpdhrtghpthhtoheplhhinhhugiesrg hrmhhlihhnuhigrdhorhhgrdhukhdprhgtphhtthhopegrnhhtohhnrdhivhgrnhhovhes tggrmhgsrhhiughgvghgrhgvhihsrdgtohhmpdhrtghpthhtohepuggrvhhiugesuggrvh hiughgohifrdhnvghtpdhrtghpthhtohepghgrrhihsehgrghrhihguhhordhnvghtpdhr tghpthhtohepsghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmpdhrtghpthhtoheptg hhrhhishhirdhstghhrhgvfhhlsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 7D351700065; Mon, 30 Mar 2026 08:14:11 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AUJnWW6OA6Vc Date: Mon, 30 Mar 2026 14:13:49 +0200 From: "Arnd Bergmann" To: "Geert Uytterhoeven" Cc: "Russell King" , "Christian Schrefl" , "Miguel Ojeda" , "Alice Ryhl" , "Ard Biesheuvel" , "Jamie Cunliffe" , "Will Deacon" , "Catalin Marinas" , "Miguel Ojeda" , "Andreas Hindborg" , acourbot@nvidia.com, "Andrew Morton" , "Anton Ivanov" , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , "Boqun Feng" , "Danilo Krummrich" , "David Gow" , "Gary Guo" , "Johannes Berg" , "Justin Stitt" , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-um@lists.infradead.org, llvm@lists.linux.dev, "Benno Lossin" , "Mark Rutland" , mmaurer@google.com, "Bill Wendling" , "Nathan Chancellor" , "Nick Desaulniers" , "Nicolas Schier" , "Nicolas Schier" , "Peter Zijlstra" , "Richard Weinberger" , rust-for-linux@vger.kernel.org, "Trevor Gross" , "Uladzislau Rezki (Sony)" , "John Paul Adrian Glaubitz" Message-Id: <26d690ab-d68f-401f-ae2d-7aa4de081bce@app.fastmail.com> In-Reply-To: References: <20260322192159.88138-1-ojeda@kernel.org> <20260323000327.111235-1-ojeda@kernel.org> <9cf5a94c-0f37-446c-b63d-ddac5674d220@gmail.com> <641592e3-2354-4238-9eb8-a1f5c2a13126@app.fastmail.com> <93439e91-cf81-477b-b880-a813bb01ad7c@app.fastmail.com> Subject: Re: [PATCH v2 0/3] Inline helpers into Rust without full LTO Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, Mar 30, 2026, at 14:03, Geert Uytterhoeven wrote: > On Fri, 27 Mar 2026 at 10:02, Arnd Bergmann wrote: >> >> echo 'struct { short a : 3; short b :15; short c :14; } x; int y = sizeof(x);' | m68k-linux-gcc -xc - -S -o- >> >> this produces '4' on m68k-linux-gcc, but '6' everywhere else. I originally >> thought this was related to this 2009 change in both compilers > > Oh, now I remember. AFAIK (holding wood and a rabbit leg) we don't > have any bitfield members spanning multiple base type instances in > the kernel. There are certainly very few of those, but two example I found in UAPI are struct dvd_layer { __u8 book_version : 4; __u8 book_type : 4; __u8 min_rate : 4; __u8 disc_size : 4; __u8 layer_type : 4; __u8 track_path : 1; __u8 nlayers : 2; __u8 track_density : 4; // crosses u8 boundary __u8 linear_density : 4; __u8 bca : 1; __u32 start_sector; __u32 end_sector; __u32 end_sector_l0; }; struct usb_raw_ep_caps { __u32 type_control : 1; __u32 type_iso : 1; __u32 type_bulk : 1; __u32 type_int : 1; __u32 dir_in : 1; __u32 dir_out : 1; // 2 bit padding on m68k, 26 bits elsewhere }; Arnd