ksh "clear-screen" for vi mode

2020-09-13 Thread Rhylx
Hi everyone, I would like to add a clear screen feature for the vi mode of ksh. I have seen that it has been done for the emacs mode last year and wanned to adapt that code to vi. But it isn't quite a success for now because it's hard for me to get were the clear screen operation is actually

diff: pfctl: error message for nonexisting rtable

2020-09-13 Thread YASUOKA Masahiko
Hi, When pf rule with a "on rdomain n" with nonexisting rdomain n causes /etc/pf.conf:XXX: rdomain n does not exist error. But with a "rtable n" with nonexisting rtable n will cause pfctl: DIOCADDRULE: Device busy error. It is hard to find the cause by this error message.

Re: smtpd: document "pki" option for relay delivery in smtpd.conf(5)

2020-09-13 Thread Todd C . Miller
On Sun, 13 Sep 2020 20:45:35 +0800, Nick Gasson wrote: > I struggled a bit to configure smtpd to relay to a remote server that > requires SSL client certificates. The solution is to just add a "pki > host.example.org" option, but "pki" is not listed as a valid option for > the relay delivery

Re: rtm_getifa: Never ignore RTA_IFP

2020-09-13 Thread Demi M. Obenour
On 2020-09-13 12:40, Claudio Jeker wrote: > On Sun, Sep 13, 2020 at 11:28:11AM -0400, Demi M. Obenour wrote: >> Resending without quoted-printable encoding, in case that helps. >> --- >> If an RTM_ADD command on a routing socket includes an RTA_IFA sockaddr, >> and that sockaddr is an exact match

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Sebastien Marie
On Sun, Sep 13, 2020 at 04:49:48PM +0200, Sebastien Marie wrote: > On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > > I'm no longer able to reproduce the corruption while building lang/go > > with the diff below. Something relevant to threading change in go since > > march? > >

Re: trunk: keep interface up on port removal

2020-09-13 Thread Stuart Henderson
On 2020/09/13 14:47, Klemens Nanni wrote: > So there's a dance around UP interfaces already; CVS log dates this > code back to 2010 when deraadt rearanged code into ifnewlladdr(), the > previous if.c revision also head this dance around UP. > > The if_down() line I removed from trunk(4) dates

Re: rtm_getifa: Never ignore RTA_IFP

2020-09-13 Thread Claudio Jeker
On Sun, Sep 13, 2020 at 11:28:11AM -0400, Demi M. Obenour wrote: > Resending without quoted-printable encoding, in case that helps. > --- > If an RTM_ADD command on a routing socket includes an RTA_IFA sockaddr, > and that sockaddr is an exact match for one of the interfaces in the > relevant

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Mark Kettenis
> Date: Sun, 13 Sep 2020 17:54:18 +0200 > From: Martin Pieuchot > > On 13/09/20(Sun) 16:54, Mark Kettenis wrote: > > > Date: Sun, 13 Sep 2020 16:49:48 +0200 > > > From: Sebastien Marie > > > > > > On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > > > > I'm no longer able to

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Sebastien Marie
On Sun, Sep 13, 2020 at 09:15:15AM -0600, Theo de Raadt wrote: > crashes -- but without any kernel printfs? crashes and no kernel printfs -- Sebastien Marie

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Martin Pieuchot
On 13/09/20(Sun) 16:54, Mark Kettenis wrote: > > Date: Sun, 13 Sep 2020 16:49:48 +0200 > > From: Sebastien Marie > > > > On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > > > I'm no longer able to reproduce the corruption while building lang/go > > > with the diff below.

rtm_getifa: Never ignore RTA_IFP

2020-09-13 Thread Demi M. Obenour
Resending without quoted-printable encoding, in case that helps. --- If an RTM_ADD command on a routing socket includes an RTA_IFA sockaddr, and that sockaddr is an exact match for one of the interfaces in the relevant routing domain, any RTA_IFP sockaddr in the same message is ignored. If there

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Sun, 13 Sep 2020 08:56:04 -0600 > > Sebastien Marie wrote: > > > On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > > > I'm no longer able to reproduce the corruption while building lang/go > > > with the diff below. Something relevant to

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Theo de Raadt
We need to know which one is hitting a broken counter party -- is it the stack checker, or the syscall checker.

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Theo de Raadt
Sebastien Marie wrote: > On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > > I'm no longer able to reproduce the corruption while building lang/go > > with the diff below. Something relevant to threading change in go since > > march? > > > > Can someone try this diff and tell

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Mark Kettenis
> Date: Sun, 13 Sep 2020 16:49:48 +0200 > From: Sebastien Marie > > On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > > I'm no longer able to reproduce the corruption while building lang/go > > with the diff below. Something relevant to threading change in go since > > march? >

Re: go/rust vs uvm_map_inentry()

2020-09-13 Thread Sebastien Marie
On Sun, Sep 13, 2020 at 03:29:57PM +0200, Martin Pieuchot wrote: > I'm no longer able to reproduce the corruption while building lang/go > with the diff below. Something relevant to threading change in go since > march? > > Can someone try this diff and tell me if go and/or rust still fail?

Re: pppoe: move softc list out of NET_LOCK() into new pppoe lock

2020-09-13 Thread Vitaliy Makkoveev
Hello Klemens. pppoe(4) input path and pppoe(4) config path (I mean clone/destroy) is always different context. Your diff introduces the new lock which protects `pppoe_softc_list’ list but what should protect `sc’ you got from this list after you released `pppoe_lock’? I mean this dereference is

smtpd: document "pki" option for relay delivery in smtpd.conf(5)

2020-09-13 Thread Nick Gasson
Hi, I struggled a bit to configure smtpd to relay to a remote server that requires SSL client certificates. The solution is to just add a "pki host.example.org" option, but "pki" is not listed as a valid option for the relay delivery method, even though the parser accepts it. Index: smtpd.conf.5

Re: pppoe: move softc list out of NET_LOCK() into new pppoe lock

2020-09-13 Thread Martin Pieuchot
On 13/09/20(Sun) 15:12, Klemens Nanni wrote: > This is my first try trading global locks for interface specific ones. > > pppoe(4) keeps a list of all its interfaces which is then obviously > traversed during create and destroy. > > Currently, the net lock is grabbed for this, but there seems to

go/rust vs uvm_map_inentry()

2020-09-13 Thread Martin Pieuchot
I'm no longer able to reproduce the corruption while building lang/go with the diff below. Something relevant to threading change in go since march? Can someone try this diff and tell me if go and/or rust still fail? Index: uvm/uvm_map.c

pppoe: move softc list out of NET_LOCK() into new pppoe lock

2020-09-13 Thread Klemens Nanni
This is my first try trading global locks for interface specific ones. pppoe(4) keeps a list of all its interfaces which is then obviously traversed during create and destroy. Currently, the net lock is grabbed for this, but there seems to be no justification other than reusing^Wabusing an

Re: trunk: keep interface up on port removal

2020-09-13 Thread Klemens Nanni
On Sun, Sep 13, 2020 at 01:23:59PM +0200, Klemens Nanni wrote: > On Sun, Sep 13, 2020 at 11:31:12AM +0100, Stuart Henderson wrote: > > On 2020/09/13 11:12, Stuart Henderson wrote: > > > This has been tried before, I forget what but there were problems > > > > from chat logs when I tried this

Re: trunk: keep interface up on port removal

2020-09-13 Thread Stuart Henderson
On 2020/09/13 13:23, Klemens Nanni wrote: > On Sun, Sep 13, 2020 at 11:31:12AM +0100, Stuart Henderson wrote: > > On 2020/09/13 11:12, Stuart Henderson wrote: > > > This has been tried before, I forget what but there were problems > > > > from chat logs when I tried this before: > > > > 14:52 <

Re: trunk: keep interface up on port removal

2020-09-13 Thread Klemens Nanni
On Sun, Sep 13, 2020 at 11:31:12AM +0100, Stuart Henderson wrote: > On 2020/09/13 11:12, Stuart Henderson wrote: > > This has been tried before, I forget what but there were problems > > from chat logs when I tried this before: > > 14:52 < sthen> if i kill the if_down, no crash, but the mac

Re: trunk: keep interface up on port removal

2020-09-13 Thread Theo de Raadt
Stuart Henderson wrote: > On 2020/09/13 11:12, Stuart Henderson wrote: > > This has been tried before, I forget what but there were problems > > from chat logs when I tried this before: > > 14:52 < sthen> if i kill the if_down, no crash, but the mac address doesn't > get updated so i end up

pckbc: extend the PS/2 interface tests

2020-09-13 Thread Ulf Brosziewski
Not all PS/2-like controllers accept the AUXECHO command, and the test that pckbc applies in order to check for the presence of the auxiliary interface may yield false negatives, even on newer hardware (see https://marc.info/?l=openbsd-misc=158413132831425=2 ). This patch adds an alternative

Re: pppoe: start documenting locks

2020-09-13 Thread Klemens Nanni
On Sun, Sep 13, 2020 at 12:23:50PM +0200, Martin Pieuchot wrote: > Without doing another audit but with the fact that pseudo-device are > generally run by a thread holding the NET_LOCK() I'd assume it's ok. Thanks, I'll put it in as its an improvement and comment only (safe); rest can happen

Re: trunk: keep interface up on port removal

2020-09-13 Thread Stuart Henderson
On 2020/09/13 11:12, Stuart Henderson wrote: > This has been tried before, I forget what but there were problems from chat logs when I tried this before: 14:52 < sthen> if i kill the if_down, no crash, but the mac address doesn't get updated so i end up with the same one on em0, em1, trunk0

Re: pppoe: start documenting locks

2020-09-13 Thread Martin Pieuchot
On 13/09/20(Sun) 10:05, Klemens Nanni wrote: > > Here's a start at struct pppoe_softc; for every member I went through > code paths looking for *_LOCK() or *_ASSERT_LOCKED(). > > Pretty much all members are under the net lock, some are proctected by > both net and kernel lock, e.g. the start

Re: trunk: keep interface up on port removal

2020-09-13 Thread Stuart Henderson
This has been tried before, I forget what but there were problems -- Sent from a phone, apologies for poor formatting. On 12 September 2020 21:16:31 Alexander Bluhm wrote: OK bluhm@ On Sat, Sep 12, 2020 at 05:49:52PM +0200, Klemens Nanni wrote: Index: if_trunk.c

RFC: kern.video.record

2020-09-13 Thread Laurence Tratt
Since I recently opened my big fat mouth and suggested that "kern.video.record" (analogous to kern.audio.record) might be a good idea, I decided to put together a quick prototype (heavily based on the kern.audio.record code). This at least roughly works for me but raises some questions such as:

pppoe: start documenting locks

2020-09-13 Thread Klemens Nanni
Here's a start at struct pppoe_softc; for every member I went through code paths looking for *_LOCK() or *_ASSERT_LOCKED(). Pretty much all members are under the net lock, some are proctected by both net and kernel lock, e.g. the start routine is called with KERNEL_LOCK(). I did not go