[DTrace-devel] [oracle/dtrace-utils] 205b71: Convert ip6_finish_output to rawfbt
euloh
noreply at github.com
Tue Sep 16 15:24:05 UTC 2025
Branch: refs/heads/dev-queue
Home: https://github.com/oracle/dtrace-utils
Commit: 205b718e60a78ec742982d243be277d9d019878d
https://github.com/oracle/dtrace-utils/commit/205b718e60a78ec742982d243be277d9d019878d
Author: Eugene Loh <eugene.loh at oracle.com>
Date: 2025-09-04 (Thu, 04 Sep 2025)
Changed paths:
M libdtrace/dt_prov_ip.c
Log Message:
-----------
Convert ip6_finish_output to rawfbt
With commit fe2101e55 ("fbt: implement based on fentry/fexit probes")
test/unittest/ip/tst.ipv6localicmp.sh started to fail. The problem
appears to be that fbt::ip6_finish_output:entry, which is needed for
ip:::send, does not fire.
Use rawfbt for this probe to revert back to kprobes in this case.
Other fbt probes may also be impacted, but this case showed up in testing.
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Alan Maguire <alan.maguire at oracle.com>
Commit: 3c8cab0f643f6763cdc7f3757f2aaa5022b5502f
https://github.com/oracle/dtrace-utils/commit/3c8cab0f643f6763cdc7f3757f2aaa5022b5502f
Author: Eugene Loh <eugene.loh at oracle.com>
Date: 2025-09-04 (Thu, 04 Sep 2025)
Changed paths:
M libdtrace/dt_cg.c
Log Message:
-----------
cg: fix offset for > 8 bit bitfields in dt_cg_ctf_offsetof()
The tcp provider uses dt_cg_tramp_get_member() to retrieve the
offset of the sk_protocol field in struct sock. However it
returns the wrong value on UEK6 since it is an 8-bit bitfield.
>From pahole we see:
unsigned int __sk_flags_offset[0]; /* 560 0 */
unsigned int sk_padding:1; /* 560: 0 4 */
unsigned int sk_kern_sock:1; /* 560: 1 4 */
unsigned int sk_no_check_tx:1; /* 560: 2 4 */
unsigned int sk_no_check_rx:1; /* 560: 3 4 */
unsigned int sk_userlocks:4; /* 560: 4 4 */
unsigned int sk_protocol:8; /* 560: 8 4 */
In other words it is really at offset 561 but because we just
lookup the member offset and not the member type offset we get the
wrong value for the sk_protoocol.
This in turn causes tcp state-change probes (and in-progress UDP
probes) to not fire since we verify that sk_protocol == IPPROTO_TCP.
The fix is to look up the member _type_ offset and add it to the
bit offset we get for the member itself. With this in place the
state-change probes fire, but the local tcp tests still fail due
to separate issues with the tcp:::accept-established probe.
This issue is not seen on more recent kernels because sk_protocol
becomes a __u16 as the number of protocols exceeds 256.
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Changes since v1:
- added comment reflecting need to handle more complex bitfield values
in future (Nick)
Commit: 2c6c42768034fc48a5b38098f1d148a48975c4c3
https://github.com/oracle/dtrace-utils/commit/2c6c42768034fc48a5b38098f1d148a48975c4c3
Author: Eugene Loh <eugene.loh at oracle.com>
Date: 2025-09-04 (Thu, 04 Sep 2025)
Changed paths:
M libdtrace/dt_prov_tcp.c
Log Message:
-----------
tcp provider: use __ip_queue_xmit() as it is non-static on 5.4
On older kernels - 5.4 to be precise - ip_queue_xmit() is a static
function, so it is better to instrument __ip_queue_xmit() as it
is extern so not prone to optimization on 5.4 and later kernels.
With this change, the following previously-failing-on-UEK6U3 tcp tests
pass (and continue to pass when tested on an upstream kernel):
tst.ipv4localtcp.sh
tst.ipv4remotetcp.sh
tst.ipv6localtcp.sh
More work is required to fix up the tcpstate tests for UEK6U3.
Reported-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Commit: de5e3daaa084e4aa4b9a7ceeac961c217fe5993a
https://github.com/oracle/dtrace-utils/commit/de5e3daaa084e4aa4b9a7ceeac961c217fe5993a
Author: Eugene Loh <eugene.loh at oracle.com>
Date: 2025-09-04 (Thu, 04 Sep 2025)
Changed paths:
M dlibs/aarch64/5.11/ip.d
M dlibs/aarch64/5.11/tcp.d
M dlibs/aarch64/5.12/ip.d
M dlibs/aarch64/5.12/tcp.d
M dlibs/aarch64/5.14/ip.d
M dlibs/aarch64/5.14/tcp.d
M dlibs/aarch64/5.16/ip.d
M dlibs/aarch64/5.16/tcp.d
M dlibs/aarch64/5.2/ip.d
M dlibs/aarch64/5.2/tcp.d
M dlibs/aarch64/5.6/ip.d
M dlibs/aarch64/5.6/tcp.d
M dlibs/aarch64/6.1/ip.d
M dlibs/aarch64/6.1/tcp.d
M dlibs/aarch64/6.10/ip.d
M dlibs/aarch64/6.10/tcp.d
M dlibs/x86_64/5.11/ip.d
M dlibs/x86_64/5.11/tcp.d
M dlibs/x86_64/5.12/ip.d
M dlibs/x86_64/5.12/tcp.d
M dlibs/x86_64/5.14/ip.d
M dlibs/x86_64/5.14/tcp.d
M dlibs/x86_64/5.16/ip.d
M dlibs/x86_64/5.16/tcp.d
M dlibs/x86_64/5.2/ip.d
M dlibs/x86_64/5.2/tcp.d
M dlibs/x86_64/5.6/ip.d
M dlibs/x86_64/5.6/tcp.d
M dlibs/x86_64/6.1/ip.d
M dlibs/x86_64/6.1/tcp.d
M dlibs/x86_64/6.10/ip.d
M dlibs/x86_64/6.10/tcp.d
M libdtrace/dt_prov_tcp.c
M libdtrace/ip.d
M libdtrace/tcp.d
Log Message:
-----------
tcp provider: support tcp:::accept-established in absence of skb
On a 5.4 kernel, the function we instrument for tcp:::accept-established
(tcp_init_transfer()) does not have a struct sk_buff * as argument;
that does not appear until 5.10. As a result we need to fake up
the IP and TCP headers from the TCP socket. We can reuse existing
code (ensuring to mark accept-established correctly as an _INBOUND
probe) once we fix up references in ip.d to be arg6 and not arg7 (this
parameter is used to mark a probe point as inbound, outbound or as a
state change). We need to ensure that args[2] is translated from
a __dtrace_tcp_void_ip_t * to get this to work for the IP header.
For the TCP header we need a similar solution; add a
__dtrace_tcp_void_tcp_t type and translate from either the tcp header
passed in (if non-null) or use arg3 (the socket) to fill out the TCP
header info. We can get the ports, seq/ack and because we know that
only accept-established is used we know the flags will just be an
ACK.
With this in place (along with previous fixes for the TCP provider)
the TCP state-related tests finally pass on a 5.4 kernel.
Reported-by: Eugene Loh <eugene.loh at oracle.com>
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Commit: c65fb2a0e0f40b777097bb4cfffea7bde70ac214
https://github.com/oracle/dtrace-utils/commit/c65fb2a0e0f40b777097bb4cfffea7bde70ac214
Author: Kris Van Hees <kris.van.hees at oracle.com>
Date: 2025-09-16 (Tue, 16 Sep 2025)
Changed paths:
M dlibs/aarch64/5.11/udp.d
M dlibs/aarch64/5.12/udp.d
M dlibs/aarch64/5.14/udp.d
M dlibs/aarch64/5.16/udp.d
M dlibs/aarch64/5.2/udp.d
M dlibs/aarch64/5.6/udp.d
M dlibs/aarch64/6.1/udp.d
M dlibs/aarch64/6.10/udp.d
M dlibs/x86_64/5.11/udp.d
M dlibs/x86_64/5.12/udp.d
M dlibs/x86_64/5.14/udp.d
M dlibs/x86_64/5.16/udp.d
M dlibs/x86_64/5.2/udp.d
M dlibs/x86_64/5.6/udp.d
M dlibs/x86_64/6.1/udp.d
M dlibs/x86_64/6.10/udp.d
M libdtrace/Build
A libdtrace/dt_prov_udp.c
M libdtrace/dt_provider.c
M libdtrace/dt_provider.h
M libdtrace/udp.d
M test/unittest/dtrace-util/tst.ListProbes.r
M test/unittest/dtrace-util/tst.ListProbes.sh
M test/unittest/udp/test.x
Log Message:
-----------
udp: new provider
Support UDP send and receive, using raw fbt probes; since
udp.d changes sync dlibs also. Update test.x provider check
for udp, and add udp to expected providers.
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Commit: 589a81d416fb0db654c76bf74c227caf4cd53b5d
https://github.com/oracle/dtrace-utils/commit/589a81d416fb0db654c76bf74c227caf4cd53b5d
Author: Eugene Loh <eugene.loh at oracle.com>
Date: 2025-09-16 (Tue, 16 Sep 2025)
Changed paths:
M test/unittest/udp/tst.ipv4remoteudp.sh
Log Message:
-----------
test/unittest/udp: enable IPv4 remote udp test
It just tests send so we can send to remote address
and verify probe firing.
Signed-off-by: Alan Maguire <alan.maguire at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
Compare: https://github.com/oracle/dtrace-utils/compare/19e0c873b522...589a81d416fb
To unsubscribe from these emails, change your notification settings at https://github.com/oracle/dtrace-utils/settings/notifications
More information about the DTrace-devel
mailing list