d2e58ab5 | 25-Mar-2024 |
Adrian Hunter <adrian.hunter@intel.com> |
vdso: Add vdso_data:: Max_cycles
Add vdso_data::max_cycles in preparation to use it to detect potential multiplication overflow.
Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ad
vdso: Add vdso_data:: Max_cycles
Add vdso_data::max_cycles in preparation to use it to detect potential multiplication overflow.
Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240325064023.2997-7-adrian.hunter@intel.com
show more ...
|
8b3843ae | 26-Feb-2024 |
Anna-Maria Behnsen <anna-maria@linutronix.de> |
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, fr
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: a0d2fcd62ac2 ("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/
show more ...
|
d60d7de3 | 04-Aug-2020 |
Sven Schnelle <svens@linux.ibm.com> |
lib/vdso: Allow to add architecture-specific vdso data
The initial assumption that all VDSO related data can be completely generic does not hold. S390 needs architecture specific storage to access t
lib/vdso: Allow to add architecture-specific vdso data
The initial assumption that all VDSO related data can be completely generic does not hold. S390 needs architecture specific storage to access the clock steering information.
Add struct arch_vdso_data to the vdso data struct. For architectures which do not need extra data this defaults to an empty struct. Architectures which require it, enable CONFIG_ARCH_HAS_VDSO_DATA and provide their specific struct in asm/vdso/data.h.
Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200804150124.41692-2-svens@linux.ibm.com
show more ...
|
ca214e2c | 23-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
vdso: Fix clocksource.h macro detection
CONFIG_GENERIC_GETTIMEOFDAY is a sufficient condition to verify if an architecture implements asm/vdso/clocksource.h or not. The current implementation wrongl
vdso: Fix clocksource.h macro detection
CONFIG_GENERIC_GETTIMEOFDAY is a sufficient condition to verify if an architecture implements asm/vdso/clocksource.h or not. The current implementation wrongly assumes that the same is true for the config option CONFIG_ARCH_CLOCKSOURCE_DATA.
This results in a series of build errors on ia64/sparc/sparc64 like this:
In file included from ./include/linux/clocksource.h:31, from ./include/linux/clockchips.h:14, from ./include/linux/tick.h:8, from fs/proc/stat.c:15: ./include/vdso/clocksource.h:9:10: fatal error: asm/vdso/clocksource.h: No such file or directory 9 | #include <asm/vdso/clocksource.h> | ^~~~~~~~~~~~~~~~~~~~~~~~
Fix the issue removing the unneeded config condition.
Fixes: 14ee2ac618e4 ("linux/clocksource.h: Extract common header for vDSO") Reported-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200323133920.46546-1-vincenzo.frascino@arm.com
show more ...
|
d8bb6993 | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
common: Introduce processor.h
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is nece
common: Introduce processor.h
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Introduce processor.h to contain all the processor specific functions that are suitable for vDSO inclusion.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-16-vincenzo.frascino@arm.com
show more ...
|
cc56f32f | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/ktime.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this pos
linux/ktime.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split ktime.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-15-vincenzo.frascino@arm.com
show more ...
|
97b01d2e | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/jiffies.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this p
linux/jiffies.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split jiffies.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-14-vincenzo.frascino@arm.com
show more ...
|
b72a9c5e | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/time64.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this po
linux/time64.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split time64.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-13-vincenzo.frascino@arm.com
show more ...
|
9a416231 | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/time32.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this po
linux/time32.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split time32.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-12-vincenzo.frascino@arm.com
show more ...
|
639fff1c | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/time.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this poss
linux/time.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split time.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-11-vincenzo.frascino@arm.com
show more ...
|
b874b835 | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/math64.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this po
linux/math64.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split math64.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-10-vincenzo.frascino@arm.com
show more ...
|
3e0e9f8c | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/limits.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this po
linux/limits.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split limits.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-4-vincenzo.frascino@arm.com
show more ...
|
3945ff37 | 20-Mar-2020 |
Vincenzo Frascino <vincenzo.frascino@arm.com> |
linux/bits.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this poss
linux/bits.h: Extract common header for vDSO
The vDSO library should only include the necessary headers required for a userspace library (UAPI and a minimal set of kernel headers). To make this possible it is necessary to isolate from the kernel headers the common parts that are strictly necessary to build the library.
Split bits.h into linux and common headers to make the latter suitable for inclusion in the vDSO library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200320145351.32292-3-vincenzo.frascino@arm.com
show more ...
|