Thread (1 message) 1 message, 1 author, 2022-09-29

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

From: Eric W. Biederman <hidden>
Date: 2022-09-29 22:16:00
Also in: lkml

Linus Torvalds [off-list ref] writes:
On Thu, Sep 29, 2022 at 2:15 PM Al Viro [off-list ref] wrote:
quoted
FWIW, what e.g. debian profile for dhclient has is
  @{PROC}/@{pid}/net/dev      r,

Note that it's not
  @{PROC}/net/dev      r,
Argh. Yeah, then a bind mount or a hardlink won't work either, you're
right. I was assuming that any Apparmor rules allowed for just
/proc/net.

Oh well. I guess we're screwed any which way we turn.
I actually think there is a solution.

Instead of going to /proc/self/net -> /proc/tgid/net
or /proc/thread-self/net -> /proc/tgid/task/tid/net

We should be able to go to: /proc/tid/net

That directory does not show up in readdir, but the tid directories were
put in /proc because of how our pthread support evolved and gdb which
made gdb expect them to be their.

That should continue to work with the incomplete apparmor rules that
don't allow accessing /proc/tgid/tid/net for some reason.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help