amd64, i386: lapic_calibrate_timer: panic if timer calibration fails

2022-09-10 Thread Scott Cheloha
Hi, In lapic_calibrate_timer() we only conditionally decide to use the lapic timer as our interrupt clock. That is, lapic timer calibration can fail and the system will boot anyway. If after measuring the lapic timer frequency we somehow come up with zero hertz, we do *not* set initclock_func

Re: Change pru_rcvd() return type to the type of void

2022-09-10 Thread Philip Guenther
ok guenther@ (Thanks!) On Sat, Sep 10, 2022 at 10:20 AM Vitaliy Makkoveev wrote: > We have no interest on pru_rcvd() return value. Also, we call pru_rcvd() > only if the socket's protocol have PR_WANTRCVD flag set. Such sockets > are route domain, tcp(4) and unix(4) sockets. > > This diff

Re: strtonum.3: Use the proper macro for "long long"

2022-09-10 Thread Ingo Schwarze
Hi, yes, this is completely correct, with one tiny exception that should be fixed while committing, see in-line below. Jason, since you already started working on this, could you please commit this patch with OK schwarze@? I'm surprised there was still so much .Li in our tree where .Vt should

uvm_vnode locking & documentation

2022-09-10 Thread Martin Pieuchot
Previous fix from gnezdo@ pointed out that `u_flags' accesses should be serialized by `vmobjlock'. Diff below documents this and fix the remaining places where the lock isn't yet taken. One exception still remains, the first loop of uvm_vnp_sync(). This cannot be fixed right now due to possible

soreceive() with shared netlock for raw sockets

2022-09-10 Thread Vitaliy Makkoveev
As it was done for udp and divert sockets. Index: sys/netinet/ip_var.h === RCS file: /cvs/src/sys/netinet/ip_var.h,v retrieving revision 1.104 diff -u -p -r1.104 ip_var.h --- sys/netinet/ip_var.h3 Sep 2022 22:43:38 -

Change pru_rcvd() return type to the type of void

2022-09-10 Thread Vitaliy Makkoveev
We have no interest on pru_rcvd() return value. Also, we call pru_rcvd() only if the socket's protocol have PR_WANTRCVD flag set. Such sockets are route domain, tcp(4) and unix(4) sockets. This diff keeps the PR_WANTRCVD check. In other hand we could always call pru_rcvd() and do "pru_rcvd !=

Re: immutable userland mappings

2022-09-10 Thread Theo de Raadt
Theo de Raadt wrote: > Theo de Raadt wrote: > > > Theo de Raadt wrote: > > > > > In this version of the diff, the kernel manages to mark immutable most of > > > the main binary, and in the shared-binary case, also most of ld.so. But > > > it > > > cannot mark all of the ELF mapping --

Re: immutable userland mappings

2022-09-10 Thread Theo de Raadt
Theo de Raadt wrote: > Theo de Raadt wrote: > > > In this version of the diff, the kernel manages to mark immutable most of > > the main binary, and in the shared-binary case, also most of ld.so. But it > > cannot mark all of the ELF mapping -- because of two remaining problems > > (RELRO >

Re: Unmap page in uvm_anon_release()

2022-09-10 Thread Martin Pieuchot
On 10/09/22(Sat) 15:12, Mark Kettenis wrote: > > Date: Sat, 10 Sep 2022 14:18:02 +0200 > > From: Martin Pieuchot > > > > Diff below fixes a bug exposed when swapping on arm64. When an anon is > > released make sure the all the pmap references to the related page are > > removed. > > I'm a

Re: EVFILT_TIMER add support for different timer precisions NOTE_{,U,N,M}SECONDS

2022-09-10 Thread Visa Hankala
On Wed, Aug 31, 2022 at 04:48:37PM -0400, aisha wrote: > I've added a patch which adds support for NOTE_{,U,M,N}SECONDS for > EVFILT_TIMER in the kqueue interface. It sort of makes sense to add an option to specify timeouts in sub-millisecond precision. It feels complete overengineering to add

Re: Unmap page in uvm_anon_release()

2022-09-10 Thread Mark Kettenis
> Date: Sat, 10 Sep 2022 14:18:02 +0200 > From: Martin Pieuchot > > Diff below fixes a bug exposed when swapping on arm64. When an anon is > released make sure the all the pmap references to the related page are > removed. I'm a little bit puzzled by this. So these pages are still mapped even

Re: [RFC] Adding ESRT and EFI variables for fwupd

2022-09-10 Thread Sergii Dmytruk
Hi Mark, Any news? I since setup gdb debugging of OVMF and figured out my EFI RT issues and it returns data fine now (was wrong calling ABI), but I'm not making /dev/efi as it sounds like you've done it already. Where are you at with this? Can I help to move this forward? Cheers, Sergii On Tue,

Unmap page in uvm_anon_release()

2022-09-10 Thread Martin Pieuchot
Diff below fixes a bug exposed when swapping on arm64. When an anon is released make sure the all the pmap references to the related page are removed. We could move the pmap_page_protect(pg, PROT_NONE) inside uvm_pagefree() to avoid future issue but that's for a later refactoring. With this

Re: bgpd optimize bgpctl show rib 10/8 or-longer

2022-09-10 Thread Claudio Jeker
On Fri, Sep 09, 2022 at 07:07:14PM +0200, Theo Buehler wrote: > On Fri, Sep 09, 2022 at 05:50:17PM +0200, Claudio Jeker wrote: > > This diff optimized subtree walks. In other words it specifies a subtree > > (as a prefix/prefixlen combo) and only walks the entries that are under > > this covering

pmap_collect and the page daemon

2022-09-10 Thread Miod Vallat
When the kernel is low on memory, the pagedaemon thread will try various strategies to free memory. One of those is to ask the pmap layer to free some memory. This is done in uvm_swapout_threads(), which is roughly a wrapper around the invocation of pmap_collect() on behalf of all processes.

Re: strtonum.3: Use the proper macro for "long long"

2022-09-10 Thread Jason McIntyre
On Fri, Sep 09, 2022 at 08:06:32PM -0400, Josiah Frentsos wrote: > Index: strtonum.3 > === > RCS file: /cvs/src/lib/libc/stdlib/strtonum.3,v > retrieving revision 1.18 > diff -u -p -r1.18 strtonum.3 > --- strtonum.37 Feb 2016