From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (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 7E9761DFE22 for ; Tue, 30 Dec 2025 21:23:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767129812; cv=none; b=lrAwHG9FVfMIM3nUGWUMa5VcHRlsMC5rkxNshpk3mJTUrapS2IvzBsrZtjdkW46I9oDsEcoz3CLt1wB0SQRdt+rbPHh8lckgA/kTonEac8QdACtOb4dZJjx2bo3SYz++J+0K+GGfBaXryHKppS2Zx0bCTfsHdJxtFFiHpqylejs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767129812; c=relaxed/simple; bh=8FTdMkm/rFzzy3Wx/feZcj9SzyKiZPt09X26T/qFRHQ=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=Dvg+sWOZ1rU6vySUykhHgFIuPi+hMnsS8scVUaQ1Sc9Z2cK75qJPgdM3uHyV/T4ryj/60se3QoyHm0+CvBsac5s1o7A8fs5vvEbl4Md8VrkSXCUThUEIvIZ3p72C/JlOppUx2SBxi0T+ij11IHOas1lnYzy00ZK4staF9VaFydk= 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=rnvn1xMK; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=JD5JbQPe; arc=none smtp.client-ip=103.168.172.151 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="rnvn1xMK"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JD5JbQPe" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id C3BA1EC007A; Tue, 30 Dec 2025 16:23:29 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Tue, 30 Dec 2025 16:23:29 -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=1767129809; x=1767216209; bh=j0ZsZ80gOyv9K5AsBUtbpmXPA9O1Zk/t4cM6p32TmUo=; b= rnvn1xMKaQw4EdxITy3EP1d+8jRLdA4s9PRvBwrOBFDr+1jF7IanPXIOZfgJfT4m V23gp+u2JCC4ziMlXai5uamH/uVVxZsOFbVivW9X1ej72NFjGx9jaCjMplFtqL0i 40p+IGYu39YHpp7N71BxMHptD6IOM1jqekEDfxTBfaXiXQa3VZ4HLY/U4W017mdM 4fPeZS+b3YcCSy68K0hDFSm6TuH6jKsy6WtxgYMmQDMxp8okUWTtTuoPjwM6BiuT /OP+qbN9JYCvQCTtETqgIgwjGh3V7U9lTNBSr85sziQIKr6oRHMGCbQ82y2qh2vI WzFOCmt6b+q+XAkBD0iIKw== 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=1767129809; x= 1767216209; bh=j0ZsZ80gOyv9K5AsBUtbpmXPA9O1Zk/t4cM6p32TmUo=; b=J D5JbQPe0ckdBTMpnpR3T7198WmY0gBhwlbcaJ61RbxGrsJ13kn36kor1V0gYl5UL D52vUXzKyiyxBd0MgkD7f6n/c1sEJYWUV4ZBggNHxaC5UYi6lmeLB5aOEp2+FXha wCzGNc5DbsShatQd/JSEAbkLMTn12Zjkdt9QUdQGI7DMVfldcMsOS+i8QPborpWe 7seC+ouwwXrTUAWW3gE8dK6RpJqXkGjmT/chxrk0CRGqn2IQ1uOaTf3yDqpJ2w06 X6+GJe4QKQCdlwkYq+5ss/SOUQUaDwuhfoap7soUE/XjOLw70Ida6lA/3rTQKZpe U3fCv2eohzdOHqwJRWVjw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdekuddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdetrhhnugcu uegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtthgvrh hnpedvhfdvkeeuudevfffftefgvdevfedvleehvddvgeejvdefhedtgeegveehfeeljeen ucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnug 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 6576E700065; Tue, 30 Dec 2025 16:23:29 -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: Tue, 30 Dec 2025 22:23:08 +0100 From: "Arnd Bergmann" To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , "Vineet Gupta" , "Russell King" , "Dinh Nguyen" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , x86@kernel.org, "H. Peter Anvin" Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-Id: <9ecebf46-c230-4074-9001-7ba9d65634f1@app.fastmail.com> In-Reply-To: <20251230-headers_install-config-leak-v1-1-efba5c58073d@linutronix.de> References: <20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de> <20251230-headers_install-config-leak-v1-1-efba5c58073d@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 Tue, Dec 30, 2025, at 08:10, Thomas Wei=C3=9Fschuh wrote: > UAPI headers are not supposed to leak references to kconfig symbols. > These won't be set when building userspace. Hide the kconfig reference > behind 'if defined(__KERNEL__)', so it will be stripped by > headers_install.sh. The result for userspace will be the same, but the > exception in headers_install.sh can also be removed. > > Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Arnd Bergmann 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. In theory, using 'select ARCH_USE_BUILTIN_BSWAP' in Kconfig should let the compiler pick the best swap instruction, which would be even less code, but I'm not sure if there was a reason that nios2 and arc don't already do this. Arnd