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] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa4f4c83-1a1a-761f-9259-ce21ee000fc3@huawei.com>
Date:   Wed, 14 Mar 2018 19:39:25 +0000
From:   John Garry <john.garry@...wei.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
CC:     <peterz@...radead.org>, <mingo@...hat.com>,
        <alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
        <namhyung@...nel.org>, <ak@...ux.intel.com>, <wcohen@...hat.com>,
        <sukadev@...ux.vnet.ibm.com>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>
Subject: Re: [PATCH] perf vendor events: fix processing for xfs

On 14/03/2018 18:53, Arnaldo Carvalho de Melo wrote:
> Em Thu, Mar 15, 2018 at 01:10:52AM +0800, John Garry escreveu:
>> In the recently introduced support for vendor subdirectory,
>> the checking for directory entries under xfs (or any other fs
>> which does not support dirent.d_type) is missing the check
>> for links for current and parent directory. This can result
>> in a broken pmu_events.c being generated.
>>
>> Fix this by adding the appropriate check in is_leaf_dir().
>
> So I'll lookup the patch that introduced the patch and squash this one
> with it, so that we don't break 'git bisect' on ppc.

Right, so it's going to be "perf vendor events: add support for pmu 
events vendor subdirectory".

BTW, I don't think it's specifically ppc which was broken, but just when 
building from xfs.

Much appreciated,
John

>
> - Arnaldo
>
>> Cc: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
>> Signed-off-by: John Garry <john.garry@...wei.com>
>>
>> diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
>> index 1c01844..db3a594 100644
>> --- a/tools/perf/pmu-events/jevents.c
>> +++ b/tools/perf/pmu-events/jevents.c
>> @@ -873,7 +873,10 @@ static int is_leaf_dir(const char *fpath)
>>  		return 0;
>>
>>  	while ((dir = readdir(d)) != NULL) {
>> -		if (dir->d_type == DT_DIR && dir->d_name[0] != '.') {
>> +		if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, ".."))
>> +			continue;
>> +
>> +		if (dir->d_type == DT_DIR) {
>>  			res = 0;
>>  			break;
>>  		} else if (dir->d_type == DT_UNKNOWN) {
>> --
>> 1.9.1
>
> .
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ