From: Dmitry Osipenko <digetx@gmail.com>
To: Ard Biesheuvel <ardb@kernel.org>, linux@armlinux.org.uk
Cc: Nick Desaulniers <ndesaulniers@google.com>,
Kees Cook <keescook@chromium.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ARM: entry: omit FP emulation for UND exceptions taken in kernel mode
Date: Wed, 25 Nov 2020 01:59:09 +0300 [thread overview]
Message-ID: <924f5019-d0e9-115a-e563-93994f25b70d@gmail.com> (raw)
In-Reply-To: <20201118130849.7445-1-ardb@kernel.org>
18.11.2020 16:08, Ard Biesheuvel пишет:
> diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
> index c4220f51fcf3..0ea8529a4872 100644
> --- a/arch/arm/kernel/entry-armv.S
> +++ b/arch/arm/kernel/entry-armv.S
> @@ -252,31 +252,10 @@ __und_svc:
> #else
> svc_entry
> #endif
> - @
> - @ call emulation code, which returns using r9 if it has emulated
> - @ the instruction, or the more conventional lr if we are to treat
> - @ this as a real undefined instruction
> - @
> - @ r0 - instruction
> - @
> -#ifndef CONFIG_THUMB2_KERNEL
> - ldr r0, [r4, #-4]
> -#else
> - mov r1, #2
> - ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2
> - cmp r0, #0xe800 @ 32-bit instruction if xx >= 0
> - blo __und_svc_fault
> - ldrh r9, [r4] @ bottom 16 bits
> - add r4, r4, #2
> - str r4, [sp, #S_PC]
> - orr r0, r9, r0, lsl #16
> -#endif
> - badr r9, __und_svc_finish
> - mov r2, r4
> - bl call_fpe
>
> mov r1, #4 @ PC correction to apply
> -__und_svc_fault:
> + THUMB( tst r5, #PSR_T_BIT ) @ exception taken in Thumb mode?
> + THUMB( movne r1, #2 ) @ if so, fix up PC correction
> mov r0, sp @ struct pt_regs *regs
> bl __und_fault
Am I understanding correctly that when call_fpe was invoked previously,
it was supposed to print extra debug info about the VFP state? But it
didn't work properly for thumb mode, correct?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-11-24 23:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 13:08 [PATCH v2] ARM: entry: omit FP emulation for UND exceptions taken in kernel mode Ard Biesheuvel
2020-11-18 16:42 ` Nick Desaulniers
2020-11-18 16:47 ` Ard Biesheuvel
2020-11-18 16:59 ` Nick Desaulniers
2020-11-18 17:00 ` Ard Biesheuvel
2020-11-18 17:08 ` Nick Desaulniers
2020-11-18 17:15 ` Ard Biesheuvel
2020-11-24 22:59 ` Dmitry Osipenko [this message]
2020-11-25 7:00 ` Ard Biesheuvel
2020-11-25 22:45 ` Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=924f5019-d0e9-115a-e563-93994f25b70d@gmail.com \
--to=digetx@gmail.com \
--cc=ardb@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.