Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Mark Kettenis
> Date: Wed, 1 Apr 2020 09:40:05 +0200 > From: Patrick Wildt > > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > > > On Wed, Mar 18, 2020 at

EV_SET(2) shadows variable

2020-04-01 Thread Martin Pieuchot
The current form of EV_SET(2) declares a `kevp' variable. This can cause to subtle bugs hard to discover if one uses a variable of the same to retrieve events. Diff below prefixes the locally declared variable by an underscore, like it it done in FD_ZERO(), which should be good enough to prevent

Introduce kqsleep()

2020-04-01 Thread Martin Pieuchot
I've started to refactor some of the kqueue() subsystem to make progress on moving selwakeup() out of the KERNEL_LOCK(). Diff below is a small part of this work. It extracts the sleeping logic outside of the main loop. I find this easier to read and it allows me to make my huge diff more easily

worm(6): Remove stdin garbage after end

2020-04-01 Thread Martijn van Duren
When playing worm(6) and you crash there's a sleep of 2 seconds that still allows input to be put into the terminal buffer that doesn't get read until the application stops. A similar case is possible in a more limited timespan if you win the game. The diff below flushes the input buffer just

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Martin Pieuchot
On 01/04/20(Wed) 10:06, Mark Kettenis wrote: > > Date: Wed, 1 Apr 2020 09:40:05 +0200 > > From: Patrick Wildt > > > > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > > > On Wed, Apr 01, 2020 at 12:58:23PM

Re: Introduce kqsleep()

2020-04-01 Thread Mark Kettenis
> Date: Wed, 1 Apr 2020 10:28:33 +0200 > From: Martin Pieuchot > > I've started to refactor some of the kqueue() subsystem to make progress > on moving selwakeup() out of the KERNEL_LOCK(). Diff below is a small > part of this work. It extracts the sleeping logic outside of the main > loop. >

Re: Dedulpicate pipex(4) and pppx(4) code

2020-04-01 Thread Vitaliy Makkoveev
Updated diff. The idea is to use already existing pipex API for pipex_session creation and destruction. pppx_if now holds a reference to pipex_session. Index: sys/net/if_pppx.c === RCS file: /cvs/src/sys/net/if_pppx.c,v retrieving

pselect(2) bug or feature?

2020-04-01 Thread Martin Pieuchot
While working on moving pselect(2) outside of the KERNEL_LOCK() I found this surprising {p,}select(2) behavior exposed by the libc/sys/t_select.c regression test. Should it be considered as a bug or feature? The above mentioned test does the following (simplified): fd =

Re: [PATCH] dired-jump for mg

2020-04-01 Thread Philip K.
George Koehler writes: > C-x C-j doesn't work for me: it does show the dired buffer, but > doesn't jump to the file that I was editing. Looks like that was because I called gotofile before showbuffer. I changed that before submitting it, and I remember it seeming to work, but I guess I was

Re: pselect(2) bug or feature?

2020-04-01 Thread Theo de Raadt
The regress test is wrong. The first parameter to pselect has to tell it which bits to look at. It should be something like getdtablesize(), or fd+1, or FD_SETSIZE. And then there's all the handwaving about fd_set overflow, meaning what if fd >= FD_SETSIZE. I've never heard of an exploitable

Unify file descriptor kqfilter errors

2020-04-01 Thread Martin Pieuchot
kevent(2) notifies userland if an event happened based on given filter. If an error is encountered during execution, the given descriptor will have the EV_ERROR flag set and `data' will contain an errno(2) value. This value might come from the kqueue subsystem itself or from the f_attach()

rpki-client and non-existing files

2020-04-01 Thread Claudio Jeker
Currently rpki-client logs missing files like this: rpki-client: ...trace: error:02FFF002:system library:func(4095):No such file or directory rpki-client: ...trace: error:20FFF080:BIO routines:CRYPTO_internal:no such file rpki-client:

Re: pselect(2) bug or feature?

2020-04-01 Thread Claudio Jeker
On Wed, Apr 01, 2020 at 01:08:10PM +0200, Martin Pieuchot wrote: > While working on moving pselect(2) outside of the KERNEL_LOCK() I found > this surprising {p,}select(2) behavior exposed by the libc/sys/t_select.c > regression test. Should it be considered as a bug or feature? I think this is

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 09:40:06AM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > > > On Wed, Mar 18, 2020 at

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 12:04:25PM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 09:40:06AM +0200, Patrick Wildt wrote: > > On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > > > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > > > On Wed, Apr 01, 2020 at

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 09:22:07AM +0200, Patrick Wildt wrote: > On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > > On Wed, Mar 18, 2020 at 01:41:06PM +0100, Patrick Wildt wrote: > > > > On Wed, Mar 18, 2020 at

Re: Prevent memory corruption by pipex_timer()

2020-04-01 Thread YASUOKA Masahiko
Hi, Sorry for my silence. ok yasuoka for the daemon part. On Wed, 1 Apr 2020 09:27:10 +0200 Martin Pieuchot wrote: > On 31/03/20(Tue) 23:16, Vitaliy Makkoveev wrote: >> On Tue, Mar 31, 2020 at 06:15:46PM +0200, Martin Pieuchot wrote: >> > [...] >> > Well better fix npppd(8), no? Not crashing

Re: usb(4): use cacheable buffers for data transfers (massive speedup)

2020-04-01 Thread Patrick Wildt
On Wed, Apr 01, 2020 at 04:47:10PM +1100, Jonathan Gray wrote: > On Wed, Apr 01, 2020 at 12:58:23PM +1100, Jonathan Gray wrote: > > On Wed, Mar 18, 2020 at 01:41:06PM +0100, Patrick Wildt wrote: > > > On Wed, Mar 18, 2020 at 11:22:40AM +0100, Patrick Wildt wrote: > > > > Hi, > > > > > > > > I've

Re: Prevent memory corruption by pipex_timer()

2020-04-01 Thread Martin Pieuchot
On 31/03/20(Tue) 23:16, Vitaliy Makkoveev wrote: > On Tue, Mar 31, 2020 at 06:15:46PM +0200, Martin Pieuchot wrote: > > [...] > > Well better fix npppd(8), no? Not crashing the kernel is priority 1. > I made patch for npppd(8) too. I include it to this email below, without > starting new thread,

Re: pselect(2) bug or feature?

2020-04-01 Thread Christos Zoulas
The select(2) family of syscalls was designed to work this way (block when file descriptors are not available, even when they cannot become available). For example: select(0, NULL, NULL, NULL, NULL); blocks forever. In fact in the very old days (before usleep, nanosleep,

Re: pselect(2) bug or feature?

2020-04-01 Thread Todd C . Miller
On Wed, 01 Apr 2020 13:53:53 +0200, Claudio Jeker wrote: > I think this is actually a feature. The standard does not mention that you > have to listen on something and it would allow to use select() as a > sleep() replacement. I would expect that pselect() should behave the same > way. I agree

libossaudio: start using sndio

2020-04-01 Thread Alexandre Ratchov
ping! FWIW, the diff below affects the following ports: - emulators/gambatte - gstreamer-0.10 mixer plugin - sysutils/conky - sysutils/gkrellm - sysutil/tpb - telephony/iaxclient - anything depending on gstreamer, ex xfce4-mixer If you use

Re: rpki-client and non-existing files

2020-04-01 Thread Claudio Jeker
On Wed, Apr 01, 2020 at 01:06:21PM +0200, Claudio Jeker wrote: > Currently rpki-client logs missing files like this: > > rpki-client: ...trace: error:02FFF002:system library:func(4095):No such file > or directory > rpki-client: ...trace: error:20FFF080:BIO routines:CRYPTO_internal:no such >

Re: rpki-client and non-existing files

2020-04-01 Thread Claudio Jeker
On Wed, Apr 01, 2020 at 09:42:42PM +0200, Sebastian Benoit wrote: > ok > > you remove the "if (verbose > 0)" in the cms_parse_validate() case on > purpose? Yes, since we use rpki-client in cron with the magic -n prefix it would be nice to have enough verbosity to know why the process failed

Re: rpki-client and non-existing files

2020-04-01 Thread Sebastian Benoit
ok you remove the "if (verbose > 0)" in the cms_parse_validate() case on purpose? Claudio Jeker(cje...@diehard.n-r-g.com) on 2020.04.01 16:33:44 +0200: > On Wed, Apr 01, 2020 at 01:06:21PM +0200, Claudio Jeker wrote: > > Currently rpki-client logs missing files like this: > > > > rpki-client:

ospf6d: update to connected routes

2020-04-01 Thread Denis Fondras
Handle connected routes as ospfd(8) does. (diff to ospf6d and ospf6ctl) Index: ospf6ctl/ospf6ctl.c === RCS file: /cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v retrieving revision 1.50 diff -u -p -r1.50 ospf6ctl.c --- ospf6ctl/ospf6ctl.c

Re: rpki-client and non-existing files

2020-04-01 Thread Theo de Raadt
Claudio Jeker wrote: > On Wed, Apr 01, 2020 at 01:06:21PM +0200, Claudio Jeker wrote: > > Currently rpki-client logs missing files like this: > > > > rpki-client: ...trace: error:02FFF002:system library:func(4095):No such > > file or directory > > rpki-client: ...trace: error:20FFF080:BIO