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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37ab9219-a049-4a43-b555-83b1629e5a48@wanadoo.fr>
Date:   Wed, 1 Nov 2023 08:41:39 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     paulmck@...nel.org
Cc:     Davidlohr Bueso <dave@...olabs.net>,
        Josh Triplett <josh@...htriplett.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Zqiang <qiang.zhang1211@...il.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, rcu@...r.kernel.org,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] refscale: Optimize process_durations()

Le 31/10/2023 à 23:47, Paul E. McKenney a écrit :
> On Tue, Oct 31, 2023 at 11:21:14AM -0700, Paul E. McKenney wrote:
>> On Mon, Oct 30, 2023 at 09:55:16AM -0700, Davidlohr Bueso wrote:
>>> On Sat, 28 Oct 2023, Christophe JAILLET wrote:
>>>
>>>> process_durations() is not a hot path, but there is no good reason to
>>>> iterate over and over the data already in 'buf'.
>>>>
>>>> Using a seq_buf saves some useless strcat() and the need of a temp buffer.
>>>> Data is written directly at the correct place.
>>>
>>> Makes sense.
>>>
>>> Reviewed-by: Davidlohr Bueso <dave@...olabs.net>
>>
>> Queued and pushed, thank you all!
> 
> But an allmodconfig build complains about seq_buf_putc() being undefined,
> that is, not exported.  I suspect that other seq_buf_*() functions in
> this patch might also be complained about.
> 
> I am dropping this for the moment.  Please make it pass an allmodconfig
> build so that I can pull it in again.  Please see below for the commit.
> 
> 							Thanx, Paul
> 

Ouch!

seq_buf_init(), seq_buf_terminate(), seq_buf_clear() are inlined 
functions in a .h file, so shouldn't be a problem.

seq_buf_printf() is exported, but seq_buf_putc() is not!
Really odd to me.

Kees Cook (added in cc) suggests to use this API (see [1]) to avoid some 
potential issues and ease the management of NULL terminated strings in 
buffers. (#LinuxHardening).

I'll propose to add the missing EXPORT_SYMBOL_GPL.

CJ

[1]: https://lore.kernel.org/all/202310241629.0A4206316F@keescook/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ