On Wed, Dec 05, 2018 at 03:26:04PM +0800, 程洋 wrote: > Anyone who can review my patch? > > 程洋 <chengyang@xxxxxxxxxx> 于2018年11月30日周五 上午10:34写道: > > > > Here is an article illustrates the details. > > https://medium.com/@topjohnwu/from-anime-game-to-android-system-security-vulnerability-9b955a182f20 > > > > And There is a similar fix on kernel-4.4: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=99663be772c827b8f5f594fe87eb4807be1994e5 > > > > Q: Other filesystems parse the options from fill_super(). Is proc special in some fashion? > > A: According to my research, start_kernel will call proc_mount first, and initialize sb->s_root before any userspace process runs. If others want to mount it, all options will be ignored. > > AOSP change here: https://android-review.googlesource.com/c/platform/system/core/+/181345/4/init/init.cpp > > At first I though we should mount it with MS_REMOUNT flag. But kernel will crash if we did this. This is not true: /proc is mounted by userspace (and it is easy to see from the fact that proc_mount() is not called from kernel anywhere). hidepid= in its current form is misdesigned, so might as well not bother changing anything. IIRC there were(?) patches to make it per-mount.