riscv: read-only pages should not be writable
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 28 May 2022 01:41:32 +0000 (03:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:11 +0000 (18:36 +0200)
commit6005d36fbc82611a7a632265f75557d3063b8d4c
treedfd5288815998e39026588b40578c120f7c9b2a8
parent33a5c6009ab84b66c1839762b78bef89f2d7ad06
riscv: read-only pages should not be writable

[ Upstream commit 630f972d76d6460235e84e1aa034ee06f9c8c3a9 ]

If EFI pages are marked as read-only,
we should remove the _PAGE_WRITE flag.

The current code overwrites an unused value.

Fixes: b91540d52a08b ("RISC-V: Add EFI runtime services")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Link: https://lore.kernel.org/r/20220528014132.91052-1-heinrich.schuchardt@canonical.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kernel/efi.c