ldomctl: reject vdisk, vnet and iodevice parameters for primary domain

2020-05-23 Thread Klemens Nanni
In analogy to guest domains requiring vcpu, memory and at least one bootable device (vdisk, vnet or iodevice), the primary domain must not be configured with vdisk, vnet or iodevice parameters; it does make sense to provide virtual disks or interfaces to it and PCIe devices not assigned to guest d

mountd: Remove dead *netent(3) code

2020-05-24 Thread Klemens Nanni
schwarze neutered the *netent(3) family as well as networks(5) in 2018, mountd(8) remains the only user of these functions in base. setnetent() and endnetent() are empty functions now, getnetent() always returns NULL unconditionally so the while loop is never entered, the entire if block is code t

Re: Provide ldomctl(8) better error messages when parsing ldom.conf

2020-05-25 Thread Klemens Nanni
On Mon, May 25, 2020 at 05:55:39PM +0200, Mark Kettenis wrote: > Including numbers is good! I feel, quite strongly, that lowercase > vcpu isn't right. So please use VCPU (or plural VCPUs) instead. I > also think that your proposal is a bit inconsistent regarding > and > "larger than". So: > >

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-26 Thread Klemens Nanni
On Tue, May 26, 2020 at 08:09:48AM -0600, Theo de Raadt wrote: > I'll let you know who has sparc64 machines to help out: > > kn was the developer who saw the problem. jca is also adept > enough to look at this with you. I worked with the patches from the wireguard-openbsd repository after version

Re: sparc64 boot issue on qemu

2020-05-31 Thread Klemens Nanni
On Sun, May 31, 2020 at 03:22:45PM +0200, Otto Moerbeek wrote: > On Sun, May 31, 2020 at 09:49:34AM +0100, Mark Cave-Ayland wrote: > > Thanks for the test case which enables me to reproduce the issue. With > > ?fcode-verbose > > enabled you see this at the end of the FCode execution: FWIW, on late

BIOCINSTALLBOOT/sparc64 installboot: EFBIG on too big boot loaders

2020-06-01 Thread Klemens Nanni
Installing an unstripped boot loader on softraid on sparc64 fails without proper error message. Make BIOCINSTALLBOOT return a proper errno, make installboot(8) use it to provide proper usage errors plus unique code paths for debugging. At first, I made sr_ioctl_installboot() use sr_error() in the

Re: bioctl: Allow passphrase files to be chmod 400

2020-06-01 Thread Klemens Nanni
On Mon, Jun 01, 2020 at 06:28:40PM -0400, Daniel Jakots wrote: > To be sure I don't accidentally overwrite the passphrase files, I'd > like to make them read only. The current code expects them to be > readable and writable. I took the new code from ssh (sshkey_perm_ok > function). Permissions only

top: Fill last character in process line

2020-06-03 Thread Klemens Nanni
i_process() prints process lines from the global buffer thisline[MAX_COLS] which is filed by format_next_process() using snprintf(3), i.e. it is guaranteed to be NUL terminated. display_width is always set to screen_width and capped to MAX_COLS-1 in display_resize(), so NUL terminating th

Re: top: Fill last character in process line

2020-06-03 Thread Klemens Nanni
On Wed, Jun 03, 2020 at 01:11:15PM +0200, Mark Kettenis wrote: > Does that write into the last column of a 80-character wide screen? > That causes a linewrap on some terminals isn't it? And that would be > undesirable. Yes, it does; xterm and st from the x11/st package have no problem however to

Re: top: Fill last character in process line

2020-06-03 Thread Klemens Nanni
On Wed, Jun 03, 2020 at 12:45:35PM +0100, Stuart Henderson wrote: > It should check terminal capabilities for this, see termcap(5). > If 'am' (auto-margin) is set then it shouldn't write to the final column. > If 'xn' is set then it's OK in some circumstances (it's probably easier to > skip writing

Re: top: Fill last character in process line

2020-06-03 Thread Klemens Nanni
On Wed, Jun 03, 2020 at 05:33:24PM +0100, Nicholas Marriott wrote: > Actually I've got them the wrong way round here, but others have already > explained them anyway :-). Yup, which is why I will simply drop the diff: way too much hassle for single column of output, let alone potential breakages o

Re: sparc64: bootblocks vs ofwboot load address

2020-06-05 Thread Klemens Nanni
On Fri, Jun 05, 2020 at 10:12:40AM +0200, Otto Moerbeek wrote: > Miod remarked the overwriting of the bootblocks actually is a > regression I introduced. So teintroduce the lost comment and load > ofwboot at 0x6000. OK kn

Re: BIOCINSTALLBOOT/sparc64 installboot: EFBIG on too big boot loaders

2020-06-05 Thread Klemens Nanni
On Mon, Jun 01, 2020 at 11:48:05PM +0200, Klemens Nanni wrote: > Installing an unstripped boot loader on softraid on sparc64 fails > without proper error message. > > Make BIOCINSTALLBOOT return a proper errno, make installboot(8) use it > to provide proper usage errors plus unique

Re: mountd: Remove dead *netent(3) code

2020-06-05 Thread Klemens Nanni
On Sun, May 24, 2020 at 03:17:31PM +0200, Klemens Nanni wrote: > schwarze neutered the *netent(3) family as well as networks(5) in 2018, > mountd(8) remains the only user of these functions in base. > > setnetent() and endnetent() are empty functions now, getnetent() always &g

biovar.h: Add missing include guard

2020-06-07 Thread Klemens Nanni
Building installboot(8) with multiple includes fails without this. OK? Index: dev/biovar.h === RCS file: /cvs/src/sys/dev/biovar.h,v retrieving revision 1.45 diff -u -p -r1.45 biovar.h --- dev/biovar.h14 Aug 2016 04:08:03

Re: BIOCINSTALLBOOT/sparc64 installboot: EFBIG on too big boot loaders

2020-06-07 Thread Klemens Nanni
On Sun, Jun 07, 2020 at 12:42:57AM +1000, Joel Sing wrote: > While this works, you would be better off making use of the error > reporting mechanism that exists. A compile tested only diff for > the kernel side is below. A diff to installboot would be needed to > graft some code similar to that in

Re: biovar.h: Add missing include guard

2020-06-07 Thread Klemens Nanni
On Sun, Jun 07, 2020 at 09:58:44AM -0600, Theo de Raadt wrote: > Bad naming. The correct protection is visible in others in the same > directory, most of them doing it better. > > audio_if.h:#ifndef _SYS_DEV_AUDIO_IF_H_ > ipmi.h:#ifndef _IPMI_H_ > ipmivar.h:#ifndef _IPMIVAR_H_ > midi_if.h:#ifndef

Re: biovar.h: Add missing include guard

2020-06-07 Thread Klemens Nanni
On Sun, Jun 07, 2020 at 10:31:31AM -0600, Theo de Raadt wrote: > No. > > "So at minimum, the leading _"... Does "_SYS_DEV_BIOVAR_H_" not contain a leading underscore? What am I missing?

Re: BIOCINSTALLBOOT/sparc64 installboot: EFBIG on too big boot loaders

2020-06-07 Thread Klemens Nanni
On Sun, Jun 07, 2020 at 03:24:30PM +0200, Klemens Nanni wrote: > On Sun, Jun 07, 2020 at 12:42:57AM +1000, Joel Sing wrote: > > While this works, you would be better off making use of the error > > reporting mechanism that exists. A compile tested only diff for > > the kernel

sparc64: ofwboot: load CTF section to enable ddb's "show struct"

2020-06-12 Thread Klemens Nanni
DDB's "show struct" on sparc64 does not work because the boot loader does not load the kernel's ELF section ".SUNW_ctf". Adapt ofwboot to do so just like libsa already does on other platforms (such as amd64) and therefore enable DDB utilise CTF information. I needed this back when the earlier w

Re: sparc64: ofwboot: load CTF section to enable ddb's "show struct"

2020-06-12 Thread Klemens Nanni
On Sat, Jun 13, 2020 at 12:11:13AM +0200, Mark Kettenis wrote: > (there are some style issues with this code, but they are present in > the libsa version as well) Yup, various things are slightly different, but I just sticked to what's in ofwboot/elf64_exec.c already; adjusting one for consistency

Re: Good CoreBoot system?

2020-06-13 Thread Klemens Nanni
On Sat, Jun 13, 2020 at 01:27:00PM -0700, jo...@armadilloaerospace.com wrote: > What would be a good system with CoreBoot to get for OpenBSD testing? > > It looks like there are some edge cases where the CoreBoot framebuffer > support won't behave the same as the EFI framebuffer. Lots of ThinkPads

Re: ldpd engine process exits with pledge "cpath"

2020-06-19 Thread Klemens Nanni
On Fri, Jun 19, 2020 at 11:19:24PM +0100, Ricardo Mestre wrote: > this is getting in my nerves, I made a wrong assumption here and I > prefer to commit this than backout my previous commit so I'm asking for > commits for the below. Wasn't there another daemon as well that stopped unlinking the sock

ldomctl: Fix init-system with multiple PCIe root complexes

2020-06-19 Thread Klemens Nanni
Opposed to all other (single CPU) machines I have encountered so far, the T4-2 has two instead of one PCIe root complexes. ldomctl already accounts for this and iterates over them but lacks a simple skip condition when iterating over subdevices to avoid linking devices in one root complex to those

Re: sample unbound.conf tweak

2020-06-21 Thread Klemens Nanni
On Sun, Jun 21, 2020 at 04:47:22PM +0100, Stuart Henderson wrote: > An "uncomment" was left in when we reenabled dnssec by default, > and it seems a bit pointless to say "comment out to disable". ok? Reads better, yes. > Index: unbound.conf > =

mailwrapper: hostsat and purgestat symlinks

2020-06-21 Thread Klemens Nanni
Doing "*stat " in my shell I came across those two entries under /usr/bin/ which are undocumented: $ man -k any~'^(host|purge)stat$' man: nothing appropriate /etc/mailer.conf has no entries for them but mailer.conf(5)' EXAMPLES section demonstrates using them with the mail/sendmai

systat.1: document "s" command

2020-06-21 Thread Klemens Nanni
Feedback? OK? Index: systat.1 === RCS file: /cvs/src/usr.bin/systat/systat.1,v retrieving revision 1.117 diff -u -p -r1.117 systat.1 --- systat.123 Apr 2020 07:57:27 - 1.117 +++ systat.122 Jun 2020 03:53:15 - @@ -

systat.1: Trim ":" description, support line kill character

2020-06-21 Thread Klemens Nanni
The manual's wording is untouched since import in 1995, engine.c however came to be in 2008 as "New display engine for systat" from canacar. While characte erase (^h) works, word erase (^w) is not implemented and line kill (^u) is supported but as ^g instead. I see no value in documenting this ei

systat.1: Remove ^z mention

2020-06-21 Thread Klemens Nanni
Suspending systat with ^Z is done by the shell iff job control is enabled, not systat itself. Try `set +m' to disable job control or start systat in a terminal without a shell, e.g. `xterm -e systat', to confirm that ^z does nothing in these cases. Feedback? OK? Index: systat.1

Re: systat.1: Remove ^z mention

2020-06-22 Thread Klemens Nanni
On Mon, Jun 22, 2020 at 07:22:24AM +0100, Jason McIntyre wrote: > i guess the diff is correct, but removes what might be a handy reminder. It makes assumptions about the environment in which systat was started and it is wrong/misleading in some cases. > i'm fine with this bit of doc remaining or b

Re: systat.1: Trim ":" description, support line kill character

2020-06-22 Thread Klemens Nanni
On Mon, Jun 22, 2020 at 07:13:30AM +0100, Jason McIntyre wrote: > how will people be able to find this if we don;t document it? from a > brief skim of docs which may hold answers, i still can;t find where > these values are documented. Fair point, I removed them because they imply that systat honou

Re: systat.1: Trim ":" description, support line kill character

2020-06-22 Thread Klemens Nanni
On Mon, Jun 22, 2020 at 06:33:30PM -0600, Theo de Raadt wrote: > > +character erase (^H) and line kill (^U) characters > > ^H is wrong How so? It is currently hardcoded as such in engine.c:cmd_keyboard(): 1188 switch (ch) { 1189 case KEY_ENTER: 1190 case 0x0a: 1191

Re: systat.1: Trim ":" description, support line kill character

2020-06-23 Thread Klemens Nanni
On Mon, Jun 22, 2020 at 08:57:43PM -0600, Theo de Raadt wrote: > In OpenBSD, the erase character is ^? > > ^H is accepted in a few places, like here (because of CTRL_H) but > it is absolutely not the canonical tty 'character erase' character, > which is implied in your text by placing it next to k

top: remove redundant NULL check

2020-06-23 Thread Klemens Nanni
I'd like to remove a NULL check in get_process_info() for the sake of simplicity and to reflect that the process list is *always* sorted (default is "cpu"), even if not explicitly requested; this makes it easier to argue about the code, imho. Details on why this check is never true: get_process_

top.1: Fix COMMAND description

2020-06-23 Thread Klemens Nanni
There simply is no code that adds angle brackets the swapped out processes in the COMMAND column. I double checked with a tiny VMM instance using 64M of RAM where ld(1) from the library_aslr script immediately hits swap: no <> around. While here, mention that -C appends arguments. Feedback? OK?

Re: top.1: Fix COMMAND description

2020-06-23 Thread Klemens Nanni
On Tue, Jun 23, 2020 at 09:42:06PM +0200, Klemens Nanni wrote: > There simply is no code that adds angle brackets the swapped out > processes in the COMMAND column. > > I double checked with a tiny VMM instance using 64M of RAM where > ld(1) from the library_aslr script immediatel

top: Remove unused handle member

2020-06-25 Thread Klemens Nanni
The number of "remaining" processes in the handle struct is not used at all, it is is only ever set or decremented. As far as I can tell from CVS logs, this has been the case since machine.c revision 1.1 date: 1997/08/14 14:00:22; author: downsj; state: Exp; top 3.4, wit

top: remove handle abstraction, use simpler process list

2020-06-26 Thread Klemens Nanni
The internal handle used to pass process information is a needless abstraction, after previously removing an unused member, it now only has one member pointing to a pointer to a process struct, i.e. a simple list of processes. Remove the abstraction layer and (re)use the existing list of (pointers

top: remove duplicate initialisation

2020-06-26 Thread Klemens Nanni
Those are global variables are (zero) initialised as such already and machine_init() is called only once upon startup. Feedback? OK? Index: machine.c === RCS file: /cvs/src/usr.bin/top/machine.c,v retrieving revision 1.105 diff -u -

Re: top: remove duplicate initialisation

2020-06-26 Thread Klemens Nanni
On Fri, Jun 26, 2020 at 11:07:54PM +0300, Vitaliy Makkoveev wrote: > What about “pageshift = 0;” at usr.bin/top/machine.c:216 ? Could be removed as well but I left it in there intentionally to keep this block of code readable since pageshift is not only set but used immediately afterwards as well.

top: add missing scroll keys to help page, name default signal

2020-06-26 Thread Klemens Nanni
The order of commands is not in sync between help page and manual, but I refrained from reordering to avoid churn. OK? NB: On a 80x24 xterm, the help page is already using the last line, hiding all of the "Hit any key to continue: " prompt except its first five characters which land on the last `

Re: awk FS behaviour change

2020-06-26 Thread Klemens Nanni
On Fri, Jun 26, 2020 at 03:41:21PM -0600, Todd C. Miller wrote: > The awk manual leaves a lot of things unspecified (buy the book ;-). > Does this addition help clear things up? Yes. > Index: awk.1 > === > RCS file: /cvs/src/usr.bin/

Re: awk FS behaviour change

2020-06-27 Thread Klemens Nanni
On Sat, Jun 27, 2020 at 06:32:11AM -0600, Todd C. Miller wrote: > I wasn't sure that was an improvement either. Does this seem better? To me it does, thanks. OK kn > Index: usr.bin/awk/awk.1 > === > RCS file: /cvs/src/usr.bin/awk/aw

Re: ldomctl: Fix init-system with multiple PCIe root complexes

2020-06-27 Thread Klemens Nanni
On Sat, Jun 20, 2020 at 01:05:22AM +0200, Klemens Nanni wrote: > Opposed to all other (single CPU) machines I have encountered so far, > the T4-2 has two instead of one PCIe root complexes. > > ldomctl already accounts for this and iterates over them but lacks a > simple skip

sparc64.html: Mention T4-2 crashes on older firmware

2020-06-28 Thread Klemens Nanni
As Koakuma confirmed on bugs@, their machine exhibited strange behaviour with such outdated firmware while at least the latest version runs fine as expected. I'd like to mention this in the FAQ. Feedack? OK? Index: sparc64.html =

Re: sparc64.html: Mention T4-2 crashes on older firmware

2020-06-28 Thread Klemens Nanni
On Sun, Jun 28, 2020 at 12:59:10PM +0200, Mark Kettenis wrote: > Would be nice if we could give a hint about the firmware revisions > that are known to work. https://www.oracle.com/servers/technologies/firmware/release-history-jsp.html#T4-2 SysFW 8.9.11 from 10.01.2019 produces the following versi

Re: route add ::/0 ...

2020-06-29 Thread Klemens Nanni
On Mon, Jun 29, 2020 at 11:55:10PM +0900, YASUOKA Masahiko wrote: > The function mask_addr() doesn't mask address for IPv4 and IPv6. Does > any address family other than IPv4 or IPv6 require #1142:1148? The > function seems to just trim the trailing zero. Is it neccesaary? And > it causes the c

Re: ifconfig(8) add bpe(4)

2021-04-11 Thread Klemens Nanni
On Sun, Apr 11, 2021 at 04:48:40PM +0200, Marcus MERIGHI wrote: > the description of bpe(4) is missing from ifconfig(8). > my attempt with what I could gather from bpe(4) below. Thanks, that reads OK to me; I'll commit in a few days latest unless there's further feedback.

Re: ifconfig(8) add bpe(4)

2021-04-11 Thread Klemens Nanni
On Sun, Apr 11, 2021 at 03:56:35PM +0100, Jason McIntyre wrote: > the sections are ordered alphabetically, so it should go first, > immediately before BRIDGE. > > except for that, it reads fine to me. Committed with proper sort order, thanks.

ld.so: NULL dereference on corrupt library

2021-04-14 Thread Klemens Nanni
A bogus libvorbisenc.so.3.1 causes ld.so(1) to crash on my Pinebook Pro which saw a few NVMe/power related panics: $ ogg123 song62.ogg Segmentation fault (core dumped) $ egdb -q ogg123 ogg123.core Reading symbols from ogg123...(no debugging

Re: nicer rpki-client -V output

2021-04-15 Thread Klemens Nanni
On Thu, Apr 15, 2021 at 11:13:07AM +0200, Claudio Jeker wrote: > Lets print the version string a bit nicer. > Instead of > rpki-client: version: 7.0 > print > rpki-client 7.0 OK kn

Re: nicer rpki-client -V output

2021-04-15 Thread Klemens Nanni
On Thu, Apr 15, 2021 at 11:13:07AM +0200, Claudio Jeker wrote: > Lets print the version string a bit nicer. > Instead of > rpki-client: version: 7.0 > print > rpki-client 7.0 > > OK? > -- > :wq Claudio > > Index: main.c > ==

Re: cwm: keep pointer within window on maximize/fullscreen toggle

2021-04-21 Thread Klemens Nanni
On Thu, Apr 08, 2021 at 03:35:33AM +0200, Klemens Nanni wrote: > This scratch has been itching me for far too long and concerns the > funcionality behind those cwm(1) default bindings: > >CM-fToggle full-screen mode of current window. >CM-m

Re: ld.so: NULL dereference on corrupt library

2021-05-04 Thread Klemens Nanni
On Thu, Apr 15, 2021 at 03:05:45PM +0200, Mark Kettenis wrote: > > Date: Thu, 15 Apr 2021 14:20:00 +0200 > > From: Martin Pieuchot > > Content-Type: text/plain; charset=utf-8 > > Content-Disposition: inline > > > > On 14/04/21(Wed) 18:33, Klemens Nanni wrot

Re: ld.so: NULL dereference on corrupt library

2021-05-09 Thread Klemens Nanni
On Wed, May 05, 2021 at 02:20:45PM -0900, Philip Guenther wrote: > IMHO, the benefit of adding this check is almost zero: it gives a slightly > better experience for a small set of possible data corruption cases, when > similar corruptions that affect other pages aren't helped at all as it'll > cra

Re: mpe.4: properly refer to ioctl(2)

2021-05-14 Thread Klemens Nanni
My bad; fixed, thanks. On Fri, May 14, 2021 at 12:07:14PM +0200, Caspar Schutijser wrote: > Index: mpe.4 > === > RCS file: /cvs/src/share/man/man4/mpe.4,v > retrieving revision 1.11 > diff -u -p -r1.11 mpe.4 > --- mpe.4 18 Mar 20

ld.so: program headers: do not rely on DYNAMIC coming before GNU_RELRO

2021-05-24 Thread Klemens Nanni
When tinkering with ld.so crashes due to file corruption the other day I tested a few changes but did not want to replace /usr/libexec/ld.so and since recompiling executable to change their interpreter is not always an option, I went for https://github.com/NixOS/patchelf which allows me to manipula

Re: ld.so: program headers: do not rely on DYNAMIC coming before GNU_RELRO

2021-05-25 Thread Klemens Nanni
On Tue, May 25, 2021 at 12:00:21AM -0900, Philip Guenther wrote: > On Mon, May 24, 2021 at 4:59 AM Klemens Nanni wrote: > > > When tinkering with ld.so crashes due to file corruption the other day > > I tested a few changes but did not want to replace /usr/libexec/ld.so > &g

Re: mandoc: -Tlint: search /usr/local/man as well

2021-05-28 Thread Klemens Nanni
On Sat, May 15, 2021 at 10:23:31PM +0200, Ingo Schwarze wrote: > Hi Klemens, > > Klemens Nanni wrote on Mon, Apr 05, 2021 at 09:33:13PM +0200: > > On Mon, Apr 05, 2021 at 06:47:58PM +0200, Ingo Schwarze wrote: > >> Klemens Nanni wrote on Sun, Apr 04, 2021 at 03:54:43PM +02

Re: Match ps pledge name order with pledge(2)

2021-06-09 Thread Klemens Nanni
On Wed, Jun 09, 2021 at 10:42:06AM -0400, Josh Rickmar wrote: > I was surprised to find that ps -O pledge did not list the pledge > promise names in the same order as the pledge(2) manpage. Besides > lacking consistency, this was also making it difficult to quickly find > which promises are not gr

tls_load_file.3: tls_config_set_*_file() load files into memory

2021-06-10 Thread Klemens Nanni
tls_config_set_ca_file(3) and tls_config_set_cert_file(3) do not just set the file paths (like tls_config_set_ca_path(3) does), they do load the given file into memory directly using tls_config_load_file(). This distinction is important because it means a later tls_connect(3) will not do any file

Re: cwm: Exclude ignored windows from search menu

2021-06-12 Thread Klemens Nanni
On Sat, Jun 12, 2021 at 10:41:05PM +0200, Leon Fischer wrote: > There is no use in listing ignored windows, which are generally used as > for "status bars", in the window search menu (M-slash). It clutters up > the menu with persistent windows that the user would very rarely want > to focus. `M-/f

Re: tls_load_file.3: tls_config_set_*_file() load files into memory

2021-06-19 Thread Klemens Nanni
On Thu, Jun 10, 2021 at 10:26:15PM +, Klemens Nanni wrote: > tls_config_set_ca_file(3) and tls_config_set_cert_file(3) do not just > set the file paths (like tls_config_set_ca_path(3) does), they do load > the given file into memory directly using tls_config_load_file(). > > T

Re: tls_load_file.3: tls_config_set_*_file() load files into memory

2021-06-21 Thread Klemens Nanni
On Sun, Jun 20, 2021 at 09:32:36PM +0200, Theo Buehler wrote: > On Sat, Jun 19, 2021 at 03:34:39PM +0000, Klemens Nanni wrote: > > On Thu, Jun 10, 2021 at 10:26:15PM +, Klemens Nanni wrote: > > > tls_config_set_ca_file(3) and tls_config_set_cert_file(3) do not just > &

Re: tls_load_file.3: tls_config_set_*_file() load files into memory

2021-06-22 Thread Klemens Nanni
On Tue, Jun 22, 2021 at 06:35:44AM +0100, Jason McIntyre wrote: > > -sets the files from which the public certificate, and private key will be > > read. > > +loads two files from which the public certificate, and private key will be > > read. > > this is a weird place for a comma. i would remove

Re: tset(1): reduce usage()

2021-06-22 Thread Klemens Nanni
On Tue, Jun 22, 2021 at 01:47:13PM +0100, Jason McIntyre wrote: > after: > > $ /usr/obj/usr.bin/tset/tset -Z > tset: unknown option -- Z > usage: tset [-cIQqrsVw] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal] OK kn

Re: tset(1): reduce usage()

2021-06-22 Thread Klemens Nanni
On Tue, Jun 22, 2021 at 03:57:08PM +0100, Jason McIntyre wrote: > On Tue, Jun 22, 2021 at 02:19:32PM +0000, Klemens Nanni wrote: > > On Tue, Jun 22, 2021 at 01:47:13PM +0100, Jason McIntyre wrote: > > > after: > > > > > > $ /usr/obj/usr.bin/tset/tset -Z > &g

Re: tset(1): reduce usage()

2021-06-22 Thread Klemens Nanni
On Tue, Jun 22, 2021 at 05:52:34PM +0200, Theo Buehler wrote: > I think we should pull the assignment up. Our execve(2) guarantees that > argc >= 1, so it's safe to do *argv. We need to do this before calling > the internal err() the first time as that uses _nc_progname() internally. Even better, O

Re: mandoc style warning about text lines > 80 bytes

2021-06-27 Thread Klemens Nanni
On Sat, Jun 26, 2021 at 08:06:58PM +0200, Theo Buehler wrote: > On Sat, Jun 26, 2021 at 07:20:52PM +0200, Ingo Schwarze wrote: > > Hi Jason and Theo, > > > > Jason McIntyre wrote on Tue, Jun 22, 2021 at 06:37:27AM +0100: > > > On Tue, Jun 22, 2021 at 04:48:39AM +0200, Theo Buehler wrote: > > > >

Re: btrace kstack userland

2021-06-27 Thread Klemens Nanni
On Sat, Jun 26, 2021 at 01:17:33PM +0200, Alexander Bluhm wrote: > Hi, > > I would like to show the time spent in userland also when analyzing > kernel stack in flame graph. Here are examples when building a bsd > kernel on a 4 core machine. > > kernel only > http://bluhm.genua.de/perform/result

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Klemens Nanni
On Sat, Jun 12, 2021 at 11:54:58PM -0700, Greg Steuck wrote: > I started with a failing test for Haskell network package on 6.9-current amd64 > (cabal get network-3.1.2.1 && cabal v2-test) > > network-3.1.2.1/build/spec/spec --match > "/Network.Socket.ByteString/recvMsg/works well/" > > tests/

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Klemens Nanni
On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > I think this points out that diff wasn't quite right. I mean, > changing the man page doesn't fix the Haskell test does it? Of course it doesn't fix the test but it documents the status quo so kernel and test hackers can actually us

Re: recvmsg returns MSG_DONTWAIT

2021-06-27 Thread Klemens Nanni
On Sun, Jun 27, 2021 at 01:25:34PM -0600, Todd C. Miller wrote: > On Sun, 27 Jun 2021 15:59:48 -0000, Klemens Nanni wrote: > > > On Sun, Jun 27, 2021 at 05:28:09PM +0200, Mark Kettenis wrote: > > > I think this points out that diff wasn't quite right. I mean, > >

Re: tcpdump: print 802.11 sequence numbers properly

2021-06-28 Thread Klemens Nanni
On Mon, Jun 28, 2021 at 11:46:37AM +0200, Stefan Sperling wrote: > tcpdump -e -v -y IEEE802_11_RADIO currently prints sequence number > and fragment number as a combined decimal value. > > This patch makes tcpdump display these values separately which is a lot > easier to follow along as packets s

Re: log reason when a packet causes pf to add an IP to a table ?

2021-06-28 Thread Klemens Nanni
On Mon, Jun 28, 2021 at 06:38:21PM +0200, Matthieu Herrb wrote: > I have rules like this one on the firewalls I manage: > > pass in on $in_if proto tcp from any to port ssh \ > flags S/SA keep state \ > (source-track rule, max-src-states 30, max-src-conn 20, \ > max-src-conn

Re: Correct minor lie in re_format(7)

2021-07-06 Thread Klemens Nanni
On Tue, Jul 06, 2021 at 11:01:06AM +0200, Martijn van Duren wrote: > There are equivalents for '+' and '?' in BRE. OK kn

Re: spamd(8) use tls_config_set_{cert,key}_file instead of relying on tls_load_file(3)

2021-07-06 Thread Klemens Nanni
On Wed, Jun 30, 2021 at 01:11:38PM +0100, Ricardo Mestre wrote: > Hi, > > I may have seen it elsewhere, or probably not, but after checking on kn's > commit > to tls_load_file(3) it seems it's now possible to set the ca/cert/key directly > without having to load them first from disk and set them

Re: spamd(8) use tls_config_set_{cert,key}_file instead of relying on tls_load_file(3)

2021-07-06 Thread Klemens Nanni
On Tue, Jul 06, 2021 at 02:37:34PM +0100, Ricardo Mestre wrote: > You got the order wrong on my diff :) > > Before, the certs were loaded by root in memory and then set by _spamd, with > my > diff they are still loaded by root but now also set, everything else > still has the same order so it sho

Re: /etc/ssl/cert.pem doesn't need to be unveiled on ntpd(8)

2021-07-08 Thread Klemens Nanni
On Thu, Jul 08, 2021 at 08:43:30AM +0100, Ricardo Mestre wrote: > /etc/ssl/cert.pem is loaded into mem with tls_load_file(3) on local function > priv_constraint_child() which is called before we reach the code below, > therefore we don't need to unveil(2) it nor having pledge(2) "rpath". OK kn

ntpd: Remove -sS compat

2021-07-12 Thread Klemens Nanni
deraadt neutered these options in november 2019, I'd say it's time to remove them so the next release won't have it. Feedback? Objections? OK? diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 134073117cb..1349234f66a 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1

Re: /etc/ssl/cert.pem doesn't need to be unveiled on ntpd(8)

2021-07-16 Thread Klemens Nanni
On Thu, Jul 08, 2021 at 02:12:37PM +0100, Ricardo Mestre wrote: > my eyes may be tricking me, but it looks like the main proc doesn't speak with > sockets during the main loop and setpriority plus privdrop at this point are > all > set and done so pledge("inet id") are not required. > > I have it

fstat: remove setpassent leftovers

2021-07-16 Thread Klemens Nanni
Should've gone with revision 1.95 date: 2018/09/16 02:44:06; author: millert; state: Exp; lines: +10 -5; Use uid_from_user(3) and gid_from_group(3) in utilities that do repeated lookups. OK tb@ OK? Index: fstat.c =

Re: Mark ICMP code optional in pf.conf.5

2021-07-19 Thread Klemens Nanni
On Mon, Jul 19, 2021 at 03:15:37PM +0200, Martin Vahlensieck wrote: > The code part for icmp{,6}-type is optional. Below is a diff marking > it as such. Should the text be changed as well? The text reads fine as is, no need to repeat that they're optional when the brackets make it clear already.

unwind.conf.5: REFUSED, stub and block

2021-07-24 Thread Klemens Nanni
Three small unrelated things but one mail since its easier: 1. the DNS code is REFUSED not refused 2. `stub' learns from SLAAC not just DHCP 3. The `block' example's wording reads like it blocks clients due to the preposition; also, use "domain" like the `block list file [log]' text says.

Re: ntpd: Remove -sS compat

2021-07-24 Thread Klemens Nanni
On Mon, Jul 12, 2021 at 09:08:59PM +, Klemens Nanni wrote: > deraadt neutered these options in november 2019, I'd say it's time to > remove them so the next release won't have it. > > Feedback? Objections? OK? Ping. ntpd(8) obviously doesn't document

Re: ntpd: Remove -sS compat

2021-07-24 Thread Klemens Nanni
On Sat, Jul 24, 2021 at 01:58:49PM -0600, Theo de Raadt wrote: > It is way too early to cause that problem. Couple more years I think. Alright. *sets timer*

Re: pf icmp reflect

2021-07-26 Thread Klemens Nanni
On Mon, Jul 26, 2021 at 06:41:42PM +0200, Alexander Bluhm wrote: > The mbuf header cleanup I added in revision 1.173 of ip_icmp.c is > too strict. ICMP error packets generated by pf are not passed > immediately, but may be blocked. Preserve PF_TAG_GENERATED flag > in icmp_reflect() and icmp6_refl

ftp.1: -o and multiple files

2021-07-28 Thread Klemens Nanni
With the current wording, I'd either expect usage error when passing `-o output' or more wording explaining the behaviour when fetching multiple files. Usage error seems wrong since our synopsis explicitly allows it, but writing the contents behind multiple URLs into the same file, while truncatin

Re: ftp.1: -o and multiple files

2021-07-28 Thread Klemens Nanni
On Wed, Jul 28, 2021 at 10:33:05AM -0600, Theo de Raadt wrote: > Klemens Nanni wrote: > > > With the current wording, I'd either expect usage error when passing > > `-o output' or more wording explaining the behaviour when fetching > > multiple files. > >

Re: pf.conf(5) about queueing may be wrong

2021-08-23 Thread Klemens Nanni
On Mon, Aug 23, 2021 at 07:03:45PM +0200, Solene Rapenne wrote: > pf.conf says this in QUEUEING > https://man.openbsd.org/pf.conf#QUEUEING > > > If the referenced queue does not exist on the outgoing interface, > > the default queue for that interface is used. This text is outdated, pfctl gained

sys: create tags links (for netinet6)

2021-08-27 Thread Klemens Nanni
`make tags' generates per-arch tag files but nothing seems to call the "links" target which actually points to besaid tag file from the various subdirectories, i.e. editors in sys/kern/netinet6/ wouldn't be able to use tags out of the box. Of course, the directory I was hacking in was somehow miss

Re: [patch] traceroute timeouts

2021-08-28 Thread Klemens Nanni
On Sat, Aug 28, 2021 at 09:57:23AM +0100, Stuart Henderson wrote: > OK? Late to the party but I agree with this. OK kn > Index: traceroute.8 > === > RCS file: /cvs/src/usr.sbin/traceroute/traceroute.8,v > retrieving revision 1.69 > d

Re: [Patch] Document /upgrade.site in sysupgrade(8) man page

2021-08-28 Thread Klemens Nanni
On Sat, Aug 28, 2021 at 10:44:48AM -0500, Aaron Poffenberger wrote: > Based on conversations in another thread, here's a patch documenting > use of /upgrade.site in the sysupgrade(8) man page. > > The revised doc references /upgrade.site and includes examples for > updating packages from Sebastien

Re: netstart debugging

2021-08-29 Thread Klemens Nanni
On Sun, Aug 29, 2021 at 03:24:26PM +0200, Alexander Bluhm wrote: > Not much feedback for my netstart rdomain diff. So let's split it > up and improve dubgging first. > > - enable debugging in ifcreate > - add debugging output for ipv6 routes > - make locahost and multicast code aware of print onl

acpibtn.4: Mention sleep putton, lid status and machdep.{lid,pwr}action

2021-08-31 Thread Klemens Nanni
landry added the sensor back in 2013 and suspend via sleep button also works (at least on ThinkPads). machdep.*action are super useful and I dislike grepping /etc/examples/ for to read about them. acpibtn(4) is the most prominent driver supporting, so documenting them there seems fine and finally

Re: netstart routing domain loopback

2021-09-01 Thread Klemens Nanni
On Wed, Sep 01, 2021 at 11:37:10PM +0200, Alexander Bluhm wrote: > On Wed, Aug 18, 2021 at 04:28:13PM +0200, Alexander Bluhm wrote: > > I want to create an enc1 interface for routing domain 1 and set > > additional addresses on lo1. So my net config looks like this. > > > > ==> /etc/hostname.enc1

Re: acpibtn.4: Mention sleep putton, lid status and machdep.{lid,pwr}action

2021-09-02 Thread Klemens Nanni
On Wed, Sep 01, 2021 at 07:12:54AM +0100, Jason McIntyre wrote: > hi. i think this is a good change - it makes the page more helpful. > i have only one tweak, inline: Thanks. I'll wait a bit but commit eventually unless someone has more feedback/objection. > > +The lid status is set up as sensor

new gpioleds driver

2021-09-03 Thread Klemens Nanni
SEE ALSO +.Xr gpio 4 , +.Xr intro 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox 7.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Klemens Nanni Aq Mt k...@openbsd.org . blob - 3e6591124cad872771cd68599761c26981d185d8 blob + d3c3afb621f20013dc2475b4d87bd959e4127c9d --- sy

Re: new gpioleds driver

2021-09-03 Thread Klemens Nanni
On Fri, Sep 03, 2021 at 01:14:04PM -0700, Tomasz Bielecki wrote: > Just a quick confirmation that this works fine. I'm running -current > with a bunch of local patches to get the fb console, reset and power > off working on Pinebook Pro and with patched u-boot 2021.10-rc1 this > makes the led turn

new gpiocharger driver

2021-09-04 Thread Klemens Nanni
+ 12aa353d9367f57f07a89ae30dc3966c373032f8 (mode 644) --- /dev/null +++ share/man/man4/gpiocharger.4 @@ -0,0 +1,51 @@ +.\"$OpenBSD: $ +.\" +.\" Copyright (c) 2021 Klemens Nanni +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose

<    2   3   4   5   6   7   8   9   10   11   >