| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| From: Sami Tolvanen <samitolvanen@google.com> |
| Date: Fri, 16 Aug 2019 13:09:54 -0700 |
| Subject: FROMLIST: arm64: disable SCS for hypervisor code |
| |
| Filter out CC_FLAGS_SCS for code that runs at a different exception |
| level. |
| |
| Bug: 145210207 |
| Change-Id: I834424fba7aa18598b618891814327ecc2841c6e |
| (am from https://lore.kernel.org/patchwork/patch/1149062/) |
| Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org> |
| Reviewed-by: Kees Cook <keescook@chromium.org> |
| Reviewed-by: Mark Rutland <mark.rutland@arm.com> |
| Signed-off-by: Sami Tolvanen <samitolvanen@google.com> |
| --- |
| arch/arm64/kvm/hyp/Makefile | 3 +++ |
| 1 file changed, 3 insertions(+) |
| |
| diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile |
| --- a/arch/arm64/kvm/hyp/Makefile |
| +++ b/arch/arm64/kvm/hyp/Makefile |
| @@ -28,3 +28,6 @@ GCOV_PROFILE := n |
| KASAN_SANITIZE := n |
| UBSAN_SANITIZE := n |
| KCOV_INSTRUMENT := n |
| + |
| +# remove the SCS flags from all objects in this directory |
| +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) |