Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-09 Thread Kirill Tkhai
On 08.02.2018 22:00, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 11:20:26AM -0600, Josh Poimboeuf wrote: >> The patch description is confusing. It talks about "crappy drivers irq >> handlers when they access wrong memory on the stack". But if I >> understand correctly, the patch doesn't actua

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 11:20:26AM -0600, Josh Poimboeuf wrote: > The patch description is confusing. It talks about "crappy drivers irq > handlers when they access wrong memory on the stack". But if I > understand correctly, the patch doesn't actually protect against that > case, because irq han

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-08 Thread Josh Poimboeuf
On Thu, Feb 08, 2018 at 05:41:19PM +0100, Dmitry Vyukov wrote: > On Thu, Feb 8, 2018 at 5:30 PM, Josh Poimboeuf wrote: > > On Thu, Feb 08, 2018 at 01:03:49PM +0300, Kirill Tkhai wrote: > >> On 07.02.2018 21:38, Dave Hansen wrote: > >> > On 02/07/2018 08:14 AM, Kirill Tkhai wrote: > >> >> Sometimes

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-08 Thread Dmitry Vyukov
On Thu, Feb 8, 2018 at 5:30 PM, Josh Poimboeuf wrote: > On Thu, Feb 08, 2018 at 01:03:49PM +0300, Kirill Tkhai wrote: >> On 07.02.2018 21:38, Dave Hansen wrote: >> > On 02/07/2018 08:14 AM, Kirill Tkhai wrote: >> >> Sometimes it is possible to meet a situation, >> >> when irq stack is corrupted, w

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-08 Thread Josh Poimboeuf
On Thu, Feb 08, 2018 at 01:03:49PM +0300, Kirill Tkhai wrote: > On 07.02.2018 21:38, Dave Hansen wrote: > > On 02/07/2018 08:14 AM, Kirill Tkhai wrote: > >> Sometimes it is possible to meet a situation, > >> when irq stack is corrupted, while innocent > >> callback function is being executed. This

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-08 Thread Kirill Tkhai
On 07.02.2018 21:38, Dave Hansen wrote: > On 02/07/2018 08:14 AM, Kirill Tkhai wrote: >> Sometimes it is possible to meet a situation, >> when irq stack is corrupted, while innocent >> callback function is being executed. This may >> happen because of crappy drivers irq handlers, >> when they acces

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-07 Thread Dmitry Vyukov
On Wed, Feb 7, 2018 at 7:38 PM, Dave Hansen wrote: > On 02/07/2018 08:14 AM, Kirill Tkhai wrote: >> Sometimes it is possible to meet a situation, >> when irq stack is corrupted, while innocent >> callback function is being executed. This may >> happen because of crappy drivers irq handlers, >> whe

Re: [PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-07 Thread Dave Hansen
On 02/07/2018 08:14 AM, Kirill Tkhai wrote: > Sometimes it is possible to meet a situation, > when irq stack is corrupted, while innocent > callback function is being executed. This may > happen because of crappy drivers irq handlers, > when they access wrong memory on the irq stack. Can you be mo

[PATCH RFC] x86: KASAN: Sanitize unauthorized irq stack access

2018-02-07 Thread Kirill Tkhai
Sometimes it is possible to meet a situation, when irq stack is corrupted, while innocent callback function is being executed. This may happen because of crappy drivers irq handlers, when they access wrong memory on the irq stack. This patch aims to catch such the situations and adds checks of una