From bcd7644007eba9caa1b0dd535acd6266b04fe8df Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Wed, 28 Nov 2018 12:36:15 +0100 Subject: kernel: bump 4.9 to 4.9.143 Refreshed all patches. Altered patches: - 950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch - 950-0149-Update-vfpmodule.c.patch - 201-extra_optimization.patch New symbol: - CONFIG_HARDEN_BRANCH_PREDICTOR Compile-tested on: ar71xx, ar7, arc770, at91, brcm2708, brcm63xx, ixp4xx, lantiq, layerscape, mpc85xx, orion, rb532, uml Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte --- target/linux/brcm2708/bcm2708/config-4.9 | 1 + target/linux/brcm2708/bcm2709/config-4.9 | 1 + .../950-0001-smsx95xx-fix-crimes-against-truesize.patch | 4 ++-- ...028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch | 2 +- .../brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch | 2 +- ...-Improve-__copy_to_user-and-__copy_from_user-performa.patch | 10 +++++++--- .../brcm2708/patches-4.9/950-0149-Update-vfpmodule.c.patch | 10 +++++----- 7 files changed, 18 insertions(+), 12 deletions(-) (limited to 'target/linux/brcm2708') diff --git a/target/linux/brcm2708/bcm2708/config-4.9 b/target/linux/brcm2708/bcm2708/config-4.9 index 116dd257dd..ce01582fec 100644 --- a/target/linux/brcm2708/bcm2708/config-4.9 +++ b/target/linux/brcm2708/bcm2708/config-4.9 @@ -187,6 +187,7 @@ CONFIG_GPIOLIB=y # CONFIG_GPIO_BCM_VIRT is not set CONFIG_GPIO_SYSFS=y CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y diff --git a/target/linux/brcm2708/bcm2709/config-4.9 b/target/linux/brcm2708/bcm2709/config-4.9 index 4e505edced..0910fa6ea7 100644 --- a/target/linux/brcm2708/bcm2709/config-4.9 +++ b/target/linux/brcm2708/bcm2709/config-4.9 @@ -202,6 +202,7 @@ CONFIG_GPIO_BCM_EXP=y CONFIG_GPIO_BCM_VIRT=y CONFIG_GPIO_SYSFS=y CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y diff --git a/target/linux/brcm2708/patches-4.9/950-0001-smsx95xx-fix-crimes-against-truesize.patch b/target/linux/brcm2708/patches-4.9/950-0001-smsx95xx-fix-crimes-against-truesize.patch index 8916e52741..b0de3f211a 100644 --- a/target/linux/brcm2708/patches-4.9/950-0001-smsx95xx-fix-crimes-against-truesize.patch +++ b/target/linux/brcm2708/patches-4.9/950-0001-smsx95xx-fix-crimes-against-truesize.patch @@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, u32 *data, int in_pm) { -@@ -1954,7 +1958,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1961,7 +1965,8 @@ static int smsc95xx_rx_fixup(struct usbn if (dev->net->features & NETIF_F_RXCSUM) smsc95xx_rx_csum_offload(skb); skb_trim(skb, skb->len - 4); /* remove fcs */ @@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning return 1; } -@@ -1972,7 +1977,8 @@ static int smsc95xx_rx_fixup(struct usbn +@@ -1979,7 +1984,8 @@ static int smsc95xx_rx_fixup(struct usbn if (dev->net->features & NETIF_F_RXCSUM) smsc95xx_rx_csum_offload(ax_skb); skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */ diff --git a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch index 52fe8a2281..28f337b0e3 100644 --- a/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch +++ b/target/linux/brcm2708/patches-4.9/950-0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch @@ -9,7 +9,7 @@ Subject: [PATCH] kbuild: Ignore dtco targets when filtering symbols --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include -@@ -285,7 +285,7 @@ ksym_dep_filter = +@@ -295,7 +295,7 @@ ksym_dep_filter = $(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \ as_*_S|cpp_s_S) \ $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ diff --git a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch index 12174919bb..707e1a34a1 100644 --- a/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.9/950-0031-Add-dwc_otg-driver.patch @@ -696,7 +696,7 @@ Signed-off-by: Noralf Trønnes } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5072,7 +5072,7 @@ static void port_event(struct usb_hub *h +@@ -5074,7 +5074,7 @@ static void port_event(struct usb_hub *h if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; diff --git a/target/linux/brcm2708/patches-4.9/950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch b/target/linux/brcm2708/patches-4.9/950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch index 016d48dd2c..c1e5858bce 100644 --- a/target/linux/brcm2708/patches-4.9/950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch +++ b/target/linux/brcm2708/patches-4.9/950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch @@ -57,7 +57,7 @@ Signed-off-by: Phil Elwell #define memset(p,v,n) \ --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h -@@ -477,6 +477,9 @@ do { \ +@@ -489,6 +489,9 @@ do { \ extern unsigned long __must_check arm_copy_from_user(void *to, const void __user *from, unsigned long n); @@ -262,17 +262,21 @@ Signed-off-by: Phil Elwell +.endm --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S -@@ -89,11 +89,13 @@ +@@ -89,7 +89,8 @@ .text -ENTRY(arm_copy_from_user) +ENTRY(__copy_from_user_std) +WEAK(arm_copy_from_user) + #ifdef CONFIG_CPU_SPECTRE + get_thread_info r3 + ldr r3, [r3, #TI_ADDR_LIMIT] +@@ -102,7 +103,7 @@ ENTRY(arm_copy_from_user) #include "copy_template.S" - ENDPROC(arm_copy_from_user) +-ENDPROC(arm_copy_from_user) +ENDPROC(__copy_from_user_std) .pushsection .fixup,"ax" diff --git a/target/linux/brcm2708/patches-4.9/950-0149-Update-vfpmodule.c.patch b/target/linux/brcm2708/patches-4.9/950-0149-Update-vfpmodule.c.patch index 16d740aafb..78606ed61b 100644 --- a/target/linux/brcm2708/patches-4.9/950-0149-Update-vfpmodule.c.patch +++ b/target/linux/brcm2708/patches-4.9/950-0149-Update-vfpmodule.c.patch @@ -102,15 +102,15 @@ Signed-off-by: Christopher Alexander Tobias Schulze vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN); fmxr(FPEXC, fpexc); } -@@ -604,6 +611,7 @@ int vfp_restore_user_hwstate(struct user +@@ -602,6 +609,7 @@ int vfp_restore_user_hwstate(struct user + struct thread_info *thread = current_thread_info(); struct vfp_hard_struct *hwstate = &thread->vfpstate.hard; unsigned long fpexc; - int err = 0; + u32 fpsid = fmrx(FPSID); /* Disable VFP to avoid corrupting the new thread state. */ vfp_flush_hwstate(thread); -@@ -627,8 +635,12 @@ int vfp_restore_user_hwstate(struct user +@@ -624,8 +632,12 @@ int vfp_restore_user_hwstate(struct user /* Ensure the VFP is enabled. */ fpexc |= FPEXC_EN; @@ -124,8 +124,8 @@ Signed-off-by: Christopher Alexander Tobias Schulze + hwstate->fpexc = fpexc; - __get_user_error(hwstate->fpinst, &ufp_exc->fpinst, err); -@@ -698,7 +710,8 @@ void kernel_neon_begin(void) + hwstate->fpinst = ufp_exc->fpinst; +@@ -695,7 +707,8 @@ void kernel_neon_begin(void) cpu = get_cpu(); fpexc = fmrx(FPEXC) | FPEXC_EN; -- cgit v1.2.3