mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
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>
This commit is contained in:
parent
796c481a4b
commit
54e77495a7
1 changed files with 40 additions and 66 deletions
106
kernel/sysctl.c
106
kernel/sysctl.c
Loading…
Add table
Add a link
Reference in a new issue