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]
Date:   Mon, 12 Nov 2018 08:37:20 -0800
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ben Hutchings <ben@...adent.org.uk>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tools: Suppress potential format-truncation warning
 in util/pmu.c

Em Sun, Nov 11, 2018 at 06:45:24PM +0000, Ben Hutchings escreveu:
> Depending on which functions are inlined in util/pmu.c, the
> snprintf() calls in perf_pmu__parse_{scale,unit,per_pkg,snapshot}()
> might trigger a warning:
> 
> util/pmu.c: In function 'pmu_aliases':
> util/pmu.c:178:31: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
>   snprintf(path, PATH_MAX, "%s/%s.unit", dir, name);
>                                ^~
> 
> I found this when trying to build perf from Linux 3.16 with gcc 8.
> However I can reproduce the problem in mainline if I force
> __perf_pmu__new_alias() to be inlined.
> 
> Suppress this by using scnprintf() as has been done elsewhere in
> perf.

Thanks, applied.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ