Skip to contentSkip to conversation

capabilities: add bounding set to /proc/self/status

PATCH In review Serge E. Hallyn 5 participants 5 messages May 1, 2008 – May 5, 2008 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 capabilities: add bounding set to /proc/self/status

There is currently no way to query the bounding set of another task. As there appears to be no security reason not to, and as Michael Kerrisk points out the following valid reasons to do so exist:

* consistency (I can see all of the other per-thread/process sets in /proc/.../status)
* debugging -- I could imagine that it would make the job of debugging an application that uses capabilities a little simpler.

this patch adds the bounding set to /proc/self/status right after the effective set.

If at all possible (and if acked by Andrew Morgan) it would be nice to get this into the 2.6.26 cycle. But I realize it probably is too late for that.

---
 fs/proc/array.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/proc/array.c +1 -0
index c135cbd..160dd4a 100644
@@ -297,6 +297,7 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p)
 	render_cap_t(m, "CapInh:\t", &p->cap_inheritable);
 	render_cap_t(m, "CapPrm:\t", &p->cap_permitted);
 	render_cap_t(m, "CapEff:\t", &p->cap_effective);
+	render_cap_t(m, "CapBnd:\t", &p->cap_bset);
 }
 
 static inline void task_context_switch_counts(struct seq_file *m,
Signature · 1 line
1.5.3.6
Acked-by on v1 1/1
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cheers

Andrew

Serge E. Hallyn wrote:

| There is currently no way to query the bounding set of another
| task.  As there appears to be no security reason not to, and
| as Michael Kerrisk points out the following valid reasons to do
| so exist:
|
| * consistency (I can see all of the other per-thread/process sets in
| /proc/.../status)
| * debugging -- I could imagine that it would make the job of debugging
| an application that uses capabilities a little simpler.
|
| this patch adds the bounding set to /proc/self/status right after
| the effective set.
|
| If at all possible (and if acked by Andrew Morgan) it would be nice to
| get this into the 2.6.26 cycle.  But I realize it probably is too late
| for that.
|
| Signed-off-by: Serge E. Hallyn <[email protected]>
| Acked-by: Michael Kerrisk <[email protected]>
| ---
|  fs/proc/array.c |    1 +
|  1 files changed, 1 insertions(+), 0 deletions(-)
|
| diff --git a/fs/proc/array.c b/fs/proc/array.c
| index c135cbd..160dd4a 100644
| --- a/fs/proc/array.c
| +++ b/fs/proc/array.c
| @@ -297,6 +297,7 @@ static inline void task_cap(struct seq_file *m,
struct task_struct *p)
|  	render_cap_t(m, "CapInh:\t", &p->cap_inheritable);
|  	render_cap_t(m, "CapPrm:\t", &p->cap_permitted);
|  	render_cap_t(m, "CapEff:\t", &p->cap_effective);
| +	render_cap_t(m, "CapBnd:\t", &p->cap_bset);
|  }
|
|  static inline void task_context_switch_counts(struct seq_file *m,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFIGmGn+bHCR3gb8jsRAlufAJ0eheUXQ1xvB8HofY3KbPIUHqSUXQCeOQf2 pZBx38zkUe7nviE7Z77ns3k=
=lPd5
-----END PGP SIGNATURE-----

Acked-by on v1 1/1
#2 lore raw
In reply to Serge E. Hallyn
Quoted 10 lines · * Serge E. Hallyn ([email protected]) wrote:

There is currently no way to query the bounding set of another task. As there appears to be no security reason not to, and as Michael Kerrisk points out the following valid reasons to do so exist:

* consistency (I can see all of the other per-thread/process sets in /proc/.../status)
* debugging -- I could imagine that it would make the job of debugging an application that uses capabilities a little simpler.

Quoted 6 lines

this patch adds the bounding set to /proc/self/status right after the effective set.

If at all possible (and if acked by Andrew Morgan) it would be nice to get this into the 2.6.26 cycle. But I realize it probably is too late for that.

I've no issue with this.

Quoted 2 lines
Quoted 16 lines
---
 fs/proc/array.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/proc/array.c +1 -0
index c135cbd..160dd4a 100644
@@ -297,6 +297,7 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p)
 	render_cap_t(m, "CapInh:\t", &p->cap_inheritable);
 	render_cap_t(m, "CapPrm:\t", &p->cap_permitted);
 	render_cap_t(m, "CapEff:\t", &p->cap_effective);
+	render_cap_t(m, "CapBnd:\t", &p->cap_bset);
 }
 
 static inline void task_context_switch_counts(struct seq_file *m,
#3 lore raw

Andrew (Morgan),

It looks like this didn't make it into rc1, even though it was sent within the merge window -- perhaps Linus or Andrew (Morton) needed to be explicitly CCed?

Cheers,

Michael

Quoted 43 lines · Chris Wright
Quoted 10 lines · * Serge E. Hallyn ([email protected]) wrote:

There is currently no way to query the bounding set of another task. As there appears to be no security reason not to, and as Michael Kerrisk points out the following valid reasons to do so exist:

* consistency (I can see all of the other per-thread/process sets in /proc/.../status)
* debugging -- I could imagine that it would make the job of debugging an application that uses capabilities a little simpler.

Quoted 6 lines

this patch adds the bounding set to /proc/self/status right after the effective set.

If at all possible (and if acked by Andrew Morgan) it would be nice to get this into the 2.6.26 cycle. But I realize it probably is too late for that.

I've no issue with this.

Quoted 2 lines
Quoted 16 lines
---
 fs/proc/array.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/proc/array.c +1 -0
index c135cbd..160dd4a 100644
@@ -297,6 +297,7 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p)
      render_cap_t(m, "CapInh:\t", &p->cap_inheritable);
      render_cap_t(m, "CapPrm:\t", &p->cap_permitted);
      render_cap_t(m, "CapEff:\t", &p->cap_effective);
+     render_cap_t(m, "CapBnd:\t", &p->cap_bset);
 }
 
 static inline void task_context_switch_counts(struct seq_file *m,
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
#4 lore raw
Quoted 42 lines · On Mon, 5 May 2008 10:22:06 +0200 "Michael Kerrisk"…
Quoted 41 lines · Chris Wright
Quoted 10 lines · * Serge E. Hallyn ([email protected]) wrote:

There is currently no way to query the bounding set of another task. As there appears to be no security reason not to, and as Michael Kerrisk points out the following valid reasons to do so exist:

* consistency (I can see all of the other per-thread/process sets in /proc/.../status)
* debugging -- I could imagine that it would make the job of debugging an application that uses capabilities a little simpler.

Quoted 6 lines

this patch adds the bounding set to /proc/self/status right after the effective set.

If at all possible (and if acked by Andrew Morgan) it would be nice to get this into the 2.6.26 cycle. But I realize it probably is too late for that.

I've no issue with this.

Quoted 2 lines
Quoted 15 lines
---
 fs/proc/array.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/proc/array.c +1 -0
index c135cbd..160dd4a 100644
@@ -297,6 +297,7 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p)
      render_cap_t(m, "CapInh:\t", &p->cap_inheritable);
      render_cap_t(m, "CapPrm:\t", &p->cap_permitted);
      render_cap_t(m, "CapEff:\t", &p->cap_effective);
+     render_cap_t(m, "CapBnd:\t", &p->cap_bset);
 }
 
Quoted 3 lines
Quoted 2 lines

fs/proc/array.c static inline void task_cap(struct seq_file *m, struct task_struct *p) · line 303

Quoted 1 line
fs/proc/array.c +0 -0
 static inline void task_context_switch_counts(struct seq_file *m,

[top-posting repaired]

Quoted 6 lines

Andrew (Morgan),

It looks like this didn't make it into rc1, even though it was sent within the merge window -- perhaps Linus or Andrew (Morton) needed to be explicitly CCed?

Sorry, I'm horridly backlogged. I seem to be able to process them at about 105% of the arrival rate lately, so we'll get there. It isn't lost.