Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Bryan Steele
On Wed, Mar 23, 2022 at 04:27:40AM +, Alexis wrote: > Indeed I understood both octboot and vmm seabios/uefi initialazation process. > > But has its done with kexec and linuxboot coreboot payload octboot could be > ported to act in the same way. Explaining now again for the 3rd time, to >

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Mike Larkin
On Wed, Mar 23, 2022 at 04:27:40AM +, Alexis wrote: > Indeed I understood both octboot and vmm seabios/uefi initialazation process. > > But has its done with kexec and linuxboot coreboot payload octboot could be > ported to act in the same way. Explaining now again for the 3rd time, to >

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Philip Guenther
On Tue, Mar 22, 2022 at 6:04 PM Alexis wrote: > > english is not my native language my point is octboot good be used to > make openbsd the bootloader on vmm therefore no need to maintaine other > upstream stacks, therefore avoiding duplication and reducing atack surface > like it was done on that

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Mike Larkin
On Wed, Mar 23, 2022 at 12:58:41AM +, Alexis wrote: > Have vmm/vmd core developers ever thought of using octboot has a way to u > se openbsd has a bootloader to avoid stack duplication, and attached atack > surface reduction. Avoiding to maintain 2 stacks, seabios/uefi and host > vm, could be

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Theo de Raadt
Alexis wrote: > That is the beauty of it. > With octboot(4) only 1 would be necessary Don't be stupid.

Re: VMM avoid duplication and reduce atack surface with octboot(4)

2022-03-22 Thread Theo de Raadt
Alexis wrote: > Have vmm/vmd core developers ever thought of using octboot has a way to u > se openbsd has a bootloader to avoid stack duplication, and attached atack > surface reduction. Avoiding to maintain 2 stacks, seabios/uefi and host > vm, could be a simple way to improve vmm for HVM or

Re: riscv64: chatty SIGILL printf

2022-03-22 Thread Theo de Raadt
Yes, it should be silent. Old debugging code obviously. Jeremie Courreges-Anglas wrote: > Just like breakpoints, SIGILL shouldn't print anything. FWIW this seems > to only happen once in a ports bulk build. > > ok? > > > Index: trap.c >

riscv64: chatty SIGILL printf

2022-03-22 Thread Jeremie Courreges-Anglas
Just like breakpoints, SIGILL shouldn't print anything. FWIW this seems to only happen once in a ports bulk build. ok? Index: trap.c === RCS file: /home/cvs/src/sys/arch/riscv64/riscv64/trap.c,v retrieving revision 1.17 diff -u

setclasscontext: support LOGIN_SETRTABLE too

2022-03-22 Thread Todd C . Miller
I think it makes sense to accept LOGIN_SETRTABLE for setclasscontext(3) as well. Currently, it will be cleared out of the flags. - todd Index: lib/libc/gen/login_cap.3 === RCS file: /cvs/src/lib/libc/gen/login_cap.3,v retrieving

Re: introduce pfioctl_rw

2022-03-22 Thread Alexander Bluhm
On Mon, Mar 21, 2022 at 11:48:48PM +0100, Alexandr Nedvedicky wrote: > OK? I did a regress run with witness. OK bluhm@ > 8<---8<---8<--8< > diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c > index dbbc79c0a0e..329284ce6a6 100644 > ---

Re: rip sbappendaddr() with inpcb table mutex

2022-03-22 Thread Claudio Jeker
On Tue, Mar 22, 2022 at 06:35:47PM +0100, Alexander Bluhm wrote: > On Tue, Mar 22, 2022 at 04:42:45PM +0100, Claudio Jeker wrote: > > No but you push this layer into a specifc direction and by that make it > > harder to fix the PCB tables in a different way. I just see people > > changing the

rad(8): rate limit solicited router advertisements

2022-03-22 Thread Florian Obser
Rate limit router advertisements according to RFC 4861 6.2.6. In all cases, Router Advertisements sent in response to a Router Solicitation MUST be delayed by a random time between 0 and MAX_RA_DELAY_TIME seconds. (If a single advertisement is sent in response to multiple

Re: rip sbappendaddr() with inpcb table mutex

2022-03-22 Thread Alexander Bluhm
On Tue, Mar 22, 2022 at 04:42:45PM +0100, Claudio Jeker wrote: > No but you push this layer into a specifc direction and by that make it > harder to fix the PCB tables in a different way. I just see people > changing the NET_ASSERT_WLOCKED() without realizing the actual reason for > the exclusive

Re: rip sbappendaddr() with inpcb table mutex

2022-03-22 Thread Claudio Jeker
On Tue, Mar 22, 2022 at 02:56:43PM +0100, Alexander Bluhm wrote: > On Tue, Mar 22, 2022 at 02:25:08PM +0100, Claudio Jeker wrote: > > On Tue, Mar 22, 2022 at 02:09:51PM +0100, Alexander Bluhm wrote: > > > Hi, > > > > > > syzkaller and witness found the same bug I introduced in UDP also > > > for

Re: if_get NULL race arp, nd6, igmp

2022-03-22 Thread Alexander Bluhm
anyone? On Fri, Mar 04, 2022 at 12:09:03PM +0100, Alexander Bluhm wrote: > Hi, > > syzkaller has found this race in arp. > > https://syzkaller.appspot.com/bug?id=e3dc94533ddee95b6d69c2e7049360022f4190d3 > > The assumption of the code is that either the arp entry or the > interface is removed.

Re: rip sbappendaddr() with inpcb table mutex

2022-03-22 Thread Alexander Bluhm
On Tue, Mar 22, 2022 at 02:25:08PM +0100, Claudio Jeker wrote: > On Tue, Mar 22, 2022 at 02:09:51PM +0100, Alexander Bluhm wrote: > > Hi, > > > > syzkaller and witness found the same bug I introduced in UDP also > > for Raw IP. Fix it the same was for rip and rip6. > > > >

Re: rip sbappendaddr() with inpcb table mutex

2022-03-22 Thread Claudio Jeker
On Tue, Mar 22, 2022 at 02:09:51PM +0100, Alexander Bluhm wrote: > Hi, > > syzkaller and witness found the same bug I introduced in UDP also > for Raw IP. Fix it the same was for rip and rip6. > > https://syzkaller.appspot.com/bug?extid=9bac6356a881dc644265 >

rip sbappendaddr() with inpcb table mutex

2022-03-22 Thread Alexander Bluhm
Hi, syzkaller and witness found the same bug I introduced in UDP also for Raw IP. Fix it the same was for rip and rip6. https://syzkaller.appspot.com/bug?extid=9bac6356a881dc644265 https://syzkaller.appspot.com/bug?extid=5b2679ee9be0895d26f9 ok? bluhm Index: netinet/raw_ip.c

Re: CMSG_DATA(3): add an example for receiving mulitple control messages

2022-03-22 Thread David Gwynne
On Tue, Mar 22, 2022 at 09:12:23AM +0100, Claudio Jeker wrote: > On Tue, Mar 22, 2022 at 02:24:25PM +1000, David Gwynne wrote: > > i couldnt find any good examples of what to do when you wanted to > > receive multiple control messages from a single recvmsg call. the most > > interesting bit is how

Re: bgpd replace rib_entry prefix list with tailq

2022-03-22 Thread Claudio Jeker
On Tue, Mar 22, 2022 at 11:40:12AM +0100, Theo Buehler wrote: > On Tue, Mar 22, 2022 at 10:55:48AM +0100, Claudio Jeker wrote: > > As mentioned I need a TAILQ for the list of prefixes that belong to a rib > > entry. Mainly because I need TAILQ_PREV. This diff does this replacement. > > I did not

Re: bgpd replace rib_entry prefix list with tailq

2022-03-22 Thread Theo Buehler
On Tue, Mar 22, 2022 at 10:55:48AM +0100, Claudio Jeker wrote: > As mentioned I need a TAILQ for the list of prefixes that belong to a rib > entry. Mainly because I need TAILQ_PREV. This diff does this replacement. > I did not change the nexhtop LIST of prefixes to a TAILQ. Maybe something > to

Re: riscv64: simplify

2022-03-22 Thread Mark Kettenis
> Date: Tue, 22 Mar 2022 14:25:38 +1100 > From: Jonathan Gray > > On Mon, Mar 21, 2022 at 07:51:25PM +, Miod Vallat wrote: > > The riscv64 was likely copied from an architecture > > providing optimized byte-swapping code (I'd bet arm64), but doesn't have > > any such optimization, and

Re: riscv64: faster setregs()

2022-03-22 Thread Mark Kettenis
> Date: Tue, 22 Mar 2022 13:35:00 +1100 > From: Jonathan Gray > > On Mon, Mar 21, 2022 at 08:00:56PM +, Miod Vallat wrote: > > The current state of the kernel starts userland processes with register > > a0 pointing to the stack, with a comment mentioning this is copied from > > FreeBSD. > >

bgpd replace rib_entry prefix list with tailq

2022-03-22 Thread Claudio Jeker
As mentioned I need a TAILQ for the list of prefixes that belong to a rib entry. Mainly because I need TAILQ_PREV. This diff does this replacement. I did not change the nexhtop LIST of prefixes to a TAILQ. Maybe something to consider but there is no real need for that. This is mostly a mechanical

Re: CMSG_DATA(3): add an example for receiving mulitple control messages

2022-03-22 Thread Claudio Jeker
On Tue, Mar 22, 2022 at 02:24:25PM +1000, David Gwynne wrote: > i couldnt find any good examples of what to do when you wanted to > receive multiple control messages from a single recvmsg call. the most > interesting bit is how much space the buffer needs to be. > > if i struggled maybe someone