aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt2018-12-18 18:06:14 +0100
committerAlexander Graf2018-12-23 02:39:52 +0100
commit5bdb0a7cad05df35cd87ebce683eda032a8abc87 (patch)
tree85e069916e48fc29f385a858610f9078e8727080 /lib
parent05aceb2b1c9d88aafcb8dfbedb24742a24d986ba (diff)
lib: crc32: mark static variable as __efi_runtime_data
In commit 483dbab9f931 ("lib: crc32: mark function crc32() as __efi_runtime") one local static variable was missed. It did not end up in the __efi_runtime_data section as it should. If CONFIG_DYNAMIC_CRC_TABLE=y a data abort execption may occur when the UEFI payload calls the SetVirtualAddressMap() runtime service. Reported-by: Dominik Adamski <dominik.adamski@northerntech.community> Fixes: 483dbab9f931 ("lib: crc32: mark function crc32() as __efi_runtime") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/crc32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/crc32.c b/lib/crc32.c
index 71e27df78eb..eee21f8d739 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -65,7 +65,8 @@ static void __efi_runtime make_crc_table(void)
int n, k;
uLong poly; /* polynomial exclusive-or pattern */
/* terms of polynomial defining this crc (except x^32): */
- static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
+ static Byte __efi_runtime_data p[] = {
+ 0, 1, 2, 4, 5, 7, 8, 10, 11, 12, 16, 22, 23, 26};
/* make exclusive-or pattern from polynomial (0xedb88320L) */
poly = 0L;