Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-04 Thread Andy Lutomirski
> On Apr 4, 2019, at 10:28 AM, Thomas Gleixner wrote: > >> On Thu, 4 Apr 2019, Tycho Andersen wrote: >>leaq-PTREGS_SIZE(%rax), %rsp >>UNWIND_HINT_FUNC sp_offset=PTREGS_SIZE >> >> +/* >> + * If we oopsed in an interrupt handler, interrupts may be off. Let's >> turn >> +

Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-04 Thread Thomas Gleixner
On Thu, 4 Apr 2019, Tycho Andersen wrote: > leaq-PTREGS_SIZE(%rax), %rsp > UNWIND_HINT_FUNC sp_offset=PTREGS_SIZE > > + /* > + * If we oopsed in an interrupt handler, interrupts may be off. Let's > turn > + * them back on before going back to "normal" code. > +

Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-04 Thread Sebastian Andrzej Siewior
- stepping on del button while browsing though CCs. On 2019-04-04 09:47:27 [-0600], Tycho Andersen wrote: > > Hmm. do_exit() isn't really meant to be "try your best to leave the > > system somewhat usable without returning" -- it's a function that, > > other than in OOPSes, is called from a

Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-04 Thread Tycho Andersen
On Wed, Apr 03, 2019 at 09:12:16PM -0700, Andy Lutomirski wrote: > On Wed, Apr 3, 2019 at 6:42 PM Tycho Andersen wrote: > > > > On Wed, Apr 03, 2019 at 05:12:56PM -0700, Andy Lutomirski wrote: > > > On Wed, Apr 3, 2019 at 10:36 AM Khalid Aziz > > > wrote: > > > > > > > > From: Tycho Andersen >

Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-03 Thread Andy Lutomirski
On Wed, Apr 3, 2019 at 6:42 PM Tycho Andersen wrote: > > On Wed, Apr 03, 2019 at 05:12:56PM -0700, Andy Lutomirski wrote: > > On Wed, Apr 3, 2019 at 10:36 AM Khalid Aziz wrote: > > > > > > From: Tycho Andersen > > > > > > Oopsing might kill the task, via rewind_stack_do_exit() at the bottom,

Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-03 Thread Tycho Andersen
On Wed, Apr 03, 2019 at 05:12:56PM -0700, Andy Lutomirski wrote: > On Wed, Apr 3, 2019 at 10:36 AM Khalid Aziz wrote: > > > > From: Tycho Andersen > > > > Oopsing might kill the task, via rewind_stack_do_exit() at the bottom, and > > that might sleep: > > > > > > diff --git

Re: [RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-03 Thread Andy Lutomirski
On Wed, Apr 3, 2019 at 10:36 AM Khalid Aziz wrote: > > From: Tycho Andersen > > Oopsing might kill the task, via rewind_stack_do_exit() at the bottom, and > that might sleep: > > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c > index 9d5c75f02295..7891add0913f 100644 > ---

[RFC PATCH v9 02/13] x86: always set IF before oopsing from page fault

2019-04-03 Thread Khalid Aziz
From: Tycho Andersen Oopsing might kill the task, via rewind_stack_do_exit() at the bottom, and that might sleep: Aug 23 19:30:27 xpfo kernel: [ 38.302714] BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:33 Aug 23 19:30:27 xpfo kernel: [ 38.303837]