From nobody Tue Sep 10 16:55:25 2024 X-Original-To: dev-commits-src-main@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 4X38vy1Clqz5WC45; Tue, 10 Sep 2024 16:55:26 +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 4X38vx4XtLz440j; Tue, 10 Sep 2024 16:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725987325; 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=onobnO5oBR6sazaaGszhpf+SA5xuxJfkdUmLxIxotiU=; b=GM1nz8n7p6zvopbh2r8Qo3BvtBCfMR7EzFpnjHOWm/EJebPVXmmeI6ClmhRwUh9azumavV VRFu3ybNeJ+2EsIIdNmw+YE65J4VF5+L3x2MAoej7PZ9n+ANA5JkRf2cR+sF9m64+WSE1g 8VfUwpjYql6PGiRVNvwR7zYnlvJ4jW8QTZU4D8iCoauHPSdcVZB9/CySBAxAzIEiE8AsmU QZj3NR+VO0VvypwnonraVeizLRL7YCVD72jsfVfgj4A9Pqwq+E7SkuG/FYsozZlez+/X3x oIqYsMQdcwcNCBupfI4IjmBhmoGPhUFRXPMvVo6aOER+QUbjkipLvNgBzmdqaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725987325; a=rsa-sha256; cv=none; b=ewzyzOfDTet5ZMg/FJsERpB5bCqEqpz1oxrtS041R5F0fiRhytO2ZpWAqZ+nsZFW4DVKGA txtiIVuhzjQAL+ZqchNpf2lrgQavcsDWwKdu1wWI6e+SglQTiJTS3K8+jlHZVkUdd1SAc9 w1uXgkaW1Q03Lg/Ua0AJIHMr4UdKx0RMaYwtUHaXVi0UB6SILZFNRm+8L5UOku+o+dKoRz Cnk9AQet5SDjOo7oB0HHQ+VLbV6N5RsMvDQLd/9Ujt4xASYtpXFMRPwVZx/G9GUJ/4c6Cx 1UDJ3K6BvGaRRBp/TS/wmKr13lVq/EJ+voCvns1Kl+5bu5lhv7RkVDByiG2Otw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725987325; 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=onobnO5oBR6sazaaGszhpf+SA5xuxJfkdUmLxIxotiU=; b=aQti6E7IIv7YD2XxYaayUBI9Snauvdo48rtbLBXiDIpPT3tAxict63kmnPHqpQiEIzJGXT oU7tF6ZYK5nWEHabgIF2Ahbuj3ChcTU20ZopOACBrqg2I5A4VgzeL4T9ZUpoHD0AXDunmc lUlw45CmeGAXbvrDljVFCzbkpYu+b1TAIUjWnQKX26bHyfGslVnV2acXwIrussvGbbxXvv jO+56bLX7PcOrA1Rs4o5ePcljAIdKsOj8WbriNo25D/0cBp4tBEhiTxIkqNrDZClcH3dYK 5dmZZtNR3f/zT+DmR9PXlFrgviCC8dXhj5FgVhB4GAK0FzSKtZRh+X0SyXC/BA== 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 4X38vx495WzvVV; Tue, 10 Sep 2024 16:55:25 +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 48AGtPLv084119; Tue, 10 Sep 2024 16:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48AGtPc8084115; Tue, 10 Sep 2024 16:55:25 GMT (envelope-from git) Date: Tue, 10 Sep 2024 16:55:25 GMT Message-Id: <202409101655.48AGtPc8084115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b76961e3a21a - main - kdump: Print splice structures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: b76961e3a21a820f15ebff9d115ff67feb910cec Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b76961e3a21a820f15ebff9d115ff67feb910cec commit b76961e3a21a820f15ebff9d115ff67feb910cec Author: Mark Johnston AuthorDate: 2024-09-10 16:51:26 +0000 Commit: Mark Johnston CommitDate: 2024-09-10 16:52:01 +0000 kdump: Print splice structures MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Stormshield --- 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 f7ac82c757fa..41d3eb594149 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -105,6 +105,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 *); @@ -1923,6 +1924,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) { @@ -2111,6 +2120,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)