[PATCH] selinux: fix race when removing selinuxfs entries

2018-10-02 Thread Ondrej Mosnacek
Letting the following set of commands run long enough on a multi-core machine causes soft lockups in the kernel: (cd /sys/fs/selinux/; while true; do find >/dev/null 2>&1; done) & (cd /sys/fs/selinux/; while true; do find >/dev/null 2>&1; done) & (cd /sys/fs/selinux/; while true; do fi

Re: [PATCH] selinux: fix race when removing selinuxfs entries

2018-10-02 Thread Al Viro
On Tue, Oct 02, 2018 at 01:18:30PM +0200, Ondrej Mosnacek wrote: No. With the side of Hell, No. The bug is real, but this is not the way to fix it. First of all, it's still broken - e.g. mount something on a subdirectory and watch what that thing will do to it. And anyone who has permission to

Re: [PATCH] selinux: fix race when removing selinuxfs entries

2018-10-03 Thread Ondrej Mosnacek
Hi Al, On Tue, Oct 2, 2018 at 5:58 PM Al Viro wrote: > On Tue, Oct 02, 2018 at 01:18:30PM +0200, Ondrej Mosnacek wrote: > > No. With the side of Hell, No. The bug is real, but this is > not the way to fix it. > > First of all, it's still broken - e.g. mount something on a > subdirectory and wat

Re: [PATCH] selinux: fix race when removing selinuxfs entries

2018-10-03 Thread Stephen Smalley
On 10/02/2018 11:58 AM, Al Viro wrote: On Tue, Oct 02, 2018 at 01:18:30PM +0200, Ondrej Mosnacek wrote: No. With the side of Hell, No. The bug is real, but this is not the way to fix it. First of all, it's still broken - e.g. mount something on a subdirectory and watch what that thing will do