Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Otto Moerbeek
On Thu, May 28, 2020 at 01:05:59AM -0600, Jason A. Donenfeld wrote: > On Thu, May 28, 2020 at 12:15 AM Otto Moerbeek wrote: > > > > On Wed, May 27, 2020 at 11:28:09PM -0600, Jason A. Donenfeld wrote: > > > > > Hi Otto, > > > > > > On Wed, May 27, 2020 at 4:07 AM Otto Moerbeek wrote: > > > >

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Jason A. Donenfeld
On Thu, May 28, 2020 at 1:19 AM Otto Moerbeek wrote: > Of course.., I was running it from a !wxallowed mount. BTW, qemu is in > packages, no need to build it yourself. Sure, but now I've been somewhat nerd sniped and am playing with this fcode forth implementation in qemu :-P. I wonder if

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Otto Moerbeek
On Wed, May 27, 2020 at 11:28:09PM -0600, Jason A. Donenfeld wrote: > Hi Otto, > > On Wed, May 27, 2020 at 4:07 AM Otto Moerbeek wrote: > > Although I'm not terribly interested in bugs that are only seen (s0 > > far) using emulation, please send me the details on how you set up > > qemu. > >

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Jason A. Donenfeld
On Thu, May 28, 2020 at 12:15 AM Otto Moerbeek wrote: > > On Wed, May 27, 2020 at 11:28:09PM -0600, Jason A. Donenfeld wrote: > > > Hi Otto, > > > > On Wed, May 27, 2020 at 4:07 AM Otto Moerbeek wrote: > > > Although I'm not terribly interested in bugs that are only seen (s0 > > > far) using

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread YASUOKA Masahiko
Hi, I'd like to conclude this issue. On Fri, 21 Feb 2020 14:09:07 +0900 (JST) YASUOKA Masahiko wrote: > I am testing a new hardware, HPE DL20 Gen10. > > When efiboot starts the kernel, the video display becomes distorted > and never recovered until CPU reset. > > Our kernel tries to

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Otto Moerbeek
On Thu, May 28, 2020 at 01:21:21AM -0600, Jason A. Donenfeld wrote: > On Thu, May 28, 2020 at 1:19 AM Otto Moerbeek wrote: > > Of course.., I was running it from a !wxallowed mount. BTW, qemu is in > > packages, no need to build it yourself. > > Sure, but now I've been somewhat nerd sniped and

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread YASUOKA Masahiko
On Thu, 28 May 2020 17:01:48 +0900 (JST) YASUOKA Masahiko wrote: > Hi, > > I'd like to conclude this issue. > > On Fri, 21 Feb 2020 14:09:07 +0900 (JST) > YASUOKA Masahiko wrote: >> I am testing a new hardware, HPE DL20 Gen10. >> >> When efiboot starts the kernel, the video display becomes

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread Jonathan Gray
On Thu, May 28, 2020 at 05:19:19PM +0900, YASUOKA Masahiko wrote: > On Thu, 28 May 2020 17:01:48 +0900 (JST) > YASUOKA Masahiko wrote: > > Hi, > > > > I'd like to conclude this issue. > > > > On Fri, 21 Feb 2020 14:09:07 +0900 (JST) > > YASUOKA Masahiko wrote: > >> I am testing a new hardware,

Re: Enable scrollback in simplefb(4)

2020-05-28 Thread Mark Kettenis
> Date: Thu, 28 May 2020 12:55:32 +0200 > From: Frederic Cambus > > Hi tech@, > > Here is a diff to enable scrollback in simplefb(4). > > Tested on OpenBSD/armv7 on my CubieBoard2. The only arm64 device I own > is headless so I cannot test on this platform. > > Comments? OK? ok kettenis@ >

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread Mark Kettenis
> Date: Thu, 28 May 2020 20:49:18 +0900 (JST) > From: YASUOKA Masahiko > > On Thu, 28 May 2020 12:31:31 +0200 (CEST) > Mark Kettenis wrote: > >> Date: Thu, 28 May 2020 17:01:48 +0900 (JST) > >> From: YASUOKA Masahiko > >> > >> Hi, > >> > >> I'd like to conclude this issue. > >> > >> On Fri,

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread Jonathan Gray
On Thu, May 28, 2020 at 02:06:28PM +0200, Mark Kettenis wrote: > > Date: Thu, 28 May 2020 20:49:18 +0900 (JST) > > From: YASUOKA Masahiko > > > > On Thu, 28 May 2020 12:31:31 +0200 (CEST) > > Mark Kettenis wrote: > > >> Date: Thu, 28 May 2020 17:01:48 +0900 (JST) > > >> From: YASUOKA Masahiko

Re: pipex(4): kill NET_LOCK() in pipex_ioctl()

2020-05-28 Thread Martin Pieuchot
On 27/05/20(Wed) 11:54, Vitaliy Makkoveev wrote: > pipex(4) is simultaneously protected by KERNEL_LOCK() and NET_LOCK() and > the last is not required. I guess to start remove NET_LOCK(). Diff below > drops NET_LOCK() in pipex_ioctl() and underlaying routines. At least > this helps to kill

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread Mark Kettenis
> Date: Thu, 28 May 2020 17:01:48 +0900 (JST) > From: YASUOKA Masahiko > > Hi, > > I'd like to conclude this issue. > > On Fri, 21 Feb 2020 14:09:07 +0900 (JST) > YASUOKA Masahiko wrote: > > I am testing a new hardware, HPE DL20 Gen10. > > > > When efiboot starts the kernel, the video

mcx(4) vlan offload

2020-05-28 Thread Jonathan Matthew
This implements vlan offload in mcx(4). vlan stripping is fairly straightforward, as the nic just removes the tag and populates a field in the completion queue entry. vlan insertion is a bit funny, as the nic doesn't do any of the work here at all. The driver has to copy at least the L2 headers

Re: diff: init efifb even if VGA is probed.

2020-05-28 Thread YASUOKA Masahiko
On Thu, 28 May 2020 12:31:31 +0200 (CEST) Mark Kettenis wrote: >> Date: Thu, 28 May 2020 17:01:48 +0900 (JST) >> From: YASUOKA Masahiko >> >> Hi, >> >> I'd like to conclude this issue. >> >> On Fri, 21 Feb 2020 14:09:07 +0900 (JST) >> YASUOKA Masahiko wrote: >> > I am testing a new hardware,

Re: Initialize v4l2_requestbuffers struct to avoid invalid mmap

2020-05-28 Thread Martin Pieuchot
On 26/05/20(Tue) 11:30, Ingo Feinerer wrote: > video(1) supports reading frames from a webcam via mmap(). To inform the > V4L2 device about the number of desired buffers containing the frames to > be memory-mapped, a VIDIOC_REQBUFS ioctl call is used. > > At the moment the v4l2_requestbuffers

Re: clear margins when remapping efifb

2020-05-28 Thread Frederic Cambus
On Wed, May 27, 2020 at 12:25:00PM +0200, Mark Kettenis wrote: > > Date: Wed, 27 May 2020 19:39:07 +1000 > > From: Jonathan Gray > > > > When testing the row and column increase for efifb on a 1920x1080 > > display I noticed the top part of the screen continues to contain part > > of a white on

Enable scrollback in simplefb(4)

2020-05-28 Thread Frederic Cambus
Hi tech@, Here is a diff to enable scrollback in simplefb(4). Tested on OpenBSD/armv7 on my CubieBoard2. The only arm64 device I own is headless so I cannot test on this platform. Comments? OK? Index: sys/dev/fdt/simplefb.c ===

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Martin Pieuchot
On 27/05/20(Wed) 20:18, Matt Dunwoodie wrote: > On Wed, 27 May 2020 09:34:53 +0200 > Martin Pieuchot wrote: > > Regarding the kernel, I'd suggest you use "#if NWG > 0" like it is > > done for other pseudo-drives with 'needs-flag'. > > For the most part there is no significant changes to other

Kill NFS-only kqueue poller thread

2020-05-28 Thread Martin Pieuchot
When it comes to kqueue filters NFS is special. A custom thread is created when the first event is registered. Its purpose is to poll for changes every 2.5sec. This logic has been inherited from NetBSD and is not present in FreeBSD. Since filt_nfsread() only check `n_size' of a given nfsnode

Re: pppx(4): prevent access to `pxi' being destroyed

2020-05-28 Thread Martin Pieuchot
On 26/05/20(Tue) 16:12, Vitaliy Makkoveev wrote: > `pppx_if' has `pxi_ready' field used to prevent access to incomplete > `pxi'. But we don't prevent access to `pxi' which we destroy. > pppx_if_destroy() can sleep so we can grab `pxi' which we already > destroying by concurrent thread and cause

Re: WireGuard patchset for OpenBSD, rev. 2

2020-05-28 Thread Claudio Jeker
On Thu, May 28, 2020 at 01:07:40PM +0200, Martin Pieuchot wrote: > On 27/05/20(Wed) 20:18, Matt Dunwoodie wrote: > > On Wed, 27 May 2020 09:34:53 +0200 > > Martin Pieuchot wrote: > > > Regarding the kernel, I'd suggest you use "#if NWG > 0" like it is > > > done for other pseudo-drives with

Re: clear margins when remapping efifb

2020-05-28 Thread Jonathan Gray
On Thu, May 28, 2020 at 12:23:26PM +0200, Frederic Cambus wrote: > On Wed, May 27, 2020 at 12:25:00PM +0200, Mark Kettenis wrote: > > > Date: Wed, 27 May 2020 19:39:07 +1000 > > > From: Jonathan Gray > > > > > > When testing the row and column increase for efifb on a 1920x1080 > > > display I

Re: Avoid offline cpu in automatic frequency scheduling

2020-05-28 Thread Solene Rapenne
On Thu, 28 May 2020 16:29:19 +0200 Solene Rapenne : > so, this diff skip offline cpus in the loop (robert@ gave me the big > clue to use cpu_is_online in the loop) apologies, it was claudio@ but robert@ helped too.

Re: userland clock_gettime proof of concept

2020-05-28 Thread Paul Irofti
Hi, Here is a new iteration of the diff which includes support for MD high resolution clocks. Currently only implements TSC on amd64. If the MD function is not defined, it fallsback to the syscall. There is the question of the skew fix, but that will be addressed in a separate kernel diff that

Re: pipex(4): kill NET_LOCK() in pipex_ioctl()

2020-05-28 Thread Vitaliy Makkoveev
On Thu, May 28, 2020 at 12:26:39PM +0200, Martin Pieuchot wrote: > On 27/05/20(Wed) 11:54, Vitaliy Makkoveev wrote: > > pipex(4) is simultaneously protected by KERNEL_LOCK() and NET_LOCK() and > > the last is not required. I guess to start remove NET_LOCK(). Diff below > > drops NET_LOCK() in

Re: Enable building wsmoused on arm64 and armv7

2020-05-28 Thread Theo de Raadt
-MANSUBDIR= i386 amd64 alpha +MANSUBDIR= i386 amd64 arm64 armv7 alpha Actually, I suggest making this a MI man page. Delete that line, and see where the files land. I'll adjust sets.

Re: Avoid offline cpu in automatic frequency scheduling

2020-05-28 Thread Bryan Steele
On Thu, May 28, 2020 at 04:29:19PM +0200, Solene Rapenne wrote: > the macro CPU_INFO_FOREACH loop over every CPU but the frequency > algorithm will raise frequency if one cpu usage goes over a threshold > but also if the sum of cpu usage goes over another threshold. > > In the current case, if

Re: locale thread support

2020-05-28 Thread Marc Espie
On Tue, May 26, 2020 at 12:13:02AM +0200, Ingo Schwarze wrote: > Hi, > > my impression is there are two totally independent topics in this > thread. > > 1. Whether and how to make things safer, ideally terminating the > program in a controlled manner, if it uses functions that are > not

Enable building wsmoused on arm64 and armv7

2020-05-28 Thread Frederic Cambus
Hi tech@, Here is a diff to enable building wsmoused on arm64 and armv7. Builds and works correctly on my CubieBoard2. Comments? OK? Index: usr.sbin/wsmoused/Makefile === RCS file: /cvs/src/usr.sbin/wsmoused/Makefile,v retrieving

Re: Avoid offline cpu in automatic frequency scheduling

2020-05-28 Thread Solene Rapenne
On Thu, 28 May 2020 11:43:07 -0400 Bryan Steele : > On Thu, May 28, 2020 at 04:29:19PM +0200, Solene Rapenne wrote: > > the macro CPU_INFO_FOREACH loop over every CPU but the frequency > > algorithm will raise frequency if one cpu usage goes over a > > threshold but also if the sum of cpu usage

unlock PF_UNIX sockets

2020-05-28 Thread Vitaliy Makkoveev
socket(2) layer is already protected by solock(). It grabs NET_LOCK() for inet{,6}(4) sockets, but all other sockets are still under KERNEL_LOCK(). I guess solock is already placed everythere it's required. Also `struct file' is already mp-safe. Diff below introduces rwlock `unp_lock'. It's

iked(8): AES-GCM in default proposals

2020-05-28 Thread Tobias Heider
Hi, now that we finally have AES-GCM in IKE and ESP I would like to add them as defaults. This is a bit more complicated than one might think because AEADs and non-AEADs can not be sent in the same proposal. Instead we must send one proposal for each and adjust the config parser a bit. Test

Re: Enable building wsfontload on arm64 and armv7

2020-05-28 Thread Mark Kettenis
> Date: Thu, 28 May 2020 18:44:43 +0200 > From: Frederic Cambus > > Hi tech@, > > Here is a diff to enable building wsfontload on arm64 and armv7. > > Builds and works correctly on my CubieBoard2. > > Comments? OK? ok kettenis@ > Index: usr.sbin/wsfontload/Makefile >

Avoid offline cpu in automatic frequency scheduling

2020-05-28 Thread Solene Rapenne
the macro CPU_INFO_FOREACH loop over every CPU but the frequency algorithm will raise frequency if one cpu usage goes over a threshold but also if the sum of cpu usage goes over another threshold. In the current case, if you have offline cpu (because of hw.smt=0), the total will still sum all the

Enable building wsfontload on arm64 and armv7

2020-05-28 Thread Frederic Cambus
Hi tech@, Here is a diff to enable building wsfontload on arm64 and armv7. Builds and works correctly on my CubieBoard2. Comments? OK? Index: usr.sbin/wsfontload/Makefile === RCS file: /cvs/src/usr.sbin/wsfontload/Makefile,v

Re: Enable building wsmoused on arm64 and armv7

2020-05-28 Thread Mark Kettenis
> Date: Thu, 28 May 2020 18:45:52 +0200 > From: Frederic Cambus > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Hi tech@, > > Here is a diff to enable building wsmoused on arm64 and armv7. > > Builds and works correctly on my CubieBoard2. > > Comments? OK? ok

Re: pppx(4): prevent access to `pxi' being destroyed

2020-05-28 Thread Vitaliy Makkoveev
On Thu, May 28, 2020 at 12:14:43PM +0200, Martin Pieuchot wrote: > On 26/05/20(Tue) 16:12, Vitaliy Makkoveev wrote: > > `pppx_if' has `pxi_ready' field used to prevent access to incomplete > > `pxi'. But we don't prevent access to `pxi' which we destroy. > > pppx_if_destroy() can sleep so we can

Re: userland clock_gettime proof of concept

2020-05-28 Thread Paul Irofti
Is the bump actually needed? Symbols.list is untouched so there's no change to the exported symbols. I am not sure if WRAP does not require it. Probably not. Otherwise as the diff stands now (always falling back to the syscall if timekeep is missing), I tend to agree with your statement :)

Re: userland clock_gettime proof of concept

2020-05-28 Thread Stuart Henderson
I'm running it here. On 2020/05/28 17:44, Paul Irofti wrote: > diff --git lib/libc/shlib_version lib/libc/shlib_version > index 06f98b01084..5fb0770494f 100644 > --- lib/libc/shlib_version > +++ lib/libc/shlib_version > @@ -1,4 +1,4 @@ > major=96 > -minor=0 > +minor=1 > # note: If changes were

Re: Avoid offline cpu in automatic frequency scheduling

2020-05-28 Thread Ted Unangst
On 2020-05-28, Solene Rapenne wrote: > > > In the current case, if you have offline cpu (because of hw.smt=0), > > > the total will still sum all the idle cpu and it's unlikely that > > > the total threshold is ever reached before the per cpu one. > > > > > > so, this diff skip offline cpus in

Re: [RFC] pppd: add pipex(4) L2TP control support

2020-05-28 Thread Jason McIntyre
On Wed, May 27, 2020 at 08:43:47AM +0200, Martin Pieuchot wrote: > On 26/05/20(Tue) 10:31, Claudio Jeker wrote: > > [...] > > npppd(8) is server only it can not establish a connection. pppd(8) on the > > other hand is more client side (but I think it can do both). > > Could someone knowledgable

[PATCH] from.c: stricter pledge(2)

2020-05-28 Thread Martin Vahlensieck
Hey! This pledge was added with the use of unveil(2), but doesn't require the getpw promise anymore (it is only needed in mail_spool to get the username). This patch makes it stricter. Best, Martin Index: from.c === RCS file:

Re: userland clock_gettime proof of concept

2020-05-28 Thread Mark Kettenis
> Date: Thu, 28 May 2020 17:44:31 +0300 > From: Paul Irofti > > Hi, > > Here is a new iteration of the diff which includes support for MD high > resolution clocks. Currently only implements TSC on amd64. If the > MD function is not defined, it fallsback to the syscall. > > There is the

Re: filesystem code integer and many inodes

2020-05-28 Thread Otto Moerbeek
On Tue, May 26, 2020 at 04:11:50PM +0200, Otto Moerbeek wrote: > On Tue, May 26, 2020 at 03:54:15PM +0200, Otto Moerbeek wrote: > > > On Tue, May 26, 2020 at 07:51:28AM -0600, Todd C. Miller wrote: > > > > > On Tue, 26 May 2020 12:07:21 +0200, Otto Moerbeek wrote: > > > > > > > Apart from the

Re: [PATCH] from.c: stricter pledge(2)

2020-05-28 Thread Ricardo Mestre
this is ok mestre@ may I commit it? On 21:18 Thu 28 May , Martin Vahlensieck wrote: > Hey! > > This pledge was added with the use of unveil(2), but doesn't require the > getpw promise anymore (it is only needed in mail_spool to get the > username). > > This patch makes it stricter. > >

Re: filesystem code integer and many inodes

2020-05-28 Thread Todd C . Miller
On Thu, 28 May 2020 20:53:07 +0200, Otto Moerbeek wrote: > Here's the separate diff for the prefcg loops. From FreeBSD. OK millert@ - todd

Re: userland clock_gettime proof of concept

2020-05-28 Thread Paul Irofti
> 5. What if the TSC is not available as a usable timecounter? In that >case libc should fall back on the system call. But we need a way >to communicate what the timecounter is and detect when we switch >timecounters. Maybe adding a timecounter ID to the page will help >here.

Re: userland clock_gettime proof of concept

2020-05-28 Thread Paul Irofti
On Thu, May 28, 2020 at 10:27:03PM +0300, Paul Irofti wrote: > > 5. What if the TSC is not available as a usable timecounter? In that > >case libc should fall back on the system call. But we need a way > >to communicate what the timecounter is and detect when we switch > >

Re: Enable building wsmoused on arm64 and armv7

2020-05-28 Thread Frederic Cambus
On Thu, May 28, 2020 at 10:52:44AM -0600, Theo de Raadt wrote: > -MANSUBDIR= i386 amd64 alpha > +MANSUBDIR= i386 amd64 arm64 armv7 alpha > > Actually, I suggest making this a MI man page. Delete that line, and see > where the files land. I'll adjust sets. Yes, makes sense. Just

Re: [patch] correct return type in pcap_open_live.3

2020-05-28 Thread Jason McIntyre
On Tue, May 26, 2020 at 05:10:33PM -0500, Edgar Pettijohn wrote: > Please see attached diff. fixed, thanks. jmc > Index: pcap_open_live.3 > === > RCS file: /cvs/src/lib/libpcap/pcap_open_live.3,v > retrieving revision 1.3 > diff -u

symmetric toeplitz hashing

2020-05-28 Thread David Gwynne
This is another bit of the puzzle for supporting multiple rx rings and receive side scaling (RSS) on nics. It borrows heavily from DragonflyBSD, but I've made some tweaks on the way. For background on the dfly side, I recommend having a look at