efi/x86: Mark kernel rodata non-executable for mixed mode
authorArvind Sankar <nivedita@alum.mit.edu>
Fri, 17 Jul 2020 19:45:26 +0000 (15:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:49:19 +0000 (11:49 +0200)
commit09a30705079804acfe7d29ba0618db466fc0df25
treea3e8cf4968c59dbc6382443cd5357a7d124def21
parent3d9ed544ec9b8410414a3dfd27e9e89f95044c61
efi/x86: Mark kernel rodata non-executable for mixed mode

commit c8502eb2d43b6b9b1dc382299a4d37031be63876 upstream.

When remapping the kernel rodata section RO in the EFI pagetables, the
protection flags that were used for the text section are being reused,
but the rodata section should not be marked executable.

Cc: <stable@vger.kernel.org>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200717194526.3452089-1-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/platform/efi/efi_64.c