Commit 366b0e0
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 3849f0e commit 366b0e0
1 file changed
Lines changed: 24 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
837 | 837 | | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | 838 | | |
842 | 839 | | |
843 | | - | |
844 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
845 | 846 | | |
846 | 847 | | |
847 | | - | |
848 | | - | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
849 | 854 | | |
850 | 855 | | |
851 | | - | |
852 | | - | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
853 | 862 | | |
854 | 863 | | |
855 | 864 | | |
| |||
1799 | 1808 | | |
1800 | 1809 | | |
1801 | 1810 | | |
1802 | | - | |
1803 | | - | |
1804 | | - | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
1805 | 1814 | | |
1806 | 1815 | | |
1807 | 1816 | | |
| |||
2555 | 2564 | | |
2556 | 2565 | | |
2557 | 2566 | | |
2558 | | - | |
| 2567 | + | |
2559 | 2568 | | |
2560 | 2569 | | |
2561 | 2570 | | |
| |||
0 commit comments