[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d35x6pzv.fsf@xmission.com>
Date: Mon, 21 May 2012 18:03:48 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: "Kok\, Auke-jan H" <auke-jan.h.kok@...el.com>
Cc: Serge Hallyn <serge.hallyn@...onical.com>,
linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org, Eric Paris <eparis@...hat.com>
Subject: Re: [PATCH] Trace event for capable().
"Kok, Auke-jan H" <auke-jan.h.kok@...el.com> writes:
> On Fri, May 18, 2012 at 11:59 PM, Eric W. Biederman
> <ebiederm@...ssion.com> wrote:
>> Auke Kok <auke-jan.h.kok@...el.com> writes:
>>
>> > Add a simple trace event for capable().
>> >
>> > There's been a lot of discussion around capable(), and there
>> > are plenty of tools to help reduce capabilities' usage from
>> > userspace. A major gap however is that it's almost impossible
>> > to see or verify which bits are requested from either userspace
>> > or in the kernel.
>> >
>> > This patch adds a minimal tracer that will print out which
>> > CAPs are requested and whether the request was granted.
>>
>> A small comment assigned from the other issues.
>>
>> current->pid for anything going to userspace is broken,
>> and in fact current->pid should be killed on of these days.
>>
>> Which pid namespace is your tracer running in?
>
> init - I currently have no need for namespaces myself at all, and, as I replied
> to Serge and Eric already - I'll see if I can fis up the tracer with their
> suggestions.
Thanks.
A quick read of perf_event_open shows that the syscall is allowed by
unprivileged users in any context if sysctl_perf_event_paranoid is
set properly. So it looks like the perf code needs to handle namespaces
properly if we are going to be reporting namespaced values like uid
and pids. Even if no one cares today what about next week?
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists