Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1605748
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] x86: Implement __WARN using UD0 |
| Date | 2017-03-21 16:50 +0100 |
| Message-ID | <tnucP-5iR-37@gated-at.bofh.it> (permalink) |
| References | <tm7Lj-4jK-7@gated-at.bofh.it> <tm7Lj-4jK-15@gated-at.bofh.it> <tnsNI-4r2-5@gated-at.bofh.it> <tntJN-55L-31@gated-at.bofh.it> <tnu38-5ee-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 21, 2017 at 10:32:52AM -0500, Josh Poimboeuf wrote:
> On Tue, Mar 21, 2017 at 04:14:46PM +0100, Peter Zijlstra wrote:
> > > > +static int fixup_bug(struct pt_regs *regs, int trapnr)
> > > > +{
> > > > + if (trapnr != X86_TRAP_UD)
> > > > + return 0;
> > > > +
> > > > + switch (report_bug(regs->ip, regs)) {
> > > > + case BUG_TRAP_TYPE_NONE:
> > > > + case BUG_TRAP_TYPE_BUG:
> > > > + break;
> > > > +
> > > > + case BUG_TRAP_TYPE_WARN:
> > > > + regs->ip += 2;
> > > > + return 1;
> > >
> > > For self-documentation purposes, maybe use a define for the length of
> > > the ud0 instruction?
> >
> > Well, UD0 and UD2 really. LENGTH_UD0_OR_UD2 is a bit of a fail, name
> > wise.
>
> Why UD2? Warnings are UD0-only, no? What about UD0_LEN? Or at least a
> comment would be helpful I think.
Oh, right, we only resume on WARN,.. Doh.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] x86 optimizations Peter Zijlstra <peterz@infradead.org> - 2017-03-17 22:40 +0100
[PATCH 3/5] atomic: Introduce atomic_try_cmpxchg() Peter Zijlstra <peterz@infradead.org> - 2017-03-17 22:40 +0100
[PATCH 5/5] x86,atomic: Use atomic_try_cmpxchg Peter Zijlstra <peterz@infradead.org> - 2017-03-17 22:40 +0100
[PATCH 1/5] x86: Implement __WARN using UD0 Peter Zijlstra <peterz@infradead.org> - 2017-03-17 22:40 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-21 15:20 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Arjan van de Ven <arjan@linux.intel.com> - 2017-03-21 16:20 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-21 16:40 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Peter Zijlstra <peterz@infradead.org> - 2017-03-21 16:50 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Peter Zijlstra <peterz@infradead.org> - 2017-03-21 17:50 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Peter Zijlstra <peterz@infradead.org> - 2017-03-22 09:50 +0100
Re: [PATCH 1/5] x86: Implement __WARN using UD0 Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-22 15:20 +0100
[PATCH 4/5] refcount: Use atomic_try_cmpxchg() Peter Zijlstra <peterz@infradead.org> - 2017-03-17 22:40 +0100
[PATCH 2/5] bug: Add _ONCE logic to report_bug() Peter Zijlstra <peterz@infradead.org> - 2017-03-17 22:40 +0100
csiph-web