Messages in this thread | | | Date | Wed, 30 May 2012 22:36:38 +0100 | From | Al Viro <> | Subject | Re: [PATCH] vfs: fix IMA lockdep circular locking dependency |
| |
On Wed, May 30, 2012 at 02:04:23PM -0700, Linus Torvalds wrote: > Generating 'prot' from 'reqprot' really *should* be as simple as what > I did in my patch. The fact that some places f*ck it up is their > problem - see for example mprotect (I think) that didn't take > MNT_NOEXEC into account. > > Don't try to emulate those broken semantics. Just fix them.
Actually, it's better than I thought, but not as simple as you say. I've misread what's going on in !file case; mea culpa, they are actually acting the same way there.
The only difference is that for file-backed ones !MMU wants VM_MAYEXEC in that file's bdi flags (BDI_CAP_EXEC_MAP). And that actually sounds reasonable in !MMU case.
Anyway, I've dumped the variant I've got into vfs.git@security_file_mmap; it should be at commit f12a0fd062b1d259a0b6bc6442019e6d4c45e9f5.
Comments?
| |