Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1566645 > unrolled thread
| Started by | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| First post | 2017-01-25 15:30 +0100 |
| Last post | 2017-01-25 15:40 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] kasan: Respect /proc/sys/kernel/traceoff_on_warning Peter Zijlstra <peterz@infradead.org> - 2017-01-25 15:30 +0100
Re: [PATCH] kasan: Respect /proc/sys/kernel/traceoff_on_warning Alexander Potapenko <glider@google.com> - 2017-01-25 15:40 +0100
Re: [PATCH] kasan: Respect /proc/sys/kernel/traceoff_on_warning Alexander Potapenko <glider@google.com> - 2017-01-25 15:40 +0100
Re: [PATCH] kasan: Respect /proc/sys/kernel/traceoff_on_warning Peter Zijlstra <peterz@infradead.org> - 2017-01-25 15:40 +0100
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2017-01-25 15:30 +0100 |
| Subject | Re: [PATCH] kasan: Respect /proc/sys/kernel/traceoff_on_warning |
| Message-ID | <t3wKd-2S1-1@gated-at.bofh.it> |
On Wed, Jan 25, 2017 at 03:25:24PM +0100, Peter Zijlstra wrote: > > After much waiting I finally reproduced a KASAN issue, only to find my > trace-buffer empty of useful information because it got spooled out :/ > > Make kasan_report honour the /proc/sys/kernel/traceoff_on_warning > interface. > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > --- Seems to compile better when you add the required header files... mm/kasan/report.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index b82b3e2..3653ed1 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -24,6 +24,7 @@ #include <linux/types.h> #include <linux/kasan.h> #include <linux/module.h> +#include <linux/ftrace.h> #include <asm/sections.h> @@ -300,6 +301,8 @@ void kasan_report(unsigned long addr, size_t size, if (likely(!kasan_report_enabled())) return; + disable_trace_on_warning(); + info.access_addr = (void *)addr; info.access_size = size; info.is_write = is_write;
[toc] | [next] | [standalone]
| From | Alexander Potapenko <glider@google.com> |
|---|---|
| Date | 2017-01-25 15:40 +0100 |
| Message-ID | <t3wTT-2VB-17@gated-at.bofh.it> |
| In reply to | #1566645 |
On Wed, Jan 25, 2017 at 3:28 PM, Peter Zijlstra <peterz@infradead.org> wrote: > On Wed, Jan 25, 2017 at 03:25:24PM +0100, Peter Zijlstra wrote: >> >> After much waiting I finally reproduced a KASAN issue, only to find my >> trace-buffer empty of useful information because it got spooled out :/ >> >> Make kasan_report honour the /proc/sys/kernel/traceoff_on_warning >> interface. >> >> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> >> --- > > Seems to compile better when you add the required header files... > > mm/kasan/report.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/mm/kasan/report.c b/mm/kasan/report.c > index b82b3e2..3653ed1 100644 > --- a/mm/kasan/report.c > +++ b/mm/kasan/report.c > @@ -24,6 +24,7 @@ > #include <linux/types.h> > #include <linux/kasan.h> > #include <linux/module.h> > +#include <linux/ftrace.h> > > #include <asm/sections.h> > > @@ -300,6 +301,8 @@ void kasan_report(unsigned long addr, size_t size, > if (likely(!kasan_report_enabled())) > return; > > + disable_trace_on_warning(); > + Who is going to enable tracing back after we're done? Note that KASAN errors are not fatal, and the first one may possibly occur quite early. > info.access_addr = (void *)addr; > info.access_size = size; > info.is_write = is_write; -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg
[toc] | [prev] | [next] | [standalone]
| From | Alexander Potapenko <glider@google.com> |
|---|---|
| Date | 2017-01-25 15:40 +0100 |
| Message-ID | <t3wTU-2VB-23@gated-at.bofh.it> |
| In reply to | #1566650 |
On Wed, Jan 25, 2017 at 3:35 PM, Peter Zijlstra <peterz@infradead.org> wrote: > On Wed, Jan 25, 2017 at 03:32:11PM +0100, Alexander Potapenko wrote: > >> > @@ -300,6 +301,8 @@ void kasan_report(unsigned long addr, size_t size, >> > if (likely(!kasan_report_enabled())) >> > return; >> > >> > + disable_trace_on_warning(); >> > + >> Who is going to enable tracing back after we're done? > > The user.. > >> Note that KASAN errors are not fatal, and the first one may possibly >> occur quite early. > > WARN*() isn't fatal either, and it does the same thing. Note that > traceoff_on_warning is default disabled. You have to explicitly request > this. Ah, that makes sense. Sorry, I wasn't aware of that interface before. -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2017-01-25 15:40 +0100 |
| Message-ID | <t3wTU-2VB-25@gated-at.bofh.it> |
| In reply to | #1566650 |
On Wed, Jan 25, 2017 at 03:32:11PM +0100, Alexander Potapenko wrote: > > @@ -300,6 +301,8 @@ void kasan_report(unsigned long addr, size_t size, > > if (likely(!kasan_report_enabled())) > > return; > > > > + disable_trace_on_warning(); > > + > Who is going to enable tracing back after we're done? The user.. > Note that KASAN errors are not fatal, and the first one may possibly > occur quite early. WARN*() isn't fatal either, and it does the same thing. Note that traceoff_on_warning is default disabled. You have to explicitly request this.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web