summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-05-19 14:59:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-22 10:30:56 +0300
commit8cf93ef213f9c335e38db44a2c0b5ed44a146ec7 (patch)
tree3d1a0a320445888122c5b886e29b6c7bf1753d63 /samples
parent2a005026102e1bc337718a4a9812b6fdd5d9a712 (diff)
downloadlinux-8cf93ef213f9c335e38db44a2c0b5ed44a146ec7.tar.xz
ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE
[ Upstream commit e1de94380af588bdf6ad6f0cc1f75004c35bc096 ] Recent work with KASan exposed the folling hard-coded bitmask in arch/arm/mm/proc-macros.S: bic rd, sp, #8128 bic rd, rd, #63 This forms the bitmask 0x1FFF that is coinciding with (PAGE_SIZE << THREAD_SIZE_ORDER) - 1, this code was assuming that THREAD_SIZE is always 8K (8192). As KASan was increasing THREAD_SIZE_ORDER to 2, I ran into this bug. Fix it by this little oneline suggested by Ard: bic rd, sp, #(THREAD_SIZE - 1) & ~63 Where THREAD_SIZE is defined using THREAD_SIZE_ORDER. We have to also include <linux/const.h> since the THREAD_SIZE expands to use the _AC() macro. Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Suggested-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions