From nobody Sun Feb 8 14:57:01 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 7CF301A3160; Tue, 23 Dec 2025 07:04:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473460; cv=none; b=QeARj0z3lKGDGyOYm7LVNmuSMvoV3t0a1Fywz9kzKyAoDxy5KHpYApn9Qr1iu97Yvxi6PhMhibRHHVMRPR+3sTBihkFREwGPTt//pDQ2N52C5QPpbGk6HUaRiq8M00GWEvLxeQ+A6D7KzXTW0aR5e3MAwjgJQaZnShIVaasI0aU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473460; c=relaxed/simple; bh=1+NW29yfruV/Ec4g2DSnXGrgqnqMbnt64fDn+nZOeTk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e4i0OcUpbC/uajvcW1/8BBdDN+kGuPSMDKNjGuIK3Fv67TUDPekBOldSMvtKT9hGpzl5hpNmrVkuhDWtlL0yhGPYwDbJAYhmpaqKFpUo9Nb+mGm2JZbc+9mTJq4KA3aONNVrF6qK2To3clt2k2zrCWEnkLaXEaNJmArcTqOxgL0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=y5d2ODmY; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PAarSx9P; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="y5d2ODmY"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PAarSx9P" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1766473457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2rffiepzzuxtGAonU0CVKOURwqZQ/L+i26P6vQ8Toys=; b=y5d2ODmYLOQSw74nGm0yKAjV1xDOKn97fKvqTRkg/fYZSqx+Pt7weBtox1kYHPHEZsF/wT dLlVvUkvAiOqXsr603FcbdR9c5yubPEV+mwefEKgFNkqTQJourWP3/A1pY6hUBdty/f45I jVOxxClYbYbb6v/a9AVc8mD3EyOp2nLP0GdoKXaFEXtg+Msjyb6m2wFpBY7jL8nFuOXkSu 5DrMyQy7NnibVJWtnj5u1N9FIxXQXnFhoGeQps+yMAW6oGRIlfCMWffoWKwAh6/MruNIau 6GHeEf74crsqQlS66WjyBSNuqlq1DHiyDS0mA5nCATOfE6IkVNYgpXM6AG77yA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1766473457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2rffiepzzuxtGAonU0CVKOURwqZQ/L+i26P6vQ8Toys=; b=PAarSx9PZOdqyna5ShRV7FKzAE0SaLEDoUVEeQHv363WfuG7K6IUVfROWhJxtbs84yanlR 1DbUhe2svHkl1vCw== Date: Tue, 23 Dec 2025 08:04:08 +0100 Subject: [PATCH 1/5] kbuild: uapi: validate that headers do not use libc Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251223-uapi-nostdinc-v1-1-d91545d794f7@linutronix.de> References: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> In-Reply-To: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> To: Nathan Chancellor , Nicolas Schier , Brian Cain Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-hexagon@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1766473456; l=3680; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=1+NW29yfruV/Ec4g2DSnXGrgqnqMbnt64fDn+nZOeTk=; b=SrUNwBhWtiIv0gEhhP+5+eoJTtOhDvLyZ8G5AVzgl6JsNzzkLZioH+zGZyAQK4XOqnEL6YJmd nCp5aSokohdDqN/WP2bJ1e0JGlhAgg6z89Shv0r90afmkSBDMbA8xhI X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The UAPI headers should be self-contained. That means they should not use other headers from libc. Currently this is not enforced and various dependencies have crept in. Add a check to make sure no new ones are added. Signed-off-by: Thomas Wei=C3=9Fschuh --- This currently depends on a fix for linux/fcntl.h: https://lore.kernel.org/lkml/20251203-uapi-fcntl-v1-1-490c67bf3425@linutron= ix.de/ --- usr/include/Makefile | 77 ++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 77 insertions(+) diff --git a/usr/include/Makefile b/usr/include/Makefile index d8a508042fed..a9a861ec8702 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -68,12 +68,89 @@ endif # asm-generic/*.h is used by asm/*.h, and should not be included directly no-header-test +=3D asm-generic/% =20 +# The following are using libc header and types. +# +# Do not add a new header to the list without legitimate reason. +# Please consider to fix the header first. +# +# Sorted alphabetically. +uses-libc +=3D linux/a.out.h +uses-libc +=3D linux/atmbr2684.h +uses-libc +=3D linux/auto_dev-ioctl.h +uses-libc +=3D linux/auto_fs.h +uses-libc +=3D linux/auto_fs4.h +uses-libc +=3D linux/btrfs_tree.h +uses-libc +=3D linux/cec-funcs.h +uses-libc +=3D linux/cec.h +uses-libc +=3D linux/dvb/dmx.h +uses-libc +=3D linux/dvb/video.h +uses-libc +=3D linux/ethtool.h +uses-libc +=3D linux/ethtool_netlink.h +uses-libc +=3D linux/fuse.h +uses-libc +=3D linux/gsmmux.h +uses-libc +=3D linux/icmp.h +uses-libc +=3D linux/idxd.h +uses-libc +=3D linux/if.h +uses-libc +=3D linux/if_arp.h +uses-libc +=3D linux/if_bonding.h +uses-libc +=3D linux/if_pppox.h +uses-libc +=3D linux/if_tunnel.h +uses-libc +=3D linux/input.h +uses-libc +=3D linux/ip6_tunnel.h +uses-libc +=3D linux/joystick.h +uses-libc +=3D linux/llc.h +uses-libc +=3D linux/mctp.h +uses-libc +=3D linux/mdio.h +uses-libc +=3D linux/mii.h +uses-libc +=3D linux/mptcp.h +uses-libc +=3D linux/netdevice.h +uses-libc +=3D linux/netfilter/xt_RATEEST.h +uses-libc +=3D linux/netfilter/xt_hashlimit.h +uses-libc +=3D linux/netfilter/xt_physdev.h +uses-libc +=3D linux/netfilter/xt_rateest.h +uses-libc +=3D linux/netfilter_arp/arp_tables.h +uses-libc +=3D linux/netfilter_arp/arpt_mangle.h +uses-libc +=3D linux/netfilter_bridge.h +uses-libc +=3D linux/netfilter_bridge/ebtables.h +uses-libc +=3D linux/netfilter_ipv4.h +uses-libc +=3D linux/netfilter_ipv4/ip_tables.h +uses-libc +=3D linux/netfilter_ipv6.h +uses-libc +=3D linux/netfilter_ipv6/ip6_tables.h +uses-libc +=3D linux/route.h +uses-libc +=3D linux/shm.h +uses-libc +=3D linux/soundcard.h +uses-libc +=3D linux/string.h +uses-libc +=3D linux/tipc_config.h +uses-libc +=3D linux/uhid.h +uses-libc +=3D linux/uinput.h +uses-libc +=3D linux/vhost.h +uses-libc +=3D linux/vhost_types.h +uses-libc +=3D linux/virtio_ring.h +uses-libc +=3D linux/wireless.h +uses-libc +=3D regulator/regulator.h +uses-libc +=3D scsi/fc/fc_els.h + +ifeq ($(SRCARCH),hexagon) +uses-libc +=3D asm/sigcontext.h +endif + +ifeq ($(SRCARCH),nios2) +uses-libc +=3D asm/ptrace.h +uses-libc +=3D linux/bpf_perf_event.h +endif + +ifeq ($(SRCARCH),s390) +uses-libc +=3D asm/chpid.h +uses-libc +=3D asm/chsc.h +endif + always-y :=3D $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '= *.h' 2>/dev/null)) =20 # Include the header twice to detect missing include guard. quiet_cmd_hdrtest =3D HDRTEST $< cmd_hdrtest =3D \ $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \ + $(if $(filter-out $(uses-libc), $*.h), -nostdinc) \ $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \ $(PERL) $(src)/headers_check.pl $(obj) $<; \ touch $@ --=20 2.52.0 From nobody Sun Feb 8 14:57:01 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 58DC52C11C4; Tue, 23 Dec 2025 07:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473460; cv=none; b=V6mdup4ihh9mKykt/F+R8/6zR29ZrpvvhxzrpSD2o6HhgixWef4XoqH85KQguN3TChqokj/IN3Mhbdz3K7DSMt+T0xOQyMgMFYvBxPPN01YUxQ5nwCoR1h3XuQPJikg/MOnRaQ0AQykc/XPTcdIgrgahZJQAqUZsUTflscsxVII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473460; c=relaxed/simple; bh=K/unO6+pepLfO2osiSqrw9BSyrlWWQpEI/4E70KxQeQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JDaXRKHWJYFDe32ZeglTFr10yf0SPG3PT3xCoKburbPoDc2NuL48a5F346FsXVX8+m8Hfa2iqyL5XvHjHNXrt4lboBWDJNMWz+QyQExoSB9vbAhoFTJa27uxP8mkNhsWC8ogxsDT5r5vx6xppbIrP1fIX1uiFBHMMMzla83mShM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hfGumtgB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UGsKy55S; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hfGumtgB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UGsKy55S" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1766473457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sBI5m5fOsqa8GvlEA5EmwGOkzB7rIX+/Or7sr4YAcC0=; b=hfGumtgBCoi1WLF9yTF1C+e+C8Gv4tvggmOKFWDX2YspILxifRcCPR563zJbqjdl4kIHb/ /ZP4w5OjsvAYuruEcqDHWS4mg9quC3A383nyvUr5q6SwoGgiMgyBjS5Cdf3Hwh1AAL/SKC +kHk6MzHu1atgqXHOzTdtaclxIlatxiLxsb2Cy1qPXc2LGp8WLZMtBd7uBa3Dt5bJO9DMb EqmHQPRLMof26/R7VG5nEC6AumcIywo9yXT6fowfhXD2I12H1cGKbpcM2egoxQbuymJG0j PAfxxzYRRF+fupsWhGYG7YbmfFfwsqrJc02pgeJtr94kPXvrsAtsXNc9QFyO3w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1766473457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sBI5m5fOsqa8GvlEA5EmwGOkzB7rIX+/Or7sr4YAcC0=; b=UGsKy55ScshsbVsf9lCtZvkLLreMQ4X0HQtrg5TeGne7VhOZdpAuQ8SLXO2xqnjuhrZ6fv ZZuaBL2aMOhDh2DQ== Date: Tue, 23 Dec 2025 08:04:09 +0100 Subject: [PATCH 2/5] hexagon: Drop invalid UAPI header asm/signal.h Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251223-uapi-nostdinc-v1-2-d91545d794f7@linutronix.de> References: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> In-Reply-To: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> To: Nathan Chancellor , Nicolas Schier , Brian Cain Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-hexagon@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1766473456; l=824; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=K/unO6+pepLfO2osiSqrw9BSyrlWWQpEI/4E70KxQeQ=; b=3hkGqlC6iUOHLTANsMQf68quxWyCeyKm+HposaWJEO5Rz0fsn5FTMf6MMTuovcMaqtTHNPRu3 ONBwytC248vD0LHhlf8MOZQks6gk9TbzFzZYHUDQW04mCZzGr8I+Yl3 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= This UAPI header contains declarations of internal kernel symbols. Such declarations are invalid. Normally headers_check.pl would report an error, but apparently its dependency on CC_CAN_LINK prevent its execution on hexagon so far. As the header does not expose any additional UAPI, just make it a regular internal kernel header. asm-generic/signal.h will be used for the UAPI automatically, the same as before. Signed-off-by: Thomas Wei=C3=9Fschuh --- arch/hexagon/include/{uapi =3D> }/asm/signal.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/arch/hexagon/include/uapi/asm/signal.h b/arch/hexagon/include/= asm/signal.h similarity index 100% rename from arch/hexagon/include/uapi/asm/signal.h rename to arch/hexagon/include/asm/signal.h --=20 2.52.0 From nobody Sun Feb 8 14:57:01 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 C832E3090EB; Tue, 23 Dec 2025 07:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473461; cv=none; b=aOjlDEEIz6mWTwaKqhbJHq+7dImbTRv7yyEfKPnAOPrztEs09yMGC5/IWgJxERyHamYzs8ZFMwRSY48QtcLXDQe/hzlnMyKTFpSJ3KnU5xIcn5b4FRpJhhH95cCnU5nEK7qtxWI/VMUoPVxGVwQ9+khDCfZMSyseWlgbxvxLiLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473461; c=relaxed/simple; bh=Zm7fWvYFAWJNdv0m1Ct8W4h4ycRsgtbyuhmhof7tf4I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MxptkwzsYtcO/K0G3Qb61/N/2GiKYo58iKcOwiSdUH6oPKjp0wOMaGi6ysg0FHts7/WzidIfulXhN7KUwKRyzUBmw0uHsQy0TCMid3HEToN+4i1LT2N0NUg7dSCPHUilPLT9GB6S+whmropYi2YotrC2jnDslVsS4OJJ2u/XPx4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VwBVtD3t; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pl5JU7N3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VwBVtD3t"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pl5JU7N3" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1766473458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hHuvlCnwOf0FSCs0IK4C5Ex5NQu3u4/V//8wm3JYWt0=; b=VwBVtD3tTRMlm0/bdmrRxNtCOEqDC329gYeA4cAE5f7eM+DiCaK9juKzEUCf8GMTbwbihD qmYBghcgtmS8GBojY4DgfKd2yNNXo9upqwV1tVTjvrQfF9cFSK4YRs6Snz+fG9BlCWK1YH NJQql7xFoCiEwqAd76dhg5UX+gA6f+i2ZqF1pzaAIXe6zToYhb96xywQF7xfDA3JkwYERL PZcZGNwM/8/cqJWOmvG7dp57CRPo+X8O5aPvwhNRtspYEQ/cmhZPbRXJVXmjEkH3XdthMu zxCqlxYbJa9pIkQHLsACDX4yyoSXJCupTpi1U5O5ExKjyjdCnFyXlhP/BfHoGw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1766473458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hHuvlCnwOf0FSCs0IK4C5Ex5NQu3u4/V//8wm3JYWt0=; b=pl5JU7N3/lDxDSBHpOoWOfBhQxBXOyLaGQHGA4E2Slx88mY9FuBoUrgHnX9dy2zWOfmgTN VJZfC8XXmYxTBTCQ== Date: Tue, 23 Dec 2025 08:04:10 +0100 Subject: [PATCH 3/5] kbuild: uapi: don't compile test bpf_perf_event.h on xtensa Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251223-uapi-nostdinc-v1-3-d91545d794f7@linutronix.de> References: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> In-Reply-To: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> To: Nathan Chancellor , Nicolas Schier , Brian Cain Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-hexagon@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1766473456; l=816; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Zm7fWvYFAWJNdv0m1Ct8W4h4ycRsgtbyuhmhof7tf4I=; b=WvJaoCPxYrDbMS+Tcc92EHEbCf79n1IcIFVtU9DGJseimX2+aH0ut+DP0NKx7QkouIJRnr47E TiKcysN6z3lCAuYQzGYxztzce46ag2UJrwT49J5NUjSerhmY+w1pI7C X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The xtensa UAPI headers do not provide 'struct pt_regs', triggering an error: usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplet= e type Disable the header tests for this file on xtensa. Signed-off-by: Thomas Wei=C3=9Fschuh --- usr/include/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/include/Makefile b/usr/include/Makefile index a9a861ec8702..fd29c11c35cb 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -65,6 +65,10 @@ no-header-test +=3D asm/uctx.h no-header-test +=3D asm/fbio.h endif =20 +ifeq ($(SRCARCH),xtensa) +no-header-test +=3D linux/bpf_perf_event.h +endif + # asm-generic/*.h is used by asm/*.h, and should not be included directly no-header-test +=3D asm-generic/% =20 --=20 2.52.0 From nobody Sun Feb 8 14:57:01 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 20A3E309F02; Tue, 23 Dec 2025 07:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473461; cv=none; b=jI+iK+vL56J8yvQZ08uM70uec6vT/G2DQwwYBLvJcq9l1J0dbV1ViXd+Nh2edMSPZE1MqG4zR12qpG9xd7/v0SioFxVR3e2iDu4Tu8rVaOdOxdSyTGwCszqb+fOztt6k0y8OyLE80La/ylUUk+aJEPqkU3IDZ4b/+SKiwU3eYds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473461; c=relaxed/simple; bh=tuGHt3DLLTu5lXcwHSaMZsZn6szkZwAMb14MrkMu94c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JY17BSp9OoYbt2cAO5Di2kJYODq7LBOSDwvjraSOw8snLKHG+kmdsVu8+RQIDJ1Y6bkXipXGt0T2W7WtPl5sF+PDwJAXuRgqV0B1CngUAolypwRtPDwezmRv1AlJvf7/TbzWf4bhjHjkZGYW0bmR7Tu4zoTvhU1zMDQvEu9b9/Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lLyoI/Z9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sp/FPbPm; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lLyoI/Z9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sp/FPbPm" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1766473458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k7SWYdn3Oi5rBRPPinrxOjmT14ISIjczlskQPXhJWD8=; b=lLyoI/Z9RvVQLGAKme1YBPSMhLACkSnowidwFR9AgVrroUaikbewrnuxsYHoog23T+p4i7 cTFd0xno108AraJFj5/jyr/EEJhsZ5H9YUF5StaA2BgCV2tkNyCoqWtnB4fOTURbMashWI L3cpW/A/mAruI6kEMTzaA7H/506yV+xRjE2XEwYdOi8siRoHqR1ZWcqdsP2lTuwVYGhMSv QLWw72rBO8u2s0T5NlguaOiMnd9twLOP8L8ZdC/lEFHmeomDa3Xe1rFseNvlCVn3RZiLyX r52rtfQtZFEWLzpBcffELOSDAZIB7K/gbNiznnx2+PXdPitBKMK2ADQRaWLGEA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1766473458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k7SWYdn3Oi5rBRPPinrxOjmT14ISIjczlskQPXhJWD8=; b=sp/FPbPmopsd5WYL5E6M/biUSiwcihfaCZqGcNcMfrQfNPoJ9jseO3YcijZpARFVS1s3mD 7Iy7s12Sk4QVYPBA== Date: Tue, 23 Dec 2025 08:04:11 +0100 Subject: [PATCH 4/5] kbuild: uapi: split out command conditions into variables Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251223-uapi-nostdinc-v1-4-d91545d794f7@linutronix.de> References: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> In-Reply-To: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> To: Nathan Chancellor , Nicolas Schier , Brian Cain Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-hexagon@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1766473456; l=1180; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=tuGHt3DLLTu5lXcwHSaMZsZn6szkZwAMb14MrkMu94c=; b=O3HX+r+GMW6Fr6wLVUcLDIW6UjAe+0+He/8kBbARi4B+D+q7d8OYAPW0RVuC69oHTvPIvdDb3 oymDR+RP+LoDfvHlcc16fJF4pa9hqghoQbK7lRjNgAmdpIoPVxcwScJ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The condition logic will become a bit more complicated. Split them out into dedicated variables so they stay readable. Signed-off-by: Thomas Wei=C3=9Fschuh --- usr/include/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr/include/Makefile b/usr/include/Makefile index fd29c11c35cb..fa01bcda21f5 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -150,12 +150,15 @@ endif =20 always-y :=3D $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '= *.h' 2>/dev/null)) =20 +target-no-libc =3D $(filter-out $(uses-libc), $*.h) +target-can-compile =3D $(filter-out $(no-header-test), $*.h) + # Include the header twice to detect missing include guard. quiet_cmd_hdrtest =3D HDRTEST $< cmd_hdrtest =3D \ $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \ - $(if $(filter-out $(uses-libc), $*.h), -nostdinc) \ - $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \ + $(if $(target-no-libc), -nostdinc) \ + $(if $(target-can-compile), -include $< -include $<); \ $(PERL) $(src)/headers_check.pl $(obj) $<; \ touch $@ =20 --=20 2.52.0 From nobody Sun Feb 8 14:57:01 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 14C4530BBA0; Tue, 23 Dec 2025 07:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473462; cv=none; b=WpQEBKWMw3tyI1vFzfDfOrflqLE93bxt9Ox4EarAc6NzpNejTMzp0Y98KhopuBfzTIkXjsFCpkwT7B7fbprBXS8+s+g07BEmkwDqVFCENtE4ap+fIV41Dx7K2pB6kE4K945LBw+cEerc5VhPguee4w0Hycsv1ETfDvce/v39rJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766473462; c=relaxed/simple; bh=JvThK3D0po6Go7rwk2+OL/2B8Ulbte9q+20HJXRZ7kw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GrLGlwvNWD1cDP2VaPjscgdq7bT+hWOPkFEsUdVQfS6wIRUUDlWG93SxEsCryP5Q2JLUXgvrzYT+hGAKp7sN216oxml5w/wSevyWnrK7ZlCiLjpc/zGl0e52Y67BXj6a2FoW+MDxWXb4GysDcOjAVkCmzJxRJ27jmwNmjGPoy2s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GggDd38O; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=u90Z0mYU; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GggDd38O"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="u90Z0mYU" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1766473459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hTn+nCaMtLNpZ9M4ZQw3UrVsBJeVi0MyHz1cx+b02SY=; b=GggDd38OxhzhjfSLAPm9m4DCbFOwre3cTY2fuxZTTjjIHkl5PGEgd8gKohFp8lI4V0wsHx 8kfo9Z0GXUcM4NtqUiSRpkvkyldtGvHRhXNGLLLNPFfo9sxsle5quey3M/HoaMhMF07FTc 9X7RekB7/o3FyB4alyZdcs2rH9v0qzWSpOz4e+2SSPRbmqWivg2FdmDxTycYk8ONmKOx1/ CzKem85lEmd++nM2+oq8NUF8sqR43C6ALXIBCSllLDIeVzZ7H0ZB90y30dCU1F9zJAWnty 9EuHjcZkTy4AfUmTiJWG3ktY997pLNkN4AsaMNZKBqTCcYjtCHt3q4ihZDD/yw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1766473459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hTn+nCaMtLNpZ9M4ZQw3UrVsBJeVi0MyHz1cx+b02SY=; b=u90Z0mYUrEf8PCGb1IDvcG/3i2uieUhFYzSnLxxUayTNYJSQTMaljANymhZuu4osGgN+bh 8pDOE9E8VoDEY/BA== Date: Tue, 23 Dec 2025 08:04:12 +0100 Subject: [PATCH 5/5] kbuild: uapi: drop dependency on CC_CAN_LINK Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251223-uapi-nostdinc-v1-5-d91545d794f7@linutronix.de> References: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> In-Reply-To: <20251223-uapi-nostdinc-v1-0-d91545d794f7@linutronix.de> To: Nathan Chancellor , Nicolas Schier , Brian Cain Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-hexagon@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1766473456; l=1988; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=JvThK3D0po6Go7rwk2+OL/2B8Ulbte9q+20HJXRZ7kw=; b=GtixPB7n5P/Q1KtZNZscrAVFYfCRtRXEWGZstURVep+3cMTg6UVzi/tC2cpY+8XSad9oNfD6G 4oLfl8346cBDsIMwjOfFyAlLW0Y6RaUdjB4UBh8mNNud3m4RBBrSSWZ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The header tests try to compile each header. Some UAPI headers depend on libc headers so they need a full userspace toolchain to build. This dependency is expressed in kconfig as a dependency on CC_CAN_LINK. Many kernel builds do not satisfy CC_CAN_LINK as they only use a minimal kernel (cross-) compiler. In those configurations the UAPI headers are not tested at all. However most UAPI headers do not even depend on any libc headers, and such dependencies are undesired in any case. Also the static analysis performed by headers_check.pl does not need CC_CAN_LINK. Drop the hard dependency on CC_CAN_LINK and instead skip the affected compilation step for exactly those headers which require libc. Signed-off-by: Thomas Wei=C3=9Fschuh --- init/Kconfig | 2 +- usr/include/Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index fa79feb8fe57..4e7ae65683ee 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -247,7 +247,7 @@ config WERROR =20 config UAPI_HEADER_TEST bool "Compile test UAPI headers" - depends on HEADERS_INSTALL && CC_CAN_LINK + depends on HEADERS_INSTALL help Compile test headers exported to user-space to ensure they are self-contained, i.e. compilable as standalone units. diff --git a/usr/include/Makefile b/usr/include/Makefile index fa01bcda21f5..6d86a53c6f0a 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -151,7 +151,8 @@ endif always-y :=3D $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '= *.h' 2>/dev/null)) =20 target-no-libc =3D $(filter-out $(uses-libc), $*.h) -target-can-compile =3D $(filter-out $(no-header-test), $*.h) +target-can-compile =3D $(and $(filter-out $(no-header-test), $*.h), \ + $(or $(CONFIG_CC_CAN_LINK), $(target-no-libc))) =20 # Include the header twice to detect missing include guard. quiet_cmd_hdrtest =3D HDRTEST $< --=20 2.52.0