Hello, On Tue, Oct 29, 2024 at 03:17:18PM -0700, Yonghong Song wrote: > For struct_ops progs, whether a particular prog will use private stack > or not (prog->aux->use_priv_stack) will be set before actual insn-level > verification for that prog. One particular implementation is to > piggyback on struct_ops->check_member(). The next patch will have an > example for this. The struct_ops->check_member() will set > prog->aux->use_priv_stack to be true which enables private stack > usage with ignoring BPF_PRIV_STACK_MIN_SIZE limit. > > If use_priv_stack is true for a particular struct_ops prog, bpf > trampoline will need to do recursion checks (one level at this point) > to avoid stack overwrite. > > Signed-off-by: Yonghong Song <yonghong.song@xxxxxxxxx>