Hi, On 9/16/21 7:51 PM, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
The patch titled Subject: ipc: check checkpoint_restore_ns_capable() to modify C/R proc files has been added to the -mm tree. Its filename is ipc-check-checkpoint_restore_ns_capable-to-modify-c-r-proc-files.patch ------------------------------------------------------ From: Michal Clapinski <mclapinski@xxxxxxxxxx> Subject: ipc: check checkpoint_restore_ns_capable() to modify C/R proc files This commit removes the requirement to be root to modify sem_next_id, msg_next_id and shm_next_id and checks checkpoint_restore_ns_capable instead. Since those files are specific to the IPC namespace, there is no reason they should require root privileges. This is similar to ns_last_pid, which also only checks checkpoint_restore_ns_capable. Link: https://lkml.kernel.org/r/20210916163717.3179496-1-mclapinski@xxxxxxxxxx Signed-off-by: Michal Clapinski <mclapinski@xxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx> Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Reviewed-By: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
[...] #else #define proc_ipc_doulongvec_minmax NULL #define proc_ipc_dointvec NULL @@ -111,6 +124,9 @@ static int proc_ipc_sem_dointvec(struct #define proc_ipc_dointvec_minmax_orphans NULL #define proc_ipc_auto_msgmni NULL #define proc_ipc_sem_dointvec NULL +#ifdef CONFIG_CHECKPOINT_RESTORE +#define proc_ipc_dointvec_minmax_checkpoint_restore NULL +#endif /* CONFIG_CHECKPOINT_RESTORE */ #endif
This fallback is actually not required: From what I see, the whole file is not compiled when sysctl is disabled. -- Manfred