Re: [PATCH bpf-next v1 7/8] libbpf: sync progs autoload with maps autocreate for struct_ops maps

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

 



On Wed, 2024-02-28 at 16:37 -0800, Martin KaFai Lau wrote:
[...]

> > Yes, it's all sane in the above example. But imagine a stand-alone
> > struct_ops program with no SEC(".struct_ops") at all:
> > 
> > 
> > SEC("struct_ops/test1")
> > int BPF_PROG(test1) { ... }
> > 
> > /* nothing else */
> > 
> > Currently this will fail, right?
> > 
> > And with your proposal it will succeed without actually even
> > attempting to load the BPF program. Or am I misunderstanding?
> 
> Yep, currently it should fail.
> 
> Agree that we need to distinguish this case and prog->attach_btf_id is not 
> enough. This probably can be tracked in collect_st_ops_relos at the open phase.

collect_st_ops_relos() should work, I'll add a flag to track this.





[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