bpf, x86: Normalize IA32 kfunc return values - #13262
bpf, x86: Normalize IA32 kfunc return values#13262kernel-patches-daemon-bpf[bot] wants to merge 2 commits into
Conversation
|
Upstream branch: 6f03361 |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: |
673b1f0 to
dd132f6
Compare
|
Upstream branch: 9786d42 |
b5ed44f to
4efb67e
Compare
dd132f6 to
6220a54
Compare
|
Upstream branch: 806c1a1 |
4efb67e to
48448e6
Compare
6220a54 to
fa81f18
Compare
|
Upstream branch: aacd13e |
48448e6 to
d45b1f2
Compare
fa81f18 to
fdd9d75
Compare
|
Upstream branch: 259d60f |
d45b1f2 to
e8db87f
Compare
fdd9d75 to
c66e1e2
Compare
|
Upstream branch: 4d9551b |
e8db87f to
bd21ac2
Compare
|
Upstream branch: adb7719 |
82a3190 to
75ad3a7
Compare
f0e6afe to
7ac20a0
Compare
|
Upstream branch: 6b0835a |
75ad3a7 to
612fc37
Compare
7ac20a0 to
fd7f5fa
Compare
|
Upstream branch: 6ab6a94 |
612fc37 to
ca9f63e
Compare
fd7f5fa to
23ff631
Compare
|
Upstream branch: 3d9393f |
ca9f63e to
0dee13a
Compare
|
Upstream branch: f79066c |
|
Upstream branch: 91ec203 |
|
Upstream branch: aed1bf1 |
|
Upstream branch: d19862d |
|
Upstream branch: 4191e49 |
|
Upstream branch: 4954de7 |
|
Upstream branch: e40f61a |
|
Upstream branch: 669e4fa |
|
Upstream branch: a284ed4 |
|
Upstream branch: 5e289c5 |
1 similar comment
|
Upstream branch: 5e289c5 |
|
Upstream branch: d83fba2 |
|
Upstream branch: ce36e38 |
|
Upstream branch: 05ea1b6 |
IA32 stores each BPF register in two 32-bit scratch words. A kfunc returning four bytes or less currently updates only R0.low32, leaving R0.high32 with its previous scratch value even though later BPF instructions may read the full register. Use the BTF function model to sign- or zero-extend one-, two-, and four-byte returns into EDX:EAX, then store both words of R0. Keep the existing EDX:EAX handling for eight-byte returns. Fixes: 797b84f ("bpf: Support kernel function call in x86-32") Signed-off-by: Yiyang Chen <chenyy23@mails.tsinghua.edu.cn>
Teach test_loader to select IA32-specific cases and add unsigned bool and signed int kfunc-return tests. Each case consumes the high half of R0 after the call and checks the required zero or sign extension. Signed-off-by: Yiyang Chen <chenyy23@mails.tsinghua.edu.cn>
|
Upstream branch: 1555de3 |
Pull request for series with
subject: bpf, x86: Normalize IA32 kfunc return values
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1145411