bin/171662: procstat(1) fails to recognize AT_TIMEKEEP
Konstantin Belousov
kostikbel at gmail.com
Sat Sep 15 14:10:16 UTC 2012
The following reply was made to PR bin/171662; it has been noted by GNATS.
From: Konstantin Belousov <kostikbel at gmail.com>
To: Jan Beich <jbeich at tormail.org>
Cc: FreeBSD-gnats-submit at freebsd.org, trociny at freebsd.org
Subject: Re: bin/171662: procstat(1) fails to recognize AT_TIMEKEEP
Date: Sat, 15 Sep 2012 17:04:42 +0300
--Gs9iBZf6UKWgztis
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Sep 15, 2012 at 02:26:36AM -0900, Jan Beich wrote:
>=20
> >Number: 171662
> >Category: bin
> >Synopsis: procstat(1) fails to recognize AT_TIMEKEEP
> >Confidential: no
> >Severity: non-critical
> >Priority: low
> >Responsible: freebsd-bugs
> >State: open
> >Quarter: =20
> >Keywords: =20
> >Date-Required:
> >Class: sw-bug
> >Submitter-Id: current-users
> >Arrival-Date: Sat Sep 15 11:50:09 UTC 2012
> >Closed-Date:
> >Last-Modified:
> >Originator: Jan Beich
> >Release: FreeBSD 10.0-CURRENT amd64
> >Organization:
> >Environment:
> >Description:
> >How-To-Repeat:
> $ procstat -x $(pgrep firefox)
> PID COMM AUXV VALUE
> 90996 firefox AT_PHDR 0x400040
> 90996 firefox AT_PHENT 56
> 90996 firefox AT_PHNUM 8
> 90996 firefox AT_PAGESZ 4096
> 90996 firefox AT_FLAGS 0
> 90996 firefox AT_ENTRY 0x401790
> 90996 firefox AT_BASE 0x80060d000
> 90996 firefox AT_EXECPATH 0x7fffffffefc8
> 90996 firefox AT_OSRELDATE 1000018
> 90996 firefox AT_CANARY 0x7fffffffef88
> 90996 firefox AT_CANARYLEN 64
> 90996 firefox AT_NCPUS 2
> 90996 firefox AT_PAGESIZES 0x7fffffffef70
> 90996 firefox AT_PAGESIZESLEN 24
> 90996 firefox 22 0x7ffffffff190
> 90996 firefox AT_STACKPROT EXECUTABLE
> >Fix:
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
Yes, I forgot about procstat at all when I added AT_TIMEKEEP.
I also noted that AT_COUNT is defined in the switch statement, which
is not useful. AT_COUNT is not an auxv at all, it is just count.
diff --git a/usr.bin/procstat/procstat_auxv.c b/usr.bin/procstat/procstat_a=
uxv.c
index 9bf7afb..b78e13a 100644
--- a/usr.bin/procstat/procstat_auxv.c
+++ b/usr.bin/procstat/procstat_auxv.c
@@ -231,9 +231,11 @@ procstat_auxv(struct kinfo_proc *kipp)
else
PRINT(AT_STACKPROT, %s, "EXECUTABLE");
break;
- case AT_COUNT:
- PRINT(AT_COUNT, %ld, (long)auxv[i].a_un.a_val);
+#ifdef AT_TIMEKEEP
+ case AT_TIMEKEEP:
+ PRINT(AT_TIMEKEEP, %p, auxv[i].a_un.a_ptr);
break;
+#endif
default:
PRINT_UNKNOWN(auxv[i].a_type, auxv[i].a_un.a_val);
break;
--Gs9iBZf6UKWgztis
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)
iEYEARECAAYFAlBUivoACgkQC3+MBN1Mb4hzpgCfbYe5K3wLrY3o6jqEwMt+CaiL
OGsAn3+FVxju/YcO6AFi4ZQGaA1qexxg
=J8Zi
-----END PGP SIGNATURE-----
--Gs9iBZf6UKWgztis--
More information about the freebsd-bugs
mailing list