[PATCH bpf v2 0/3] Two more fixes for check_max_stack_depth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I noticed two more bugs while reviewing the code, description and
examples available in the patches.

One leads to incorrect subprog index to be stored in the frame stack
maintained by the function (leading to incorrect tail_call_reachable
marks, among other things).

The other problem is missing exploration pass of other async callbacks
when they are not called from the main prog. Call chains rooted at them
can thus bypass the stack limits (32 call frames * max permitted stack
depth per function).

Changelog:
----------
v1 -> v2
v1: https://lore.kernel.org/bpf/20230713003118.1327943-1-memxor@xxxxxxxxx

 * Fix commit message for patch 2 (Alexei)

Kumar Kartikeya Dwivedi (3):
  bpf: Fix subprog idx logic in check_max_stack_depth
  bpf: Repeat check_max_stack_depth for async callbacks
  selftests/bpf: Add more tests for check_max_stack_depth bug

 kernel/bpf/verifier.c                         | 32 +++++++++++++++----
 .../selftests/bpf/progs/async_stack_depth.c   | 25 +++++++++++++--
 2 files changed, 48 insertions(+), 9 deletions(-)


base-commit: 9840036786d90cea11a90d1f30b6dc003b34ee67
-- 
2.40.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux