From: Greg Kroah-Hartman Date: Mon, 30 Mar 2020 14:32:41 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.6.1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=452ee2a055271c7d7f43255f45b6a5f1f7be9699;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: arm-dts-sun8i-a83t-tbs-a711-fix-usb-otg-mode-detection.patch bpf-btf-fix-btf-verification-of-enum-members-in-struct-union.patch revert-r8169-check-that-realtek-phy-driver-module-is-loaded.patch vti6-fix-memory-leak-of-skb-if-input-policy-check-fails.patch --- diff --git a/queue-4.19/arm-dts-sun8i-a83t-tbs-a711-fix-usb-otg-mode-detection.patch b/queue-4.19/arm-dts-sun8i-a83t-tbs-a711-fix-usb-otg-mode-detection.patch new file mode 100644 index 00000000000..e3cf572e3b8 --- /dev/null +++ b/queue-4.19/arm-dts-sun8i-a83t-tbs-a711-fix-usb-otg-mode-detection.patch @@ -0,0 +1,39 @@ +From b642d4825441bf30c72b72deb739bd2d5f53af08 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman +Date: Sat, 22 Feb 2020 23:31:53 +0100 +Subject: ARM: dts: sun8i-a83t-tbs-a711: Fix USB OTG mode detection + +From: Ondrej Jirman + +commit b642d4825441bf30c72b72deb739bd2d5f53af08 upstream. + +USB-ID signal has a pullup on the schematic, but in reality it's not +pulled up, so add a GPIO pullup. And we also need a usb0_vbus_power-supply +for VBUS detection. + +This fixes OTG mode detection and charging issues on TBS A711 tablet. +The issues came from ID pin reading 0, causing host mode to be enabled, +when it should not be, leading to DRVVBUS being enabled, which disabled +the charger. + +Fixes: f2f221c7810b824e ("ARM: dts: sun8i: a711: Enable USB OTG") +Signed-off-by: Ondrej Jirman +Signed-off-by: Maxime Ripard +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts ++++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +@@ -416,7 +416,8 @@ + }; + + &usbphy { +- usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ ++ usb0_id_det-gpios = <&pio 7 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH11 */ ++ usb0_vbus_power-supply = <&usb_power_supply>; + usb0_vbus-supply = <®_drivevbus>; + usb1_vbus_supply = <®_vmain>; + usb2_vbus_supply = <®_vmain>; diff --git a/queue-4.19/bpf-btf-fix-btf-verification-of-enum-members-in-struct-union.patch b/queue-4.19/bpf-btf-fix-btf-verification-of-enum-members-in-struct-union.patch new file mode 100644 index 00000000000..64e34bf15d8 --- /dev/null +++ b/queue-4.19/bpf-btf-fix-btf-verification-of-enum-members-in-struct-union.patch @@ -0,0 +1,37 @@ +From da6c7faeb103c493e505e87643272f70be586635 Mon Sep 17 00:00:00 2001 +From: Yoshiki Komachi +Date: Tue, 10 Mar 2020 16:32:29 +0900 +Subject: bpf/btf: Fix BTF verification of enum members in struct/union + +From: Yoshiki Komachi + +commit da6c7faeb103c493e505e87643272f70be586635 upstream. + +btf_enum_check_member() was currently sure to recognize the size of +"enum" type members in struct/union as the size of "int" even if +its size was packed. + +This patch fixes BTF enum verification to use the correct size +of member in BPF programs. + +Fixes: 179cde8cef7e ("bpf: btf: Check members of struct/union") +Signed-off-by: Yoshiki Komachi +Signed-off-by: Alexei Starovoitov +Link: https://lore.kernel.org/bpf/1583825550-18606-2-git-send-email-komachi.yoshiki@gmail.com +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/bpf/btf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/bpf/btf.c ++++ b/kernel/bpf/btf.c +@@ -1763,7 +1763,7 @@ static int btf_enum_check_member(struct + + struct_size = struct_type->size; + bytes_offset = BITS_ROUNDDOWN_BYTES(struct_bits_off); +- if (struct_size - bytes_offset < sizeof(int)) { ++ if (struct_size - bytes_offset < member_type->size) { + btf_verifier_log_member(env, struct_type, member, + "Member exceeds struct_size"); + return -EINVAL; diff --git a/queue-4.19/revert-r8169-check-that-realtek-phy-driver-module-is-loaded.patch b/queue-4.19/revert-r8169-check-that-realtek-phy-driver-module-is-loaded.patch new file mode 100644 index 00000000000..f672aea6bda --- /dev/null +++ b/queue-4.19/revert-r8169-check-that-realtek-phy-driver-module-is-loaded.patch @@ -0,0 +1,41 @@ +From e413fffb6c72e4760156c1094f65c7d9456b7d1e Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Mon, 30 Mar 2020 16:28:20 +0200 +Subject: Revert "r8169: check that Realtek PHY driver module is loaded" + +From: Greg Kroah-Hartman + +This reverts commit 85a19b0e31e256e77fd4124804b9cec10619de5e which is +commit f325937735498afb054a0195291bbf68d0b60be5 upstream. + +Heiner writes: + commit 85a19b0e31e2 ("r8169: check that Realtek PHY driver + module is loaded") made it accidentally to 4.19 and causes an + issue with Android/x86. Could you please revert it? + +Cc: Heiner Kallweit +Cc: David S. Miller +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/realtek/r8169.c | 9 --------- + 1 file changed, 9 deletions(-) + +--- a/drivers/net/ethernet/realtek/r8169.c ++++ b/drivers/net/ethernet/realtek/r8169.c +@@ -7433,15 +7433,6 @@ static int rtl_init_one(struct pci_dev * + int chipset, region, i; + int jumbo_max, rc; + +- /* Some tools for creating an initramfs don't consider softdeps, then +- * r8169.ko may be in initramfs, but realtek.ko not. Then the generic +- * PHY driver is used that doesn't work with most chip versions. +- */ +- if (!driver_find("RTL8201CP Ethernet", &mdio_bus_type)) { +- dev_err(&pdev->dev, "realtek.ko not loaded, maybe it needs to be added to initramfs?\n"); +- return -ENOENT; +- } +- + dev = devm_alloc_etherdev(&pdev->dev, sizeof (*tp)); + if (!dev) + return -ENOMEM; diff --git a/queue-4.19/series b/queue-4.19/series index 0c81b2341fa..6830cabba62 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -72,3 +72,7 @@ afs-fix-some-tracing-details.patch netfilter-flowtable-reload-ip-v6-h-in-nf_flow_tuple_ip-v6.patch netfilter-nft_fwd_netdev-validate-family-and-chain-type.patch netfilter-nft_fwd_netdev-allow-to-redirect-to-ifb-via-ingress.patch +bpf-btf-fix-btf-verification-of-enum-members-in-struct-union.patch +arm-dts-sun8i-a83t-tbs-a711-fix-usb-otg-mode-detection.patch +vti6-fix-memory-leak-of-skb-if-input-policy-check-fails.patch +revert-r8169-check-that-realtek-phy-driver-module-is-loaded.patch diff --git a/queue-4.19/vti6-fix-memory-leak-of-skb-if-input-policy-check-fails.patch b/queue-4.19/vti6-fix-memory-leak-of-skb-if-input-policy-check-fails.patch new file mode 100644 index 00000000000..8f4bfefba96 --- /dev/null +++ b/queue-4.19/vti6-fix-memory-leak-of-skb-if-input-policy-check-fails.patch @@ -0,0 +1,39 @@ +From 2a9de3af21aa8c31cd68b0b39330d69f8c1e59df Mon Sep 17 00:00:00 2001 +From: Torsten Hilbrich +Date: Wed, 11 Mar 2020 11:19:06 +0100 +Subject: vti6: Fix memory leak of skb if input policy check fails + +From: Torsten Hilbrich + +commit 2a9de3af21aa8c31cd68b0b39330d69f8c1e59df upstream. + +The vti6_rcv function performs some tests on the retrieved tunnel +including checking the IP protocol, the XFRM input policy, the +source and destination address. + +In all but one places the skb is released in the error case. When +the input policy check fails the network packet is leaked. + +Using the same goto-label discard in this case to fix this problem. + +Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces") +Signed-off-by: Torsten Hilbrich +Reviewed-by: Nicolas Dichtel +Signed-off-by: Steffen Klassert +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv6/ip6_vti.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/ipv6/ip6_vti.c ++++ b/net/ipv6/ip6_vti.c +@@ -315,7 +315,7 @@ static int vti6_rcv(struct sk_buff *skb) + + if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { + rcu_read_unlock(); +- return 0; ++ goto discard; + } + + ipv6h = ipv6_hdr(skb);