Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread Matthias Kaehlcke
On Tue, Sep 18, 2018 at 11:51:55AM +0200, Jiri Slaby wrote: > On 09/18/2018, 11:17 AM, Greg Kroah-Hartman wrote: > > My question is why we just don't call panic() here instead of trying to > > duplicate the logic of that function here. Why is that happening? > > Historically (before d6580a9f1), w

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread Matthias Kaehlcke
On Tue, Sep 18, 2018 at 08:11:33AM +0200, Jiri Slaby wrote: > On 09/17/2018, 11:33 PM, Matthias Kaehlcke wrote: > > sysrq_handle_crash() dereferences a NULL pointer on purpose to force > > an exception, the local variable 'killer' is assigned to NULL and > > dereferenced later. Clang detects the NU

RE: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread David Laight
From: Matthias Kaehlcke > Sent: 17 September 2018 22:33 > > sysrq_handle_crash() dereferences a NULL pointer on purpose to force > an exception, the local variable 'killer' is assigned to NULL and > dereferenced later. Clang detects the NULL pointer dereference at compile > time and emits a BRK in

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread Sai Prakash Ranjan
On 9/18/2018 2:47 PM, Greg Kroah-Hartman wrote: On Tue, Sep 18, 2018 at 02:35:02PM +0530, Sai Prakash Ranjan wrote: On 9/18/2018 12:50 PM, Greg Kroah-Hartman wrote: On Tue, Sep 18, 2018 at 12:28:39PM +0530, Sai Prakash Ranjan wrote: On 9/18/2018 11:41 AM, Jiri Slaby wrote: On 09/17/2018, 11:3

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread Greg Kroah-Hartman
On Tue, Sep 18, 2018 at 02:35:02PM +0530, Sai Prakash Ranjan wrote: > On 9/18/2018 12:50 PM, Greg Kroah-Hartman wrote: > > On Tue, Sep 18, 2018 at 12:28:39PM +0530, Sai Prakash Ranjan wrote: > > > On 9/18/2018 11:41 AM, Jiri Slaby wrote: > > > > On 09/17/2018, 11:33 PM, Matthias Kaehlcke wrote: > >

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread Sai Prakash Ranjan
On 9/18/2018 12:50 PM, Greg Kroah-Hartman wrote: On Tue, Sep 18, 2018 at 12:28:39PM +0530, Sai Prakash Ranjan wrote: On 9/18/2018 11:41 AM, Jiri Slaby wrote: On 09/17/2018, 11:33 PM, Matthias Kaehlcke wrote: sysrq_handle_crash() dereferences a NULL pointer on purpose to force an exception, the

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-18 Thread Greg Kroah-Hartman
On Tue, Sep 18, 2018 at 12:28:39PM +0530, Sai Prakash Ranjan wrote: > On 9/18/2018 11:41 AM, Jiri Slaby wrote: > > On 09/17/2018, 11:33 PM, Matthias Kaehlcke wrote: > > > sysrq_handle_crash() dereferences a NULL pointer on purpose to force > > > an exception, the local variable 'killer' is assigned

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-17 Thread Sai Prakash Ranjan
On 9/18/2018 11:41 AM, Jiri Slaby wrote: On 09/17/2018, 11:33 PM, Matthias Kaehlcke wrote: sysrq_handle_crash() dereferences a NULL pointer on purpose to force an exception, the local variable 'killer' is assigned to NULL and dereferenced later. Clang detects the NULL pointer dereference at comp

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-17 Thread Jiri Slaby
On 09/17/2018, 11:33 PM, Matthias Kaehlcke wrote: > sysrq_handle_crash() dereferences a NULL pointer on purpose to force > an exception, the local variable 'killer' is assigned to NULL and > dereferenced later. Clang detects the NULL pointer dereference at compile > time and emits a BRK instruction

Re: [PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-17 Thread Sai Prakash Ranjan
On 9/18/2018 3:03 AM, Matthias Kaehlcke wrote: sysrq_handle_crash() dereferences a NULL pointer on purpose to force an exception, the local variable 'killer' is assigned to NULL and dereferenced later. Clang detects the NULL pointer dereference at compile time and emits a BRK instruction (on arm6

[PATCH] tty/sysrq: Make local variable 'killer' in sysrq_handle_crash() global

2018-09-17 Thread Matthias Kaehlcke
sysrq_handle_crash() dereferences a NULL pointer on purpose to force an exception, the local variable 'killer' is assigned to NULL and dereferenced later. Clang detects the NULL pointer dereference at compile time and emits a BRK instruction (on arm64) instead of the expected NULL pointer exception