Re: eliminate use of fseek(3) inside libc

2022-05-13 Thread Todd C . Miller
On Fri, 13 May 2022 19:33:58 -0700, Philip Guenther wrote: > Diff below converts the last three such uses** and then updates the symbol > naming for fseek to block attempts to reference it in the future so uses > don't accidentally crawl back in. OK millert@ - todd

stop using mquery(2) inside realloc(3)

2022-05-13 Thread Philip Guenther
If you try to grow a 'large' (at least half a page) allocation with realloc(3), it'll try to extend the memory mapping for it and if that works it won't need to move it. Currently, it does that by using mquery(2) to see if that area is available and if so then trying to mmap it, munmaping it

eliminate use of fseek(3) inside libc

2022-05-13 Thread Philip Guenther
fseek(3) is implemented by just calling fseeko(3), the POSIX addition version that takes an off_t instead of a long: int fseek(FILE *fp, long offset, int whence) { return (fseeko(fp, offset, whence)); } ...so there's no reason for libc to be using fseek() internally, as that just loses

Re: rc.subr - allow setting daemon start directory

2022-05-13 Thread Antoine Jacoutot
On Fri, May 13, 2022 at 07:06:23PM -0400, aisha wrote: > > On 5/13/2022 7:03 PM, Antoine Jacoutot wrote: > > On Fri, May 13, 2022 at 07:01:30PM -0400, aisha wrote: > > > On 22/05/06 08:28AM, Antoine Jacoutot wrote: > > > > On Thu, May 05, 2022 at 04:49:10PM -0600, Aaron Bieber wrote: > > > > > >

Re: Lock kernel in nfsrv_rcv()

2022-05-13 Thread Alexander Bluhm
On Fri, May 13, 2022 at 04:05:15PM +, Visa Hankala wrote: > The NFS subsystem is not MP-safe yet. Take this into account > in the NFS server socket upcall by locking the kernel. > > This might help with the NFS server hanging that was seen recently > as a result of the now-reverted

Re: wsmouse(4): tapping

2022-05-13 Thread Matthias Schmidt
Hi Ulf, * Ulf Brosziewski wrote: > On 5/3/22 10:03, Ulf Brosziewski wrote: > > The implementation of the tapping mechanism in wsmouse(4) has a bug > > concerning the transitions into the hold/drag state, see > > https://marc.info/... > > for details. The patch proposed in that message is

Re: vmm: give a lonely enum a friend, fixing `vmctl receive`

2022-05-13 Thread Mike Larkin
On Sun, May 08, 2022 at 10:30:46PM -0400, Dave Voutila wrote: > tech@, > > Another vmm/vmd update: fix `vmctl receive` on Intel hosts by adding > another fault enum value to disambiguate fault reasons. > > It's expected that the guest will trigger nested page faults after being > received by vmd.

use timeout for rttimer

2022-05-13 Thread Claudio Jeker
This diff replaces most of the rttimer with a timeout(9) call. Instead of running a 1 second timer all the time it runs idividual timeouts for each rttimer object. rt_timer_remove_all() needs to be careful to not remove the rttimer object while the timeout callback is running or up to be run. It

Lock kernel in nfsrv_rcv()

2022-05-13 Thread Visa Hankala
The NFS subsystem is not MP-safe yet. Take this into account in the NFS server socket upcall by locking the kernel. This might help with the NFS server hanging that was seen recently as a result of the now-reverted selwakeup()-to-KNOTE() conversion. Unfortunately, I have not been able to confirm

Picky, but much more efficient arc4random_uniform!

2022-05-13 Thread Luke Small
I made a couple new versions of a new kind of arc4random_uniform-like function and some example functions which use them. Instead of having a sufficiently large random number greater than the modulus, I pick a random number using arc4random() from a bitfield where the length of the bitfield is