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:   Wed, 9 Sep 2020 10:19:34 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, jolsa@...hat.com, namhyung@...nel.org
Cc:     linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] kernel: events: Use scnprintf() in show_pmu_*() instead
 of snprintf()

On 9/9/20 12:45 AM, Alexander Shishkin wrote:
> Shuah Khan <skhan@...uxfoundation.org> writes:
> 
>> Since snprintf() returns would-be-output size instead of the actual
>> output size, replace it with scnprintf(), so the nr_addr_filters_show(),
>> type_show(), and perf_event_mux_interval_ms_show() routines return the
>> actual size.
> 
> Well, firstly they should just be sprintf()s, and secondly, I wouldn't
> worry about it, because [0].

scnprintf() or sprinf() could be used.

> 
> [0] https://marc.info/?l=linux-kernel&m=159874491103969&w=2

Awesome. Thanks for the pointer. I wasn't aware of this work and
it takes care of the problem kernel wide. A better way to solve
the problem.

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ