pkg_add.1

2020-06-23 Thread sven falempin
Dear readers, It may not be very obvious that 'dry run' mode of pkg_add actually downloads packages. It is a good feature and maybe the pkg_add man could use an EXAMPLES section. Index: pkg_add.1 === RCS file:

Re: [PATCH] net: prevent if_clone_destroy from racing with rest of stack

2020-06-23 Thread Jason A. Donenfeld
On Tue, Jun 23, 2020 at 8:21 AM Martin Pieuchot wrote: > I'd argue this is a related problem but a different one. The diff I > sent serializes cloning/destroying pseudo-interfaces. It has value on > its own because *all* if_clone_*() operations are now serialized. > > Now you correctly points

xhci(4): acknowledge interrupts before calling usb_schedsoftintr()

2020-06-23 Thread Patrick Wildt
Hi, I had issues with a machine hanging on powerdown. The issue is caused by sd(4)'s suspend method trying to "power down" my umass(4) USB stick. The symptom was that during powerdown, when running in "polling mode", the first transaction (send command to power down to USB stick) works: We

Re: top.1: Fix COMMAND description

2020-06-23 Thread Jason McIntyre
On Tue, Jun 23, 2020 at 09:42:06PM +0200, Klemens Nanni wrote: > There simply is no code that adds angle brackets the swapped out > processes in the COMMAND column. > > I double checked with a tiny VMM instance using 64M of RAM where > ld(1) from the library_aslr script immediately hits swap: no

Re: top.1: Fix COMMAND description

2020-06-23 Thread Klemens Nanni
On Tue, Jun 23, 2020 at 09:42:06PM +0200, Klemens Nanni wrote: > There simply is no code that adds angle brackets the swapped out > processes in the COMMAND column. > > I double checked with a tiny VMM instance using 64M of RAM where > ld(1) from the library_aslr script immediately hits swap: no

Re: SSE in kernel?

2020-06-23 Thread Philip Guenther
On Mon, Jun 22, 2020 at 9:12 PM wrote: > Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ > a sufficient guard? > > I have a rasops32 putchar with SSE that is 2x faster. > As Bryan and Patrick noted: it's possible, but there are restrictions and costs. The main restriction

top.1: Fix COMMAND description

2020-06-23 Thread Klemens Nanni
There simply is no code that adds angle brackets the swapped out processes in the COMMAND column. I double checked with a tiny VMM instance using 64M of RAM where ld(1) from the library_aslr script immediately hits swap: no <> around. While here, mention that -C appends arguments. Feedback? OK?

Re: top: remove redundant NULL check

2020-06-23 Thread Todd C . Miller
On Tue, 23 Jun 2020 18:31:03 +0200, Klemens Nanni wrote: > I'd like to remove a NULL check in get_process_info() for the sake of > simplicity and to reflect that the process list is *always* sorted > (default is "cpu"), even if not explicitly requested; this makes it > easier to argue about the

top: remove redundant NULL check

2020-06-23 Thread Klemens Nanni
I'd like to remove a NULL check in get_process_info() for the sake of simplicity and to reflect that the process list is *always* sorted (default is "cpu"), even if not explicitly requested; this makes it easier to argue about the code, imho. Details on why this check is never true:

Re: [PATCH] net: prevent if_clone_destroy from racing with rest of stack

2020-06-23 Thread Martin Pieuchot
On 23/06/20(Tue) 04:53, Jason A. Donenfeld wrote: > On 6/23/20, Martin Pieuchot wrote: > > On 23/06/20(Tue) 01:00, Jason A. Donenfeld wrote: > >> You can crash a system by running something like: > >> > >> for i in 1 2 3; do while true; do ifconfig bridge0 create& ifconfig > >> bridge0

Re: systat.1: Trim ":" description, support line kill character

2020-06-23 Thread Klemens Nanni
On Mon, Jun 22, 2020 at 08:57:43PM -0600, Theo de Raadt wrote: > In OpenBSD, the erase character is ^? > > ^H is accepted in a few places, like here (because of CTRL_H) but > it is absolutely not the canonical tty 'character erase' character, > which is implied in your text by placing it next to

Adapt usbhidaction.1 example to sndio changes

2020-06-23 Thread Benjamin Baier
Hi, adapt usbhidaction.1 example to sndio changes. Greetings Ben Index: usbhidaction.1 === RCS file: /var/cvs/src/usr.bin/usbhidaction/usbhidaction.1,v retrieving revision 1.14 diff -u -p -r1.14 usbhidaction.1 --- usbhidaction.1

umass(4): consistently use sc_xfer_flags for polling mode

2020-06-23 Thread Patrick Wildt
Hi, when powering down, sd(4) will trigger a powerdown on it's umass(4) USB stick. If the device fails to respond, for whatever reason, the umass(4) code will do multiple reset mechanism, and one of those uses a control transfer. Unfortunately the control transfer is not passed the

Re: SSE in kernel?

2020-06-23 Thread Bryan Steele
On Tue, Jun 23, 2020 at 01:03:18PM +0200, Patrick Wildt wrote: > On Tue, Jun 23, 2020 at 06:51:20AM -0400, Bryan Steele wrote: > > On Mon, Jun 22, 2020 at 11:10:10PM -0700, jo...@armadilloaerospace.com > > wrote: > > > Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ > > > a

Re: SSE in kernel?

2020-06-23 Thread Bryan Steele
On Tue, Jun 23, 2020 at 06:51:22AM -0400, Bryan Steele wrote: > On Mon, Jun 22, 2020 at 11:10:10PM -0700, jo...@armadilloaerospace.com wrote: > > Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ > > a sufficient guard? > > > > I have a rasops32 putchar with SSE that is 2x

Re: SSE in kernel?

2020-06-23 Thread Patrick Wildt
On Tue, Jun 23, 2020 at 06:51:20AM -0400, Bryan Steele wrote: > On Mon, Jun 22, 2020 at 11:10:10PM -0700, jo...@armadilloaerospace.com wrote: > > Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ > > a sufficient guard? > > > > I have a rasops32 putchar with SSE that is 2x

Re: [PATCH] net: prevent if_clone_destroy from racing with rest of stack

2020-06-23 Thread Jason A. Donenfeld
On 6/23/20, Martin Pieuchot wrote: > On 23/06/20(Tue) 01:00, Jason A. Donenfeld wrote: >> You can crash a system by running something like: >> >> for i in 1 2 3; do while true; do ifconfig bridge0 create& ifconfig >> bridge0 destroy& done& done >> >> This works with every type of interface

Re: SSE in kernel?

2020-06-23 Thread Bryan Steele
On Mon, Jun 22, 2020 at 11:10:10PM -0700, jo...@armadilloaerospace.com wrote: > Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ > a sufficient guard? > > I have a rasops32 putchar with SSE that is 2x faster. No, in general you cannot using FP instructions in the kernel, also

Re: [PATCH] net: prevent if_clone_destroy from racing with rest of stack

2020-06-23 Thread Martin Pieuchot
On 23/06/20(Tue) 01:00, Jason A. Donenfeld wrote: > You can crash a system by running something like: > > for i in 1 2 3; do while true; do ifconfig bridge0 create& ifconfig > bridge0 destroy& done& done > > This works with every type of interface I've tried. It appears that >

Make *select(2) use kqfilter handlers

2020-06-23 Thread Martin Pieuchot
Diff below can be seen as 3 logical parts that together change the current *select(2) implementation: - Create & destroy a per-thread kqueue in fork1() and exit1(). - Change the kqueue_scan() interface to keep track of the end point of a scan, this is mostly from visa@. - Change

Rename iev_ldpe to iev_lde in ldpd(8)'s lde.c

2020-06-23 Thread wlund
Dear Tech, By applying this patch, you might save someone from confusing the renamed variable with iev_ldpe in ldpd.c. diff refs/remotes/origin/master 8c512ccc39fae85e26c6bf0b4b62aa7980809163 blob - 1bfd701a39082259d0913467704bee5191aa8714 blob + b284033f891ef1bdb1d4d5fe23129e252e1726ec ---

Re: pipe: reduce number of allocations

2020-06-23 Thread Anton Lindqvist
On Tue, Jun 16, 2020 at 09:10:54PM +0200, Anton Lindqvist wrote: > Hi, > Instead of performing three distinct allocations per created pipe, > reduce it to a single one. Not only should this be more performant, it > also solves a kqueue related issue found by visa@ who also requested > this change:

[PATCH] net: prevent if_clone_destroy from racing with rest of stack

2020-06-23 Thread Jason A. Donenfeld
You can crash a system by running something like: for i in 1 2 3; do while true; do ifconfig bridge0 create& ifconfig bridge0 destroy& done& done This works with every type of interface I've tried. It appears that if_clone_destroy and if_clone_create race with other ioctls, which causes a

SSE in kernel?

2020-06-23 Thread johnc
Are SSE instructions allowed in the AMD64 kernel? Is #ifdef __SSE__ a sufficient guard? I have a rasops32 putchar with SSE that is 2x faster.