[PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Peter Zijlstra
vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to probe_kernel_read() leaves .noinstr.text section Since we use UD2 as a short-cut for 'CALL __WARN', treat it as such. Have the bare exception handler do the report_bug() thing. Fixes: 15a416e8aaa7 ("x86/entry: Treat BUG/WARN as NMI-like

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Andy Lutomirski
> On Jun 18, 2020, at 7:50 AM, Peter Zijlstra wrote: > > vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to > probe_kernel_read() leaves .noinstr.text section > > Since we use UD2 as a short-cut for 'CALL __WARN', treat it as such. > Have the bare exception handler do the report_bu

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 07:57:35AM -0700, Andy Lutomirski wrote: > > > > On Jun 18, 2020, at 7:50 AM, Peter Zijlstra wrote: > > > > vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to > > probe_kernel_read() leaves .noinstr.text section > > > > Since we use UD2 as a short-cut for 'CA

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Andy Lutomirski
On Thu, Jun 18, 2020 at 8:50 AM Peter Zijlstra wrote: > > On Thu, Jun 18, 2020 at 07:57:35AM -0700, Andy Lutomirski wrote: > > > > > > > On Jun 18, 2020, at 7:50 AM, Peter Zijlstra wrote: > > > > > > vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to > > > probe_kernel_read() leaves .n

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 11:36:53AM -0700, Andy Lutomirski wrote: > I wasn't imagining going far down the rabbit hole at all -- I think > that, at most, we should cover the path for when the fault wasn't a > BUG/WARN in the first place. I admit that, for #UD in particular, > this isn't a big deal,

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Andy Lutomirski
> On Jun 18, 2020, at 12:02 PM, Peter Zijlstra wrote: > > On Thu, Jun 18, 2020 at 11:36:53AM -0700, Andy Lutomirski wrote: > >> I wasn't imagining going far down the rabbit hole at all -- I think >> that, at most, we should cover the path for when the fault wasn't a >> BUG/WARN in the first p

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 12:29:50PM -0700, Andy Lutomirski wrote: > > > On Jun 18, 2020, at 12:02 PM, Peter Zijlstra wrote: > > > > On Thu, Jun 18, 2020 at 11:36:53AM -0700, Andy Lutomirski wrote: > > > >> I wasn't imagining going far down the rabbit hole at all -- I think > >> that, at most, w

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-22 Thread Peter Zijlstra
On Thu, Jun 18, 2020 at 11:18:23PM +0200, Peter Zijlstra wrote: > > So maybe also do an untraced cond_local_irq_enable()? After all, if > > we’re trying to report a bug from IRQs on, it should be okay to have > > IRQs on while reporting it. It might even work better than having IRQs > > off. > >

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-24 Thread Andy Lutomirski
On Mon, Jun 22, 2020 at 4:47 AM Peter Zijlstra wrote: > > On Thu, Jun 18, 2020 at 11:18:23PM +0200, Peter Zijlstra wrote: > > > > So maybe also do an untraced cond_local_irq_enable()? After all, if > > > we’re trying to report a bug from IRQs on, it should be okay to have > > > IRQs on while repo