kernel: bump 5.4 to 5.4.188
Added the new configuration options: CONFIG_HARDEN_BRANCH_HISTORY=y CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y Manually adapted: target/linux/generic/hack-5.4/220-gc_sections.patch Compile-tested: lantiq/xrx200, armvirt/64 Run-tested: lantiq/xrx200, armvirt/64 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
		| @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL | ||||
|   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) | ||||
| endif | ||||
|  | ||||
| LINUX_VERSION-5.4 = .182 | ||||
| LINUX_VERSION-5.4 = .188 | ||||
|  | ||||
| LINUX_KERNEL_HASH-5.4.182 = b2f1201f64f010e9e3c85d6f303a559a7944a80a0244a86b8f5035bd23f1f40d | ||||
| LINUX_KERNEL_HASH-5.4.188 = 9fbc8bfdc28c9fce2307bdf7cf1172c9819df673397a411c40a5c3d0a570fdbc | ||||
|  | ||||
| remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) | ||||
| sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) | ||||
|   | ||||
| @@ -37,7 +37,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|  | ||||
| --- a/drivers/i2c/busses/i2c-bcm2835.c | ||||
| +++ b/drivers/i2c/busses/i2c-bcm2835.c | ||||
| @@ -51,6 +51,18 @@ | ||||
| @@ -56,6 +56,18 @@ | ||||
|  #define BCM2835_I2C_CDIV_MIN	0x0002 | ||||
|  #define BCM2835_I2C_CDIV_MAX	0xFFFE | ||||
|   | ||||
| @@ -56,7 +56,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|  struct bcm2835_i2c_dev { | ||||
|  	struct device *dev; | ||||
|  	void __iomem *regs; | ||||
| @@ -63,8 +75,78 @@ struct bcm2835_i2c_dev { | ||||
| @@ -68,8 +80,78 @@ struct bcm2835_i2c_dev { | ||||
|  	u32 msg_err; | ||||
|  	u8 *msg_buf; | ||||
|  	size_t msg_buf_remaining; | ||||
| @@ -135,7 +135,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|  static inline void bcm2835_i2c_writel(struct bcm2835_i2c_dev *i2c_dev, | ||||
|  				      u32 reg, u32 val) | ||||
|  { | ||||
| @@ -252,6 +334,7 @@ static void bcm2835_i2c_start_transfer(s | ||||
| @@ -257,6 +339,7 @@ static void bcm2835_i2c_start_transfer(s | ||||
|  	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr); | ||||
|  	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len); | ||||
|  	bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c); | ||||
| @@ -143,7 +143,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|  } | ||||
|   | ||||
|  static void bcm2835_i2c_finish_transfer(struct bcm2835_i2c_dev *i2c_dev) | ||||
| @@ -278,6 +361,7 @@ static irqreturn_t bcm2835_i2c_isr(int t | ||||
| @@ -283,6 +366,7 @@ static irqreturn_t bcm2835_i2c_isr(int t | ||||
|  	u32 val, err; | ||||
|   | ||||
|  	val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); | ||||
| @@ -151,7 +151,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|   | ||||
|  	err = val & (BCM2835_I2C_S_CLKT | BCM2835_I2C_S_ERR); | ||||
|  	if (err) { | ||||
| @@ -344,6 +428,13 @@ static int bcm2835_i2c_xfer(struct i2c_a | ||||
| @@ -349,6 +433,13 @@ static int bcm2835_i2c_xfer(struct i2c_a | ||||
|  	unsigned long time_left; | ||||
|  	int i; | ||||
|   | ||||
| @@ -165,7 +165,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|  	for (i = 0; i < (num - 1); i++) | ||||
|  		if (msgs[i].flags & I2C_M_RD) { | ||||
|  			dev_warn_once(i2c_dev->dev, | ||||
| @@ -362,6 +453,10 @@ static int bcm2835_i2c_xfer(struct i2c_a | ||||
| @@ -367,6 +458,10 @@ static int bcm2835_i2c_xfer(struct i2c_a | ||||
|   | ||||
|  	bcm2835_i2c_finish_transfer(i2c_dev); | ||||
|   | ||||
| @@ -176,7 +176,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org> | ||||
|  	if (!time_left) { | ||||
|  		bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, | ||||
|  				   BCM2835_I2C_C_CLEAR); | ||||
| @@ -372,7 +467,9 @@ static int bcm2835_i2c_xfer(struct i2c_a | ||||
| @@ -377,7 +472,9 @@ static int bcm2835_i2c_xfer(struct i2c_a | ||||
|  	if (!i2c_dev->msg_err) | ||||
|  		return num; | ||||
|   | ||||
|   | ||||
| @@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org> | ||||
|  | ||||
| --- a/drivers/i2c/busses/i2c-bcm2835.c | ||||
| +++ b/drivers/i2c/busses/i2c-bcm2835.c | ||||
| @@ -188,6 +188,7 @@ static int clk_bcm2835_i2c_set_rate(stru | ||||
| @@ -193,6 +193,7 @@ static int clk_bcm2835_i2c_set_rate(stru | ||||
|  { | ||||
|  	struct clk_bcm2835_i2c *div = to_clk_bcm2835_i2c(hw); | ||||
|  	u32 redl, fedl; | ||||
| @@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org> | ||||
|  	u32 divider = clk_bcm2835_i2c_calc_divider(rate, parent_rate); | ||||
|   | ||||
|  	if (divider == -EINVAL) | ||||
| @@ -211,6 +212,17 @@ static int clk_bcm2835_i2c_set_rate(stru | ||||
| @@ -216,6 +217,17 @@ static int clk_bcm2835_i2c_set_rate(stru | ||||
|  	bcm2835_i2c_writel(div->i2c_dev, BCM2835_I2C_DEL, | ||||
|  			   (fedl << BCM2835_I2C_FEDL_SHIFT) | | ||||
|  			   (redl << BCM2835_I2C_REDL_SHIFT)); | ||||
|   | ||||
| @@ -22,11 +22,9 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | ||||
|  net/dsa/switch.c | 31 ++++++++++++++++++++++--------- | ||||
|  1 file changed, 22 insertions(+), 9 deletions(-) | ||||
|  | ||||
| diff --git a/net/dsa/switch.c b/net/dsa/switch.c | ||||
| index 6a9607518823..dd71e3301b27 100644 | ||||
| --- a/net/dsa/switch.c | ||||
| +++ b/net/dsa/switch.c | ||||
| @@ -65,19 +65,12 @@ static int dsa_switch_bridge_join(struct dsa_switch *ds, | ||||
| @@ -65,19 +65,12 @@ static int dsa_switch_bridge_join(struct | ||||
|  	return 0; | ||||
|  } | ||||
|   | ||||
| @@ -48,7 +46,7 @@ index 6a9607518823..dd71e3301b27 100644 | ||||
|  	/* If the bridge was vlan_filtering, the bridge core doesn't trigger an | ||||
|  	 * event for changing vlan_filtering setting upon slave ports leaving | ||||
|  	 * it. That is a good thing, because that lets us handle it and also | ||||
| @@ -103,6 +96,26 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds, | ||||
| @@ -103,6 +96,26 @@ static int dsa_switch_bridge_leave(struc | ||||
|  		if (err && err != EOPNOTSUPP) | ||||
|  			return err; | ||||
|  	} | ||||
| @@ -75,6 +73,3 @@ index 6a9607518823..dd71e3301b27 100644 | ||||
|  	return 0; | ||||
|  } | ||||
|   | ||||
| --  | ||||
| 2.34.1 | ||||
|  | ||||
|   | ||||
| @@ -39,11 +39,9 @@ Signed-off-by: Marek Behún <kabel@kernel.org> | ||||
|  net/dsa/switch.c | 8 +++++--- | ||||
|  1 file changed, 5 insertions(+), 3 deletions(-) | ||||
|  | ||||
| diff --git a/net/dsa/switch.c b/net/dsa/switch.c | ||||
| index dd71e3301b27..f517d6d7efa2 100644 | ||||
| --- a/net/dsa/switch.c | ||||
| +++ b/net/dsa/switch.c | ||||
| @@ -112,9 +112,11 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds, | ||||
| @@ -112,9 +112,11 @@ static int dsa_switch_bridge_leave(struc | ||||
|  		ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port, | ||||
|  						info->br); | ||||
|   | ||||
| @@ -58,6 +56,3 @@ index dd71e3301b27..f517d6d7efa2 100644 | ||||
|   | ||||
|  	return 0; | ||||
|  } | ||||
| --  | ||||
| 2.34.1 | ||||
|  | ||||
|   | ||||
| @@ -1872,6 +1872,7 @@ CONFIG_GPIO_SYSFS=y | ||||
| CONFIG_HARDENED_USERCOPY=y | ||||
| # CONFIG_HARDENED_USERCOPY_FALLBACK is not set | ||||
| # CONFIG_HARDENED_USERCOPY_PAGESPAN is not set | ||||
| CONFIG_HARDEN_BRANCH_HISTORY=y | ||||
| CONFIG_HARDEN_EL2_VECTORS=y | ||||
| # CONFIG_HARDLOCKUP_DETECTOR is not set | ||||
| # CONFIG_HAVE_AOUT is not set | ||||
| @@ -3056,6 +3057,7 @@ CONFIG_MISC_FILESYSTEMS=y | ||||
| # CONFIG_MISDN_NETJET is not set | ||||
| # CONFIG_MISDN_SPEEDFAX is not set | ||||
| # CONFIG_MISDN_W6692 is not set | ||||
| CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y | ||||
| # CONFIG_MKISS is not set | ||||
| # CONFIG_MLX4_CORE is not set | ||||
| # CONFIG_MLX4_EN is not set | ||||
|   | ||||
| @@ -72,7 +72,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | ||||
|   | ||||
| --- a/arch/arm/kernel/vmlinux.lds.h | ||||
| +++ b/arch/arm/kernel/vmlinux.lds.h | ||||
| @@ -22,13 +22,13 @@ | ||||
| @@ -22,7 +22,7 @@ | ||||
|  #define ARM_MMU_DISCARD(x) | ||||
|  #else | ||||
|  #define ARM_MMU_KEEP(x) | ||||
| @@ -80,6 +80,8 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | ||||
| +#define ARM_MMU_DISCARD(x)	KEEP(x) | ||||
|  #endif | ||||
|   | ||||
|  /* | ||||
| @@ -41,7 +41,7 @@ | ||||
|  #define PROC_INFO							\ | ||||
|  		. = ALIGN(4);						\ | ||||
|  		__proc_info_begin = .;					\ | ||||
| @@ -88,7 +90,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | ||||
|  		__proc_info_end = .; | ||||
|   | ||||
|  #define HYPERVISOR_TEXT							\ | ||||
| @@ -39,11 +39,11 @@ | ||||
| @@ -52,11 +52,11 @@ | ||||
|  #define IDMAP_TEXT							\ | ||||
|  		ALIGN_FUNCTION();					\ | ||||
|  		__idmap_text_start = .;					\ | ||||
| @@ -102,7 +104,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | ||||
|  		__hyp_idmap_text_end = .; | ||||
|   | ||||
|  #define ARM_DISCARD							\ | ||||
| @@ -86,12 +86,12 @@ | ||||
| @@ -99,12 +99,12 @@ | ||||
|  	. = ALIGN(8);							\ | ||||
|  	.ARM.unwind_idx : {						\ | ||||
|  		__start_unwind_idx = .;					\ | ||||
| @@ -117,20 +119,21 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> | ||||
|  		__stop_unwind_tab = .;					\ | ||||
|  	} | ||||
|   | ||||
| @@ -102,14 +102,14 @@ | ||||
|  #define ARM_VECTORS							\ | ||||
|  	__vectors_start = .;						\ | ||||
|  	.vectors 0xffff0000 : AT(__vectors_start) {			\ | ||||
| @@ -116,7 +116,7 @@ | ||||
|  	__vectors_lma = .;						\ | ||||
|  	OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) {		\ | ||||
|  		.vectors {						\ | ||||
| -			*(.vectors)					\ | ||||
| +			KEEP(*(.vectors))				\ | ||||
|  		}							\ | ||||
|  	. = __vectors_start + SIZEOF(.vectors);				\ | ||||
|  	__vectors_end = .;						\ | ||||
|  		.vectors.bhb.loop8 {					\ | ||||
|  			*(.vectors.bhb.loop8)				\ | ||||
| @@ -134,7 +134,7 @@ | ||||
|  									\ | ||||
|  	__stubs_start = .;						\ | ||||
|  	.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_start) {		\ | ||||
|  	__stubs_lma = .;						\ | ||||
|  	.stubs ADDR(.vectors) + 0x1000 : AT(__stubs_lma) {		\ | ||||
| -		*(.stubs)						\ | ||||
| +		KEEP(*(.stubs))						\ | ||||
|  	}								\ | ||||
|  	. = __stubs_start + SIZEOF(.stubs);				\ | ||||
|  	__stubs_end = .;						\ | ||||
|  	ARM_LMA(__stubs, .stubs);					\ | ||||
|  	. = __stubs_lma + SIZEOF(.stubs);				\ | ||||
|   | ||||
| @@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john@phrozen.org> | ||||
|  	bool | ||||
| --- a/lib/Kconfig | ||||
| +++ b/lib/Kconfig | ||||
| @@ -402,16 +402,16 @@ config BCH_CONST_T | ||||
| @@ -401,16 +401,16 @@ config BCH_CONST_T | ||||
|  # Textsearch support is select'ed if needed | ||||
|  # | ||||
|  config TEXTSEARCH | ||||
|   | ||||
| @@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||
|   | ||||
| --- a/net/core/sock.c | ||||
| +++ b/net/core/sock.c | ||||
| @@ -3643,6 +3643,8 @@ static __net_initdata struct pernet_oper | ||||
| @@ -3641,6 +3641,8 @@ static __net_initdata struct pernet_oper | ||||
|   | ||||
|  static int __init proto_init(void) | ||||
|  { | ||||
|   | ||||
| @@ -1087,7 +1087,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com> | ||||
|  #define JFFS2_NODE_ACCURATE 0x2000 | ||||
| --- a/lib/Kconfig | ||||
| +++ b/lib/Kconfig | ||||
| @@ -303,6 +303,12 @@ config ZSTD_DECOMPRESS | ||||
| @@ -302,6 +302,12 @@ config ZSTD_DECOMPRESS | ||||
|   | ||||
|  source "lib/xz/Kconfig" | ||||
|   | ||||
|   | ||||
| @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||
|  	if (!net_eq(dev_net(dev), sock_net(sk))) | ||||
|  		goto drop; | ||||
|   | ||||
| @@ -3293,6 +3295,7 @@ static int packet_create(struct net *net | ||||
| @@ -3296,6 +3298,7 @@ static int packet_create(struct net *net | ||||
|  	mutex_init(&po->pg_vec_lock); | ||||
|  	po->rollover = NULL; | ||||
|  	po->prot_hook.func = packet_rcv; | ||||
| @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||
|   | ||||
|  	if (sock->type == SOCK_PACKET) | ||||
|  		po->prot_hook.func = packet_rcv_spkt; | ||||
| @@ -3930,6 +3933,16 @@ packet_setsockopt(struct socket *sock, i | ||||
| @@ -3939,6 +3942,16 @@ packet_setsockopt(struct socket *sock, i | ||||
|  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit; | ||||
|  		return 0; | ||||
|  	} | ||||
| @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||
|  	default: | ||||
|  		return -ENOPROTOOPT; | ||||
|  	} | ||||
| @@ -3986,6 +3999,13 @@ static int packet_getsockopt(struct sock | ||||
| @@ -3995,6 +4008,13 @@ static int packet_getsockopt(struct sock | ||||
|  	case PACKET_VNET_HDR: | ||||
|  		val = po->has_vnet_hdr; | ||||
|  		break; | ||||
|   | ||||
| @@ -63,7 +63,7 @@ Signed-off-by: Roy Pledge <roy.pledge@nxp.com> | ||||
|   * address space as memory. Needed when the kernel wants to execute | ||||
| --- a/arch/arm/mm/mmu.c | ||||
| +++ b/arch/arm/mm/mmu.c | ||||
| @@ -314,6 +314,13 @@ static struct mem_type mem_types[] __ro_ | ||||
| @@ -316,6 +316,13 @@ static struct mem_type mem_types[] __ro_ | ||||
|  		.prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | ||||
|  		.domain    = DOMAIN_KERNEL, | ||||
|  	}, | ||||
| @@ -77,7 +77,7 @@ Signed-off-by: Roy Pledge <roy.pledge@nxp.com> | ||||
|  	[MT_ROM] = { | ||||
|  		.prot_sect = PMD_TYPE_SECT, | ||||
|  		.domain    = DOMAIN_KERNEL, | ||||
| @@ -650,6 +657,7 @@ static void __init build_mem_type_table( | ||||
| @@ -652,6 +659,7 @@ static void __init build_mem_type_table( | ||||
|  	} | ||||
|  	kern_pgprot |= PTE_EXT_AF; | ||||
|  	vecs_pgprot |= PTE_EXT_AF; | ||||
| @@ -85,7 +85,7 @@ Signed-off-by: Roy Pledge <roy.pledge@nxp.com> | ||||
|   | ||||
|  	/* | ||||
|  	 * Set PXN for user mappings | ||||
| @@ -678,6 +686,7 @@ static void __init build_mem_type_table( | ||||
| @@ -680,6 +688,7 @@ static void __init build_mem_type_table( | ||||
|  	mem_types[MT_MEMORY_RWX].prot_pte |= kern_pgprot; | ||||
|  	mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd; | ||||
|  	mem_types[MT_MEMORY_RW].prot_pte |= kern_pgprot; | ||||
|   | ||||
| @@ -210,7 +210,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> | ||||
|   | ||||
|  #undef DEBUG | ||||
|   | ||||
| @@ -57,16 +55,16 @@ void __par_io_config_pin(struct qe_pio_r | ||||
| @@ -59,16 +57,16 @@ void __par_io_config_pin(struct qe_pio_r | ||||
|  	pin_mask1bit = (u32) (1 << (QE_PIO_PINS - (pin + 1))); | ||||
|   | ||||
|  	/* Set open drain, if required */ | ||||
| @@ -232,7 +232,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> | ||||
|   | ||||
|  	/* get all bits mask for 2 bit per port */ | ||||
|  	pin_mask2bits = (u32) (0x3 << (QE_PIO_PINS - | ||||
| @@ -78,34 +76,30 @@ void __par_io_config_pin(struct qe_pio_r | ||||
| @@ -80,34 +78,30 @@ void __par_io_config_pin(struct qe_pio_r | ||||
|   | ||||
|  	/* clear and set 2 bits mask */ | ||||
|  	if (pin > (QE_PIO_PINS / 2) - 1) { | ||||
| @@ -277,7 +277,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> | ||||
|  	} | ||||
|  } | ||||
|  EXPORT_SYMBOL(__par_io_config_pin); | ||||
| @@ -133,12 +127,12 @@ int par_io_data_set(u8 port, u8 pin, u8 | ||||
| @@ -135,12 +129,12 @@ int par_io_data_set(u8 port, u8 pin, u8 | ||||
|  	/* calculate pin location */ | ||||
|  	pin_mask = (u32) (1 << (QE_PIO_PINS - 1 - pin)); | ||||
|   | ||||
|   | ||||
| @@ -37,7 +37,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> | ||||
|  	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; | ||||
| --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | ||||
| +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | ||||
| @@ -133,7 +133,6 @@ | ||||
| @@ -134,7 +134,6 @@ | ||||
|  	status = "okay"; | ||||
|  	max-link-speed = <2>; | ||||
|  	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; | ||||
|   | ||||
| @@ -24,7 +24,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> | ||||
|  | ||||
| --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | ||||
| +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | ||||
| @@ -131,7 +131,6 @@ | ||||
| @@ -132,7 +132,6 @@ | ||||
|  	pinctrl-names = "default"; | ||||
|  	pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; | ||||
|  	status = "okay"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Hauke Mehrtens
					Hauke Mehrtens