diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-07-27 13:38:04 -0400 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-07-28 14:07:59 -0700 |
commit | b470985c76df6d53a9454670fb7551e1197f55e2 (patch) | |
tree | 1ff9a1ec7f16561d10eeee033e9997f05230ffe4 /net/handshake | |
parent | 39067dda1d865d7fac1f56c18479e67b0917bbe4 (diff) | |
download | lwn-b470985c76df6d53a9454670fb7551e1197f55e2.tar.gz lwn-b470985c76df6d53a9454670fb7551e1197f55e2.zip |
net/handshake: Trace events for TLS Alert helpers
Add observability for the new TLS Alert infrastructure.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://lore.kernel.org/r/169047947409.5241.14548832149596892717.stgit@oracle-102.nfsv4bat.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/handshake')
-rw-r--r-- | net/handshake/alert.c | 7 | ||||
-rw-r--r-- | net/handshake/trace.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/net/handshake/alert.c b/net/handshake/alert.c index 286bf94d93a3..329d91984683 100644 --- a/net/handshake/alert.c +++ b/net/handshake/alert.c @@ -21,6 +21,8 @@ #include "handshake.h" +#include <trace/events/handshake.h> + /** * tls_alert_send - send a TLS Alert on a kTLS socket * @sock: open kTLS socket to send on @@ -39,6 +41,8 @@ int tls_alert_send(struct socket *sock, u8 level, u8 description) u8 alert[2]; int ret; + trace_tls_alert_send(sock->sk, level, description); + alert[0] = level; alert[1] = description; iov.iov_base = alert; @@ -77,6 +81,7 @@ u8 tls_get_record_type(const struct sock *sk, const struct cmsghdr *cmsg) return 0; record_type = *((u8 *)CMSG_DATA(cmsg)); + trace_tls_contenttype(sk, record_type); return record_type; } EXPORT_SYMBOL(tls_get_record_type); @@ -99,5 +104,7 @@ void tls_alert_recv(const struct sock *sk, const struct msghdr *msg, data = iov->iov_base; *level = data[0]; *description = data[1]; + + trace_tls_alert_recv(sk, *level, *description); } EXPORT_SYMBOL(tls_alert_recv); diff --git a/net/handshake/trace.c b/net/handshake/trace.c index 1c4d8e27e17a..44432d0857b9 100644 --- a/net/handshake/trace.c +++ b/net/handshake/trace.c @@ -8,8 +8,10 @@ */ #include <linux/types.h> +#include <linux/ipv6.h> #include <net/sock.h> +#include <net/inet_sock.h> #include <net/netlink.h> #include <net/genetlink.h> |