From nobody Thu Oct 17 16:16:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTtJ64llPz5Z9WZ; Thu, 17 Oct 2024 16:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTtJ648Yhz42wJ; Thu, 17 Oct 2024 16:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5XjN9+YqOlaMdkeFpeQNyg5F8zpC2aF2AWhUPfLuYg=; b=eGoXr7IHXHyVLu1kWUZZyZCCEs6w0ZGfVJWsYndohbFavYXaJhML1IkII1wIyZWc9JjCto BXO7IzxjEw33SFGj/BUWIWZ7IQr1rU7GltAg/qQCrXHGUuDI4cTPt1eVulGemvvyhkpN9j dyKvwBpYGq8B0E3pvEJ3Y8JUnSSyNKErHtuOR5j6M6/JogbTejsx47uUVdHYMq7OxcKDDQ YK/vWDJ7JuqE8VOWplpfrxDTaTpqNFwGHyRrL/QL/xZxFIaM0vz9FFx82bDclygB5DM/QR EYZz7Va5AGbZxqGc0k0jbn4/szg2cdwKZkYJQlknual/OcTsEERupYnbUGGbNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729181798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5XjN9+YqOlaMdkeFpeQNyg5F8zpC2aF2AWhUPfLuYg=; b=SAfGK3467Y3WLXsWG/PehVomdik55ntvkYD8GrfhoPkam38lm2hQ+je9ER62m4ObRUowUi V57pX+7yROIEbwZOXpMBEdkZK6ziMmOF8MhaSY6Jf0O+e/2+bi1tSGAY9YxAwHD16/CrHy FlrC5M9zqwTOfQdQiPxGkJ8OqFztrOo2jnvytEeICa0u5kEW1CUl0wQW3sB6fa4VZhTdZ7 RkmGQHh0KQX10m0tmm/OhMWyEMWuzYMozSIvWCl+eqpj4oUyObyOnQMyDzhv9MeLR/QKOW uUlOb+n9qGz+0AwHYg5stgb8aqIkHTf9sFeUjguYfPCBmU6jX5r9qXILjq1kPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729181798; a=rsa-sha256; cv=none; b=anDd8vr1J+tC+8ecNsBl6pVbX8h6sbKE92RerdULXpWRYdiEvWd1XV55kuoFGHMqeqQLQQ nBc45SMqHmFG9T2N1N8w56B+mCpNG8g4FLlRfuvB1++0zlNaddUA8GWhhdgR4BYEJvFWHl BrZMA3Q5Vs2OzdjT65DDNHLCSOTGWidJKCQpLJXU53z11BNYOqDZlKummaYLyepkGXuo4V VO9lTsCdY1vP0mtGUQQTGE1f29D7vDQkeZD6Dqgkx9J2mcnyrlxcm8d0VYP+ui1oxaIDu0 p3HXVuEVrxWrON5LIdBy6Id1nvVkaQgsuQPXPoo4NPUEpVDO+DxGaIHXAVfbLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTtJ63kJTzwvX; Thu, 17 Oct 2024 16:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49HGGc1Z099221; Thu, 17 Oct 2024 16:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49HGGcM0099218; Thu, 17 Oct 2024 16:16:38 GMT (envelope-from git) Date: Thu, 17 Oct 2024 16:16:38 GMT Message-Id: <202410171616.49HGGcM0099218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9a2d163115f5 - stable/14 - kdump: Print splice structures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a2d163115f509c4a046295a6ffc4f2cd7162a7d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9a2d163115f509c4a046295a6ffc4f2cd7162a7d commit 9a2d163115f509c4a046295a6ffc4f2cd7162a7d Author: Mark Johnston AuthorDate: 2024-09-10 16:51:26 +0000 Commit: Mark Johnston CommitDate: 2024-10-17 15:48:37 +0000 kdump: Print splice structures MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit b76961e3a21a820f15ebff9d115ff67feb910cec) --- lib/libsysdecode/ktrace.out | Bin 0 -> 23596 bytes usr.bin/kdump/kdump.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/libsysdecode/ktrace.out b/lib/libsysdecode/ktrace.out new file mode 100644 index 000000000000..29d35f0de3ce Binary files /dev/null and b/lib/libsysdecode/ktrace.out differ diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index abbe57b0b75e..bde4eb7657e0 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -117,6 +117,7 @@ void ktruser(int, void *); void ktrcaprights(cap_rights_t *); void ktritimerval(struct itimerval *it); void ktrsockaddr(struct sockaddr *); +void ktrsplice(struct splice *); void ktrstat(struct stat *); void ktrstruct(char *, size_t); void ktrcapfail(struct ktr_cap_fail *); @@ -1935,6 +1936,14 @@ ktrsockaddr(struct sockaddr *sa) printf(" }\n"); } +void +ktrsplice(struct splice *sp) +{ + printf("struct splice { fd=%d, max=%#jx, idle=%jd.%06jd }\n", + sp->sp_fd, (uintmax_t)sp->sp_max, (intmax_t)sp->sp_idle.tv_sec, + (intmax_t)sp->sp_idle.tv_usec); +} + void ktrstat(struct stat *statp) { @@ -2123,6 +2132,13 @@ ktrstruct(char *buf, size_t buflen) memcpy(set, data, datalen); ktrbitset(name, set, datalen); free(set); + } else if (strcmp(name, "splice") == 0) { + struct splice sp; + + if (datalen != sizeof(sp)) + goto invalid; + memcpy(&sp, data, datalen); + ktrsplice(&sp); } else { #ifdef SYSDECODE_HAVE_LINUX if (ktrstruct_linux(name, data, datalen) == false)