]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some spectre networking patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jan 2019 07:43:37 +0000 (08:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jan 2019 07:43:37 +0000 (08:43 +0100)
queue-4.14/net-core-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.14/phonet-af_phonet-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.19/net-core-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.19/phonet-af_phonet-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.20/net-core-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.20/phonet-af_phonet-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.4/net-core-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.4/phonet-af_phonet-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.9/net-core-fix-spectre-v1-vulnerability.patch [deleted file]
queue-4.9/phonet-af_phonet-fix-spectre-v1-vulnerability.patch [deleted file]

diff --git a/queue-4.14/net-core-fix-spectre-v1-vulnerability.patch b/queue-4.14/net-core-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 423a675..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From foo@baz Fri Jan  4 19:53:50 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 14:49:01 -0600
-Subject: net: core: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit 50d5258634aee2e62832aa086d2fb0de00e72b91 ]
-
-flen is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/core/filter.c:1101 bpf_check_classic() warn: potential spectre issue 'filter' [w]
-
-Fix this by sanitizing flen before using it to index filter at line 1101:
-
-       switch (filter[flen - 1].code) {
-
-and through pc at line 1040:
-
-       const struct sock_filter *ftest = &filter[pc];
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/core/filter.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -56,6 +56,7 @@
- #include <net/busy_poll.h>
- #include <net/tcp.h>
- #include <linux/bpf_trace.h>
-+#include <linux/nospec.h>
- /**
-  *    sk_filter_trim_cap - run a packet through a socket filter
-@@ -823,6 +824,7 @@ static int bpf_check_classic(const struc
-       bool anc_found;
-       int pc;
-+      flen = array_index_nospec(flen, BPF_MAXINSNS + 1);
-       /* Check the filter code now */
-       for (pc = 0; pc < flen; pc++) {
-               const struct sock_filter *ftest = &filter[pc];
diff --git a/queue-4.14/phonet-af_phonet-fix-spectre-v1-vulnerability.patch b/queue-4.14/phonet-af_phonet-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 1c9f463..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From foo@baz Fri Jan  4 19:53:50 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 15:41:17 -0600
-Subject: phonet: af_phonet: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit d686026b1e6ed4ea27d630d8f54f9a694db088b2 ]
-
-protocol is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap)
-
-Fix this by sanitizing protocol before using it to index proto_tab.
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/phonet/af_phonet.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- a/net/phonet/af_phonet.c
-+++ b/net/phonet/af_phonet.c
-@@ -34,6 +34,8 @@
- #include <net/phonet/phonet.h>
- #include <net/phonet/pn_dev.h>
-+#include <linux/nospec.h>
-+
- /* Transport protocol registration */
- static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-@@ -43,6 +45,7 @@ static struct phonet_protocol *phonet_pr
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-+      protocol = array_index_nospec(protocol, PHONET_NPROTO);
-       rcu_read_lock();
-       pp = rcu_dereference(proto_tab[protocol]);
diff --git a/queue-4.19/net-core-fix-spectre-v1-vulnerability.patch b/queue-4.19/net-core-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 0f1313d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From foo@baz Fri Jan  4 19:32:42 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 14:49:01 -0600
-Subject: net: core: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit 50d5258634aee2e62832aa086d2fb0de00e72b91 ]
-
-flen is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/core/filter.c:1101 bpf_check_classic() warn: potential spectre issue 'filter' [w]
-
-Fix this by sanitizing flen before using it to index filter at line 1101:
-
-       switch (filter[flen - 1].code) {
-
-and through pc at line 1040:
-
-       const struct sock_filter *ftest = &filter[pc];
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/core/filter.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -68,6 +68,7 @@
- #include <linux/seg6_local.h>
- #include <net/seg6.h>
- #include <net/seg6_local.h>
-+#include <linux/nospec.h>
- /**
-  *    sk_filter_trim_cap - run a packet through a socket filter
-@@ -1033,6 +1034,7 @@ static int bpf_check_classic(const struc
-       bool anc_found;
-       int pc;
-+      flen = array_index_nospec(flen, BPF_MAXINSNS + 1);
-       /* Check the filter code now */
-       for (pc = 0; pc < flen; pc++) {
-               const struct sock_filter *ftest = &filter[pc];
diff --git a/queue-4.19/phonet-af_phonet-fix-spectre-v1-vulnerability.patch b/queue-4.19/phonet-af_phonet-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index a4b4a7b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From foo@baz Fri Jan  4 19:32:42 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 15:41:17 -0600
-Subject: phonet: af_phonet: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit d686026b1e6ed4ea27d630d8f54f9a694db088b2 ]
-
-protocol is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap)
-
-Fix this by sanitizing protocol before using it to index proto_tab.
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/phonet/af_phonet.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- a/net/phonet/af_phonet.c
-+++ b/net/phonet/af_phonet.c
-@@ -34,6 +34,8 @@
- #include <net/phonet/phonet.h>
- #include <net/phonet/pn_dev.h>
-+#include <linux/nospec.h>
-+
- /* Transport protocol registration */
- static const struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-@@ -43,6 +45,7 @@ static const struct phonet_protocol *pho
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-+      protocol = array_index_nospec(protocol, PHONET_NPROTO);
-       rcu_read_lock();
-       pp = rcu_dereference(proto_tab[protocol]);
diff --git a/queue-4.20/net-core-fix-spectre-v1-vulnerability.patch b/queue-4.20/net-core-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 572ca93..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From foo@baz Fri Jan  4 19:32:29 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 14:49:01 -0600
-Subject: net: core: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit 50d5258634aee2e62832aa086d2fb0de00e72b91 ]
-
-flen is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/core/filter.c:1101 bpf_check_classic() warn: potential spectre issue 'filter' [w]
-
-Fix this by sanitizing flen before using it to index filter at line 1101:
-
-       switch (filter[flen - 1].code) {
-
-and through pc at line 1040:
-
-       const struct sock_filter *ftest = &filter[pc];
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/core/filter.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -73,6 +73,7 @@
- #include <linux/seg6_local.h>
- #include <net/seg6.h>
- #include <net/seg6_local.h>
-+#include <linux/nospec.h>
- /**
-  *    sk_filter_trim_cap - run a packet through a socket filter
-@@ -1038,6 +1039,7 @@ static int bpf_check_classic(const struc
-       bool anc_found;
-       int pc;
-+      flen = array_index_nospec(flen, BPF_MAXINSNS + 1);
-       /* Check the filter code now */
-       for (pc = 0; pc < flen; pc++) {
-               const struct sock_filter *ftest = &filter[pc];
diff --git a/queue-4.20/phonet-af_phonet-fix-spectre-v1-vulnerability.patch b/queue-4.20/phonet-af_phonet-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index f21cc15..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From foo@baz Fri Jan  4 19:32:29 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 15:41:17 -0600
-Subject: phonet: af_phonet: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit d686026b1e6ed4ea27d630d8f54f9a694db088b2 ]
-
-protocol is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap)
-
-Fix this by sanitizing protocol before using it to index proto_tab.
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/phonet/af_phonet.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- a/net/phonet/af_phonet.c
-+++ b/net/phonet/af_phonet.c
-@@ -34,6 +34,8 @@
- #include <net/phonet/phonet.h>
- #include <net/phonet/pn_dev.h>
-+#include <linux/nospec.h>
-+
- /* Transport protocol registration */
- static const struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-@@ -43,6 +45,7 @@ static const struct phonet_protocol *pho
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-+      protocol = array_index_nospec(protocol, PHONET_NPROTO);
-       rcu_read_lock();
-       pp = rcu_dereference(proto_tab[protocol]);
diff --git a/queue-4.4/net-core-fix-spectre-v1-vulnerability.patch b/queue-4.4/net-core-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index cff59f3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From foo@baz Fri Jan  4 19:53:50 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 14:49:01 -0600
-Subject: net: core: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit 50d5258634aee2e62832aa086d2fb0de00e72b91 ]
-
-flen is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/core/filter.c:1101 bpf_check_classic() warn: potential spectre issue 'filter' [w]
-
-Fix this by sanitizing flen before using it to index filter at line 1101:
-
-       switch (filter[flen - 1].code) {
-
-and through pc at line 1040:
-
-       const struct sock_filter *ftest = &filter[pc];
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/core/filter.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -50,6 +50,7 @@
- #include <net/cls_cgroup.h>
- #include <net/dst_metadata.h>
- #include <net/dst.h>
-+#include <linux/nospec.h>
- /**
-  *    sk_filter_trim_cap - run a packet through a socket filter
-@@ -765,6 +766,7 @@ static int bpf_check_classic(const struc
-       if (flen == 0 || flen > BPF_MAXINSNS)
-               return -EINVAL;
-+      flen = array_index_nospec(flen, BPF_MAXINSNS + 1);
-       /* Check the filter code now */
-       for (pc = 0; pc < flen; pc++) {
-               const struct sock_filter *ftest = &filter[pc];
diff --git a/queue-4.4/phonet-af_phonet-fix-spectre-v1-vulnerability.patch b/queue-4.4/phonet-af_phonet-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 1c9f463..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From foo@baz Fri Jan  4 19:53:50 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 15:41:17 -0600
-Subject: phonet: af_phonet: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit d686026b1e6ed4ea27d630d8f54f9a694db088b2 ]
-
-protocol is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap)
-
-Fix this by sanitizing protocol before using it to index proto_tab.
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/phonet/af_phonet.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- a/net/phonet/af_phonet.c
-+++ b/net/phonet/af_phonet.c
-@@ -34,6 +34,8 @@
- #include <net/phonet/phonet.h>
- #include <net/phonet/pn_dev.h>
-+#include <linux/nospec.h>
-+
- /* Transport protocol registration */
- static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-@@ -43,6 +45,7 @@ static struct phonet_protocol *phonet_pr
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-+      protocol = array_index_nospec(protocol, PHONET_NPROTO);
-       rcu_read_lock();
-       pp = rcu_dereference(proto_tab[protocol]);
diff --git a/queue-4.9/net-core-fix-spectre-v1-vulnerability.patch b/queue-4.9/net-core-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 07343e2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From foo@baz Fri Jan  4 19:53:50 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 14:49:01 -0600
-Subject: net: core: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit 50d5258634aee2e62832aa086d2fb0de00e72b91 ]
-
-flen is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/core/filter.c:1101 bpf_check_classic() warn: potential spectre issue 'filter' [w]
-
-Fix this by sanitizing flen before using it to index filter at line 1101:
-
-       switch (filter[flen - 1].code) {
-
-and through pc at line 1040:
-
-       const struct sock_filter *ftest = &filter[pc];
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/core/filter.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -51,6 +51,7 @@
- #include <net/dst_metadata.h>
- #include <net/dst.h>
- #include <net/sock_reuseport.h>
-+#include <linux/nospec.h>
- /**
-  *    sk_filter_trim_cap - run a packet through a socket filter
-@@ -786,6 +787,7 @@ static int bpf_check_classic(const struc
-       bool anc_found;
-       int pc;
-+      flen = array_index_nospec(flen, BPF_MAXINSNS + 1);
-       /* Check the filter code now */
-       for (pc = 0; pc < flen; pc++) {
-               const struct sock_filter *ftest = &filter[pc];
diff --git a/queue-4.9/phonet-af_phonet-fix-spectre-v1-vulnerability.patch b/queue-4.9/phonet-af_phonet-fix-spectre-v1-vulnerability.patch
deleted file mode 100644 (file)
index 1c9f463..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From foo@baz Fri Jan  4 19:53:50 CET 2019
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-Date: Fri, 21 Dec 2018 15:41:17 -0600
-Subject: phonet: af_phonet: Fix Spectre v1 vulnerability
-
-From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
-
-[ Upstream commit d686026b1e6ed4ea27d630d8f54f9a694db088b2 ]
-
-protocol is indirectly controlled by user-space, hence leading to
-a potential exploitation of the Spectre variant 1 vulnerability.
-
-This issue was detected with the help of Smatch:
-
-net/phonet/af_phonet.c:48 phonet_proto_get() warn: potential spectre issue 'proto_tab' [w] (local cap)
-
-Fix this by sanitizing protocol before using it to index proto_tab.
-
-Notice that given that speculation windows are large, the policy is
-to kill the speculation on the first load and not worry if it can be
-completed with a dependent load/store [1].
-
-[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2
-
-Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/phonet/af_phonet.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- a/net/phonet/af_phonet.c
-+++ b/net/phonet/af_phonet.c
-@@ -34,6 +34,8 @@
- #include <net/phonet/phonet.h>
- #include <net/phonet/pn_dev.h>
-+#include <linux/nospec.h>
-+
- /* Transport protocol registration */
- static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
-@@ -43,6 +45,7 @@ static struct phonet_protocol *phonet_pr
-       if (protocol >= PHONET_NPROTO)
-               return NULL;
-+      protocol = array_index_nospec(protocol, PHONET_NPROTO);
-       rcu_read_lock();
-       pp = rcu_dereference(proto_tab[protocol]);