The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] x86/entry/vdso: fix path to gettimeofday.c
@ 2026-03-07 17:44 vladimir.oltean
  2026-03-07 19:09 ` Borislav Petkov
  0 siblings, 1 reply; 8+ messages in thread
From: vladimir.oltean @ 2026-03-07 17:44 UTC (permalink / raw)
  To: x86
  Cc: Andy Lutomirski, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, H. Peter Anvin, Thomas Weißschuh, linux-kernel

To get from arch/x86/entry/vdso/common/vclock_gettime.c to
lib/vdso/gettimeofday.c, you need 5 "..", not 4.

Proof:
$ (cd "$(dirname arch/x86/entry/vdso/common/vclock_gettime.c)" && ls ../../../../lib/vdso/gettimeofday.c)
ls: cannot access '../../../../lib/vdso/gettimeofday.c': No such file or directory
$ (cd "$(dirname arch/x86/entry/vdso/common/vclock_gettime.c)" && ls ../../../../../lib/vdso/gettimeofday.c)
../../../../../lib/vdso/gettimeofday.c

I'm blaming the commit below because it moved vclock_gettime.c from
arch/x86/entry/vdso/vclock_gettime.c to
arch/x86/entry/vdso/common/vclock_gettime.c
without updating the relative include path.

This shows up on an x86 allmodconfig build, I don't really know why it
hasn't been reported so far.

The fix, though, is to make the include path a bit more robust. Benefit
from the fact that arch/x86/entry/vdso/common/Makefile.include sets up
"flags-y += -I$(srctree)", and just specify the include path relative to
the kernel root directory. This was done in a few places in the blamed
commit, but here it was missed.

Fixes: 693c819fedcd ("x86/entry/vdso: Refactor the vdso build")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 arch/x86/entry/vdso/common/vclock_gettime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/common/vclock_gettime.c b/arch/x86/entry/vdso/common/vclock_gettime.c
index 027b7e88d753..57066f346b3f 100644
--- a/arch/x86/entry/vdso/common/vclock_gettime.c
+++ b/arch/x86/entry/vdso/common/vclock_gettime.c
@@ -13,7 +13,7 @@
 #include <linux/types.h>
 #include <vdso/gettime.h>
 
-#include "../../../../lib/vdso/gettimeofday.c"
+#include "lib/vdso/gettimeofday.c"
 
 int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
 {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-03-10 17:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-07 17:44 [PATCH] x86/entry/vdso: fix path to gettimeofday.c vladimir.oltean
2026-03-07 19:09 ` Borislav Petkov
2026-03-08  0:21   ` Vladimir Oltean
2026-03-08  0:29     ` H. Peter Anvin
2026-03-09 18:38       ` Vladimir Oltean
2026-03-09 18:46         ` Borislav Petkov
2026-03-09 19:21           ` Vladimir Oltean
2026-03-10 17:23           ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox