Re: [PATCH bpf-next v4 1/3] bpf: Relax tracing prog recursive attach rules

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

 



> On Fri, Dec 01, 2023 at 10:55:09AM +0100, Artem Savkov wrote:
> On Thu, Nov 30, 2023 at 09:41:34PM +0100, Dmitry Dolgov wrote:
> > > On Thu, Nov 30, 2023 at 12:19:31PM -0800, Song Liu wrote:
> > > > All in all I've decided that more elaborated approach is slightly
> > > > better. But if everyone in the community agrees that less
> > > > "defensiveness" is not an issue and verifier could be simply made less
> > > > restrictive, I'm fine with that. What do you think?
> > >
> > > I think the follower_cnt check is not necessary, and may cause confusions.
> > > For tracing programs, we are very specific on "which function(s) are we
> > > tracing". So I don't think circular attachment can be a real issue. Do we
> > > have potential use cases that make the circular attach possible?
> >
> > At the moment no, nothing like that in sight. Ok, you've convinced me --
> > plus since nobody has yet actively mentioned that potential cycle
> > prevention is nice to have, I can drop follower_cnt and the
> > corresponding check in the verifier.
>
> If you are worried about potential future situations where cyclic
> attaches are possible would it make sense to add a test that checks if
> this fails?

Do you mean a test that cyclic attachment doesn't work due to the
current limitations (not the one in verifier)? Sounds interesting, but
I'm hesitant to add such a test -- it would verify a property that is
more like a side effect of e.g. having attach_prog_fd at prog load, and
most likely will be either incomplete or flaky.

At the moment I'm pretty convinced that even if the future changes will
make cycles possible, it's something that has to be discussed at the
point when such change will land, and it's fine for now to simplify
things.




[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