From nobody Wed Jun 22 11:41:05 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 F23418719FB; Wed, 22 Jun 2022 11:41: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 4LShKZ05j2z4sfR; Wed, 22 Jun 2022 11:41:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898066; 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=cIuj6R/EHtVZw7YcF4xlIr8svlynRdVtWpfqtcDEYbQ=; b=IpmBoGunQk/40LkQZe91Wz/CD93ubBY+Gvttw+SXsFbYRhR+N9AIq2E2T6lGJZJ3c7BLbC cLn4bSDyocXDS5EvpeKWpT7Cg2FyI7MGJXBVKNr1oWMulUvo7XSXxsC2rNeljECW7HVPLH u0gZDjankCXASpP90LuPR/uq9gTFlQmMQnus5tMoXjEkS4cD8nadzeU6QdRF9h3GjEwRcr 0hNfk0VzK9Mw8ly1T0TNj9YM6WCkQXQiieTzeRuNEcTqoWX16MgJZVBNgsICFy1vGprwQV g1vuZ7/dP+TkAnTarTX3Qu3AqNO/an9jF9vmNpw0Ys4OntzJe2UXsQac6gGDQw== 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 782FB24E6A; Wed, 22 Jun 2022 11:41:05 +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 25MBf5Cx023786; Wed, 22 Jun 2022 11:41:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25MBf5PQ023785; Wed, 22 Jun 2022 11:41:05 GMT (envelope-from git) Date: Wed, 22 Jun 2022 11:41:05 GMT Message-Id: <202206221141.25MBf5PQ023785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: b9b86b6742ad - main - 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/main X-Git-Reftype: branch X-Git-Commit: b9b86b6742ad589e5ad1077c000bfdb2ce9ac198 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898066; 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=cIuj6R/EHtVZw7YcF4xlIr8svlynRdVtWpfqtcDEYbQ=; b=vXlEYezEnZzt2Q/jQfF7RboSqTgedTghhhG/ZYLTVDXKRI8eJDxGL4cr0IEjTqmavpj6On 61MswGgpf5dLHKk3Jgdw66vx/cn35GnfSGT6sNWcEGTX2eBCzm0O7xiVk8lfRVdYjuhtuF 2UfEGQ7UjBBaqwhxxKI4WaMxsOk0yOw4pvo9d0qqXjjnzyKaQmisSJ07sIto7hP3oFoT9L mmJzK2nR+8oMH2GXgGghntS27XCPFEKWxi4Hf9YYskrkuZatmAOEPoe9U42/KIehGQ9Asp hg8Xu/k6jQGOkv+TRAloS8G9ndgOlPNiCvZ1woLmyvYbCJV9bFbHCbBhdCQ4cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655898066; a=rsa-sha256; cv=none; b=MA7l4XPeNenH5Dk9Yp7UTFqMTzIlY8Y3zQCgwtXOT441nrmSs+vcnvklTM0mF8kzINKnO+ E8lai4bQFNI3Z5LXZe8lE4YUc2LLF35U3cpEjNG4nRWUJFkw/j7nbXsVnajVTcqXB9NS84 MSHh2nMKR+fnvI+usDmXy7r3C4h+3aFw6MpaQ5OigHMAuIntV7uA7bnzg+O+8BW0tgi4oP 4akk685CvlltPIgeuyl5g5lUKMZ7oFVu1o740MRRqiHfDccXpMEJaYOx9whgjqPJq3CGhn eC5dENEx8cNco4T9rhu/XvCdPVEn0uZA+RZ6r+hrrx+DNSpYgEPQ2a7SCTs3bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b9b86b6742ad589e5ad1077c000bfdb2ce9ac198 commit b9b86b6742ad589e5ad1077c000bfdb2ce9ac198 Author: Dmitry Chagin AuthorDate: 2022-06-22 11:19:31 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-22 11:19:31 +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 --- 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 5c05a82b53ba..22ac539793fa 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1529,6 +1529,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 c16aed732230..d30857e8a17b 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 0a3f616294af..46a0c5ecc44b 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -296,7 +296,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, @@ -506,7 +506,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, @@ -607,6 +608,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, @@ -619,6 +622,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, @@ -2445,6 +2451,9 @@ print_arg(struct syscall_arg *sc, syscallarg_t *args, syscallarg_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;