Blame SOURCES/rhbz1643997.0023-pr23860-verifier-workaround-be-sure-to-delete-all-mo.patch

cab4ad
From b43a06011e0a4606504391ffb94762276c95610d Mon Sep 17 00:00:00 2001
cab4ad
From: Serhei Makarov <smakarov@redhat.com>
cab4ad
Date: Wed, 7 Nov 2018 13:07:51 -0500
cab4ad
Subject: [PATCH 23/32] pr23860 verifier workaround :: be sure to delete all
cab4ad
 mov rN,rN
cab4ad
cab4ad
An apparent bug in the eBPF verifier fails to preserve register state
cab4ad
when MOVing a register to itself, marking rN as 'unknown scalar'.
cab4ad
cab4ad
Previously bpf-opt.cxx failed to remove spurious MOVs if they were the
cab4ad
final instruction in a basic block. This would fail verification if
cab4ad
the register holds a pointer.
cab4ad
---
cab4ad
 bpf-opt.cxx | 2 +-
cab4ad
 1 file changed, 1 insertion(+), 1 deletion(-)
cab4ad
cab4ad
diff --git a/bpf-opt.cxx b/bpf-opt.cxx
cab4ad
index 904b33b46..8b9a6ea60 100644
cab4ad
--- a/bpf-opt.cxx
cab4ad
+++ b/bpf-opt.cxx
cab4ad
@@ -909,7 +909,7 @@ post_alloc_cleanup (program &p)
cab4ad
 	  n = j->next;
cab4ad
 	  if (j->is_move()
cab4ad
 	      && j->src1->is_reg()
cab4ad
-	      && j->dest->reg() == j->src1->reg() && n)
cab4ad
+	      && j->dest->reg() == j->src1->reg())
cab4ad
 	    {
cab4ad
 	      // Delete no-op moves created by partition merging.
cab4ad
 	      insn *p = j->prev;
cab4ad
-- 
cab4ad
2.14.5
cab4ad