[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141114123442.4669a0f4@gandalf.local.home>
Date: Fri, 14 Nov 2014 12:34:42 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Petr Mladek <pmladek@...e.cz>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>
Subject: Re: [RFC][PATCH 19/23 v4] seq_buf: Create seq_buf_used() to find
out how much was written
On Fri, 14 Nov 2014 18:23:06 +0100
Petr Mladek <pmladek@...e.cz> wrote:
> On Thu 2014-11-13 20:13:03, Steven Rostedt wrote:
> > From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> >
> > Add a helper function seq_buf_used() that replaces the SEQ_BUF_USED()
> > private macro to let callers have a method to know how much of the
> > seq_buf was written to.
> >
> > Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
>
> Reviewed-by: Petr Mladek <pmladek@...e.cz>
>
> The patch is correct. But we should move it before "[RFC][PATCH 17/23
> v4] tracing: Have seq_buf use full buffer" and use it everywhere
> any code is accessing the internal buffer using the seq.len value.
> I mean to solve the potential buffer overflows mentioned for
> "[RFC][PATCH 13/23 v4] tracing: Create seq_buf layer in trace_seq"
>
> Best Regards,
Bah, I'm getting seq_buf_buffer_left() confused with seq_buf_used().
Yes, this should be moved before hand. I thought it was by looking at:
git show <patch-17-SHA1>:include/linux/seq_buf.h
I saw the seq_buf_buffer_left() and confused that with seq_buf_used()
and said to myself "oh good, it has the function I need". Not!
Thanks,
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists