From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.74 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796126135; b=q1PxZ64OwF/uEAgB6Vz2k30xuvygFWWu+FR+6FkHzvzZd+/CQQ+uiipEICXfsnTYTCkv qZDD9z1TeJZ2+lcys0GM0gYxJ1z6wR06og/EKcOQMFFACuyMws5c7XzU0RY6c3PP3JvD1 icLUdxfb59DeV57eEparcObX1spbM9CgVJhDcRMa8r9e8TMwOKWB1vd7I6eZjoSYQVy56 LNwaO6BLCeBcJhLg+Z6rDLabrSlMo+fmW3AogCzitqtQFYXi6QQLrbAJsbQjmFVEqUlH6 brg5lypE+VMScQ9R9ik2H96ojv3BSzZA5BhHfXPniIkbQbpCZj2kc/G3xiQwBSQ11fQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796126135; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=qBlx7FNVVyLx1rHmXqg2VZ/2bFnQEPeikCLRg5TzRkM=; b=LXT92x+y+4DEkef7AGAK3NexkJ5fVUxu28pv8W5HKkhfG9HuJEzHa4RuXagWZQ+02/Y4 He5D1ZVb0sUavn5sU1xVRqZBQ00I+d0/Yz4kn1svPHIQ1RE0oAX9RozwMLtN779TYYRwJ LskERURabR98fyqanVF/+wxlS0tzauVagoqf/ary3eHlL3131APUiGOvDI8cBRNgpEa6T lwDYsCtvJqIamXiHIeuN+97hc2UgvhakzSE1UqlSv9YlYkU7AsrENCJIQBVwuK5W9IfSM ThPXtzzqP3tj11BWMN+3S2iCQ0Iyc67yB/QQTRIMpCg/x+HZuSRwFMdWX2vwZ+wPehw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=xiaopeng.com; spf=pass smtp.mailfrom=xiaopeng.com; dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=UrtDJoX8; arc=none smtp.remote-ip=115.124.28.74 Received: from out28-74.mail.aliyun.com (out28-74.mail.aliyun.com [115.124.28.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67478606A331; Tue, 1 Dec 2026 11:55:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 67478606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xiaopeng.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xiaopeng.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=UrtDJoX8 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=xiaopeng.com; s=default; t=1796126131; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=qBlx7FNVVyLx1rHmXqg2VZ/2bFnQEPeikCLRg5TzRkM=; b=UrtDJoX8/0AnKw2UNmGtC60s9Jk/4MYeJAU86Zq8OI1N+inAyBCvP+mJiLchzRS0y2p84oG3jvIvY19eGmiFSUVCg2mU0qeq9zFQJNoiYnzCjr3HeiM2xhvJMFMk1fzJRDtjDw8FF8KfEJSHM+YU+KTQa6FY7CGAw9Oh5LCU0rc= X-Alimail-AntiSpam:AC=CONTINUE;BC=0.04540095|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.0399601-0.00240619-0.957634;FP=18366310610108016554|9|3|19|0|-1|-1|-1;HT=maildocker-contentspam033068002237;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=19;RT=19;SR=0;TI=SMTPD_---.kEK1TkT_1796126128; Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.kEK1TkT_1796126128 cluster:ay29) by smtp.aliyun-inc.com; Tue, 01 Dec 2026 19:55:30 +0800 From: Fang Xieyan To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , x86@kernel.org Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , Arnd Bergmann , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Huacai Chen , WANG Xuerui , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [RFC PATCH 3/5] vdso: Switch the sanctioned headers to vdso/types.h Date: Tue, 1 Dec 2026 19:55:21 +0800 Message-ID: <20261201115523.75606-4-fangxy@xiaopeng.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261201115523.75606-1-fangxy@xiaopeng.com> References: <20261201115523.75606-1-fangxy@xiaopeng.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Now that provides the sanitized UAPI type subset and the x86 side no longer carries redundant includes that would clash, convert the sanctioned include/vdso headers to take their types from it: datapage.h: -> , drop gettime.h: -> getrandom.h: -> time.h: -> auxclock.h: , -> This removes the direct dependency of the sanctioned headers on kernel-internal and UAPI type headers, so vDSO code compiled against them no longer reaches include/asm-generic/bitsperlong.h through the type headers. Note the vDSO build still reaches indirectly through unrelated kernel-header paths (e.g. asm/msr.h -> linux/percpu.h -> linux/time64.h on x86); breaking those remaining chains is left for follow-up work. Signed-off-by: Fang Xieyan --- Build-tested at this commit: x86_64 defconfig (CONFIG_IA32_EMULATION=y, CONFIG_X86_X32_ABI=y) builds bzImage with 0 errors producing vdso32.so.dbg, vdso64.so.dbg and vdsox32.so.dbg, and the arm64 defconfig cross-build (aarch64-linux-gnu-gcc) builds Image with 0 errors producing vdso.so/vdso.so.dbg. arm, riscv, loongarch and s390 also build cleanly with the full series; the mips and powerpc vDSO objects build cleanly too (their full-tree failures reproduce identically on the unpatched baseline with the same clang toolchain limitations). A compiler -H trace confirms include/vdso/types.h is self-contained and that the sanctioned headers no longer include or the UAPI time headers directly. The remaining linux/types.h / asm-generic/ bitsperlong.h inclusions reach the vDSO build through unrelated kernel-header paths (e.g. asm/msr.h -> linux/percpu.h -> linux/time64.h) and are left for follow-up work, as noted above. Series based on v7.4-rc5 (fe6ff8d5d675). The per-commit build results above were collected on v7.4-rc4; none of the fifteen files this series touches changed between the two tags, and rebuilding the x86 vDSO on this base yields byte-identical vdso64, vdsox32 and vdso32 objects. include/vdso/auxclock.h | 3 +-- include/vdso/datapage.h | 3 +-- include/vdso/getrandom.h | 2 +- include/vdso/gettime.h | 2 +- include/vdso/time.h | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/vdso/auxclock.h b/include/vdso/auxclock.h index 6d6e74cbc400..82b675c207dd 100644 --- a/include/vdso/auxclock.h +++ b/include/vdso/auxclock.h @@ -2,8 +2,7 @@ #ifndef _VDSO_AUXCLOCK_H #define _VDSO_AUXCLOCK_H -#include -#include +#include static __always_inline u64 aux_clock_resolution_ns(void) { diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 09897f76ae07..286f625659b3 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -4,10 +4,9 @@ #ifndef __ASSEMBLER__ -#include +#include #include -#include #include #include diff --git a/include/vdso/getrandom.h b/include/vdso/getrandom.h index 1d9dbd4d76c1..f766cf913d74 100644 --- a/include/vdso/getrandom.h +++ b/include/vdso/getrandom.h @@ -6,7 +6,7 @@ #ifndef _VDSO_GETRANDOM_H #define _VDSO_GETRANDOM_H -#include +#include #define CHACHA_KEY_SIZE 32 #define CHACHA_BLOCK_SIZE 64 diff --git a/include/vdso/gettime.h b/include/vdso/gettime.h index 16a0a0556b86..17e08fa5936b 100644 --- a/include/vdso/gettime.h +++ b/include/vdso/gettime.h @@ -2,7 +2,7 @@ #ifndef _VDSO_GETTIME_H #define _VDSO_GETTIME_H -#include +#include struct __kernel_timespec; struct __kernel_old_timeval; diff --git a/include/vdso/time.h b/include/vdso/time.h index 739f53cd2949..da417a347824 100644 --- a/include/vdso/time.h +++ b/include/vdso/time.h @@ -2,7 +2,7 @@ #ifndef __VDSO_TIME_H #define __VDSO_TIME_H -#include +#include struct timens_offset { s64 sec; -- 2.50.1