From nobody Wed Jun 22 11:41:07 2022 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 965BF871C29; Wed, 22 Jun 2022 11:41:08 +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 4LShKc21wsz4sfc; Wed, 22 Jun 2022 11:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898068; 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=Mw8wsxRoI+aNzHMZGGpbcKBiLbojO0XC4/KvpeyeQXE=; b=r6kBgbCUIgoUMipzaVVOTIV2u0YsxvUIBJ1NZDJigA/EpQV8IMv4lPWYezMUfYZgfzhL9t kK2owmPt0uEsfBHevJ1isDwVyZzdSA2r+cuRbqEr+zbhFHWjksd94rRBeEyvb7nidDCjpR YyFBdRkReDWaWMv+h0PdA04P5eecqtT1AKsJ967DvWLXUWiO2HyTQgGw0K6lZhD6TFmAUM tfylK6OoRCClFd/lMjpyvCAxZmODm5Z81XrIpQvCDYjd5aCc32grc4wdX2H2QqXFqgwNAI 83+wI9BOEAxpUD3Ls+AMDZ0hC9742lyIWVhxVSh6FyjrDPSAt865aYCcdenBbg== 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 C9E262571D; Wed, 22 Jun 2022 11:41:07 +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 25MBf76r023834; Wed, 22 Jun 2022 11:41:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25MBf7i4023833; Wed, 22 Jun 2022 11:41:07 GMT (envelope-from git) Date: Wed, 22 Jun 2022 11:41:07 GMT Message-Id: <202206221141.25MBf7i4023833@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: 39de84b619b0 - main - kdump: Decode Linux clock_nanosleep syscall 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 39de84b619b0d8bb27aa77e49b6134ca06370e1a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898068; 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=Mw8wsxRoI+aNzHMZGGpbcKBiLbojO0XC4/KvpeyeQXE=; b=pv6Gzdlnzycy6DyjzosuMw8PVbl6tI7j4euGm6+L3VcF3X4mZ+4lO0WuxivDaAojCgtSpJ npSm524eO4OawvKtIxeCFgvtFVhqHednbaV7atAEZIUvlNLGa8Z69l2jZQW3hR5wVLMAGX PeNxXoWmF1sSwEBbNXv0zkLHmNgD1MJEXXBK8NgNT3rEfh7o2Ig5mHUIk4JjDIIkPd+jCl QhTMhQeWYo/StYPRTL2CJOiJ7w8gBbxd5m3IbvsE+yO7DRPAdPjHJOcSqoRmuWnd/k+Kf5 EIr4U2MiRGDVkAmBmIO0F3ZkmUhG1IgFvaIrQmafyIPgaOp5iIumnUkRRMJBcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655898068; a=rsa-sha256; cv=none; b=KAzkhhgjt/GghnttDFV8oa2veHKBA1jT4hZxxLNMBZi/1WKCNVhIw/4a7JN0scIH//z1UH wsruBWmvqHpt/zdxNQdcwvRaPbhx9YZwZypH/8axTK1KXfoSYFZu3Qfr/2YNfWOHcDpDgW l7g+OWO0LieL22v9v+0m2onodZUOdipRMymXQMPHaTT7Cp3VXz9t2c9XFSO45/UYvADk61 ATsH7mQ8QES0cbRs5pMDS55LdlzVWrit7l6W5jBmbs4Nj6P7Q/Uk0CIKm+CSu2kGXwTTTo DgK87Ef1Aw2hvJDeDTeo0r0jIKUbXGYkOYWX79Wtr84gzbmSXe376D3TRPF/qA== 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=39de84b619b0d8bb27aa77e49b6134ca06370e1a commit 39de84b619b0d8bb27aa77e49b6134ca06370e1a Author: Dmitry Chagin AuthorDate: 2022-06-22 11:21:42 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-22 11:21:42 +0000 kdump: Decode Linux clock_nanosleep syscall MFC after: 2 weeks --- lib/libsysdecode/linux.c | 7 +++++++ lib/libsysdecode/mklinuxtables | 1 + lib/libsysdecode/sysdecode.h | 1 + usr.bin/kdump/linux.c | 22 ++++++++++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/lib/libsysdecode/linux.c b/lib/libsysdecode/linux.c index adaf6172618d..79e71d1207ca 100644 --- a/lib/libsysdecode/linux.c +++ b/lib/libsysdecode/linux.c @@ -190,3 +190,10 @@ sysdecode_linux_sigprocmask_how(int how) return (lookup_value(sigprocmaskhow, how)); } + +bool +sysdecode_linux_clock_flags(FILE *fp, int flags, int *rem) +{ + + return (print_mask_int(fp, clockflags, flags, rem)); +} diff --git a/lib/libsysdecode/mklinuxtables b/lib/libsysdecode/mklinuxtables index efd579adff35..caeeb785b4d3 100644 --- a/lib/libsysdecode/mklinuxtables +++ b/lib/libsysdecode/mklinuxtables @@ -89,6 +89,7 @@ cat <<_EOF_ _EOF_ gen_table "clockids" "LINUX_CLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_timer.h" +gen_table "clockflags" "LINUX_TIMER_[A-Z_]+[[:space:]]+0x[0-9]+" "compat/linux/linux_timer.h" gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_timer.h" "_MASK|_MAX" gen_table "sigprocmaskhow" "LINUX_SIG_[A-Z]+[[:space:]]+[0-9]+" "compat/linux/linux.h" diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index 4412f5d70078..4a826f489a16 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -140,6 +140,7 @@ bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem); #define SYSDECODE_HAVE_LINUX void sysdecode_linux_clockid(FILE *_fp, clockid_t _which); +bool sysdecode_linux_clock_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_linux_signal(int _sig); const char *sysdecode_linux_sigprocmask_how(int _how); diff --git a/usr.bin/kdump/linux.c b/usr.bin/kdump/linux.c index f55d0b7da83d..1d9768fc302d 100644 --- a/usr.bin/kdump/linux.c +++ b/usr.bin/kdump/linux.c @@ -87,6 +87,17 @@ ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip, ip++; narg--; break; + case LINUX_SYS_linux_clock_nanosleep: + putchar('('); + sysdecode_linux_clockid(stdout, *ip); + putchar(','); + ip++; + narg--; + print_mask_arg0(sysdecode_linux_clock_flags, *ip); + c = ','; + ip++; + narg--; + break; case LINUX_SYS_linux_kill: case LINUX_SYS_linux_tkill: case LINUX_SYS_linux_rt_sigqueueinfo: @@ -169,6 +180,17 @@ ktrsyscall_linux32(struct ktr_syscall *ktr, register_t **resip, ip++; narg--; break; + case LINUX32_SYS_linux_clock_nanosleep: + putchar('('); + sysdecode_linux_clockid(stdout, *ip); + putchar(','); + ip++; + narg--; + print_mask_arg0(sysdecode_linux_clock_flags, *ip); + c = ','; + ip++; + narg--; + break; case LINUX32_SYS_linux_kill: case LINUX32_SYS_linux_tkill: case LINUX32_SYS_linux_rt_sigqueueinfo: