]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 07:24:58 +0000 (09:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 07:24:58 +0000 (09:24 +0200)
added patches:
s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch

queue-4.14/net-renesas-sh_eth-fix-freeing-wrong-tx-descriptor.patch
queue-4.14/s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch [new file with mode: 0644]
queue-4.14/series

index d9e23f53b5f5c33ae19a9c91a35362d02ebd6361..9238a35a46a61d6e8609c87e3657ede19b7af159 100644 (file)
@@ -20,14 +20,12 @@ Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
 Signed-off-by: David S. Miller <davem@davemloft.net>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/net/ethernet/renesas/sh_eth.c | 1 +
+ drivers/net/ethernet/renesas/sh_eth.c |    1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 36f1019809ea..0fa6403ab085 100644
 --- a/drivers/net/ethernet/renesas/sh_eth.c
 +++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2442,6 +2442,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+@@ -2442,6 +2442,7 @@ static int sh_eth_start_xmit(struct sk_b
        else
                txdesc->status |= cpu_to_le32(TD_TACT);
  
@@ -35,6 +33,3 @@ index 36f1019809ea..0fa6403ab085 100644
        mdp->cur_tx++;
  
        if (!(sh_eth_read(ndev, EDTRR) & sh_eth_get_edtrr_trns(mdp)))
--- 
-2.30.2
-
diff --git a/queue-4.14/s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch b/queue-4.14/s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch
new file mode 100644 (file)
index 0000000..fa01f77
--- /dev/null
@@ -0,0 +1,41 @@
+From 6e61dc9da0b7a0d91d57c2e20b5ea4fd2d4e7e53 Mon Sep 17 00:00:00 2001
+From: Ilya Leoshkevich <iii@linux.ibm.com>
+Date: Tue, 7 Sep 2021 13:41:16 +0200
+Subject: s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
+
+From: Ilya Leoshkevich <iii@linux.ibm.com>
+
+commit 6e61dc9da0b7a0d91d57c2e20b5ea4fd2d4e7e53 upstream.
+
+The JIT uses agfi for subtracting constants, but -(-0x80000000) cannot
+be represented as a 32-bit signed binary integer. Fix by using algfi in
+this particular case.
+
+Reported-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
+Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend")
+Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
+Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/s390/net/bpf_jit_comp.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/arch/s390/net/bpf_jit_comp.c
++++ b/arch/s390/net/bpf_jit_comp.c
+@@ -626,8 +626,13 @@ static noinline int bpf_jit_insn(struct
+       case BPF_ALU64 | BPF_SUB | BPF_K: /* dst = dst - imm */
+               if (!imm)
+                       break;
+-              /* agfi %dst,-imm */
+-              EMIT6_IMM(0xc2080000, dst_reg, -imm);
++              if (imm == -0x80000000) {
++                      /* algfi %dst,0x80000000 */
++                      EMIT6_IMM(0xc20a0000, dst_reg, 0x80000000);
++              } else {
++                      /* agfi %dst,-imm */
++                      EMIT6_IMM(0xc2080000, dst_reg, -imm);
++              }
+               break;
+       /*
+        * BPF_MUL
index 019bac67968e36338067ed6e96bc8a450f163ee8..6deb6699d4617e5c5b2fc45c7ae016d75b2fd91f 100644 (file)
@@ -214,3 +214,4 @@ net-dsa-b53-fix-calculating-number-of-switch-ports.patch
 netfilter-socket-icmp6-fix-use-after-scope.patch
 qlcnic-remove-redundant-unlock-in-qlcnic_pinit_from_.patch
 net-renesas-sh_eth-fix-freeing-wrong-tx-descriptor.patch
+s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch