Date: Thu, 20 May 2021 12:15:54 -0400 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: Michael Gmelin <freebsd@grem.de> Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: Reducing SIGINFO verbosity Message-ID: <20210520161554.tjfpfe2vl2x4zi5q@mutt-hbsd> In-Reply-To: <20210520180155.3e23500e@bsd64.grem.de> References: <20210520180155.3e23500e@bsd64.grem.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--lvsbbc3nl6orliz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 20, 2021 at 06:01:55PM +0200, Michael Gmelin wrote: > Hi, >=20 > I'm leaving this here, mostly so that others (or future me) can google > it up. >=20 > Traditionally, CTRL-t would give a one-line output + whatever the > process specific signal handler comes up with: >=20 > # sleep 120 <--- hits CTRL-t > load: 0.27 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.00s 0% 1780k > sleep: about 119 second(s) left out of the original 120 >=20 > # cat <--- hits CTRL-t > load: 0.02 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s 0% 2308k >=20 > =20 > On 13 I get: >=20 > # sleep 120 <--- hits CTRL-t > load: 0.12 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00s 0% 2172k > mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait_sig+0x12 > _sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b > amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about 119 > second(s) left out of the original 120 >=20 > # cat <--- hits CTRL-t > load: 0.09 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0% 2300k > mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+0x9 > _cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_read+0x56 > devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_syscall+0x10c > fast_syscall_common+0xf8=20 >=20 > which is quite way too verbose when checking the progress of > long-running processes, like cp, dd, or poudriere. Especially as CTRL-t > is part of the user experience to me - I use it to interact with the > machine outside of debugging software issues. >=20 > Setting >=20 > sysctl kern.tty_info_kstacks=3D0 > echo kern.tty_info_kstacks=3D0 >>/etc/sysctl.conf >=20 > fixes this permanently. >=20 > Apparently, this was enabled by default on purpose[0], so that people > find the feature (which certainly worked ^_^), but I think it would > been worth mentioning the sysctl somewhere in the release notes/errata, > so that people understand how to disable it again. HardenedBSD also disables tty_info_kstacks by default given its security ramifications. We're actively working to remove or mitigate "kernel infoleak as features" we inherit from FreeBSD. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --lvsbbc3nl6orliz7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmCmizgACgkQ/y5nonf4 4frPUBAAnwLRbq1FUb+Firz2Isomry1QyVPJ1rkN9F2gUF8q16Hyz46vWyiqUj7l VujydQAgiORKexX5M97tq7C7zMSvMvCp2PXdju3QiDIQvG6RrwpdQDhGCs0JKj4q 0IsOajgt/4qojZcMr4M4VR8Do0ZXyXpjUBc9odRRgCroyt1uAUxQsd8801u3gf3U +tBogmsaHM1JQDY4wdofqEHn5WI1d62lDK24hS3IGDhBLVD2KQhBl9LVypSPXQ2p Yk2ASGkEZzb2eKRFdu+6lpTf3Pt1GfOzTJP6u6okWhf1b/KWhU9TNXJMT3VSxTUY j5muL/S1Sltqucq7JEXiLuk85T5ur+X4vecHhCZLOSzTF/QAJfRz+RcjLsGNS0Tf ldDP2lFW6kSDJb2cPgM5RDBIv9vTnyVYGeFaeX/szNslRtD/mBl7Ht1Xe7E1UWlv OvJsyQapDiTtBtP+D0jIRiZ/KC5vv1Bc/Iswr8X61RUO6GmJprGqlaOKGhfF6Yu2 R1dY4uscUAkfPk889mqHegDOJGxS+WzQs6l/OO+mkURkD748CCBOB0QIfFU5lteM ght/7SrdtklXPYNkyJP68RZ+9zqXSJefrGYgU/s23V//YP0PNVplIkF+YTnJAcTp WeV89IWQaMIiHXfpcs38LmD3IaN2QhoxGO24pfUvmts2amYKJcE= =fGxo -----END PGP SIGNATURE----- --lvsbbc3nl6orliz7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210520161554.tjfpfe2vl2x4zi5q>