Re: [PATCH v5 31/32] tracing: Convert to printbuf

From: Kent Overstreet
Date: Sun Aug 07 2022 - 23:32:35 EST


On 8/7/22 22:51, Steven Rostedt wrote:
On Mon, 8 Aug 2022 03:41:27 +0100
"Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> wrote:

@@ -9826,20 +9821,8 @@ static struct notifier_block trace_die_notifier = {
void
trace_printk_seq(struct trace_seq *s)
{
- /* Probably should print a warning here. */
- if (s->seq.len >= TRACE_MAX_PRINT)
- s->seq.len = TRACE_MAX_PRINT;
-
- /*
- * More paranoid code. Although the buffer size is set to
- * PAGE_SIZE, and TRACE_MAX_PRINT is 1000, this is just
- * an extra layer of protection.
- */
- if (WARN_ON_ONCE(s->seq.len >= s->seq.size))
- s->seq.len = s->seq.size - 1;
-
/* should be zero ended, but we are paranoid. */
- s->buffer[s->seq.len] = 0;
+ printbuf_nul_terminate(&s->seq);
printk(KERN_TRACE "%s", s->buffer);
diff --g

Please remove the two tracing patches and the deletion of the seq_buf from
the series.

Well, that's not really an option, as Christoph already (rightly) pointed out.

If you've got actual engineering concerns that you'd care to articulate I'd (still) like to try to work with you - otherwise, I don't think this is something I can accommodate you on.