aboutsummaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorGravatar Eric W. Biederman <ebiederm@xmission.com> 2020-03-02 16:00:33 -0600
committerGravatar Eric W. Biederman <ebiederm@xmission.com> 2020-03-02 16:00:33 -0600
commita0d4a141750df51135499f96c355c4d76add5505 (patch)
treeca1a72db5f1bb4725807c466fc4ef4914201f3db /fs/exec.c
parentproc: Dentry flushing without proc_mnt (diff)
parentpid: Improve the comment about waiting in zap_pid_ns_processes (diff)
downloadlinux-a0d4a141750df51135499f96c355c4d76add5505.tar.gz
linux-a0d4a141750df51135499f96c355c4d76add5505.tar.bz2
linux-a0d4a141750df51135499f96c355c4d76add5505.zip
Proc mount option handling is broken, and it has been since I
accidentally broke it in the middle 2016. The problem is that because we perform an internal mount of proc before user space mounts proc all of the mount options that user specifies when mounting proc are ignored. You can set those mount options with a remount but that is rather surprising. This most directly affects android which is using hidpid=2 by default. Now that the sysctl system call support has been removed, and we have settled on way of flushing proc dentries when a process exits without using proc_mnt, there is an simple and easy fix. a) Give UML mconsole it's own private mount of proc to use. b) Stop creating the internal mount of proc We still need Alexey Gladkov's full patch to get proc mount options to work inside of UML, and to be generally useful. This set of changes is just enough to get them working as well as they have in the past. If anyone sees any problem with this code please let me know. Otherwise I plan to merge these set of fixes through my tree. Link: https://lore.kernel.org/lkml/87r21tuulj.fsf@x220.int.ebiederm.org/ Link: https://lore.kernel.org/lkml/871rqk2brn.fsf_-_@x220.int.ebiederm.org/ Link: https://lore.kernel.org/lkml/20200210150519.538333-1-gladkov.alexey@gmail.com/ Link: https://lore.kernel.org/lkml/20180611195744.154962-1-astrachan@google.com/ Fixes: e94591d0d90c ("proc: Convert proc_mount to use mount_ns.") Eric W. Biederman (4): uml: Don't consult current to find the proc_mnt in mconsole_proc uml: Create a private mount of proc for mconsole proc: Remove the now unnecessary internal mount of proc pid: Improve the comment about waiting in zap_pid_ns_processes arch/um/drivers/mconsole_kern.c | 28 +++++++++++++++++++++++++++- fs/proc/root.c | 36 ------------------------------------ include/linux/pid_namespace.h | 2 -- include/linux/proc_ns.h | 5 ----- kernel/pid.c | 8 -------- kernel/pid_namespace.c | 38 +++++++++++++++++++------------------- 6 files changed, 46 insertions(+), 71 deletions(-)
Diffstat (limited to 'fs/exec.c')
0 files changed, 0 insertions, 0 deletions