Re: bioctl: sync usage with manual, simplify option list

2022-08-25 Thread Jason McIntyre
On Thu, Aug 25, 2022 at 09:19:09PM +, Klemens Nanni wrote: > -l takes chunks as per the manual, not specials. > > I also think that comma separated lists are marked up overly > confusing, so reduce it by one level, i.e. turn > -l chunk[,chunk[,...]]] > into > -l chunk[,...]] > > F

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Theo de Raadt
Klemens Nanni wrote: > On Thu, Aug 25, 2022 at 07:07:27PM +, Miod Vallat wrote: > > > Well, something tells me the inclusion of the manual pages for fdisk > > > and disklabel is deliberate. Makes some sense as these are complex > > > utilities and their interactive use is documented in those

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Theo de Raadt
Wow you have it so backwards. So we will have embedded manuals for the case we don't need need the embedded manual because you have manuals installed (type ^Z and run man) but in the systems where you don't have manual pages, you won't have the embedded manuals. Very logical to forget why this wa

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Theo de Raadt
I think you have this wrong. If someone is operating in the install media, and manually adjusting their disk, and they don't know the commands they need, where are they going to find the instructions? In 1997, we added the embedded manual pages to fdisk (inside the 'manual' command) and disklabe

Re: installboot: link dynamically

2022-08-25 Thread Theo de Raadt
Klemens Nanni wrote: > Dynamic installboot would be nice but I don't have strong opinoins about > it, so best drop the diff and retain the chance to repair your system. These are the static binaries: ./libexec/ld.so/ldconfig obvious why ./sbin/dhcpleased ./sbin/iked ./sbin/isakmpd ./sb

Re: Race in disk_attach_callback?

2022-08-25 Thread Klemens Nanni
On Thu, Aug 18, 2022 at 08:29:13AM +, Klemens Nanni wrote: > On Wed, Aug 17, 2022 at 07:03:50AM +, Miod Vallat wrote: > > > What is the result if root runs disklabel, and forces it to all zeros? > > > > If the root duid is all zeroes, then the only way to refer to the root > > disk is to u

signify: move (unused) variables under !VERIFYONLY

2022-08-25 Thread Klemens Nanni
See through ===> signify /usr/src/distrib/special/signify/../../../usr.bin/signify/signify.c:754:34: warning: variable 'seckeyfile' set but not used [-Wunused-but-set-variable] const char *pubkeyfile = NULL, *seckeyfile = NULL, *msgfile = NULL,

slaacd: move (unused) functions under !SMALL

2022-08-25 Thread Klemens Nanni
Seen when building with -Wunused-function ===> slaacd /usr/src/distrib/special/slaacd/../../../sbin/slaacd/engine.c:313:1: warning: unused function 'if_state_name' [-Wunused-function] if_state_name(enum if_state ifs) ^ /usr/src/distrib/special/slaacd/../../.

bioctl: sync usage with manual, simplify option list

2022-08-25 Thread Klemens Nanni
-l takes chunks as per the manual, not specials. I also think that comma separated lists are marked up overly confusing, so reduce it by one level, i.e. turn -l chunk[,chunk[,...]]] into -l chunk[,...]] Feedback? OK? Index: bioctl.8 ===

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Otto Moerbeek
On Thu, Aug 25, 2022 at 07:32:16PM +, Miod Vallat wrote: > > > The ability to be able to read the manual pages from the binaries > > > themselves, when running is interactive mode, is an intentional feature > > > and the reason they embed a gzipped version of the formatted manpage. > > > > Ev

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Miod Vallat
> > The ability to be able to read the manual pages from the binaries > > themselves, when running is interactive mode, is an intentional feature > > and the reason they embed a gzipped version of the formatted manpage. > > Even in the installer? Especially in the installer, because you might not

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Klemens Nanni
On Thu, Aug 25, 2022 at 07:07:27PM +, Miod Vallat wrote: > > Well, something tells me the inclusion of the manual pages for fdisk > > and disklabel is deliberate. Makes some sense as these are complex > > utilities and their interactive use is documented in those pages. > > The ability to be

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Miod Vallat
> Well, something tells me the inclusion of the manual pages for fdisk > and disklabel is deliberate. Makes some sense as these are complex > utilities and their interactive use is documented in those pages. The ability to be able to read the manual pages from the binaries themselves, when runnin

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Mark Kettenis
> Date: Thu, 25 Aug 2022 18:58:39 + > From: Klemens Nanni > > On Thu, Aug 25, 2022 at 06:36:55PM +, Klemens Nanni wrote: > > Turns out all install media ship full copies of those two manuals due to > > what can be described like a makefile TOCTOU. > > > > In /usr/src/distrib/special, Mak

Re: installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Klemens Nanni
On Thu, Aug 25, 2022 at 06:36:55PM +, Klemens Nanni wrote: > Turns out all install media ship full copies of those two manuals due to > what can be described like a makefile TOCTOU. > > In /usr/src/distrib/special, Makefile.inc sets NOMAN=1 but */Makefile > only includes it in the very end thr

Re: move PRU_RCVD request to (*pru_rcvd)()

2022-08-25 Thread Alexander Bluhm
On Tue, Aug 23, 2022 at 11:47:30AM +0300, Vitaliy Makkoveev wrote: > On Mon, Aug 22, 2022 at 11:08:07PM -0900, Philip Guenther wrote: > > Since pru_rcvd() is only invoked if the protocol has the PR_WANTRCVD flag > > set, there should be no need to test whether the callback is set: a > > protocol wi

installer: zap fdisk.8.gz and disklabel.8.gz

2022-08-25 Thread Klemens Nanni
Turns out all install media ship full copies of those two manuals due to what can be described like a makefile TOCTOU. In /usr/src/distrib/special, Makefile.inc sets NOMAN=1 but */Makefile only includes it in the very end through . fdisk and disklabel have NOMAN logic before that include, so they

acpihpet(4): use bus_space_{read,write}_8() where available

2022-08-25 Thread Scott Cheloha
The HPET is a 64-bit counter. The spec permits both 32-bit and 64-bit aligned access. We should use bus_space_read_8() in acpihpet_r() where it is available to improve the accuracy of acpihpet_delay(). The math is obvious: one read is faster than two. Switching acpihpet_w() to bus_space_read_wri

Re: installboot: link dynamically

2022-08-25 Thread Klemens Nanni
On Thu, Aug 25, 2022 at 12:16:56PM -0600, Theo de Raadt wrote: > This binary being static has nothing to do with "installer testing". > You've got that completely wrong. It has nothing to do with reacharounds > either, since instbin takes care of all that. Thanks. > > It has to do with people w

Re: installboot: link dynamically

2022-08-25 Thread Theo de Raadt
This binary being static has nothing to do with "installer testing". You've got that completely wrong. It has nothing to do with reacharounds either, since instbin takes care of all that. It has to do with people who may want to use it when their systems are broken in some way, to repair their sy

installboot: link dynamically

2022-08-25 Thread Klemens Nanni
Spotted through failed attempts to test libutil/opendev(3) changes with LD_LIBRARY_PATH. Regular installboot(8) has been linking statically since import in 2013, which probably stems from when early reach arounds of the installer to the installation's installboot binary. These days all architectu

Re: rpki-client: print info about encapsulated certs & PEM format in filemode

2022-08-25 Thread Theo Buehler
On Thu, Aug 25, 2022 at 05:06:33PM +, Job Snijders wrote: > On Thu, Aug 25, 2022 at 06:38:36PM +0200, Theo Buehler wrote: > > On Thu, Aug 25, 2022 at 04:04:27PM +, Job Snijders wrote: > > > On Thu, Aug 25, 2022 at 03:38:45PM +0200, Claudio Jeker wrote: > > > > I wonder why is PEM printing n

Re: rpki-client: print info about encapsulated certs & PEM format in filemode

2022-08-25 Thread Job Snijders
On Thu, Aug 25, 2022 at 06:38:36PM +0200, Theo Buehler wrote: > On Thu, Aug 25, 2022 at 04:04:27PM +, Job Snijders wrote: > > On Thu, Aug 25, 2022 at 03:38:45PM +0200, Claudio Jeker wrote: > > > I wonder why is PEM printing not part of -f? It seems to be something > > > that should be part of f

Re: rpki-client: print info about encapsulated certs & PEM format in filemode

2022-08-25 Thread Theo Buehler
On Thu, Aug 25, 2022 at 04:04:27PM +, Job Snijders wrote: > On Thu, Aug 25, 2022 at 03:38:45PM +0200, Claudio Jeker wrote: > > I wonder why is PEM printing not part of -f? It seems to be something > > that should be part of filemode. > > OK, how about this? That's a lot better. However X509_p

Re: rpki-client: print info about encapsulated certs & PEM format in filemode

2022-08-25 Thread Job Snijders
On Thu, Aug 25, 2022 at 03:38:45PM +0200, Claudio Jeker wrote: > I wonder why is PEM printing not part of -f? It seems to be something > that should be part of filemode. OK, how about this? Kind regards, Job Index: filemode.c === R

Re: bgplgd use memset and memcpy instead of bzero and bcopy

2022-08-25 Thread Theo Buehler
On Thu, Aug 25, 2022 at 05:31:55PM +0200, Claudio Jeker wrote: > The same change was done in bgpd and bgpctl. So here is bgplgd. > I replaced one bcopy() with memmove() since this is most probably an > overlapping memory move. Agreed, that looks like it could be overlapping. ok > > -- > :wq Cl

bgplgd use memset and memcpy instead of bzero and bcopy

2022-08-25 Thread Claudio Jeker
The same change was done in bgpd and bgpctl. So here is bgplgd. I replaced one bcopy() with memmove() since this is most probably an overlapping memory move. -- :wq Claudio Index: qs.c === RCS file: /cvs/src/usr.sbin/bgplgd/qs.c,v r

Re: rpki-client: add mode to print encapsulated certs/crls in human-readable & PEM format

2022-08-25 Thread Claudio Jeker
On Thu, Aug 25, 2022 at 01:25:24PM +, Job Snijders wrote: > Hi all, > > Thanks for taking the time to review & suggest improvements. I amended > the changeset based on your feedback. > > To summarize the changes: > > * to address sloppiness in command line option handling, make pemmode > m

Re: rpki-client: add mode to print encapsulated certs/crls in human-readable & PEM format

2022-08-25 Thread Job Snijders
Hi all, Thanks for taking the time to review & suggest improvements. I amended the changeset based on your feedback. To summarize the changes: * to address sloppiness in command line option handling, make pemmode mutually exclusive with filemode and specifying outformats * rename PEM printing

Re: libutil: opendev: require block/character devices

2022-08-25 Thread Todd C . Miller
On Thu, 25 Aug 2022 11:50:31 -, Klemens Nanni wrote: > And this should use the ternary operator, as this would still succeed > if path is a character device even though OPENDEV_BLCK was passed. Sure. OK millert@ - todd

Re: bgpd silence "connection from non-peer" unless verbose

2022-08-25 Thread Claudio Jeker
On Thu, Aug 25, 2022 at 01:48:50PM +0100, Stuart Henderson wrote: > On 2022/08/25 14:38, Claudio Jeker wrote: > > On Thu, Aug 25, 2022 at 09:23:01AM +0100, Stuart Henderson wrote: > > > On 2022/08/24 18:47, Denis Fondras wrote: > > > > Le Tue, Aug 23, 2022 at 06:28:12PM +0200, Claudio Jeker a écrit

Re: libutil: opendev: require block/character devices

2022-08-25 Thread Todd C . Miller
On Thu, 25 Aug 2022 05:36:53 -, Klemens Nanni wrote: > Ah yes, the failure check does not return early but falls through, so > all further logic needs to check fd and/or errno (like the isduid() case > already does). OK millert@ - todd

Re: bgpd silence "connection from non-peer" unless verbose

2022-08-25 Thread Stuart Henderson
On 2022/08/25 14:38, Claudio Jeker wrote: > On Thu, Aug 25, 2022 at 09:23:01AM +0100, Stuart Henderson wrote: > > On 2022/08/24 18:47, Denis Fondras wrote: > > > Le Tue, Aug 23, 2022 at 06:28:12PM +0200, Claudio Jeker a écrit : > > > > I noticed that the "connection from non-peer" message can fill

Re: bgpd silence "connection from non-peer" unless verbose

2022-08-25 Thread Claudio Jeker
On Thu, Aug 25, 2022 at 09:23:01AM +0100, Stuart Henderson wrote: > On 2022/08/24 18:47, Denis Fondras wrote: > > Le Tue, Aug 23, 2022 at 06:28:12PM +0200, Claudio Jeker a écrit : > > > I noticed that the "connection from non-peer" message can fill the log and > > > be so chatty that it is hard to

Re: libutil: opendev: require block/character devices

2022-08-25 Thread Klemens Nanni
On Thu, Aug 25, 2022 at 05:36:53AM +, Klemens Nanni wrote: > On Wed, Aug 24, 2022 at 08:02:03PM -0600, Todd C. Miller wrote: > > On Wed, 24 Aug 2022 20:06:00 -, Klemens Nanni wrote: > > > > > Feedback? Am I missing anything? > > > > If fstat(2) fails you should not try to access sb. Perh

Re: bgpd silence "connection from non-peer" unless verbose

2022-08-25 Thread Stuart Henderson
On 2022/08/24 18:47, Denis Fondras wrote: > Le Tue, Aug 23, 2022 at 06:28:12PM +0200, Claudio Jeker a écrit : > > I noticed that the "connection from non-peer" message can fill the log and > > be so chatty that it is hard to see the other messages. The system I see > > this on is a bit special sinc