Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1370706 > unrolled thread
| Started by | Andy Lutomirski <luto@kernel.org> |
|---|---|
| First post | 2016-04-04 17:50 +0200 |
| Last post | 2016-04-13 13:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] x86/extable: Add a comment about early exception handlers Andy Lutomirski <luto@kernel.org> - 2016-04-04 17:50 +0200
Re: [PATCH] x86/extable: Add a comment about early exception handlers Borislav Petkov <bp@alien8.de> - 2016-04-04 18:20 +0200
[tip:x86/asm] x86/extable: Add a comment about early exception handlers tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2016-04-13 13:50 +0200
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Date | 2016-04-04 17:50 +0200 |
| Subject | [PATCH] x86/extable: Add a comment about early exception handlers |
| Message-ID | <rkeVj-5br-3@gated-at.bofh.it> |
Borislav asked for a comment explaining why all exception handlers are allowed early. Signed-off-by: Andy Lutomirski <luto@kernel.org> --- arch/x86/mm/extable.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index 98b5f45d9d79..36fe03bc81ee 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c @@ -132,6 +132,20 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr) if (regs->cs != __KERNEL_CS) goto fail; + /* + * The full exception fixup machinery is available as soon as + * the early IDT is loaded. This means that it is the + * responsibility of extable users to either function correctly + * when handlers are invoked early or to simply avoid causing + * exceptions before they're ready to handle them. + * + * This is better than filtering which handlers can be used, + * because refusing to call a handler here is guaranteed to + * result in a hard-to-debug panic. + * + * Keep in mind that not all vectors actually get here. Early + * fage faults, for example, are special. + */ if (fixup_exception(regs, trapnr)) return; -- 2.5.5
[toc] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-04-04 18:20 +0200 |
| Message-ID | <rkfol-5Jt-5@gated-at.bofh.it> |
| In reply to | #1370706 |
On Mon, Apr 04, 2016 at 08:46:22AM -0700, Andy Lutomirski wrote:
> Borislav asked for a comment explaining why all exception handlers are
> allowed early.
>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> ---
> arch/x86/mm/extable.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
> index 98b5f45d9d79..36fe03bc81ee 100644
> --- a/arch/x86/mm/extable.c
> +++ b/arch/x86/mm/extable.c
> @@ -132,6 +132,20 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr)
> if (regs->cs != __KERNEL_CS)
> goto fail;
>
> + /*
> + * The full exception fixup machinery is available as soon as
> + * the early IDT is loaded. This means that it is the
> + * responsibility of extable users to either function correctly
> + * when handlers are invoked early or to simply avoid causing
> + * exceptions before they're ready to handle them.
> + *
> + * This is better than filtering which handlers can be used,
> + * because refusing to call a handler here is guaranteed to
> + * result in a hard-to-debug panic.
> + *
> + * Keep in mind that not all vectors actually get here. Early
> + * fage faults, for example, are special.
> + */
> if (fixup_exception(regs, trapnr))
> return;
>
> --
Thanks!
Reviewed-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Andy Lutomirski <tipbot@zytor.com> |
|---|---|
| Date | 2016-04-13 13:50 +0200 |
| Subject | [tip:x86/asm] x86/extable: Add a comment about early exception handlers |
| Message-ID | <rnrt3-BH-85@gated-at.bofh.it> |
| In reply to | #1370706 |
Commit-ID: 60a0e2039e3df6c0a2b896bd78af36ff36fb629c Gitweb: http://git.kernel.org/tip/60a0e2039e3df6c0a2b896bd78af36ff36fb629c Author: Andy Lutomirski <luto@kernel.org> AuthorDate: Mon, 4 Apr 2016 08:46:22 -0700 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Wed, 13 Apr 2016 11:37:47 +0200 x86/extable: Add a comment about early exception handlers Borislav asked for a comment explaining why all exception handlers are allowed early. Signed-off-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Borislav Petkov <bp@suse.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Borislav Petkov <bp@alien8.de> Cc: KVM list <kvm@vger.kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: xen-devel <Xen-devel@lists.xen.org> Link: http://lkml.kernel.org/r/5f1dcd6919f4a5923959a8065cb2c04d9dac1412.1459784772.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/mm/extable.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index fd9eb98..aaeda3f 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c @@ -125,6 +125,20 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr) if (regs->cs != __KERNEL_CS) goto fail; + /* + * The full exception fixup machinery is available as soon as + * the early IDT is loaded. This means that it is the + * responsibility of extable users to either function correctly + * when handlers are invoked early or to simply avoid causing + * exceptions before they're ready to handle them. + * + * This is better than filtering which handlers can be used, + * because refusing to call a handler here is guaranteed to + * result in a hard-to-debug panic. + * + * Keep in mind that not all vectors actually get here. Early + * fage faults, for example, are special. + */ if (fixup_exception(regs, trapnr)) return;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web