Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: fix verification error in bpf_execve_event
This patch fixes a verification error in a 4.18.0-477.21.1.el8_8.x86_64 kernel. The error was reported in issue 1442. The patch simplifies the code: it eliminates a common expression, and it changes some values from int to long to avoid generated code for the implicit casting. It also fixes a issue. bpf_probe_read_str may return 0, and in this case the old code will underflow. And even though we mask the size, the size value would have been wrong in this case: (gdb) printf "0x%zx\n", (0-1) & 0x7fff 0x7fff Signed-off-by: Kornilios Kourtis <[email protected]>
- Loading branch information