summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2024-03-25 08:40:07 +0200
committerThomas Gleixner <tglx@linutronix.de>2024-04-08 15:03:06 +0200
commit0c68458b0a5878d735572b4f4d91219a1db7c784 (patch)
tree1f52897642d0b705b7dca467f5df1522d051c5c2
parent5b26ef660a690e424d9548fdf0565d4172d5d88f (diff)
downloadlwn-0c68458b0a5878d735572b4f4d91219a1db7c784.tar.gz
lwn-0c68458b0a5878d735572b4f4d91219a1db7c784.zip
vdso: Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT
Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT in preparation to add multiplication overflow protection to the VDSO time getter functions. 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-4-adrian.hunter@intel.com
-rw-r--r--lib/vdso/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vdso/Kconfig b/lib/vdso/Kconfig
index d883ac299508..c46c2300517c 100644
--- a/lib/vdso/Kconfig
+++ b/lib/vdso/Kconfig
@@ -30,4 +30,11 @@ config GENERIC_VDSO_TIME_NS
Selected by architectures which support time namespaces in the
VDSO
+config GENERIC_VDSO_OVERFLOW_PROTECT
+ bool
+ help
+ Select to add multiplication overflow protection to the VDSO
+ time getter functions for the price of an extra conditional
+ in the hotpath.
+
endif