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

2024-04-10 Thread Peilin He
he 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. move t

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

2024-04-10 Thread Peilin He
n, 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 wishes Peilin He >> >> >> 2.Target this patch f

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

2024-04-10 Thread Peilin He
imacy 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 skb, the source port and destination port will not

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

2024-04-11 Thread Peilin He
u 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 --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c >index e63a3bf99617..2

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
. >> >> 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

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