linux-stable/include/vdso
Anna-Maria Behnsen 8b3843ae36 vdso/datapage: Quick fix - use asm/page-def.h for ARM64
The vdso rework for the generic union vdso_data_store broke compat VDSO on
arm64:

In file included from arch/arm64/include/asm/lse.h:5,
		 from arch/arm64/include/asm/cmpxchg.h:14,
		 from arch/arm64/include/asm/atomic.h:16,
		 from include/linux/atomic.h:7,
		 from include/asm-generic/bitops/atomic.h:5,
		 from arch/arm64/include/asm/bitops.h:25,
		 from include/linux/bitops.h:68,
		 from arch/arm64/include/asm/memory.h:209,
		 from arch/arm64/include/asm/page.h:46,
		 from include/vdso/datapage.h:22,
		 from lib/vdso/gettimeofday.c:5,
		 from <command-line>:
arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128'
  298 |         u128 full;
      |         ^~~~
arch/arm64/include/asm/atomic_ll_sc.h:305:24: error: unknown type name 'u128'
  305 | static __always_inline u128
	 \
      |

The reason is the include of asm/page.h which in turn includes headers
which are outside the scope of compat VDSO. The only reason for the
asm/page.h include is the required definition of PAGE_SIZE. But as arm64
defines PAGE_SIZE in asm/page-def.h without extra header includes, this
could be used instead.

Caution: this is a quick fix only! The final fix is an upcoming cleanup of
Arnd which consolidates PAGE_SIZE definition. After the cleanup, the
include of asm/page.h to access PAGE_SIZE is no longer required.

Fixes: a0d2fcd62a ("vdso/ARM: Make union vdso_data_store available for all architectures")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240226175023.56679-1-anna-maria@linutronix.de
Link: https://lore.kernel.org/lkml/CA+G9fYtrXXm_KO9fNPz3XaRxHV7UD_yQp-TEuPQrNRHU+_0W_Q@mail.gmail.com/
2024-02-26 23:13:41 +01:00
..
bits.h vdso/bits.h: Add BIT_ULL() for the sake of consistency 2023-01-31 14:42:10 +01:00
clocksource.h vdso: Fix clocksource.h macro detection 2020-03-23 18:51:08 +01:00
const.h
datapage.h vdso/datapage: Quick fix - use asm/page-def.h for ARM64 2024-02-26 23:13:41 +01:00
gettime.h arch: vdso: consolidate gettime prototypes 2023-11-23 11:32:32 +01:00
helpers.h vdso/helpers: Fix grammar in comments 2024-02-20 20:56:00 +01:00
jiffies.h linux/jiffies.h: Extract common header for vDSO 2020-03-21 15:23:58 +01:00
ktime.h linux/ktime.h: Extract common header for vDSO 2020-03-21 15:23:59 +01:00
limits.h
math64.h
processor.h common: Introduce processor.h 2020-03-21 15:23:59 +01:00
time.h
time32.h linux/time32.h: Extract common header for vDSO 2020-03-21 15:23:57 +01:00
time64.h time64.h: Consolidated PSEC_PER_SEC definition 2021-04-06 16:32:17 -07:00
vsyscall.h timekeeping/vsyscall: Provide vdso_update_begin/end() 2020-08-06 10:57:30 +02:00