vdso: Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 25 Mar 2024 06:40:07 +0000 (08:40 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 8 Apr 2024 13:03:06 +0000 (15:03 +0200)
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
lib/vdso/Kconfig

index d883ac29950897801f3a597cc90d42ae6d696524..c46c2300517c944a4ac42e5d1de104d92b9982fe 100644 (file)
@@ -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