Re: Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-11 Thread Peilin He
ning, I always agree with the UDP check. I was saying if >you can put the trace_icmp_send() just before icmp_push_reply()[1], >you could avoid those kinds of checks. >As I said in the previous email, "only keeping the UDP check is >enough". So you are right. > >[1] >diff -

Re: Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Peilin He
correct. Therefore, I believe that it is essential to include a legitimacy judgment for the UDP header. Here is an explanation of this code: Firstly, the UDP header (*uh) is extracted from the skb. Then, if the current protocol of the skb is not UDP, or if the address of uh is outside the range of the

Re: Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Peilin He
this viewpoint. When trace_icmp_send is placed in this position, it cannot guarantee that all skbs in icmp are UDP protocols (UDP needs to be distinguished based on the proto_4!=IPPROTO_UDP condition), nor can it guarantee the legitimacy of udphdr (*uh legitimacy check is required). With best wis

Re: Re: Subject: [PATCH net-next v4] net/ipv4: add tracepoint for icmp_send

2024-04-10 Thread Peilin He
of the TP-STRUCT_entry parameter structure. >> >> v1->v2: >> Some fixes according to >> https://lore.kernel.org/all/CANn89iL-y9e_VFpdw=3DsZtRnKRu_tnUwqHuFQTJvJsv= >-nz1x...@mail.gmail.com/ >> 1. adjust the trace_icmp_send() to more protocols than UDP. >> 2. m

Re: Re: [PATCH v3 resend] net/ipv4: add tracepoint for icmp_send

2024-03-25 Thread Peilin He
.org/all/20240319102549.7f7f6...@gandalf.local.home/ >> 1. Change the tracking directory to/sys/kernel/tracking. >> 2. Adjust the layout of the TP-STRUCT_entry parameter structure. >> >> v1->v2: >> Some fixes according to >> https://lore.kernel.org/all/CANn89iL-y9

Re: Re: Re: [PATCH v3 resend] net/ipv4: add tracepoint for icmp_send

2024-03-25 Thread Peilin He
gt;> 1. adjust the trace_icmp_send() to more protocols than UDP. >> >> 2. move the calling of trace_icmp_send after sanity checks >> >> in __icmp_send(). >> >> >> >> Signed-off-by: Peilin He >> >> Reviewed-by: xu xin >> >>

Re: Re: [PATCH v3 resend] net/ipv4: add tracepoint for icmp_send

2024-03-25 Thread Peilin He
.org/all/20240319102549.7f7f6...@gandalf.local.home/ >> 1. Change the tracking directory to/sys/kernel/tracking. >> 2. Adjust the layout of the TP-STRUCT_entry parameter structure. >> >> v1->v2: >> Some fixes according to >> https://lore.kernel.org/all/CANn89iL-y9

Re: Re: [PATCH v3 resend] net/ipv4: add tracepoint for icmp_send

2024-03-25 Thread Peilin He
gt;> >> v1->v2: >> Some fixes according to >> https://lore.kernel.org/all/CANn89iL-y9e_VFpdw=3DsZtRnKRu_tnUwqHuFQTJvJsv= >-nz1x...@mail.gmail.com/ >> 1. adjust the trace_icmp_send() to more protocols than UDP. >> 2. move the calling of trace_icmp_send after sanity