Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-03-07 Thread Steven Rostedt
On Sun, 7 Mar 2021 12:01:42 +0800 Peter Chen wrote: > On 21-03-02 09:56:05, Steven Rostedt wrote: > > On Tue, 2 Mar 2021 16:23:55 +0800 > > Peter Chen wrote: > > > > s it looks like it uses %pa which IIUC from the printk code, it > > > > >> dereferences the pointer to find it's virtual addres

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-03-06 Thread Peter Chen
On 21-03-02 09:56:05, Steven Rostedt wrote: > On Tue, 2 Mar 2021 16:23:55 +0800 > Peter Chen wrote: > > s it looks like it uses %pa which IIUC from the printk code, it > > > >> dereferences the pointer to find it's virtual address. The event has > > > >> this as the field: > > > >> > > > >>

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-03-03 Thread Steven Rostedt
On Wed, 3 Mar 2021 09:21:39 +0800 Peter Chen wrote: > On 21-03-02 09:56:05, Steven Rostedt wrote: > > On Tue, 2 Mar 2021 16:23:55 +0800 > > Peter Chen wrote: > > > > s it looks like it uses %pa which IIUC from the printk code, it > > > > >> dereferences the pointer to find it's virtual addres

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-03-03 Thread Peter Chen
On 21-03-02 09:56:05, Steven Rostedt wrote: > On Tue, 2 Mar 2021 16:23:55 +0800 > Peter Chen wrote: > > s it looks like it uses %pa which IIUC from the printk code, it > > > >> dereferences the pointer to find it's virtual address. The event has > > > >> this as the field: > > > >> > > > >>

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-03-02 Thread Steven Rostedt
On Tue, 2 Mar 2021 16:23:55 +0800 Peter Chen wrote: s it looks like it uses %pa which IIUC from the printk code, it > > >> dereferences the pointer to find it's virtual address. The event has > > >> this as the field: > > >> > > >> __field(struct cdns3_trb *, start_trb_addr) > > >

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-03-02 Thread Peter Chen
On 21-03-01 05:27:04, Pawel Laszczak wrote: > > + Peter Chen - Maintainer of CDNS3 driver > > > > >[ Resending with an address that should work for Felipe ] > > > >On Sat, 27 Feb 2021 14:18:02 -0500 > >Steven Rostedt wrote: > > > >> On Fri, 26 Feb 2021 14:21:00 -0800 > >> Linus Torvalds wrote:

RE: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-28 Thread Pawel Laszczak
+ Peter Chen - Maintainer of CDNS3 driver > >[ Resending with an address that should work for Felipe ] > >On Sat, 27 Feb 2021 14:18:02 -0500 >Steven Rostedt wrote: > >> On Fri, 26 Feb 2021 14:21:00 -0800 >> Linus Torvalds wrote: >> >> > On Fri, Feb 26, 2021 at 11:07 AM Steven Rostedt >> > wr

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-27 Thread Steven Rostedt
[ Resending with an address that should work for Felipe ] On Sat, 27 Feb 2021 14:18:02 -0500 Steven Rostedt wrote: > On Fri, 26 Feb 2021 14:21:00 -0800 > Linus Torvalds wrote: > > > On Fri, Feb 26, 2021 at 11:07 AM Steven Rostedt > > wrote: > > > > > > The first patch scans the print fmt

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-27 Thread Steven Rostedt
On Fri, 26 Feb 2021 14:21:00 -0800 Linus Torvalds wrote: > On Fri, Feb 26, 2021 at 11:07 AM Steven Rostedt wrote: > > > > The first patch scans the print fmts of the trace events looking for > > dereferencing pointers from %p*, and making sure that they refer back > > to the trace event itself.

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-26 Thread Joe Perches
On Fri, 2021-02-26 at 18:33 -0500, Steven Rostedt wrote: > On Fri, 26 Feb 2021 14:21:00 -0800 > Linus Torvalds wrote: > > > > The second patch handles strings "%s" [..] > > > > Doing this at runtime really feels like the wrong thing to do. > > > > It won't even protect us from what happened -

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-26 Thread Steven Rostedt
On Fri, 26 Feb 2021 14:21:00 -0800 Linus Torvalds wrote: > > The second patch handles strings "%s" [..] > > Doing this at runtime really feels like the wrong thing to do. > > It won't even protect us from what happened - people like me and > Andrew won't even run those tracepoints in the firs

Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-26 Thread Linus Torvalds
On Fri, Feb 26, 2021 at 11:07 AM Steven Rostedt wrote: > > The first patch scans the print fmts of the trace events looking for > dereferencing pointers from %p*, and making sure that they refer back > to the trace event itself. > > The second patch handles strings "%s" [..] Doing this at runtime

[PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events

2021-02-26 Thread Steven Rostedt
After seeing that an unsafe string dereference in a trace event made it into the kernel, I decided it's time to add some sanity checks to catch these cases without needing me to supervise. The first patch scans the print fmts of the trace events looking for dereferencing pointers from %p*, and m