x86 fixes
Linus,
Please pull the latest x86/urgent git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-2021-03-28
# HEAD: 9fcb51c14da2953de585c5c6e50697b8a6e91a7b x86/build: Turn off -fcf-protection for realmode targets
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).
Thanks,
Ingo
------------------>
Arnd Bergmann (1):
x86/build: Turn off -fcf-protection for realmode targets
Isaku Yamahata (1):
x86/mem_encrypt: Correct physical address calculation in __set_clr_pte_enc()
arch/x86/Makefile | 2 +- arch/x86/mm/mem_encrypt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/Makefile +1 -1
@@ -27,7 +27,7 @@ endif REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \ -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ - -mno-mmx -mno-sse + -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none) REALMODE_CFLAGS += -ffreestanding REALMODE_CFLAGS += -fno-stack-protector
arch/x86/mm/mem_encrypt.c +1 -1
@@ -262,7 +262,7 @@ static void __init __set_clr_pte_enc(pte_t *kpte, int level, bool enc)if (pgprot_val (old_prot) ==pgprot_val (new_prot))return ; - pa = pfn <<page_level_shift (level); + pa = pfn <<PAGE_SHIFT ; size =page_level_size (level);/*
The pull request you sent on Sun, 28 Mar 2021 12:44:42 +0200:
The pull request you sent on Sun, 28 Mar 2021 12:44:42 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitx86-urgent-2021-03-28
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/36a14638f7c06546717cc1316fcfee6da42b98cc
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html