[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFx7HZrZ=OxnRaCKnHJU0fYk5G7PY1o8eRBOaPZu7h-4kA@mail.gmail.com>
Date: Tue, 6 Dec 2011 18:21:55 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: John Johansen <john.johansen@...onical.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [git pull] apparmor fix for __d_path() misuse
On Tue, Dec 6, 2011 at 5:37 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
>
> Turns out that returning ERR_PTR(-EINVAL) is more convenient.
> All right, here's a variant that does *NOT* return any vfsmount/dentry
> pointers at all. And it does best-sane-effort wrt returning the pathname;
> i.e. if it *is* something outside of chroot, that absolute pathname is
> what we'll get.
So I don't mind this patch, but I think the d_absolute_path() thing is
actually being a bit too nice to the two users of that new function.
Both users of that are just broken. And I think they should be fixed,
rather than pandered to. Both of them would be better off just
considering the "out of my mountspace" to be an error, rather than
using some random 'absolute' pathname (where "error" might obviously
mean "I will use another strategy entirely for this case").
Afaik, you really are trying to make crazy code continue to work in
ways that I'm not convinced is really required. Now, maybe it's a good
idea for this stage in the -rc process, but my gut feel is that we
could simply have broken it too. JJ seems willing to fix things up for
AppArmor, and I don't know of any big distro that uses Tomoyo, so...
But I don't actually have any real hatred of this patch. It definitely
falls into my acceptable range.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists