Re: route add ::/0 ...

2020-07-06 Thread YASUOKA Masahiko
On Tue, 30 Jun 2020 02:42:02 +0200 Klemens Nanni wrote: > On Tue, Jun 30, 2020 at 09:00:30AM +0900, YASUOKA Masahiko wrote: >> inet_makenetandmask() had required another treatment. >> >> Also -prefixlen 0 for -inet has a bug >> >> % doas ./obj/route -T100 add -inet 0.0.0.0 -prefixlen 0

Re: fix races in if_clone_create()

2020-07-06 Thread Martin Pieuchot
On 01/07/20(Wed) 00:02, Vitaliy Makkoveev wrote: > On Tue, Jun 30, 2020 at 03:48:22PM +0300, Vitaliy Makkoveev wrote: > > On Tue, Jun 30, 2020 at 12:08:03PM +0200, Martin Pieuchot wrote: > > > On 29/06/20(Mon) 11:59, Vitaliy Makkoveev wrote: > > > > [...] > > > > I reworked tool for reproduce.

urtwn(4): Add support for D-Link DWA-121 rev B1

2020-07-06 Thread Miguel Landaeta
Hi, The patch at the end should add support for USB wifi dongle DWA-121 from D-Link [1]. The USB id of such device is 2001:331b. lykke$ usbdevs Controller /dev/usb0: addr 01: : Generic, EHCI root hub Controller /dev/usb1: addr 01: : Generic, EHCI root hub addr 02: 05e3:0608

Re: pipex(4): kill pipexintr()

2020-07-06 Thread Martin Pieuchot
On 01/07/20(Wed) 22:42, Vitaliy Makkoveev wrote: > pipex(4) has 2 mbuf queues: `pipexinq' and `pipexoutq'. When mbuf passed > to pipex it goes to one of these queues and pipexintr() will be > scheduled to process them. pipexintr() called from `netisr' context. > > It's true for pppac(4) but for

Re: route add ::/0 ...

2020-07-06 Thread YASUOKA Masahiko
Let me updated the diff. On Mon, 06 Jul 2020 17:54:30 +0900 (JST) YASUOKA Masahiko wrote: > On Tue, 30 Jun 2020 02:42:02 +0200 > Klemens Nanni wrote: >> On Tue, Jun 30, 2020 at 09:00:30AM +0900, YASUOKA Masahiko wrote: >>> inet_makenetandmask() had required another treatment. >>> >>> Also

Re: adjfreq(2): limit adjustment to prevent overflow during tc_windup()

2020-07-06 Thread Nicholas Marriott
10^12 was the old definition of billion in the UK also, although in the last few decades it has become rare and 10^9 is now the norm. https://en.wikipedia.org/wiki/Long_and_short_scales has quite a bit about it. On Tue, 7 Jul 2020 at 00:27, Scott Cheloha wrote: > On Mon, Jul 06, 2020 at

Re: urtwn(4): Add support for D-Link DWA-121 rev B1

2020-07-06 Thread Jonathan Gray
On Mon, Jul 06, 2020 at 10:15:14AM +0100, Miguel Landaeta wrote: > Hi, > > The patch at the end should add support for USB wifi dongle > DWA-121 from D-Link [1]. > > The USB id of such device is 2001:331b. > > lykke$ usbdevs > Controller /dev/usb0: > addr 01: : Generic, EHCI root hub >

pipex(4) prevent `old_session_keys' memory leak

2020-07-06 Thread Vitaliy Makkoveev
Before session freeing pipex_rele_session() will check and release `old_session_keys' if necessary. So use it instead of pool_put(9) within pipex_destroy_session(). Index: sys/net/pipex.c === RCS file: /cvs/src/sys/net/pipex.c,v

Re: pipex(4): kill pipexintr()

2020-07-06 Thread Vitaliy Makkoveev
On Mon, Jul 06, 2020 at 10:59:17AM +0200, Martin Pieuchot wrote: > On 01/07/20(Wed) 22:42, Vitaliy Makkoveev wrote: > > pipex(4) has 2 mbuf queues: `pipexinq' and `pipexoutq'. When mbuf passed > > to pipex it goes to one of these queues and pipexintr() will be > > scheduled to process them.

DNS options for sppp(4)

2020-07-06 Thread Peter J. Philipp
Hello, This is an old patch from Gerhard Roth, and mpf@ dating back to 2007. Please see: https://marc.info/?l=openbsd-tech=134943767022961=2 I contacted Gerhard who said instead of begging for this I should make it IPv6 capable. So I tried and nearly flooded my ISP off the net (sorry), it

Re: pipex(4): kill pipexintr()

2020-07-06 Thread Martin Pieuchot
On 06/07/20(Mon) 19:23, Vitaliy Makkoveev wrote: > > On 6 Jul 2020, at 17:36, Martin Pieuchot wrote: > [...] > Unfortunately you can’t be sure about NET_LOCK() status while you are > in pppac_start(). It was described at this thread [1]. > > We have two cases: > 1. pppac_start() called from

Re: fix races in if_clone_create()

2020-07-06 Thread Vitaliy Makkoveev
> On 6 Jul 2020, at 12:17, Martin Pieuchot wrote: > > On 01/07/20(Wed) 00:02, Vitaliy Makkoveev wrote: >> On Tue, Jun 30, 2020 at 03:48:22PM +0300, Vitaliy Makkoveev wrote: >>> On Tue, Jun 30, 2020 at 12:08:03PM +0200, Martin Pieuchot wrote: On 29/06/20(Mon) 11:59, Vitaliy Makkoveev

Re: pipex(4): kill pipexintr()

2020-07-06 Thread Martin Pieuchot
On 06/07/20(Mon) 16:42, Vitaliy Makkoveev wrote: > [...] > pipex(4) is simultaneously locked by NET_LOCK() and KERNEL_LOCK() but > with two exceptions: > > 1. As you pointed pipex_pppoe_input() called without KERNEL_LOCK() held. > 2. pppac_start() called without NET_LOCK() held. Or with

Re: adjfreq(2): limit adjustment to prevent overflow during tc_windup()

2020-07-06 Thread Scott Cheloha
On Mon, Jul 06, 2020 at 11:57:32PM +0200, Mark Kettenis wrote: > > Date: Mon, 6 Jul 2020 16:40:35 -0500 > > From: Scott Cheloha > > > > On Fri, Jul 03, 2020 at 10:52:15AM +0200, Otto Moerbeek wrote: > > > On Thu, Jul 02, 2020 at 08:27:58PM -0500, Scott Cheloha wrote: > > > > > > > Hi, > > > >

Re: userland clock_gettime proof of concept

2020-07-06 Thread Theo de Raadt
Ah, it was seen. But everyone has too much memory these days. Vitaliy Makkoveev wrote: > Sorry for late reaction. At least VirtualBox based virtual machines > started to panic with the recent kernel. I reverted your diff and panics > stopped. > Screenshot attached.

Re: pipex(4): kill pipexintr()

2020-07-06 Thread Vitaliy Makkoveev
> On 6 Jul 2020, at 17:36, Martin Pieuchot wrote: > > On 06/07/20(Mon) 16:42, Vitaliy Makkoveev wrote: >> [...] >> pipex(4) is simultaneously locked by NET_LOCK() and KERNEL_LOCK() but >> with two exceptions: >> >> 1. As you pointed pipex_pppoe_input() called without KERNEL_LOCK() held. >> 2.

ksh(1) set -o pipefail

2020-07-06 Thread Jeremie Courreges-Anglas
Requested by ajacoutot@, here's an attempt at implementing set -o pipefail. As pointed by sthen@ this option should be included in the next POSIX standard: https://www.austingroupbugs.net/view.php?id=789 There are several ways to implement it, the diff I showed to Antoine was based on

Re: amd64: lapic: refactor lapic timer programming

2020-07-06 Thread Mike Larkin
On Fri, Jul 03, 2020 at 07:41:45PM -0500, Scott Cheloha wrote: > Hi, > > I want to run the lapic timer in one-shot mode on amd64 as we do with > other interrupt clocks on other platforms. I aim to make the clock > interrupt code MD where possible. > > However, nobody is going to test my MD clock

Re: pipex(4): kill pipexintr()

2020-07-06 Thread Vitaliy Makkoveev
On Mon, Jul 06, 2020 at 08:47:23PM +0200, Martin Pieuchot wrote: > On 06/07/20(Mon) 19:23, Vitaliy Makkoveev wrote: > > > On 6 Jul 2020, at 17:36, Martin Pieuchot wrote: > > [...] > > Unfortunately you can’t be sure about NET_LOCK() status while you are > > in pppac_start(). It was described at

Re: [patch] dhclient(8) crashes with vm.malloc_conf=J

2020-07-06 Thread David Gwynne
> On 7 Jul 2020, at 7:57 am, Jesper Wallin wrote: > > Hi all, > > I received a segmentation fault from dhclient(8) upon boot and decided > to investigate... My system is running with vm.malloc_conf=CFGJUR and > figured one of those options was the cause of the crash. I noticed that > the

Re: userland clock_gettime proof of concept

2020-07-06 Thread Vitaliy Makkoveev
> On 5 Jul 2020, at 20:31, Paul Irofti wrote: > > On Fri, Jul 03, 2020 at 06:36:39PM +0300, Paul Irofti wrote: >> >> >> În 3 iulie 2020 17:55:25 EEST, Mark Kettenis a >> scris: Date: Fri, 3 Jul 2020 15:13:22 +0200 From: Robert Nagy On 02/07/20 00:31 +0100, Stuart

Re: userland clock_gettime proof of concept

2020-07-06 Thread Vitaliy Makkoveev
Sorry for late reaction. At least VirtualBox based virtual machines started to panic with the recent kernel. I reverted your diff and panics stopped. Screenshot attached.

Re: ksh(1) set -o pipefail

2020-07-06 Thread Todd C . Miller
On Mon, 06 Jul 2020 22:22:36 +0200, Jeremie Courreges-Anglas wrote: > Requested by ajacoutot@, here's an attempt at implementing set -o > pipefail. As pointed by sthen@ this option should be included in the > next POSIX standard: > > https://www.austingroupbugs.net/view.php?id=789 > > There

Re: adjfreq(2): limit adjustment to prevent overflow during tc_windup()

2020-07-06 Thread Scott Cheloha
On Fri, Jul 03, 2020 at 10:52:15AM +0200, Otto Moerbeek wrote: > On Thu, Jul 02, 2020 at 08:27:58PM -0500, Scott Cheloha wrote: > > > Hi, > > > > When we recompute the scaling factor during tc_windup() there is an > > opportunity for arithmetic overflow/underflow when we add the NTP > >

Re: adjfreq(2): limit adjustment to prevent overflow during tc_windup()

2020-07-06 Thread Mark Kettenis
> Date: Mon, 6 Jul 2020 16:40:35 -0500 > From: Scott Cheloha > > On Fri, Jul 03, 2020 at 10:52:15AM +0200, Otto Moerbeek wrote: > > On Thu, Jul 02, 2020 at 08:27:58PM -0500, Scott Cheloha wrote: > > > > > Hi, > > > > > > When we recompute the scaling factor during tc_windup() there is an > > >

[patch] dhclient(8) crashes with vm.malloc_conf=J

2020-07-06 Thread Jesper Wallin
Hi all, I received a segmentation fault from dhclient(8) upon boot and decided to investigate... My system is running with vm.malloc_conf=CFGJUR and figured one of those options was the cause of the crash. I noticed that the buffer which holds my config options contained a lot of junk at the

Use CPU_IS_PRIMARY macro in identifycpu() on amd64

2020-07-06 Thread Frederic Cambus
Hi tech@, While having a glance at identcpu.c to see how CPU flags were printed for each CPU, I noticed we have the following macro in cpu.h: #define CPU_IS_PRIMARY(ci) ((ci)->ci_flags & CPUF_PRIMARY) Here is a diff to use it in identifycpu() on amd64. Comments? OK? Index:

Re: userland clock_gettime proof of concept

2020-07-06 Thread Mark Kettenis
> From: Vitaliy Makkoveev > Date: Tue, 7 Jul 2020 01:34:33 +0300 > > > On 5 Jul 2020, at 20:31, Paul Irofti wrote: > > > > On Fri, Jul 03, 2020 at 06:36:39PM +0300, Paul Irofti wrote: > >> > >> > >> În 3 iulie 2020 17:55:25 EEST, Mark Kettenis a > >> scris: > Date: Fri, 3 Jul 2020

ws(4): Wheel emulation touch scroll on touchscreens

2020-07-06 Thread wdaver
My first diff... This patch has the ws driver update mouse cursor absolute position before scrolling begins on a touchscreen when wheel emulation is enabled. This change should not impact other uses of wheel emulation. Is this ok? Index: driver/xf86-input-ws/src/ws.c