lkml.org 
[lkml]   [2011]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [git pull] apparmor fix for __d_path() misuse
On Tue, Dec 6, 2011 at 5:37 PM, Al Viro <viro@zeniv.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-12-07 03:25    [W:0.076 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site