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

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

 



> On Fri, Dec 15, 2023 at 03:48:15PM +0100, Jiri Olsa wrote:
> > +	/* Bookkeeping for managing the prog attachment chain */
> > +	if (tgt_prog &&
> > +		prog->type == BPF_PROG_TYPE_TRACING &&
> > +		tgt_prog->type == BPF_PROG_TYPE_TRACING)
> > +			prog->aux->attach_tracing_prog = true;
>
> hi,
> this still looks bad, I think it should be:
>
> +	if (tgt_prog &&
> +	    prog->type == BPF_PROG_TYPE_TRACING &&
> +	    tgt_prog->type == BPF_PROG_TYPE_TRACING)
> +		prog->aux->attach_tracing_prog = true;
>
> other than that the patchset looks good to me

Never thought I would have so many troubles with code formatting :) To
make sure I got it right this time, this is how it should be (with
explicit vim-style tabs and spaces, last tab for "if" predicates is
expanded with spaces), right?

+^Iif (tgt_prog &&
+^I    prog->type == BPF_PROG_TYPE_TRACING &&
+^I    tgt_prog->type == BPF_PROG_TYPE_TRACING)
+^I^Iprog->aux->attach_tracing_prog = true;

Thanks for the review and patience.




[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