diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2024-03-25 08:40:10 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-04-08 15:03:07 +0200 |
commit | d2e58ab5cda2a225c406ac10d0a8b960bc5a39b6 (patch) | |
tree | 18d081c1c8b2e1da02f17161a8edb4912040f4aa /include/vdso/datapage.h | |
parent | 1beb35ec615f676d49d68b6dc23c7418ba8ff145 (diff) | |
download | linux-stable-d2e58ab5cda2a225c406ac10d0a8b960bc5a39b6.tar.gz linux-stable-d2e58ab5cda2a225c406ac10d0a8b960bc5a39b6.tar.bz2 linux-stable-d2e58ab5cda2a225c406ac10d0a8b960bc5a39b6.zip |
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
Diffstat (limited to 'include/vdso/datapage.h')
-rw-r--r-- | include/vdso/datapage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index c71ddb6d4691..d04d394db064 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -61,6 +61,7 @@ struct vdso_timestamp { * @seq: timebase sequence counter * @clock_mode: clock mode * @cycle_last: timebase at clocksource init + * @max_cycles: maximum cycles which won't overflow 64bit multiplication * @mask: clocksource mask * @mult: clocksource multiplier * @shift: clocksource shift @@ -92,6 +93,9 @@ struct vdso_data { s32 clock_mode; u64 cycle_last; +#ifdef CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT + u64 max_cycles; +#endif u64 mask; u32 mult; u32 shift; |