Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 853cfa4b authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Gerrit - the friendly Code Review server
Browse files

ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch



[ Upstream commit 36b0cb84ee858f02c256d26f0cb4229c78e3399e ]

An additional 'ip' will be pushed to the stack, for restoring the
DACR later, if CONFIG_CPU_SW_DOMAIN_PAN defined.

However, the fixup still get the err_ptr by add #8*4 to sp, which
results in the fact that the code area pointed by the LR will be
overwritten, or the kernel will crash if CONFIG_DEBUG_RODATA is enabled.

This patch fixes the stack mismatch.

Change-Id: Ie473ebbcfd704e8f92c76cd0b0a2e0d719c56e0b
Fixes: a5e090acbf54 ("ARM: software-based priviledged-no-access support")
Signed-off-by: default avatarLvqiang Huang <Lvqiang.Huang@spreadtrum.com>
Signed-off-by: default avatarChunyan Zhang <zhang.lyra@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ba9443c55f36079cb61fb7bc4913766e9a519585
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarSharath Chandra Vurukala <sharathv@codeaurora.org>
parent 132a0d94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment