Commit 469fb2c
riscv, bpf: Fix missing exception handling and redundant zext for LDX_B/H/W
For LDX_B/H/W, when zext has been inserted by verifier, it'll return 1,
and no exception handling will continue. Also, when the offset is 12-bit
value, the redundant zext inserted by the verifier is not removed. Fix
both scenarios by moving down the removal of redundant zext.
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20230824095001.3408573-2-pulehui@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 1b580c9 commit 469fb2c
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | | - | |
1516 | | - | |
1517 | 1515 | | |
1518 | 1516 | | |
1519 | 1517 | | |
| |||
1528 | 1526 | | |
1529 | 1527 | | |
1530 | 1528 | | |
1531 | | - | |
1532 | | - | |
1533 | 1529 | | |
1534 | 1530 | | |
1535 | 1531 | | |
| |||
1544 | 1540 | | |
1545 | 1541 | | |
1546 | 1542 | | |
1547 | | - | |
1548 | | - | |
1549 | 1543 | | |
1550 | 1544 | | |
1551 | 1545 | | |
| |||
1566 | 1560 | | |
1567 | 1561 | | |
1568 | 1562 | | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1569 | 1566 | | |
1570 | 1567 | | |
1571 | 1568 | | |
| |||
0 commit comments