Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1192417
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe |
| Date | 2015-07-25 20:20 +0200 |
| Message-ID | <pQcdb-3RK-3@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <pPZfX-2a9-1@gated-at.bofh.it> <pPZpE-2l7-3@gated-at.bofh.it> <pPZJ0-2HE-7@gated-at.bofh.it> <pQbTP-3fV-1@gated-at.bofh.it> <pQc3w-3GH-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, Jul 25, 2015 at 10:59 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>
> What if we added something like:
>
> if (regs->ip == ret_after_sti && !user_mode(regs) && (regs->flags &
> X86_EFLAGS_IF)) {
> regs->ip--;
> regs->flags &= ~X86_EFLAGS_IF;
> }
>
> to do_nmi, do_machine_check, and do_debug (the latter because kernel
> breakpoints, damnit)?
Hmm. And how would you test it?
Putting an instruction breakpoint on the final 'ret' might do it, I
guess. "mov ss" disables even that (and is documented to disable nmi
too), but maybe it works with 'sti; ret'.
But yes, as long as we'd have some test coverage, that sounds doable.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] x86_64: Make int3 non-magical Andy Lutomirski <luto@kernel.org> - 2015-07-24 00:40 +0200
[PATCH 3/3] x86/entry/64: Move #BP from IST to the IRQ stack Andy Lutomirski <luto@kernel.org> - 2015-07-24 00:40 +0200
Re: [PATCH 3/3] x86/entry/64: Move #BP from IST to the IRQ stack Borislav Petkov <bp@alien8.de> - 2015-07-24 13:10 +0200
[PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Andy Lutomirski <luto@kernel.org> - 2015-07-24 00:40 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Borislav Petkov <bp@alien8.de> - 2015-07-24 12:30 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Borislav Petkov <bp@alien8.de> - 2015-07-25 06:20 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Andy Lutomirski <luto@amacapital.net> - 2015-07-25 06:30 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Borislav Petkov <bp@alien8.de> - 2015-07-25 06:40 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Andy Lutomirski <luto@amacapital.net> - 2015-07-25 07:00 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Linus Torvalds <torvalds@linux-foundation.org> - 2015-07-25 20:00 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Andy Lutomirski <luto@amacapital.net> - 2015-07-25 20:10 +0200
Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then NMI-safe Linus Torvalds <torvalds@linux-foundation.org> - 2015-07-25 20:20 +0200
[PATCH 2/3] x86/entry/64: Teach idtentry to use the IRQ stack Andy Lutomirski <luto@kernel.org> - 2015-07-24 00:40 +0200
Re: [PATCH 0/3] x86_64: Make int3 non-magical Andy Lutomirski <luto@amacapital.net> - 2015-07-24 00:40 +0200
csiph-web