From nobody Thu Jun 5 03:03:24 2025 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 4bCTmW6DHzz5y4kF; Thu, 05 Jun 2025 03:03:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4bCTmW1LZPz3Yg9; Thu, 05 Jun 2025 03:03:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 55533OrH073386; Thu, 5 Jun 2025 06:03:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 55533OrH073386 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 55533OkA073385; Thu, 5 Jun 2025 06:03:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Jun 2025 06:03:24 +0300 From: Konstantin Belousov To: Kyle Evans Cc: Gleb Smirnoff , markj@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 969f6380eb66 - main - kdump: nicer printing of kill(2) PID argument Message-ID: References: <202506040151.5541pESm016476@gitrepo.freebsd.org> <02ed6d30-b22a-456d-96e2-7f5b235766fd@FreeBSD.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <02ed6d30-b22a-456d-96e2-7f5b235766fd@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bCTmW1LZPz3Yg9 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Wed, Jun 04, 2025 at 06:03:44PM -0500, Kyle Evans wrote: > On 6/4/25 17:55, Gleb Smirnoff wrote: > > On Wed, Jun 04, 2025 at 01:51:14AM +0000, Kyle Evans wrote: > > K> The branch main has been updated by kevans: > > K> > > K> URL: https://cgit.FreeBSD.org/src/commit/?id=969f6380eb66f809eed3e5c38b6021824a4cc2bf > > K> > > K> commit 969f6380eb66f809eed3e5c38b6021824a4cc2bf > > K> Author: Kyle Evans > > K> AuthorDate: 2025-06-04 01:51:06 +0000 > > K> Commit: Kyle Evans > > K> CommitDate: 2025-06-04 01:51:06 +0000 > > K> > > K> kdump: nicer printing of kill(2) PID argument > > K> > > K> Similar to wait*(), kill(2) operates on a pid that currently gets output > > K> as hex. Output it in decimal to make it a little easier to eyeball the > > K> pid we're signalling. > > K> > > K> Reviewed by: markj > > K> Differential Revision: https://reviews.freebsd.org/D50508 > > > > I didn't review if PIDs are always printed as decimals or not, but for > > the file descriptors it is a mix of hex and decimals. :( Usually I go > > with a sed script over kdump output to make it consistent. > > > > To be fair, I'd like to fix that, too- I noticed close() the other day for > fd > 0, but paused when I: > > 1.) couldn't tell where we even output close args > 2.) noticed that close_range has the same problem, but hex can make sense > for its upper range (particularly when you're doing ~0U to simulate > closefrom(2)) and that's a bit of a predicament because that's a harder > pattern to spot in decimal. > > > I think if we try to bring that to common format, that would leave > > some people unsatisfied regardless of our choice - all decimal or > > all hex. > > > > So, I would suggest to add a command line options that would force > > into all hex or all decimal. > > > > I'd like to hear from some folks that prefer hex here... other system tools > are generally not printing IDs in hex, so it makes it harder to correlate. > Ideally, I think we'd audit it all and make sure we match truss(1) here > (which tends to just print decimal for all of the ID arguments, as far as > I've found). > Why cannot we consistently use %#x for hex instead of %x?