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: <de62f91e-b081-4cf5-8052-0b910ccf1b41@linaro.org>
Date: Tue, 21 Oct 2025 09:28:16 +0100
From: James Clark <james.clark@...aro.org>
To: Leo Yan <leo.yan@....com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
 Adrian Hunter <adrian.hunter@...el.com>, linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] perf jevents: Fix build when there are other json
 files in the tree



On 20/10/2025 5:38 pm, Leo Yan wrote:
> On Mon, Oct 20, 2025 at 05:08:26PM +0100, James Clark wrote:
>> The unquoted glob *.json will expand to a real file if, for example,
>> there is any file in the Perf source ending in .json. This can happen
>> when using tools like Bear and clangd which generate a
>> compile_commands.json file. With the glob already expanded by the shell,
>> the find command will fail to wildcard any real json events files.
>>
>> Fix it by wrapping the star in quotes so it's passed to find rather than
>> the shell.
>>
>> This fixes the following build error (most of the diff output omitted):
>>
>>    $ make V=1 -C tools/perf O=/tmp/perf_build_with_json
>>
>>    TEST    /tmp/perf_build_with_json/pmu-events/empty-pmu-events.log
>>    ...
>>     /* offset=121053 */ "node-access\000legacy cache\000Local memory read accesses\000legacy-cache-config=6\000\00010\000\000\000\000\000"
>>     /* offset=121135 */ "node-misses\000legacy cache\000Local memory read misses\000legacy-cache-config=0x10006\000\00010\000\000\000\000\000"
>>     /* offset=121221 */ "node-miss\000legacy cache\000Local memory read misses\000legacy-cache-config=0x10006\000\00010\000\000\000\000\000"
>>    ...
>>    -       {
>>                    .event_table = { 0, 0 },
>>                    .metric_table = { 0, 0 },
>>            },
>>    make[3]: *** [pmu-events/Build:54: /tmp/perf_build_with_json/pmu-events/empty-pmu-events.log] Error 1
>>
>> Fixes: 4bb55de4ff03 ("perf jevents: Support copying the source json files to OUTPUT")
>> Signed-off-by: James Clark <james.clark@...aro.org>
> 
> Searched a bit, if without quotes, the wildcard will be expanded by make
> but not by shell.  It makes sense for me to fix it with quotes.
> 

I think it is the shell. The only * expanded by make is file names on 
the right hand side of rules. Either way it only makes a difference to 
the commit message.

> Reviewed-by: Leo Yan <leo.yan@....com>

Thanks for the review.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ