From 2ddc6e58faa00b7d9c0eaeefdaed2904eeaed6fe Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 24 Apr 2020 12:12:13 +0200 Subject: [PATCH] 4.4-stable patches added patches: alsa-hda-fix-incorrect-usage-of-is_reachable.patch crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch net-ipv4-avoid-unused-variable-warning-for-sysctl.patch net-ipv4-emulate-read_once-on-hdrincl-bit-field-in-raw_sendmsg.patch vti4-removed-duplicate-log-message.patch --- ...-fix-incorrect-usage-of-is_reachable.patch | 35 +++++++++++ ...ull_hash-and-sha256_null_hash-static.patch | 42 +++++++++++++ ...d-unused-variable-warning-for-sysctl.patch | 47 ++++++++++++++ ...-on-hdrincl-bit-field-in-raw_sendmsg.patch | 61 +++++++++++++++++++ queue-4.4/series | 5 ++ .../vti4-removed-duplicate-log-message.patch | 37 +++++++++++ 6 files changed, 227 insertions(+) create mode 100644 queue-4.4/alsa-hda-fix-incorrect-usage-of-is_reachable.patch create mode 100644 queue-4.4/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch create mode 100644 queue-4.4/net-ipv4-avoid-unused-variable-warning-for-sysctl.patch create mode 100644 queue-4.4/net-ipv4-emulate-read_once-on-hdrincl-bit-field-in-raw_sendmsg.patch create mode 100644 queue-4.4/vti4-removed-duplicate-log-message.patch diff --git a/queue-4.4/alsa-hda-fix-incorrect-usage-of-is_reachable.patch b/queue-4.4/alsa-hda-fix-incorrect-usage-of-is_reachable.patch new file mode 100644 index 00000000000..2f2defb7f64 --- /dev/null +++ b/queue-4.4/alsa-hda-fix-incorrect-usage-of-is_reachable.patch @@ -0,0 +1,35 @@ +From 6a30abaa40b62aed46ef12ea4c16c48565bdb376 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 27 Apr 2018 17:17:35 +0200 +Subject: ALSA: hda - Fix incorrect usage of IS_REACHABLE() + +From: Takashi Iwai + +commit 6a30abaa40b62aed46ef12ea4c16c48565bdb376 upstream. + +The commit c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for +dependency on input") simplified the dependencies with IS_REACHABLE() +macro, but it broke due to its incorrect usage: it should have been +IS_REACHABLE(CONFIG_INPUT) instead of IS_REACHABLE(INPUT). + +Fixes: c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") +Cc: +Signed-off-by: Takashi Iwai +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -3500,7 +3500,7 @@ static void alc280_fixup_hp_gpio4(struct + } + } + +-#if IS_REACHABLE(INPUT) ++#if IS_REACHABLE(CONFIG_INPUT) + static void gpio2_mic_hotkey_event(struct hda_codec *codec, + struct hda_jack_callback *event) + { diff --git a/queue-4.4/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch b/queue-4.4/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch new file mode 100644 index 00000000000..0f3be1fd182 --- /dev/null +++ b/queue-4.4/crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch @@ -0,0 +1,42 @@ +From ce4e45842de3eb54b8dd6e081765d741f5b92b56 Mon Sep 17 00:00:00 2001 +From: Wei Yongjun +Date: Thu, 11 Oct 2018 01:49:48 +0000 +Subject: crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static + +From: Wei Yongjun + +commit ce4e45842de3eb54b8dd6e081765d741f5b92b56 upstream. + +Fixes the following sparse warnings: + +drivers/crypto/mxs-dcp.c:39:15: warning: + symbol 'sha1_null_hash' was not declared. Should it be static? +drivers/crypto/mxs-dcp.c:43:15: warning: + symbol 'sha256_null_hash' was not declared. Should it be static? + +Fixes: c709eebaf5c5 ("crypto: mxs-dcp - Fix SHA null hashes and output length") +Signed-off-by: Wei Yongjun +Signed-off-by: Herbert Xu +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/crypto/mxs-dcp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/crypto/mxs-dcp.c ++++ b/drivers/crypto/mxs-dcp.c +@@ -37,11 +37,11 @@ + * Null hashes to align with hw behavior on imx6sl and ull + * these are flipped for consistency with hw output + */ +-const uint8_t sha1_null_hash[] = ++static const uint8_t sha1_null_hash[] = + "\x09\x07\xd8\xaf\x90\x18\x60\x95\xef\xbf" + "\x55\x32\x0d\x4b\x6b\x5e\xee\xa3\x39\xda"; + +-const uint8_t sha256_null_hash[] = ++static const uint8_t sha256_null_hash[] = + "\x55\xb8\x52\x78\x1b\x99\x95\xa4" + "\x4c\x93\x9b\x64\xe4\x41\xae\x27" + "\x24\xb9\x6f\x99\xc8\xf4\xfb\x9a" diff --git a/queue-4.4/net-ipv4-avoid-unused-variable-warning-for-sysctl.patch b/queue-4.4/net-ipv4-avoid-unused-variable-warning-for-sysctl.patch new file mode 100644 index 00000000000..f17ad66f010 --- /dev/null +++ b/queue-4.4/net-ipv4-avoid-unused-variable-warning-for-sysctl.patch @@ -0,0 +1,47 @@ +From 773daa3caf5d3f87fdb1ab43e9c1b367a38fa394 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 28 Feb 2018 14:32:48 +0100 +Subject: net: ipv4: avoid unused variable warning for sysctl + +From: Arnd Bergmann + +commit 773daa3caf5d3f87fdb1ab43e9c1b367a38fa394 upstream. + +The newly introudced ip_min_valid_pmtu variable is only used when +CONFIG_SYSCTL is set: + +net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used [-Werror=unused-variable] + +This moves it to the other variables like it, to avoid the harmless +warning. + +Fixes: c7272c2f1229 ("net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68") +Signed-off-by: Arnd Bergmann +Acked-by: Sabrina Dubroca +Signed-off-by: David S. Miller +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/route.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/net/ipv4/route.c ++++ b/net/ipv4/route.c +@@ -131,8 +131,6 @@ static int ip_rt_min_advmss __read_mostl + + static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT; + +-static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU; +- + /* + * Interface to generic destination cache. + */ +@@ -2705,6 +2703,7 @@ void ip_rt_multicast_event(struct in_dev + static int ip_rt_gc_interval __read_mostly = 60 * HZ; + static int ip_rt_gc_min_interval __read_mostly = HZ / 2; + static int ip_rt_gc_elasticity __read_mostly = 8; ++static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU; + + static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write, + void __user *buffer, diff --git a/queue-4.4/net-ipv4-emulate-read_once-on-hdrincl-bit-field-in-raw_sendmsg.patch b/queue-4.4/net-ipv4-emulate-read_once-on-hdrincl-bit-field-in-raw_sendmsg.patch new file mode 100644 index 00000000000..b4dae279f1b --- /dev/null +++ b/queue-4.4/net-ipv4-emulate-read_once-on-hdrincl-bit-field-in-raw_sendmsg.patch @@ -0,0 +1,61 @@ +From 20b50d79974ea3192e8c3ab7faf4e536e5f14d8f Mon Sep 17 00:00:00 2001 +From: Nicolai Stange +Date: Mon, 8 Jan 2018 15:54:44 +0100 +Subject: net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg() + +From: Nicolai Stange + +commit 20b50d79974ea3192e8c3ab7faf4e536e5f14d8f upstream. + +Commit 8f659a03a0ba ("net: ipv4: fix for a race condition in +raw_sendmsg") fixed the issue of possibly inconsistent ->hdrincl handling +due to concurrent updates by reading this bit-field member into a local +variable and using the thus stabilized value in subsequent tests. + +However, aforementioned commit also adds the (correct) comment that + + /* hdrincl should be READ_ONCE(inet->hdrincl) + * but READ_ONCE() doesn't work with bit fields + */ + +because as it stands, the compiler is free to shortcut or even eliminate +the local variable at its will. + +Note that I have not seen anything like this happening in reality and thus, +the concern is a theoretical one. + +However, in order to be on the safe side, emulate a READ_ONCE() on the +bit-field by doing it on the local 'hdrincl' variable itself: + + int hdrincl = inet->hdrincl; + hdrincl = READ_ONCE(hdrincl); + +This breaks the chain in the sense that the compiler is not allowed +to replace subsequent reads from hdrincl with reloads from inet->hdrincl. + +Fixes: 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") +Signed-off-by: Nicolai Stange +Reviewed-by: Stefano Brivio +Signed-off-by: David S. Miller +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/raw.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/ipv4/raw.c ++++ b/net/ipv4/raw.c +@@ -507,9 +507,11 @@ static int raw_sendmsg(struct sock *sk, + goto out; + + /* hdrincl should be READ_ONCE(inet->hdrincl) +- * but READ_ONCE() doesn't work with bit fields ++ * but READ_ONCE() doesn't work with bit fields. ++ * Doing this indirectly yields the same result. + */ + hdrincl = inet->hdrincl; ++ hdrincl = READ_ONCE(hdrincl); + /* + * Check the flags. + */ diff --git a/queue-4.4/series b/queue-4.4/series index cb481c941cb..5c61016f944 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1 +1,6 @@ ext4-fix-extent_status-fragmentation-for-plain-files.patch +alsa-hda-fix-incorrect-usage-of-is_reachable.patch +net-ipv4-emulate-read_once-on-hdrincl-bit-field-in-raw_sendmsg.patch +net-ipv4-avoid-unused-variable-warning-for-sysctl.patch +crypto-mxs-dcp-make-symbols-sha1_null_hash-and-sha256_null_hash-static.patch +vti4-removed-duplicate-log-message.patch diff --git a/queue-4.4/vti4-removed-duplicate-log-message.patch b/queue-4.4/vti4-removed-duplicate-log-message.patch new file mode 100644 index 00000000000..6577f1e9254 --- /dev/null +++ b/queue-4.4/vti4-removed-duplicate-log-message.patch @@ -0,0 +1,37 @@ +From 01ce31c57b3f07c91c9d45bbaf126124cce83a5d Mon Sep 17 00:00:00 2001 +From: Jeremy Sowden +Date: Tue, 19 Mar 2019 15:39:21 +0000 +Subject: vti4: removed duplicate log message. + +From: Jeremy Sowden + +commit 01ce31c57b3f07c91c9d45bbaf126124cce83a5d upstream. + +Removed info log-message if ipip tunnel registration fails during +module-initialization: it adds nothing to the error message that is +written on all failures. + +Fixes: dd9ee3444014e ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel") +Signed-off-by: Jeremy Sowden +Signed-off-by: Steffen Klassert +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/ip_vti.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/net/ipv4/ip_vti.c ++++ b/net/ipv4/ip_vti.c +@@ -666,10 +666,8 @@ static int __init vti_init(void) + + msg = "ipip tunnel"; + err = xfrm4_tunnel_register(&ipip_handler, AF_INET); +- if (err < 0) { +- pr_info("%s: cant't register tunnel\n",__func__); ++ if (err < 0) + goto xfrm_tunnel_failed; +- } + + msg = "netlink interface"; + err = rtnl_link_register(&vti_link_ops); -- 2.47.3