Re: [PATCH] vfs: fix IMA lockdep circular locking dependency

From: Linus Torvalds
Date: Tue May 15 2012 - 21:53:52 EST


On Tue, May 15, 2012 at 5:45 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Oops. Err.. I meant to do that. Right. To check that you're awake.
>
> Here.

Btw, a few notes:

- this adds the new security_mmap_file() calls to the same places
that Mimi added the ima_file_mmap() call.

HOWEVER. There are other callers that call do_mmap[_pgoff].
Notably, do_shmat(). IMA probably doesn't care, but other security
models might - even if the file in question there will be one just
allocated by the shm layer.

So it does change semantics a bit, in that not only does the
->mmap_file() function no longer get called when 'file' is NULL, it
also doesn't get called with a couple of special files (the other one
I noticed was the i810 driver doing it's do_mmap() dance)

- the fact that we don't call the security function for a NULL-file
mmap() is actually consistent with what do_brk() has always done (it
used to do "addr_only=1", now it obviously does just
security_mmap_addr() instead). So that part looks sane, and no
security model can possibly care.

- I booted the patch. Not that I actually *tested* it any real way,
but at least it boots and doesn't seem to break anything obvious.

Hmm?

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/