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

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

index 5d63e5ed3c041079c2c9b4dc65eb491cff2c94e4..6e72d0f21d7c5cf465a1aa258826d623a06c18f8 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 1942264b621b..73fc8e9683b7 100644
 --- a/drivers/net/ethernet/renesas/sh_eth.c
 +++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2426,6 +2426,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+@@ -2426,6 +2426,7 @@ static int sh_eth_start_xmit(struct sk_b
        else
                txdesc->status |= cpu_to_edmac(mdp, TD_TACT);
  
@@ -35,6 +33,3 @@ index 1942264b621b..73fc8e9683b7 100644
        mdp->cur_tx++;
  
        if (!(sh_eth_read(ndev, EDTRR) & sh_eth_get_edtrr_trns(mdp)))
--- 
-2.30.2
-
diff --git a/queue-4.4/s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch b/queue-4.4/s390-bpf-fix-64-bit-subtraction-of-the-0x80000000-constant.patch
new file mode 100644 (file)
index 0000000..c0c36a0
--- /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
+@@ -630,8 +630,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 c07ef45b8d813b372236b97dac233b1ddb2b6ee0..07aa7306f6e7fc500f18015d0fa9123b42ae0efa 100644 (file)
@@ -131,3 +131,4 @@ mtd-rawnand-cafe-fix-a-resource-leak-in-the-error-ha.patch
 arc-export-clear_user_page-for-modules.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