On Fri, 24 May 2019 06:05:36 +0200
Miguel Ojeda wrote:
> On Fri, May 24, 2019 at 4:12 AM Steven Rostedt wrote:
> >
> > On Thu, 23 May 2019 14:45:35 +0200
> > Miguel Ojeda wrote:
> >
> > I still prefer the typecast of void *, as that's used a bit more in the
> > kernel, but since char * is also
On Fri, May 24, 2019 at 4:12 AM Steven Rostedt wrote:
>
> On Thu, 23 May 2019 14:45:35 +0200
> Miguel Ojeda wrote:
>
> I still prefer the typecast of void *, as that's used a bit more in the
> kernel, but since char * is also used (not as much), I'll leave it. But
> the parenthesis around iter ar
On Thu, 23 May 2019 14:45:35 +0200
Miguel Ojeda wrote:
> +/*
> + * Reset the state of the trace_iterator so that it can read consumed data.
> + * Normally, the trace_iterator is used for reading the data when it is not
> + * consumed, and must retain state.
> + */
> +static __always_inline void t
Starting with GCC 9, -Warray-bounds detects cases when memset is called
starting on a member of a struct but the size to be cleared ends up
writing over further members.
Such a call happens in the trace code to clear, at once, all members
after and including `seq` on struct trace_iterator:
In
On Fri, 17 May 2019 21:09:21 +0200
Miguel Ojeda wrote:
> By the way, how do you all feel about moving this as a generic
> facility to zero out the suffix/prefix of an structure? In particular,
> since we won't have the LAT* stuff according to Steven.
Is this done in other places? If so, how many
On Fri, May 17, 2019 at 11:25 AM Miguel Ojeda
wrote:
>
> ./include/linux/string.h:344:9: warning: '__builtin_memset' offset
> [8505, 8560] from the object at 'iter' is out of the bounds of
By the way, I noticed these offsets of the new warning seem to be off
by 1, reported here:
http
On Fri, May 17, 2019 at 7:59 PM Linus Torvalds
wrote:
>
> On Fri, May 17, 2019 at 2:25 AM Miguel Ojeda
> wrote:
> >
> > + memset((char *)(iter) + offsetof(struct trace_iterator, seq), 0,
> > + sizeof(struct trace_iterator) -
> > + offsetof(struct trace_iterator, se
Hi Steven,
On Fri, May 17, 2019 at 6:47 PM Steven Rostedt wrote:
>
> Hi Miguel,
>
> Linus mentioned this too.
>
>
> https://lore.kernel.org/lkml/CAHk-=wihyb8w__yqjgyjyzsvniu5ctktcfycmcgdqvg8guj...@mail.gmail.com/T/#u
Ah, I didn't see that. We were discussing here [1] backporting to 4.19
some c
On Fri, May 17, 2019 at 2:25 AM Miguel Ojeda
wrote:
>
> + memset((char *)(iter) + offsetof(struct trace_iterator, seq), 0,
> + sizeof(struct trace_iterator) -
> + offsetof(struct trace_iterator, seq));
Honestly, the above is nasty.
Whenever you have to split an ex
On Fri, 17 May 2019 11:25:02 +0200
Miguel Ojeda wrote:
> Starting with GCC 9, -Warray-bounds detects cases when memset is called
> starting on a member of a struct but the size to be cleared ends up
> writing over further members.
>
> Such a call happens in the trace code to clear, at once, all
Starting with GCC 9, -Warray-bounds detects cases when memset is called
starting on a member of a struct but the size to be cleared ends up
writing over further members.
Such a call happens in the trace code to clear, at once, all members
after and including `seq` on struct trace_iterator:
In
11 matches
Mail list logo