* [RFC PATCH] proc: making "limits" world readable
@ 2010-09-21 9:10 Jiri Olsa
2010-09-23 21:56 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Jiri Olsa @ 2010-09-21 9:10 UTC (permalink / raw)
To: nhorman, eugene; +Cc: linux-kernel, oleg
hi,
I'd like to have the /proc/<pid>/limits file world readable,
but I'm not sure this could cause some security issue.. thoughts?
The "limit" file was as a debug feature by following commit:
- proc: export a processes resource limits via /proc/pid
commit d85f50d5e1aa99ab082035f94265847521819e58
Author: Neil Horman <nhorman@tuxdriver.com>
thanks for any ideas,
jirka
---
fs/proc/base.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index a1c43e7..8e4adda 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {
INF("auxv", S_IRUSR, proc_pid_auxv),
ONE("status", S_IRUGO, proc_pid_status),
ONE("personality", S_IRUSR, proc_pid_personality),
- INF("limits", S_IRUSR, proc_pid_limits),
+ INF("limits", S_IRUGO, proc_pid_limits),
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
@@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {
INF("auxv", S_IRUSR, proc_pid_auxv),
ONE("status", S_IRUGO, proc_pid_status),
ONE("personality", S_IRUSR, proc_pid_personality),
- INF("limits", S_IRUSR, proc_pid_limits),
+ INF("limits", S_IRUGO, proc_pid_limits),
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] proc: making "limits" world readable
2010-09-21 9:10 [RFC PATCH] proc: making "limits" world readable Jiri Olsa
@ 2010-09-23 21:56 ` Andrew Morton
2010-09-24 10:55 ` Jiri Olsa
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2010-09-23 21:56 UTC (permalink / raw)
To: Jiri Olsa; +Cc: nhorman, eugene, linux-kernel, oleg
On Tue, 21 Sep 2010 11:10:55 +0200
Jiri Olsa <jolsa@redhat.com> wrote:
> hi,
>
> I'd like to have the /proc/<pid>/limits file world readable,
Why?
> but I'm not sure this could cause some security issue.. thoughts?
>
> The "limit" file was as a debug feature by following commit:
> - proc: export a processes resource limits via /proc/pid
> commit d85f50d5e1aa99ab082035f94265847521819e58
> Author: Neil Horman <nhorman@tuxdriver.com>
>
>
> thanks for any ideas,
> jirka
> ---
> fs/proc/base.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index a1c43e7..8e4adda 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {
> INF("auxv", S_IRUSR, proc_pid_auxv),
> ONE("status", S_IRUGO, proc_pid_status),
> ONE("personality", S_IRUSR, proc_pid_personality),
> - INF("limits", S_IRUSR, proc_pid_limits),
> + INF("limits", S_IRUGO, proc_pid_limits),
> #ifdef CONFIG_SCHED_DEBUG
> REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
> #endif
> @@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {
> INF("auxv", S_IRUSR, proc_pid_auxv),
> ONE("status", S_IRUGO, proc_pid_status),
> ONE("personality", S_IRUSR, proc_pid_personality),
> - INF("limits", S_IRUSR, proc_pid_limits),
> + INF("limits", S_IRUGO, proc_pid_limits),
> #ifdef CONFIG_SCHED_DEBUG
> REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
> #endif
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] proc: making "limits" world readable
2010-09-23 21:56 ` Andrew Morton
@ 2010-09-24 10:55 ` Jiri Olsa
2010-09-24 16:20 ` Neil Horman
0 siblings, 1 reply; 8+ messages in thread
From: Jiri Olsa @ 2010-09-24 10:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: nhorman, eugene, linux-kernel, oleg
On Thu, Sep 23, 2010 at 02:56:42PM -0700, Andrew Morton wrote:
> On Tue, 21 Sep 2010 11:10:55 +0200
> Jiri Olsa <jolsa@redhat.com> wrote:
>
> > hi,
> >
> > I'd like to have the /proc/<pid>/limits file world readable,
>
> Why?
>
having this will ease the task of system management for large install
bases and where root privileges might be restricted
jirka
> > but I'm not sure this could cause some security issue.. thoughts?
> >
> > The "limit" file was as a debug feature by following commit:
> > - proc: export a processes resource limits via /proc/pid
> > commit d85f50d5e1aa99ab082035f94265847521819e58
> > Author: Neil Horman <nhorman@tuxdriver.com>
> >
> >
> > thanks for any ideas,
> > jirka
> > ---
> > fs/proc/base.c | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/proc/base.c b/fs/proc/base.c
> > index a1c43e7..8e4adda 100644
> > --- a/fs/proc/base.c
> > +++ b/fs/proc/base.c
> > @@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {
> > INF("auxv", S_IRUSR, proc_pid_auxv),
> > ONE("status", S_IRUGO, proc_pid_status),
> > ONE("personality", S_IRUSR, proc_pid_personality),
> > - INF("limits", S_IRUSR, proc_pid_limits),
> > + INF("limits", S_IRUGO, proc_pid_limits),
> > #ifdef CONFIG_SCHED_DEBUG
> > REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
> > #endif
> > @@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {
> > INF("auxv", S_IRUSR, proc_pid_auxv),
> > ONE("status", S_IRUGO, proc_pid_status),
> > ONE("personality", S_IRUSR, proc_pid_personality),
> > - INF("limits", S_IRUSR, proc_pid_limits),
> > + INF("limits", S_IRUGO, proc_pid_limits),
> > #ifdef CONFIG_SCHED_DEBUG
> > REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
> > #endif
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] proc: making "limits" world readable
2010-09-24 10:55 ` Jiri Olsa
@ 2010-09-24 16:20 ` Neil Horman
2010-09-24 18:32 ` Andrew Morton
2010-09-27 7:23 ` [RFC PATCH] " Eugene Teo
0 siblings, 2 replies; 8+ messages in thread
From: Neil Horman @ 2010-09-24 16:20 UTC (permalink / raw)
To: Jiri Olsa; +Cc: Andrew Morton, eugene, linux-kernel, oleg
On Fri, Sep 24, 2010 at 12:55:47PM +0200, Jiri Olsa wrote:
> On Thu, Sep 23, 2010 at 02:56:42PM -0700, Andrew Morton wrote:
> > On Tue, 21 Sep 2010 11:10:55 +0200
> > Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > > hi,
> > >
> > > I'd like to have the /proc/<pid>/limits file world readable,
> >
> > Why?
> >
>
> having this will ease the task of system management for large install
> bases and where root privileges might be restricted
>
> jirka
>
I don't see a problem with making this file world readable. Doing so would be
in keeping with most of the other stats bearing files in /proc/<pid>. The only
reason I didn't make it world readable was because the getrlimit sematics
previously kept limit information private to the process, and I didn't want to
deviate from that. But as long as we're not making it world writeable I think
we're ok.
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] proc: making "limits" world readable
2010-09-24 16:20 ` Neil Horman
@ 2010-09-24 18:32 ` Andrew Morton
2010-09-27 8:49 ` [PATCHv2] " Jiri Olsa
2010-09-27 7:23 ` [RFC PATCH] " Eugene Teo
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2010-09-24 18:32 UTC (permalink / raw)
To: Neil Horman; +Cc: Jiri Olsa, eugene, linux-kernel, oleg
On Fri, 24 Sep 2010 12:20:07 -0400
Neil Horman <nhorman@tuxdriver.com> wrote:
> On Fri, Sep 24, 2010 at 12:55:47PM +0200, Jiri Olsa wrote:
> > On Thu, Sep 23, 2010 at 02:56:42PM -0700, Andrew Morton wrote:
> > > On Tue, 21 Sep 2010 11:10:55 +0200
> > > Jiri Olsa <jolsa@redhat.com> wrote:
> > >
> > > > hi,
> > > >
> > > > I'd like to have the /proc/<pid>/limits file world readable,
> > >
> > > Why?
> > >
> >
> > having this will ease the task of system management for large install
> > bases and where root privileges might be restricted
> >
> > jirka
> >
> I don't see a problem with making this file world readable. Doing so would be
> in keeping with most of the other stats bearing files in /proc/<pid>. The only
> reason I didn't make it world readable was because the getrlimit sematics
> previously kept limit information private to the process, and I didn't want to
> deviate from that. But as long as we're not making it world writeable I think
> we're ok.
>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
>
hm, OK, I can't really think of any realistic problem with exposing limits.
The original patch had no signoff. Please resend, with a changelog
which includes a *good* rationale for making the change. For example,
a use case.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] proc: making "limits" world readable
2010-09-24 16:20 ` Neil Horman
2010-09-24 18:32 ` Andrew Morton
@ 2010-09-27 7:23 ` Eugene Teo
1 sibling, 0 replies; 8+ messages in thread
From: Eugene Teo @ 2010-09-27 7:23 UTC (permalink / raw)
To: Neil Horman; +Cc: Jiri Olsa, Andrew Morton, linux-kernel, oleg
On 09/25/2010 12:20 AM, Neil Horman wrote:
> On Fri, Sep 24, 2010 at 12:55:47PM +0200, Jiri Olsa wrote:
>> On Thu, Sep 23, 2010 at 02:56:42PM -0700, Andrew Morton wrote:
>>> On Tue, 21 Sep 2010 11:10:55 +0200
>>> Jiri Olsa<jolsa@redhat.com> wrote:
>>>
>>>> hi,
>>>>
>>>> I'd like to have the /proc/<pid>/limits file world readable,
>>>
>>> Why?
>>>
>>
>> having this will ease the task of system management for large install
>> bases and where root privileges might be restricted
>>
>> jirka
>>
> I don't see a problem with making this file world readable. Doing so would be
> in keeping with most of the other stats bearing files in /proc/<pid>. The only
> reason I didn't make it world readable was because the getrlimit sematics
> previously kept limit information private to the process, and I didn't want to
> deviate from that. But as long as we're not making it world writeable I think
> we're ok.
>
> Acked-by: Neil Horman<nhorman@tuxdriver.com>
I agree with Neil. I can't see how this can be a problem as long as it
is just world-readable.
Eugene
--
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCHv2] proc: making "limits" world readable
2010-09-24 18:32 ` Andrew Morton
@ 2010-09-27 8:49 ` Jiri Olsa
2010-09-27 10:41 ` Neil Horman
0 siblings, 1 reply; 8+ messages in thread
From: Jiri Olsa @ 2010-09-27 8:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: Neil Horman, eugene, linux-kernel
On Fri, Sep 24, 2010 at 11:32:46AM -0700, Andrew Morton wrote:
> On Fri, 24 Sep 2010 12:20:07 -0400
> Neil Horman <nhorman@tuxdriver.com> wrote:
>
> > On Fri, Sep 24, 2010 at 12:55:47PM +0200, Jiri Olsa wrote:
> > > On Thu, Sep 23, 2010 at 02:56:42PM -0700, Andrew Morton wrote:
> > > > On Tue, 21 Sep 2010 11:10:55 +0200
> > > > Jiri Olsa <jolsa@redhat.com> wrote:
> > > >
> > > > > hi,
> > > > >
> > > > > I'd like to have the /proc/<pid>/limits file world readable,
> > > >
> > > > Why?
> > > >
> > >
> > > having this will ease the task of system management for large install
> > > bases and where root privileges might be restricted
> > >
> > > jirka
> > >
> > I don't see a problem with making this file world readable. Doing so would be
> > in keeping with most of the other stats bearing files in /proc/<pid>. The only
> > reason I didn't make it world readable was because the getrlimit sematics
> > previously kept limit information private to the process, and I didn't want to
> > deviate from that. But as long as we're not making it world writeable I think
> > we're ok.
> >
> > Acked-by: Neil Horman <nhorman@tuxdriver.com>
> >
>
> hm, OK, I can't really think of any realistic problem with exposing limits.
>
> The original patch had no signoff. Please resend, with a changelog
> which includes a *good* rationale for making the change. For example,
> a use case.
>
thanks for feedback, the patch is attached
jirka
---
making the /proc/<pid>/limits file world readable.
Having the limits file world readable will ease the task of
system management on systems where root privileges might be
restricted.
Having admin restricted with root proviledges, he/she could
not check other users process' limits.
Also it'd align with most of the /proc stat files.
wbr,
jirka
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
fs/proc/base.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index a1c43e7..8e4adda 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2675,7 +2675,7 @@ static const struct pid_entry tgid_base_stuff[] = {
INF("auxv", S_IRUSR, proc_pid_auxv),
ONE("status", S_IRUGO, proc_pid_status),
ONE("personality", S_IRUSR, proc_pid_personality),
- INF("limits", S_IRUSR, proc_pid_limits),
+ INF("limits", S_IRUGO, proc_pid_limits),
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
@@ -3011,7 +3011,7 @@ static const struct pid_entry tid_base_stuff[] = {
INF("auxv", S_IRUSR, proc_pid_auxv),
ONE("status", S_IRUGO, proc_pid_status),
ONE("personality", S_IRUSR, proc_pid_personality),
- INF("limits", S_IRUSR, proc_pid_limits),
+ INF("limits", S_IRUGO, proc_pid_limits),
#ifdef CONFIG_SCHED_DEBUG
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCHv2] proc: making "limits" world readable
2010-09-27 8:49 ` [PATCHv2] " Jiri Olsa
@ 2010-09-27 10:41 ` Neil Horman
0 siblings, 0 replies; 8+ messages in thread
From: Neil Horman @ 2010-09-27 10:41 UTC (permalink / raw)
To: Jiri Olsa; +Cc: Andrew Morton, eugene, linux-kernel
On Mon, Sep 27, 2010 at 10:49:23AM +0200, Jiri Olsa wrote:
> On Fri, Sep 24, 2010 at 11:32:46AM -0700, Andrew Morton wrote:
> > On Fri, 24 Sep 2010 12:20:07 -0400
> > Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > > On Fri, Sep 24, 2010 at 12:55:47PM +0200, Jiri Olsa wrote:
> > > > On Thu, Sep 23, 2010 at 02:56:42PM -0700, Andrew Morton wrote:
> > > > > On Tue, 21 Sep 2010 11:10:55 +0200
> > > > > Jiri Olsa <jolsa@redhat.com> wrote:
> > > > >
> > > > > > hi,
> > > > > >
> > > > > > I'd like to have the /proc/<pid>/limits file world readable,
> > > > >
> > > > > Why?
> > > > >
> > > >
> > > > having this will ease the task of system management for large install
> > > > bases and where root privileges might be restricted
> > > >
> > > > jirka
> > > >
> > > I don't see a problem with making this file world readable. Doing so would be
> > > in keeping with most of the other stats bearing files in /proc/<pid>. The only
> > > reason I didn't make it world readable was because the getrlimit sematics
> > > previously kept limit information private to the process, and I didn't want to
> > > deviate from that. But as long as we're not making it world writeable I think
> > > we're ok.
> > >
> > > Acked-by: Neil Horman <nhorman@tuxdriver.com>
> > >
> >
> > hm, OK, I can't really think of any realistic problem with exposing limits.
> >
> > The original patch had no signoff. Please resend, with a changelog
> > which includes a *good* rationale for making the change. For example,
> > a use case.
> >
> thanks for feedback, the patch is attached
>
> jirka
>
> ---
> making the /proc/<pid>/limits file world readable.
>
> Having the limits file world readable will ease the task of
> system management on systems where root privileges might be
> restricted.
>
> Having admin restricted with root proviledges, he/she could
> not check other users process' limits.
>
> Also it'd align with most of the /proc stat files.
>
> wbr,
> jirka
>
>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-09-27 10:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 9:10 [RFC PATCH] proc: making "limits" world readable Jiri Olsa
2010-09-23 21:56 ` Andrew Morton
2010-09-24 10:55 ` Jiri Olsa
2010-09-24 16:20 ` Neil Horman
2010-09-24 18:32 ` Andrew Morton
2010-09-27 8:49 ` [PATCHv2] " Jiri Olsa
2010-09-27 10:41 ` Neil Horman
2010-09-27 7:23 ` [RFC PATCH] " Eugene Teo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox