From: Fredrik Strupe <fredrik@strupe.net>
To: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>
Subject: [PATCH] arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
Date: Mon, 6 Apr 2020 16:16:05 +0200 [thread overview]
Message-ID: <911db2f1-e078-a460-32ee-154a0b4de5d4@strupe.net> (raw)
Use a full 32-bit mask to prevent accidental matchings of thumb32
instructions where the second half-word is equal to the thumb16 setend
encoding.
This fixes the same problem as the following patch:
https://lkml.org/lkml/2020/3/16/341
but for setend emulation instead.
Signed-off-by: Fredrik Strupe <fredrik@strupe.net>
---
arch/arm64/kernel/armv8_deprecated.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c
index 9d3442d62..8c06dfee0 100644
--- a/arch/arm64/kernel/armv8_deprecated.c
+++ b/arch/arm64/kernel/armv8_deprecated.c
@@ -609,7 +609,7 @@ static struct undef_hook setend_hooks[] = {
},
{
/* Thumb mode */
- .instr_mask = 0x0000fff7,
+ .instr_mask = 0xfffffff7,
.instr_val = 0x0000b650,
.pstate_mask = (PSR_AA32_T_BIT | PSR_AA32_MODE_MASK),
.pstate_val = (PSR_AA32_T_BIT | PSR_AA32_MODE_USR),
--
2.20.1
next reply other threads:[~2020-04-06 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 14:16 Fredrik Strupe [this message]
2020-04-07 9:27 ` [PATCH] arm64: armv8_deprecated: Fix undef_hook mask for thumb setend Catalin Marinas
2020-04-07 10:47 ` Suzuki K Poulose
2020-04-07 11:12 ` Fredrik Strupe
2020-04-07 11:18 ` Fredrik Strupe
2020-04-08 9:01 ` Catalin Marinas
2020-04-08 9:58 ` Fredrik Strupe
2020-04-08 11:29 ` [PATCH v2] " Fredrik Strupe
2020-04-08 11:39 ` Suzuki K Poulose
2020-04-08 17:17 ` Catalin Marinas
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=911db2f1-e078-a460-32ee-154a0b4de5d4@strupe.net \
--to=fredrik@strupe.net \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).