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: <CABPqkBQDm=Kja99P=4C5n72LfNVN5HPtm4STxW5tKgwkQOJ-LA@mail.gmail.com>
Date:	Thu, 17 Oct 2013 18:09:47 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	David Ahern <dsahern@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH v2] perf: disable PERF_RECORD_MMAP2 support

On Thu, Oct 17, 2013 at 5:59 PM, David Ahern <dsahern@...il.com> wrote:
> On 10/17/13 9:57 AM, Stephane Eranian wrote:
>>
>> On Thu, Oct 17, 2013 at 5:54 PM, David Ahern <dsahern@...il.com> wrote:
>>>
>>> On 10/17/13 8:28 AM, Stephane Eranian wrote:
>>>>
>>>>
>>>>
>>>> For now, we disable the extended MMAP record support (MMAP2).
>>>> We have identified cases where it would not report the correct
>>>> mapping information, clone(VM_CLONE) but with separate pids.
>>>> We will revisit the support once we find a solution for this case.
>>>>
>>>> The patch changes the kernel to return EINVAL if attr->mmap2
>>>> is set. The patch also modifies the perf tool to use regular
>>>> PERF_RECORD_MMAP
>>>> for synthetic events and it also prevents the tool from requesting
>>>> attr->mmap2
>>>> mode because the kernel would reject it.
>>>>
>>>> The support will be revisited once the kenrel interface is updated.
>>>
>>>
>>>
>>> Why not disable mmap2 as well:
>>>
>>> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
>>> index 0ce9febf1ba0..289f34dbe970 100644
>>> --- a/tools/perf/util/evsel.c
>>> +++ b/tools/perf/util/evsel.c
>>> @@ -678,7 +678,7 @@ void perf_evsel__config(struct perf_evsel *evsel,
>>>          attr->sample_type   |= PERF_SAMPLE_WEIGHT;
>>>
>>>      attr->mmap  = track;
>>> -   attr->mmap2 = track && !perf_missing_features.mmap2;
>>> +   /* attr->mmap2 = track && !perf_missing_features.mmap2; */
>>>      attr->comm  = track;
>>>
>> It is disabled automatically later on. I checked that. Wanted to minimize
>> the changes.
>>
>
> Understood that the fallback kicks in. Why fail the perf_event_open every
> single time when we know it is not going to succeed?
>
Ok, I can add that.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ