Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.122 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796120668; b=3pdFMW8MUq1mSxLMQWBCEODMTRAELiVEa0p40U6PHsB09Ye9wBtHcTuJmviuK78KkUzX vMfmy7gsooF+nisbkF5xNs3T1IMcb/8+t70slN98mQ6+phIJB2XiLiqQy8LT0KxaSqe01 A1ux6dBTrTtoRpFXuUDqIh+sZBrrQBtg1QjHOlv6V5n3d2Z47Hf8Ez2y2AIwlhzYIMqU3 LzewQbx+GASJH92rCvp2qdAaAaG5qclQC7sISqa8KtBTaiS1+EqUCjQFe5CRfq9NzgQSO lSksRhMGRGM/i67TddWEfDOl6dJiDxfCz8IDRxlG5Vy9XTNGVRGfuMWGcG9T1132GQQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796120668; 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=F4NrQxobKDaiyosgHYQfn5dGqHYCAjZaQ0yCLIvpgjYK29qdVO1R0m6veDg4uFZbzY6B bAYKLj0pGA920/thYQlpdwetEmi47hwwlyyLw0dR5NNYPYtBeUKhH84M5OOHuLfHn8xVQ 2WLjAqXY6JAW5YCqXxajTo8vPjw8apXiAYcY2Ignh+h2lhfaS/jw5wpR6hr5cTGGsU45L 4TyMzr1Cs+Q8hMGtT+bHu9E0rIPDucpsWG8PMkKFBGahHjlv8VQw/i/SZNm3BJEfNQeus 5vUla9zDbegV87SNHSEa6A8oj3moH30mjefZU8UjX7uPURVEjHH7vUggow6ea9OQL1A== 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=nwy0MC67; arc=none smtp.remote-ip=115.124.28.122 Received: from out28-122.mail.aliyun.com (out28-122.mail.aliyun.com [115.124.28.122]) (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 22B64606A68F; Tue, 1 Dec 2026 10:24:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 22B64606A68F 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=nwy0MC67 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=xiaopeng.com; s=default; t=1796120659; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=qBlx7FNVVyLx1rHmXqg2VZ/2bFnQEPeikCLRg5TzRkM=; b=nwy0MC6708c8toDQJllf5z4SD73njVEQfyFeJ+OZpZ8VrVzeF8EfFYK6hX91SYfH5kyx2Cq1t13PVTXYHGwijsHolEDHmJjDPf6EGMgSJS1Ts8S1NExLk98UT5uVm61dprd1yC3xiFpmG3qTdhm6Ijjgd7RUA2fXBYn3GvJDyIw= 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|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033037006180;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=19;RT=19;SR=0;TI=SMTPD_---.kE4ydF3_1796120656; Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.kE4ydF3_1796120656 cluster:ay29) by smtp.aliyun-inc.com; Tue, 01 Dec 2026 18:24:17 +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 18:24:08 +0800 Message-ID: <20261201102410.44071-4-fangxy@xiaopeng.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261201102410.44071-1-fangxy@xiaopeng.com> References: <20261201102410.44071-1-fangxy@xiaopeng.com> X-Mailing-List: linux-arch@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