[openwrt/openwrt] arm64: enable harden branch predictor

LEDE Commits lede-commits at lists.infradead.org
Fri Apr 27 12:37:28 PDT 2018


mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/3877550114c37be4dfcb6dce7f28ef5400529326

commit 3877550114c37be4dfcb6dce7f28ef5400529326
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Thu Apr 26 22:25:11 2018 +0200

    arm64: enable harden branch predictor
    
    Enable the harden branch predictor for arm64 as it is recommend.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/armvirt/64/config-default      | 2 ++
 target/linux/generic/config-4.14            | 2 --
 target/linux/mvebu/cortexa53/config-default | 2 ++
 target/linux/mvebu/cortexa72/config-default | 2 ++
 target/linux/octeontx/config-4.14           | 2 ++
 target/linux/sunxi/cortexa53/config-default | 2 ++
 6 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/target/linux/armvirt/64/config-default b/target/linux/armvirt/64/config-default
index 4e63668..0045651 100644
--- a/target/linux/armvirt/64/config-default
+++ b/target/linux/armvirt/64/config-default
@@ -106,6 +106,7 @@ CONFIG_GENERIC_CSUM=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_ARCH_HUGE_VMAP=y
 CONFIG_HAVE_ARCH_KASAN=y
@@ -177,6 +178,7 @@ CONFIG_SYS_SUPPORTS_HUGETLBFS=y
 # CONFIG_THUNDER_NIC_PF is not set
 # CONFIG_THUNDER_NIC_RGX is not set
 # CONFIG_THUNDER_NIC_VF is not set
+CONFIG_UNMAP_KERNEL_AT_EL0=y
 CONFIG_VEXPRESS_CONFIG=y
 CONFIG_VEXPRESS_SYSCFG=y
 CONFIG_VIDEOMODE_HELPERS=y
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index a271983..c9ee88c 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -1534,7 +1534,6 @@ CONFIG_GENERIC_NET_UTILS=y
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_HARDENED_USERCOPY is not set
-# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
 # CONFIG_HARDLOCKUP_DETECTOR is not set
 # CONFIG_HAVE_AOUT is not set
 CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y
@@ -5021,7 +5020,6 @@ CONFIG_UNIX=y
 CONFIG_UNIX98_PTYS=y
 # CONFIG_UNIXWARE_DISKLABEL is not set
 # CONFIG_UNIX_DIAG is not set
-# CONFIG_UNMAP_KERNEL_AT_EL0 is not set
 # CONFIG_UNUSED_SYMBOLS is not set
 # CONFIG_UPROBES is not set
 # CONFIG_UPROBE_EVENT is not set
diff --git a/target/linux/mvebu/cortexa53/config-default b/target/linux/mvebu/cortexa53/config-default
index 0ee5d3c..4c0ced3 100644
--- a/target/linux/mvebu/cortexa53/config-default
+++ b/target/linux/mvebu/cortexa53/config-default
@@ -64,6 +64,7 @@ CONFIG_GENERIC_CSUM=y
 CONFIG_GENERIC_IRQ_MIGRATION=y
 CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_ARCH_HUGE_VMAP=y
 CONFIG_HAVE_ARCH_KASAN=y
@@ -109,4 +110,5 @@ CONFIG_SPI_ARMADA_3700=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_SYS_SUPPORTS_HUGETLBFS=y
 CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
 CONFIG_VMAP_STACK=y
diff --git a/target/linux/mvebu/cortexa72/config-default b/target/linux/mvebu/cortexa72/config-default
index ba0fd35..3c2b2b0 100644
--- a/target/linux/mvebu/cortexa72/config-default
+++ b/target/linux/mvebu/cortexa72/config-default
@@ -62,6 +62,7 @@ CONFIG_GENERIC_CSUM=y
 CONFIG_GENERIC_IRQ_MIGRATION=y
 CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_ARCH_HUGE_VMAP=y
 CONFIG_HAVE_ARCH_KASAN=y
@@ -118,4 +119,5 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_SYS_SUPPORTS_HUGETLBFS=y
 CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
 CONFIG_VMAP_STACK=y
diff --git a/target/linux/octeontx/config-4.14 b/target/linux/octeontx/config-4.14
index 6e70c9d..b2ea99b 100644
--- a/target/linux/octeontx/config-4.14
+++ b/target/linux/octeontx/config-4.14
@@ -253,6 +253,7 @@ CONFIG_GPIO_PCA953X_IRQ=y
 CONFIG_GPIO_THUNDERX=y
 # CONFIG_GRO_CELLS is not set
 CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
@@ -513,6 +514,7 @@ CONFIG_TASK_XACCT=y
 CONFIG_TEE=y
 CONFIG_THIN_ARCHIVES=y
 CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
 CONFIG_THUNDER_NIC_BGX=y
 CONFIG_THUNDER_NIC_PF=y
 CONFIG_THUNDER_NIC_RGX=y
diff --git a/target/linux/sunxi/cortexa53/config-default b/target/linux/sunxi/cortexa53/config-default
index ef67c0e..2d9dd01 100644
--- a/target/linux/sunxi/cortexa53/config-default
+++ b/target/linux/sunxi/cortexa53/config-default
@@ -55,6 +55,7 @@ CONFIG_FRAME_POINTER=y
 CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
 CONFIG_GENERIC_CSUM=y
 CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
 CONFIG_HAVE_ARCH_HUGE_VMAP=y
 CONFIG_HAVE_ARCH_KASAN=y
@@ -103,4 +104,5 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_SUN50I_A64_CCU=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
 CONFIG_VMAP_STACK=y



More information about the lede-commits mailing list