Re: userland clock_gettime proof of concept

2020-05-30 Thread Theo de Raadt
> PowerPC Mac OS X had a userland gettimeofday(2) using the cpu's > timebase and a "common page" from the kernel. Their common page also > had executable code for gettimeofday, memcpy, pthread_self, and a few > other functions. We are desperately avoiding the model where such code is exported. It

Re: userland clock_gettime proof of concept

2020-05-30 Thread George Koehler
On Sat, 30 May 2020 19:21:30 +0300 Paul Irofti wrote: > Here is an updated diff with no libc bump. Please use this one for > further testing. Your diff does amd64. Here is a diff to add macppc. Apply after your diff. I have only tested clock_gettime(2) with CLOCK_REALTIME, by doing loops in R

Re: fix pppx(4) with net/ifq.c rev 1.38

2020-05-30 Thread David Gwynne
> On 30 May 2020, at 9:43 pm, Vitaliy Makkoveev > wrote: > > >> On 30 May 2020, at 09:40, David Gwynne wrote: >> >> On Mon, May 25, 2020 at 09:44:22AM +0200, Martin Pieuchot wrote: >>> On 23/05/20(Sat) 15:38, Vitaliy Makkoveev wrote: > On 23 May 2020, at 12:54, Martin Pieuchot wrote:

Re: sparc64 boot issue on qemu

2020-05-30 Thread Patrick Wildt
On Sat, May 30, 2020 at 07:21:15PM +, Miod Vallat wrote: > Yet another case where the emulator does not match the real hardware. > > Why bother with them? > > Get qemu to fix their shit so that the frame buffer metrics variable are > aligned on 64-bit boundaries. There might not be a written

Re: sparc64 boot issue on qemu

2020-05-30 Thread Miod Vallat
Yet another case where the emulator does not match the real hardware. Why bother with them? Get qemu to fix their shit so that the frame buffer metrics variable are aligned on 64-bit boundaries. There might not be a written specification for this requirement, but that's the way real hardware beha

Re: umstc: Microsoft Surface Type Cover driver

2020-05-30 Thread Mark Kettenis
> Date: Sat, 30 May 2020 12:38:12 -0500 > From: joshua stein > > This makes the volume and screen brightness keys work, but more > importantly it keeps the USB data/interrupt pipes open at all times > because otherwise the Type Cover resets itself (or at least detaches > and reattaches) when t

Re: official ports vs DEBUG_PACKAGES

2020-05-30 Thread Marc Espie
On Sat, May 30, 2020 at 05:10:49PM +0200, Jeremie Courreges-Anglas wrote: > On Sat, May 30 2020, Marc Espie wrote: > >> - have some magic I don't know in ELF handling that would allow to either > >> tweak the default location/introduce ${WRKOBJDIR} in that debug info. > > > > Thinking some more ab

Re: acpihid: INT33D5 driver

2020-05-30 Thread Mark Kettenis
> Date: Sat, 30 May 2020 12:26:00 -0500 > From: joshua stein > > A driver for tablet hardware buttons which seems to be a > standardized interface. Used on the Surface Go. > > When pressing the power button, the driver receives a button down > and then a button up event, unlike acpibtn. Sinc

ospf6d: enable reload

2020-05-30 Thread Denis Fondras
This diff provides a working 'ospf6ctl reload'. Must be applied after https://marc.info/?l=openbsd-tech&m=159084971620177&w=2 Index: ospf6ctl/ospf6ctl.c === RCS file: /home/denis/dev/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v retrieving

umstc: Microsoft Surface Type Cover driver

2020-05-30 Thread joshua stein
This makes the volume and screen brightness keys work, but more importantly it keeps the USB data/interrupt pipes open at all times because otherwise the Type Cover resets itself (or at least detaches and reattaches) when these buttons are pressed. diff --git share/man/man4/Makefile share/man/

acpihid: INT33D5 driver

2020-05-30 Thread joshua stein
A driver for tablet hardware buttons which seems to be a standardized interface. Used on the Surface Go. When pressing the power button, the driver receives a button down and then a button up event, unlike acpibtn. Since there may be an opportunity to do something different based on the durat

Re: userland clock_gettime proof of concept

2020-05-30 Thread Paul Irofti
Here is an updated diff with no libc bump. Please use this one for further testing. diff --git lib/libc/arch/amd64/gen/Makefile.inc lib/libc/arch/amd64/gen/Makefile.inc index e995309ed71..c80f5cf671a 100644 --- lib/libc/arch/amd64/gen/Makefile.inc +++ lib/libc/arch/amd64/gen/Makefile.inc @@ -2,6

Re: smtpd: make smarthost to use SNI when relaying

2020-05-30 Thread Bob Beck
On Sat, May 30, 2020 at 05:40:43PM +0200, Sebastien Marie wrote: > Hi, > > I am looking to make smtpd to set SNI (SSL_set_tlsext_host_name) when > connecting > to smarthost when relaying mail. > > After digging a bit in libtls (to stole the right code) and smtpd (to see > where > to put the sto

Re: userland clock_gettime proof of concept

2020-05-30 Thread Paul Irofti
On Sat, May 30, 2020 at 10:11:10AM -0600, Theo de Raadt wrote: > Paul Irofti wrote: > > > > > The libc bump is there because it helps me switch more easily between > > > > versions. > > > > > > That is bogus. Minors are used for visible ABI additions, majors are > > > used for ABI deletions or

Re: userland clock_gettime proof of concept

2020-05-30 Thread Theo de Raadt
Paul Irofti wrote: > > > The libc bump is there because it helps me switch more easily between > > > versions. > > > > That is bogus. Minors are used for visible ABI additions, majors are > > used for ABI deletions or API changes visible as ABI. Please don't > > argue for a vague extension of

Re: userland clock_gettime proof of concept

2020-05-30 Thread Paul Irofti
On Sat, May 30, 2020 at 09:59:41AM -0600, Theo de Raadt wrote: > Paul Irofti wrote: > > > > A few more notes below. > > > > I addressed all the comments. Here is the updated diff. This includes > > the rename to usertc that I suggested. > > I want to see support for quite a few more architectur

Re: userland clock_gettime proof of concept

2020-05-30 Thread Theo de Raadt
Additional question: What happens during suspend/resume, over over a hibernate.

Re: userland clock_gettime proof of concept

2020-05-30 Thread Theo de Raadt
Paul Irofti wrote: > > A few more notes below. > > I addressed all the comments. Here is the updated diff. This includes > the rename to usertc that I suggested. I want to see support for quite a few more architectures, especially those which are very different, because changing format of the s

Re: userland clock_gettime proof of concept

2020-05-30 Thread Paul Irofti
> A few more notes below. I addressed all the comments. Here is the updated diff. This includes the rename to usertc that I suggested. The libc bump is there because it helps me switch more easily between versions. A lot of our developers tested and reported no issues with eluding the bump. So we

Re: Kill NFS-only kqueue poller thread

2020-05-30 Thread Visa Hankala
On Sat, May 30, 2020 at 03:34:06PM +0200, Martin Pieuchot wrote: > On 30/05/20(Sat) 09:22, Visa Hankala wrote: > > On Thu, May 28, 2020 at 12:11:20PM +0200, Martin Pieuchot wrote: > > > When it comes to kqueue filters NFS is special. A custom thread is > > > created when the first event is registe

Re: smtpd: make smarthost to use SNI when relaying

2020-05-30 Thread Todd C . Miller
On Sat, 30 May 2020 17:40:43 +0200, Sebastien Marie wrote: > I am looking to make smtpd to set SNI (SSL_set_tlsext_host_name) > when connecting to smarthost when relaying mail. > > After digging a bit in libtls (to stole the right code) and smtpd (to > see where to put the stolen code), I have the

Re: fix pppx(4) with net/ifq.c rev 1.38

2020-05-30 Thread Vitaliy Makkoveev
> On 30 May 2020, at 09:40, David Gwynne wrote: > > On Mon, May 25, 2020 at 09:44:22AM +0200, Martin Pieuchot wrote: >> On 23/05/20(Sat) 15:38, Vitaliy Makkoveev wrote: On 23 May 2020, at 12:54, Martin Pieuchot wrote: On 22/05/20(Fri) 13:25, Vitaliy Makkoveev wrote: > On Fri, May

smtpd: make smarthost to use SNI when relaying

2020-05-30 Thread Sebastien Marie
Hi, I am looking to make smtpd to set SNI (SSL_set_tlsext_host_name) when connecting to smarthost when relaying mail. After digging a bit in libtls (to stole the right code) and smtpd (to see where to put the stolen code), I have the following diff: diff 73b535ef4537e8454483912fc3420bc304759e96

Re: official ports vs DEBUG_PACKAGES

2020-05-30 Thread Jeremie Courreges-Anglas
On Sat, May 30 2020, Marc Espie wrote: >> - have some magic I don't know in ELF handling that would allow to either >> tweak the default location/introduce ${WRKOBJDIR} in that debug info. > > Thinking some more about it, that 3rd option is possibly not that > far-fetched > > we do pass most debug

ospf6d: change the way interfaces are handled

2020-05-30 Thread Denis Fondras
This diff updates how ospf6d(8) handles interfaces. It is now in line with what ospfd(8) does. Last step before enabling reload. Tested against Mikrotik and Zebra implementations. Warning: it changes the default behaviour. No prefix is announced if no "redistribute" statement is present in confi

Re: userland clock_gettime proof of concept

2020-05-30 Thread Theo de Raadt
Paul Irofti wrote: > Exposing the skews to the user is easy. The hard bit is figuring out > on which CPU you are to pick the proper skew without doing a system > call. If you do a syscall then all of this is for nothing :) That can't work right. When you figure out which cpu you are on, you con

Re: userland clock_gettime proof of concept

2020-05-30 Thread Theo de Raadt
Robert Nagy wrote: > > I also would like to see at least one non-amd64 platform supported > > before we settle on this approach. > > > Which one would you prefer? arm64? As many as possible. If a design issue is encountered, cranking the major on this *might not be easy*. If the mechanism ch

Re: Kill NFS-only kqueue poller thread

2020-05-30 Thread Martin Pieuchot
On 30/05/20(Sat) 09:22, Visa Hankala wrote: > On Thu, May 28, 2020 at 12:11:20PM +0200, Martin Pieuchot wrote: > > 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 ha

Re: official ports vs DEBUG_PACKAGES

2020-05-30 Thread Marc Espie
> - have some magic I don't know in ELF handling that would allow to either > tweak the default location/introduce ${WRKOBJDIR} in that debug info. Thinking some more about it, that 3rd option is possibly not that far-fetched we do pass most debug-info thru dwz for shrinkage, so there's one tool

Re: [patch] azalia: Intel 300 Series HD Audio

2020-05-30 Thread Bruno Flueckiger
On 29.05., Jonathan Gray wrote: > On Fri, May 29, 2020 at 11:25:44AM +0200, Bruno Flueckiger wrote: > > Hi, > > > > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series > > HD Audio device rev 0x11. The device shows up as not configured in the > > dmesg. The PCI config space of th

Re: userland clock_gettime proof of concept

2020-05-30 Thread Paul Irofti
On 2020-05-30 12:30, Mark Kettenis wrote: Date: Fri, 29 May 2020 17:51:50 +0300 From: Paul Irofti On Fri, May 29, 2020 at 03:00:50PM +0200, Mark Kettenis wrote: Date: Fri, 29 May 2020 13:45:37 +0100 From: Stuart Henderson On 2020/05/29 13:50, Paul Irofti wrote: +struct __timekeep { +

Re: userland clock_gettime proof of concept

2020-05-30 Thread Mark Kettenis
> From: Paul Irofti > Date: Sat, 30 May 2020 13:53:18 +0300 > > On 2020-05-30 12:40, Mark Kettenis wrote: > >> Date: Sat, 30 May 2020 10:49:07 +0200 > >> From: Robert Nagy > >> > >> On 30/05/20 10:40 +0200, Mark Kettenis wrote: > Date: Sat, 30 May 2020 10:32:15 +0200 > From: Robert Nag

Re: userland clock_gettime proof of concept

2020-05-30 Thread Paul Irofti
On 2020-05-30 12:40, Mark Kettenis wrote: Date: Sat, 30 May 2020 10:49:07 +0200 From: Robert Nagy On 30/05/20 10:40 +0200, Mark Kettenis wrote: Date: Sat, 30 May 2020 10:32:15 +0200 From: Robert Nagy On 29/05/20 17:51 +0300, Paul Irofti wrote: On Fri, May 29, 2020 at 03:00:50PM +0200, Mark

Re: sparc64 boot issue on qemu

2020-05-30 Thread Otto Moerbeek
On Sat, May 30, 2020 at 10:11:08AM +0100, Mark Cave-Ayland wrote: > On 30/05/2020 10:03, Otto Moerbeek wrote: > > > Hi, > > > > thanks for the hints, but an unpatched 6.7 miniroot still fails to > > boot for me > > > > qemu-system-sparc64 -machine sun4u -m 1024 -drive \ > > file=miniroot67.

Outdated BUGS section in kqueue.2

2020-05-30 Thread Visa Hankala
The BUGS section in kqueue.2 is outdated. The FIFO limitation does not seem to exist anymore, AIO is not implemented at all in the kernel, and watching vnodes looks possible on all filesystem types that allow writing. OK to remove the section? Index: kqueue.2 =

Re: userland clock_gettime proof of concept

2020-05-30 Thread Mark Kettenis
> Date: Sat, 30 May 2020 10:49:07 +0200 > From: Robert Nagy > > On 30/05/20 10:40 +0200, Mark Kettenis wrote: > > > Date: Sat, 30 May 2020 10:32:15 +0200 > > > From: Robert Nagy > > > > > > On 29/05/20 17:51 +0300, Paul Irofti wrote: > > > > On Fri, May 29, 2020 at 03:00:50PM +0200, Mark Ketten

Re: sparc64 boot issue on qemu

2020-05-30 Thread Mark Cave-Ayland
On 29/05/2020 23:56, Jason A. Donenfeld wrote: > Oh that's a nice observation about `boot disk -V`. Doing so actually > got me booting up entirely: > > $ qemu-img convert -O qcow2 miniroot66.fs disk.qcow2 > $ qemu-img resize disk.qcow2 20G > $ qemu-system-sparc64 -m 1024 -drive file=disk.qcow2,if

Re: userland clock_gettime proof of concept

2020-05-30 Thread Mark Kettenis
> Date: Fri, 29 May 2020 17:51:50 +0300 > From: Paul Irofti > > On Fri, May 29, 2020 at 03:00:50PM +0200, Mark Kettenis wrote: > > > Date: Fri, 29 May 2020 13:45:37 +0100 > > > From: Stuart Henderson > > > > > > On 2020/05/29 13:50, Paul Irofti wrote: > > > > +struct __timekeep { > > > > +

Re: Kill NFS-only kqueue poller thread

2020-05-30 Thread Visa Hankala
On Thu, May 28, 2020 at 12:11:20PM +0200, Martin Pieuchot wrote: > 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

Re: sparc64 boot issue on qemu

2020-05-30 Thread Mark Cave-Ayland
On 30/05/2020 10:03, Otto Moerbeek wrote: > Hi, > > thanks for the hints, but an unpatched 6.7 miniroot still fails to > boot for me > > qemu-system-sparc64 -machine sun4u -m 1024 -drive \ > file=miniroot67.img,format=raw -nographic -serial stdio -monitor none > > OpenBIOS for Sparc64 > C

Re: sparc64 boot issue on qemu

2020-05-30 Thread Otto Moerbeek
On Sat, May 30, 2020 at 09:29:36AM +0100, Mark Cave-Ayland wrote: > On 29/05/2020 23:56, Jason A. Donenfeld wrote: > > > Oh that's a nice observation about `boot disk -V`. Doing so actually > > got me booting up entirely: > > > > $ qemu-img convert -O qcow2 miniroot66.fs disk.qcow2 > > $ qemu-im

Re: userland clock_gettime proof of concept

2020-05-30 Thread Robert Nagy
On 30/05/20 10:40 +0200, Mark Kettenis wrote: > > Date: Sat, 30 May 2020 10:32:15 +0200 > > From: Robert Nagy > > > > On 29/05/20 17:51 +0300, Paul Irofti wrote: > > > On Fri, May 29, 2020 at 03:00:50PM +0200, Mark Kettenis wrote: > > > > > Date: Fri, 29 May 2020 13:45:37 +0100 > > > > > From: St

Re: userland clock_gettime proof of concept

2020-05-30 Thread Mark Kettenis
> Date: Sat, 30 May 2020 10:32:15 +0200 > From: Robert Nagy > > On 29/05/20 17:51 +0300, Paul Irofti wrote: > > On Fri, May 29, 2020 at 03:00:50PM +0200, Mark Kettenis wrote: > > > > Date: Fri, 29 May 2020 13:45:37 +0100 > > > > From: Stuart Henderson > > > > > > > > On 2020/05/29 13:50, Paul I

Re: userland clock_gettime proof of concept

2020-05-30 Thread Robert Nagy
On 29/05/20 17:51 +0300, Paul Irofti wrote: > On Fri, May 29, 2020 at 03:00:50PM +0200, Mark Kettenis wrote: > > > Date: Fri, 29 May 2020 13:45:37 +0100 > > > From: Stuart Henderson > > > > > > On 2020/05/29 13:50, Paul Irofti wrote: > > > > +struct __timekeep { > > > > + uint32_t major;