Re: [PATCH 3/4] proc: Point /proc/net at /proc/thread-self/net instead of /proc/self/net

From: Linus Torvalds
Date: Thu Sep 29 2022 - 14:22:01 EST


On Thu, Sep 29, 2022 at 8:22 AM David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> This was applied and then reverted by Linus (I can't find anything
> in the LKML archive) - see git show 155134fef - because of
> issues with apparmor and dhclient.

lkml archive link:

https://lore.kernel.org/all/CADDKRnDD_W5yJLo2otWXH8oEgmGdMP0N_p7wenBQbh17xKGZJg@xxxxxxxxxxxxxx/

in case anybody cares.

I wonder if the fix is to replace the symlink with a hardcoded lookup
(ie basically make it *act* like a hardlink - we don't really support
hardlinked directories, but we could basically fake the lookup in
proc). Since the problem was AppArmor reacting to the name in the
symlink.

Al added the participants so that he can say "hell no".

Actually, it might be cleaner to make it act like a dynamic
mount-point instead - kind of "automount" style. Again, Al would be
the person who can say "sure, that makes sense" or "over my dead
body".

Al?

Or maybe that crazy AppArmor rule just doesn't exist any more. It's
been 8 years, after all.

Linus