]> Gentwo Git Trees - linux/.git/commit
sysctl: Add optional range checking to SYSCTL_INT_CONV_CUSTOM
authorJoel Granados <joel.granados@kernel.org>
Sun, 12 Oct 2025 09:24:41 +0000 (11:24 +0200)
committerJoel Granados <joel.granados@kernel.org>
Thu, 27 Nov 2025 14:43:20 +0000 (15:43 +0100)
commit54e77495a7c5f64bc2d35583a4f59c8dbee579ab
tree6b74f733e5c4591ebcc76afb04fde30f2f215fbd
parent796c481a4b7026a93e4800bff8d99923630014e7
sysctl: Add optional range checking to SYSCTL_INT_CONV_CUSTOM

Extend the SYSCTL_INT_CONV_CUSTOM macro with a k_ptr_range_check
parameter to conditionally generate range validation code. When enabled,
validation is done against table->extra1 (min) and table->extra2 (max)
bounds before assignment. Add base minmax and ms_jiffies_minmax
converter instances that utilize the range checking functionality.

Signed-off-by: Joel Granados <joel.granados@kernel.org>
kernel/sysctl.c