Commit 290e005
If the original insn is a jump, then it is not subjected to branch
adjustment, which is incorrect. As discovered by Yauheni in https://lore.kernel.org/bpf/20200903140542.156624-1-yauheni.kaliuta@redhat.com/ this causes `test_progs -t global_funcs` failures on s390. Most likely, the current code includes the original insn in the patchlet, because there was no infrastructure to insert new insns, only to replace the existing ones. Now that bpf_patch_insns_data() can do insertions, stop including the original insns in zext patchlets. Fixes: a4b1d3c ("bpf: verifier: insert zero extension according to analysis result") Reported-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> --- kernel/bpf/verifier.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)1 parent 4b8d357 commit 290e005
1 file changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9911 | 9911 | | |
9912 | 9912 | | |
9913 | 9913 | | |
9914 | | - | |
| 9914 | + | |
9915 | 9915 | | |
9916 | 9916 | | |
9917 | 9917 | | |
9918 | 9918 | | |
9919 | 9919 | | |
9920 | 9920 | | |
9921 | 9921 | | |
9922 | | - | |
| 9922 | + | |
9923 | 9923 | | |
9924 | 9924 | | |
9925 | 9925 | | |
9926 | 9926 | | |
9927 | 9927 | | |
9928 | 9928 | | |
| 9929 | + | |
9929 | 9930 | | |
9930 | 9931 | | |
9931 | 9932 | | |
| |||
9968 | 9969 | | |
9969 | 9970 | | |
9970 | 9971 | | |
9971 | | - | |
9972 | | - | |
9973 | | - | |
9974 | | - | |
9975 | | - | |
| 9972 | + | |
| 9973 | + | |
| 9974 | + | |
| 9975 | + | |
| 9976 | + | |
| 9977 | + | |
9976 | 9978 | | |
9977 | | - | |
| 9979 | + | |
9978 | 9980 | | |
9979 | 9981 | | |
9980 | 9982 | | |
9981 | 9983 | | |
9982 | 9984 | | |
9983 | 9985 | | |
9984 | | - | |
| 9986 | + | |
9985 | 9987 | | |
9986 | 9988 | | |
9987 | 9989 | | |
| |||
0 commit comments