RCU Archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Josh Triplett <josh@joshtriplett.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <quic_neeraju@quicinc.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang1211@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	rcu@vger.kernel.org, Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] refscale: Optimize process_durations()
Date: Wed, 1 Nov 2023 03:24:36 -0700	[thread overview]
Message-ID: <014c446a-23c4-40f9-9512-6869a9b02117@paulmck-laptop> (raw)
In-Reply-To: <37ab9219-a049-4a43-b555-83b1629e5a48@wanadoo.fr>

On Wed, Nov 01, 2023 at 08:41:39AM +0100, Christophe JAILLET wrote:
> 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@stgolabs.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.
> 
> Ouch!

Believe me, I know that feeling!  ;-)

> 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.

Very good, looking forward to seeing the result.

							Thanx, Paul

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

      reply	other threads:[~2023-11-01 10:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28 17:04 [PATCH] refscale: Optimize process_durations() Christophe JAILLET
2023-10-28 21:30 ` Steven Rostedt
2023-10-30 16:55 ` Davidlohr Bueso
2023-10-31 18:21   ` Paul E. McKenney
2023-10-31 22:47     ` Paul E. McKenney
2023-11-01  7:41       ` Christophe JAILLET
2023-11-01 10:24         ` Paul E. McKenney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=014c446a-23c4-40f9-9512-6869a9b02117@paulmck-laptop \
    --to=paulmck@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dave@stgolabs.net \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=qiang.zhang1211@gmail.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).