Re: [PATCH bpf-next v2] tracing: perf_call_bpf: use struct trace_entry in struct syscall_tp_t

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

 



Hi, Yonghong!

>>>>> On Mon, 31 Jul 2023 11:20:55 -0700, Yonghong Song  wrote:


 >> >> +
 >> >> +	/* __bpf_prog_run() requires *regs as the first parameter */
 >> > This comment is not correct.
 >> > static __always_inline u32 __bpf_prog_run(const struct bpf_prog
 >> *prog,
 >> >                                           const void *ctx,
 >> >                                           bpf_dispatcher_fn dfunc)
 >> > {
 >> > 	...
 >> > }
 >> > The first parameter is 'prog'.
 >> > Also there is no __bpf_prog_run() referenced in this function
 >> > so this comment may confuse readers. So I suggest removing
 >> > this comment. The same for perf_call_bpf_exit() below.
 >> Again, in [1] we agreed that it's better to have the comment
 >> since it's even more confusing.
 >> Could you help to formulate it?
 >> "__bpf_prog_run() requires *regs as the first argument for bpf
 >> prog" or something?
 >> But yes, I can remove it of course.

 > You could have a comment like below:
 > 	/* bpf prog requires 'regs' to be the first member in the ctx
 > 	(a.k.a. &param) */


Thanks!


-- 
WBR,
Yauheni Kaliuta





[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