On Tue, Aug 06, 2024 at 12:38:04AM +0100, Al Viro wrote: > On Mon, Aug 05, 2024 at 05:35:35PM +0200, Christian Brauner wrote: > > > To my reading that path_noexec is still there only for debug, not > > > because of any security need. > > > > I don't think it's there for debug. I think that WARN_ON_ONCE() is based > > on the assumption that the mount properties can't change. IOW, someone > > must've thought that somehow stable mount properties are guaranteed > > after may_open() irrespective of how the file was opened. And in that > > sense they thought they might actually catch a bug. > > That would be a neat trick, seeing that there'd never been anything to > prevent mount -o remount,exec while something is executed on the noexec, obviously...