From nobody Wed Jul 6 11:04:06 2022 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 C861C1D00F9B; Wed, 6 Jul 2022 11:04:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LdGrQ5k1Jz3NHR; Wed, 6 Jul 2022 11:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657105446; 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=14WVcBWGPVPw3i7wdmkSstG0Qu6E30bCk1SD+TPN/7c=; b=XiurHANgKnWb/MP3dv0F3SR2LI0VkmevJn1m5OO3QcVVL1RmxIsCIG/hlC52o8ffESagbf ohkxYkLsJuG0A9671Gv372V638atRXqeXAPrc+uuamr+OpL68LBnY778yTNGKZTIqKx45i vxz0B5ckpSXD1AhlKAJdJyuc1r7Il8/ExR/BNRwCdmLifqNltxXoF2AepPpszGE/7sHLK/ dtpYA8teKARkX/rnjz9HvMHAULOfi7XlASudKfEbrf7U0sDbT8l7W3JHeDTRf9Y8RVliw2 z922nEDag8j4dNtL658gl/Qh0+LEEPhdTcl5o0qJmTPIPVbskQrJWyUysWQBSw== 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 74694194BB; Wed, 6 Jul 2022 11:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 266B46XJ096550; Wed, 6 Jul 2022 11:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 266B46Bg096549; Wed, 6 Jul 2022 11:04:06 GMT (envelope-from git) Date: Wed, 6 Jul 2022 11:04:06 GMT Message-Id: <202207061104.266B46Bg096549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 894f26c8f64a - stable/13 - kdump: Decode getitimer, setitimer which argument 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 894f26c8f64a749bb1bc22fb6eb1abb523081fc6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657105446; 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=14WVcBWGPVPw3i7wdmkSstG0Qu6E30bCk1SD+TPN/7c=; b=foVd4Mkwo+7fry6ikIyd68JMJsIS+XAYEG2JL1fp+g6h+gmgDCyJt/3Nrts+N3f4szv3f8 YF+8BJ7tn64gmtAcCshVoJwZsFvDZRDAwh0gx1TMtZSL0RfB+25o4jNDpvGrkZVCt3U0oD I6kanghhRb66Jc/pX3ySn/G+cPdhMuj1EpPvDzJgj4X7gtITwR6Mkk86UMlfmZdWPZhGMO Dvw7/1wjjdxxdRGcz28SXcVrtyBiRhI3696v0h95ggNVXPtclumygQkD7AZaJauwf4CZQ1 uQMMd/wpufzSXx5/D58NcJWmFAfM59iNybUB8CcubL14nZZLit+ND733y2MU4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657105446; a=rsa-sha256; cv=none; b=qz2aINtkcZF64gfdAATaNF8vcffGjqPVkgiJyQrGUrUgntReBpH0KJbfyL5XfhiFFcnn/g ranGVZ+rqAgNjaLlhaiJlVnlLV71OpzqilOC1UL/4akykaymfF7/kInHzDKbUuD79h4hjH crZAP/LFwI17ip4Nf+MFXjDU06Wb5dDwOQjhbPq/otjT8VDMVJEBfE4XlJSyfWxG4W362T yFzeIB6s/dJoEAcspVI94QGqemp7M1PDcFVx/c3fWN0BlEsoBiqVu4kwN705NdjFccCucb WHRZisMsFcOPduQZhPCe6dVVLPFALu0rW3dmUjFCQG/qTZOpj1Yqui5F78M03Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=894f26c8f64a749bb1bc22fb6eb1abb523081fc6 commit 894f26c8f64a749bb1bc22fb6eb1abb523081fc6 Author: Dmitry Chagin AuthorDate: 2022-06-22 11:19:31 +0000 Commit: Dmitry Chagin CommitDate: 2022-07-06 11:02:14 +0000 kdump: Decode getitimer, setitimer which argument Reviewed by: jhb (previous version, without truss) Differential revision: https://reviews.freebsd.org/D35231 MFC after: 2 weeks (cherry picked from commit b9b86b6742ad589e5ad1077c000bfdb2ce9ac198) --- usr.bin/kdump/kdump.c | 8 ++++++++ usr.bin/kdump/linux.c | 16 ++++++++++++++++ usr.bin/truss/syscall.h | 1 + usr.bin/truss/syscalls.c | 13 +++++++++++-- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index f3e6787edbe0..30747909d002 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1534,6 +1534,14 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip, narg--; c = ','; break; + case SYS_getitimer: + case SYS_setitimer: + putchar('('); + print_integer_arg(sysdecode_itimer, *ip); + ip++; + narg--; + c = ','; + break; } switch (ktr->ktr_code) { case SYS_chflagsat: diff --git a/usr.bin/kdump/linux.c b/usr.bin/kdump/linux.c index ed057a6b8ef6..55b3df912898 100644 --- a/usr.bin/kdump/linux.c +++ b/usr.bin/kdump/linux.c @@ -117,6 +117,14 @@ ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number64(first, ip, narg, c); break; + case LINUX_SYS_linux_getitimer: + case LINUX_SYS_linux_setitimer: + putchar('('); + print_integer_arg(sysdecode_itimer, *ip); + ip++; + narg--; + c = ','; + break; } *resc = c; *resip = ip; @@ -183,6 +191,14 @@ ktrsyscall_linux32(struct ktr_syscall *ktr, register_t **resip, print_number(ip, narg, c); print_number64(first, ip, narg, c); break; + case LINUX32_SYS_linux_getitimer: + case LINUX32_SYS_linux_setitimer: + putchar('('); + print_integer_arg(sysdecode_itimer, *ip); + ip++; + narg--; + c = ','; + break; } *resc = c; *resip = ip; diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h index f25cbd81ede5..d27bbacfd126 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -101,6 +101,7 @@ enum Argtype { Getfsstatmode, Idtype, Ioctl, + Itimerwhich, Kldsymcmd, Kldunloadflags, LioMode, diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index cf863d2bfaaa..11ca6269b153 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -297,7 +297,7 @@ static const struct syscall_decode decoded_syscalls[] = { { .name = "getfsstat", .ret_type = 1, .nargs = 3, .args = { { Ptr, 0 }, { Long, 1 }, { Getfsstatmode, 2 } } }, { .name = "getitimer", .ret_type = 1, .nargs = 2, - .args = { { Int, 0 }, { Itimerval | OUT, 2 } } }, + .args = { { Itimerwhich, 0 }, { Itimerval | OUT, 2 } } }, { .name = "getpeername", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } }, { .name = "getpgid", .ret_type = 1, .nargs = 1, @@ -507,7 +507,8 @@ static const struct syscall_decode decoded_syscalls[] = { { Msgflags, 3 }, { Sockaddr | IN, 4 }, { Socklent | IN, 5 } } }, { .name = "setitimer", .ret_type = 1, .nargs = 3, - .args = { { Int, 0 }, { Itimerval, 1 }, { Itimerval | OUT, 2 } } }, + .args = { { Itimerwhich, 0 }, { Itimerval, 1 }, + { Itimerval | OUT, 2 } } }, { .name = "setpriority", .ret_type = 1, .nargs = 3, .args = { { Priowhich, 0 }, { Int, 1 }, { Int, 2 } } }, { .name = "setrlimit", .ret_type = 1, .nargs = 2, @@ -608,6 +609,8 @@ static const struct syscall_decode decoded_syscalls[] = { { .name = "linux_execve", .ret_type = 1, .nargs = 3, .args = { { Name | IN, 0 }, { ExecArgs | IN, 1 }, { ExecEnv | IN, 2 } } }, + { .name = "linux_getitimer", .ret_type = 1, .nargs = 2, + .args = { { Itimerwhich, 0 }, { Itimerval | OUT, 2 } } }, { .name = "linux_lseek", .ret_type = 2, .nargs = 3, .args = { { Int, 0 }, { Int, 1 }, { Whence, 2 } } }, { .name = "linux_mkdir", .ret_type = 1, .nargs = 2, @@ -620,6 +623,9 @@ static const struct syscall_decode decoded_syscalls[] = { .args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } }, { .name = "linux_readlink", .ret_type = 1, .nargs = 3, .args = { { Name, 0 }, { Name | OUT, 1 }, { Sizet, 2 } } }, + { .name = "linux_setitimer", .ret_type = 1, .nargs = 3, + .args = { { Itimerwhich, 0 }, { Itimerval, 1 }, + { Itimerval | OUT, 2 } } }, { .name = "linux_socketcall", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { LinuxSockArgs, 1 } } }, { .name = "linux_stat64", .ret_type = 1, .nargs = 2, @@ -2628,6 +2634,9 @@ print_arg(struct syscall_arg *sc, unsigned long *args, register_t *retval, print_integer_arg(sysdecode_getfsstat_mode, fp, args[sc->offset]); break; + case Itimerwhich: + print_integer_arg(sysdecode_itimer, fp, args[sc->offset]); + break; case Kldsymcmd: print_integer_arg(sysdecode_kldsym_cmd, fp, args[sc->offset]); break;