lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2365C14A-C579-497D-A271-EC24911A6BE1@fb.com>
Date:   Tue, 7 May 2019 16:13:16 +0000
From:   Song Liu <songliubraving@...com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH] perf: allow non-privileged uprobe for user processes



> On May 7, 2019, at 4:40 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Tue, May 07, 2019 at 12:43:15AM -0700, Song Liu wrote:
>> diff --git a/kernel/events/core.c b/kernel/events/core.c
>> index abbd4b3b96c2..0508774d82e4 100644
>> --- a/kernel/events/core.c
>> +++ b/kernel/events/core.c
>> @@ -8532,9 +8532,10 @@ static int perf_tp_event_match(struct perf_event *event,
>> 	if (event->hw.state & PERF_HES_STOPPED)
>> 		return 0;
>> 	/*
>> -	 * All tracepoints are from kernel-space.
>> +	 * All tracepoints except uprobes are from kernel-space.
>> 	 */
>> -	if (event->attr.exclude_kernel)
>> +	if (event->attr.exclude_kernel &&
>> +	    ((event->tp_event->flags & TRACE_EVENT_FL_UPROBE) == 0))
> 
> That doesn't make sense; should you not be checking user_mode(regs)
> instead?

Yes! user_mode(regs) is better! V2 coming soon.

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ