From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (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 BA9FB1EA84 for ; Fri, 2 Jan 2026 10:31:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767349916; cv=none; b=G3OeJuL/LDG55U23FBcB5vwGirpWxMFmZTscbxy8vvb63wTbgf/m3m+ugFy3wlNWFbvQobAHs5+VgHcQ7DFBwZUTaIglMNOBLc11jWltdBeydCnYiGgLiCH6pU3elJt+F8c9H6fyeSAyQNybruU//jVs3g/npJZycWN9cc/Baa4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767349916; c=relaxed/simple; bh=1KewF//gMHx9ffoIJaCbkBRSiv5eX0YhtfGfXCoHinw=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=HpVemhyPDdegK/+LtqxFedTDQ6nk//e/eL7P1l9Cf8jrqRy1Rn0GYHAwgo10ZgTUs02PNXhwSxskUaGEPbdOiUuC0VEpqVxEUFierlz8WXYNr8gSVn63E/95m0v1DytXAmHd6H/23GFV2SRv3P9ROHL16x34KjubrShUYyWtWwM= 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=jGFXaUJb; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=JRHc/9SW; arc=none smtp.client-ip=103.168.172.149 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="jGFXaUJb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JRHc/9SW" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id DDCD9EC009B; Fri, 2 Jan 2026 05:31:52 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Fri, 02 Jan 2026 05:31:52 -0500 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=1767349912; x=1767436312; bh=cUMtD88AdGpX8s4OOc8iMm1yt6OaFYCq7BaaMzDEg90=; b= jGFXaUJbwqcPteJhWuVBhXcv8RAwsMWr32964lXm1uY1QLhYOA8cWftHHKf43yhj yXc+vaWfGTVRNpqbQpdBle65CXYc+Rtt6sJG5rYKxulQ82gWDsMPHwquMWO7my5h uC7IL9D/BCilZov4t+klsW8WXI+rZbyhQVrvWiYStw7Tgdl2mOfl/ajmCe50kPxm msChMrujypgo4hkHo1hkK4dvNVp0miW+2hJH4PKPGgvj59TiAq2Lv9hnkce9mkBh 2RV2yPiHOMhWZgEdC/Izjz+qaZQDzfgNYCZIRekQ/q+jf6XhWqMYoOI5QYf+0+l0 naxmV4DL9+zUlMZeBOZH+g== 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=fm2; t=1767349912; x= 1767436312; bh=cUMtD88AdGpX8s4OOc8iMm1yt6OaFYCq7BaaMzDEg90=; b=J RHc/9SWZSN5rsHd9oSi0N7Q8f981/MO8Y9eTxO552Y1Sf+svMNaqRDmAJzDYjKfE aiudOE4QIiCaKNzasBQ5JD+PrcdoY4m6kUuh5xAbJENz4qBtTh3zeFTU/HuGdSS/ al7DWk101ftf5p9siYkiBBzFVP8RfKCI3oFnFn285u61gHwSGNh5pckSxFgawUVg blEsg5CaoVO9UMQzTDDKG0Wh/WizA3lpCw0ulPjM4yyZmR7oYcNJRnqc7oyxq1ll JNlo+X/zujYfhm5V/ZYd0cJNOpiVi0UzxL5FPf24a/TEGySsizfIZkawQlMWbV8J WRSMp/a2PoB2rv9mR2BXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdekkeegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdetrhhnugcu uegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtthgvrh hnpedvhfdvkeeuudevfffftefgvdevfedvleehvddvgeejvdefhedtgeegveehfeeljeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnug esrghrnhgusgdruggvpdhnsggprhgtphhtthhopedufedpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepsghpsegrlhhivghnkedruggvpdhrtghpthhtoheplhhinhhugiesrg hrmhhlihhnuhigrdhorhhgrdhukhdprhgtphhtthhopeguihhnghhuhigvnheskhgvrhhn vghlrdhorhhgpdhrtghpthhtohepvhhguhhpthgrsehkvghrnhgvlhdrohhrghdprhgtph htthhopeigkeeisehkvghrnhgvlhdrohhrghdprhgtphhtthhopehtghhlgieslhhinhhu thhrohhnihigrdguvgdprhgtphhtthhopehthhhomhgrshdrfigvihhsshhstghhuhhhse hlihhnuhhtrhhonhhigidruggvpdhrtghpthhtohepuggrvhgvrdhhrghnshgvnheslhhi nhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqdgrrhhmqdhkvghrnh gvlheslhhishhtshdrihhnfhhrrgguvggrugdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0607E700065; Fri, 2 Jan 2026 05:31:52 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AbWOAV9uh8L3 Date: Fri, 02 Jan 2026 11:31:31 +0100 From: "Arnd Bergmann" To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: "Vineet Gupta" , "Russell King" , "Dinh Nguyen" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , x86@kernel.org, "H. Peter Anvin" , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-Id: <0ae2688a-5a22-405b-adaf-9b5ad712b245@app.fastmail.com> In-Reply-To: <20260102103913-0420048c-d2f3-431b-8bbb-5962a1553aab@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> <20251230-headers_install-config-leak-v1-1-efba5c58073d@linutronix.de> <9ecebf46-c230-4074-9001-7ba9d65634f1@app.fastmail.com> <20260102085226-c6463fff-042d-4654-8721-27e995f06c7c@linutronix.de> <20260102103913-0420048c-d2f3-431b-8bbb-5962a1553aab@linutronix.de> Subject: Re: [PATCH 1/5] ARC: uapi: Stop leaking CONFIG_ARC_HAS_SWAPE reference to userspace Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Jan 2, 2026, at 10:40, Thomas Wei=C3=9Fschuh wrote: > On Fri, Jan 02, 2026 at 08:55:10AM +0100, Thomas Wei=C3=9Fschuh wrote: >> On Tue, Dec 30, 2025 at 10:23:08PM +0100, Arnd Bergmann wrote: >> > On Tue, Dec 30, 2025, at 08:10, Thomas Wei=C3=9Fschuh wrote: >> > > UAPI headers are not supposed to leak references to kconfig symbo= ls. >> > > These won't be set when building userspace. Hide the kconfig refe= rence >> > > behind 'if defined(__KERNEL__)', so it will be stripped by >> > > headers_install.sh. The result for userspace will be the same, bu= t the >> > > exception in headers_install.sh can also be removed. >> > > >> > > Signed-off-by: Thomas Wei=C3=9Fschuh >> >=20 >> > Acked-by: Arnd Bergmann >> >=20 >> > Same as for the nios2 version, I think the nicer solution would >> > be to use the asm-generic header for uapi and move this one >> > to arch/arc/include/asm/swab.h for kernel-internal use. >>=20 >> Ack. (...) > > This doesn't seem to be true. ARC does have a custom C implementation = which > according to its comment is supposed to be more efficient than the gen= eric one. > So I'd like to keep this as-is. Right, though I see that since 767a697e7576 ("ARC: retire ARC750 support"), all supported CPUs do have the 'swape' instruction, so I suppose we could just as well remove the CONFIG_ARC_HAS_SWAPE symbol and just keep the inline asm version. I also checked that for -mcpu=3Darchs, the compiler uses swape in __builtin_bswap32(), but it seems that there is no mcpu=3Darc770 option, and building for arc700 instead gets us the external library call, which is likely worse than swape. Arnd