Skip to content

Commit 36a1463

Browse files
committed
Merge tag 'x86-urgent-2021-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "Two fixes: - Fix build failure on Ubuntu with new GCC packages that turn on -fcf-protection - Fix SME memory encryption PTE encoding bug - AFAICT the code worked on 4K page sizes (level 1) but had the wrong shift at higher page level orders (level 2 and higher)" * tag 'x86-urgent-2021-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Turn off -fcf-protection for realmode targets x86/mem_encrypt: Correct physical address calculation in __set_clr_pte_enc()
2 parents 47fbbc9 + 9fcb51c commit 36a1463

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/x86/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endif
2727
REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
2828
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
2929
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
30-
-mno-mmx -mno-sse
30+
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
3131

3232
REALMODE_CFLAGS += -ffreestanding
3333
REALMODE_CFLAGS += -fno-stack-protector

arch/x86/mm/mem_encrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static void __init __set_clr_pte_enc(pte_t *kpte, int level, bool enc)
262262
if (pgprot_val(old_prot) == pgprot_val(new_prot))
263263
return;
264264

265-
pa = pfn << page_level_shift(level);
265+
pa = pfn << PAGE_SHIFT;
266266
size = page_level_size(level);
267267

268268
/*

0 commit comments

Comments
 (0)