Commit edc90a1
s390/bpf: Zero-extend bpf prog return values and kfunc arguments
[ Upstream commit 202e42e ]
s390x ABI requires callers to zero-extend unsigned arguments and
sign-extend signed arguments, and callees to zero-extend unsigned
return values and sign-extend signed return values.
s390 BPF JIT currently implements only sign extension. Fix this
omission and implement zero extension too.
Fixes: 528eb2c ("s390/bpf: Implement arch_prepare_bpf_trampoline()")
Reported-by: Hari Bathini <hbathini@linux.ibm.com>
Closes: https://lore.kernel.org/bpf/20260312080113.843408-1-hbathini@linux.ibm.com/
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260313174807.581826-1-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent e70b9c2 commit edc90a1
1 file changed
Lines changed: 24 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
| 762 | + | |
763 | 763 | | |
764 | | - | |
| 764 | + | |
765 | 765 | | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | 766 | | |
770 | 767 | | |
771 | | - | |
772 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
773 | 774 | | |
774 | 775 | | |
775 | | - | |
776 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
777 | 782 | | |
778 | 783 | | |
779 | | - | |
780 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
781 | 790 | | |
782 | 791 | | |
783 | 792 | | |
| |||
1452 | 1461 | | |
1453 | 1462 | | |
1454 | 1463 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1458 | 1467 | | |
1459 | 1468 | | |
1460 | 1469 | | |
| |||
2186 | 2195 | | |
2187 | 2196 | | |
2188 | 2197 | | |
2189 | | - | |
| 2198 | + | |
2190 | 2199 | | |
2191 | 2200 | | |
2192 | 2201 | | |
| |||
0 commit comments