On Thu, May 02, 2024 at 01:03:52PM -0700, Allen wrote: > +int proc_core_file_note_size_max(struct ctl_table *table, int write, > void __user *buffer, size_t *lenp, loff_t *ppos) { > + int error = proc_douintvec(table, write, buffer, lenp, ppos); > + if (write && (core_file_note_size_max < MAX_FILE_NOTE_SIZE || > core_file_note_size_max > MAX_ALLOWED_NOTE_SIZE)) > + core_file_note_size_max = MAX_FILE_NOTE_SIZE; // Revert to > default if out of bounds > + return error; > +} There's already a proc helper which let's you set min / max. Luis