Re: rtsock refactoring

2017-01-22 Thread Claudio Jeker
On Sat, Jan 21, 2017 at 07:31:20AM +0100, Claudio Jeker wrote: > On Sat, Jan 21, 2017 at 01:28:02AM +0100, Claudio Jeker wrote: > > On Fri, Jan 20, 2017 at 02:51:52AM +0100, Claudio Jeker wrote: > > > I sent this diff out some time ago and would really like to get this in. > > > This is one step

Re: ipsec_common_input() & splsoftnet()

2017-01-22 Thread Sebastian Benoit
ok Martin Pieuchot(m...@openbsd.org) on 2017.01.23 10:44:59 +1000: > This function is only called by udp_input() so at IPL_SOFTNET. Assert > that and get rid of a recursive splsoftnet()/splx() dance. > > ok? > > Index: netinet/ipsec_input.c >

less

2017-01-22 Thread Theo de Raadt
This change causes less(1) to open /dev/tty slightly earlier, or fallback to stderr. As a result the TIOCGWINSZ operation can be done against the most likely tty descriptor. As a side effect, that tty descriptor will be opened before the first pledge call. Anyone see a downside? Index:

arm64: distrib for ramdisk kernel

2017-01-22 Thread Patrick Wildt
Hi, this diff provides the infrastructure to compile a ramdisk kernel for arm64. It's been copied from armv7 and stripped from u-boots, device trees and mkuboot. ok? Patrick diff --git a/distrib/arm64/Makefile b/distrib/arm64/Makefile new file mode 100644 index 000..bb5d606b329 ---

Special casing fd's opened before pledge(2)

2017-01-22 Thread Theo de Raadt
There has been developer pressure to permit an increasing number of ioctl's to pledged programs. The problem is that providing a specific ioctl under a promise to one program, means it becomes supplied to all other programs that make that promise. There is no discrete method to differentiate

arm64: distrib/special installboot

2017-01-22 Thread Patrick Wildt
Hi, this makes installboot compile for arm64 at the RAMDISK build. ok? Patrick diff --git a/distrib/special/installboot/Makefile b/distrib/special/installboot/Makefile index 760daf0e44e..bfff63b11e4 100644 --- a/distrib/special/installboot/Makefile +++ b/distrib/special/installboot/Makefile

Re: use ifqueue packet statistics

2017-01-22 Thread Martin Pieuchot
On 22/01/17(Sun) 20:38, David Gwynne wrote: > ifqueues count packets, therefore if_enqueue doesnt have to. > > this adds reading of the ifq counters into the if_data values so > userland still looks right. > > this is another step toward multiple tx queues. I like it, some comments below. >

Re: use ifqueue packet statistics

2017-01-22 Thread David Gwynne
On Mon, Jan 23, 2017 at 10:10:23AM +1000, Martin Pieuchot wrote: > On 22/01/17(Sun) 20:38, David Gwynne wrote: > > ifqueues count packets, therefore if_enqueue doesnt have to. > > > > this adds reading of the ifq counters into the if_data values so > > userland still looks right. > > > > this is

add support for multiple transmit queues on interfaces

2017-01-22 Thread David Gwynne
the short explanation is that this lets interfaces allocate multiple ifq structures that can be mapped to their transmit rings. the mechanism for this is a driver calling if_attach_queues() after theyve called if_attach(). the long version is that this has if_enqueue access an array of ifqueues

ipsec_common_input() & splsoftnet()

2017-01-22 Thread Martin Pieuchot
This function is only called by udp_input() so at IPL_SOFTNET. Assert that and get rid of a recursive splsoftnet()/splx() dance. ok? Index: netinet/ipsec_input.c === RCS file: /cvs/src/sys/netinet/ipsec_input.c,v retrieving

Re: split pledge "ioctl" into "bpf" and "tape"

2017-01-22 Thread Mark Kettenis
> From: Theo de Raadt > Date: Sun, 22 Jan 2017 20:52:14 -0700 > > Early during pledge development the "ioctl" promise was a kitchen > sink of options until we could differentiate use cases, identify > common patterns, and then create domain-specific promises. > > only 4

Re: rtwn: fix iq calibration

2017-01-22 Thread Jeremie Courreges-Anglas
Stefan Sperling writes: > FreeBSD committed a couple of interesting things in r307529 > https://svnweb.freebsd.org/base?view=revision=r307529 > Unfortunately the commit is a giant patch bomb which makes > it hard to pick out individual fixes :-( > > This patch extracts what I

uvm: guard unused function for RAMDISK kernel

2017-01-22 Thread Patrick Wildt
Hi, on a RAMDISK kernel this function is not used, thus clang complains. Simply guard it with SMALL_KERNEL, like the rest of that part of the code. ok? Patrick diff --git a/sys/uvm/uvm_addr.c b/sys/uvm/uvm_addr.c index af33700273b..4527e1fda78 100644 --- a/sys/uvm/uvm_addr.c +++

Re: uvm: guard unused function for RAMDISK kernel

2017-01-22 Thread Patrick Wildt
On Mon, Jan 23, 2017 at 10:20:39AM +1000, Patrick Wildt wrote: > Hi, > > on a RAMDISK kernel this function is not used, thus clang complains. > Simply guard it with SMALL_KERNEL, like the rest of that part of the > code. > > ok? > > Patrick > As requested by deraadt@, simply move the function

split pledge "ioctl" into "bpf" and "tape"

2017-01-22 Thread Theo de Raadt
Early during pledge development the "ioctl" promise was a kitchen sink of options until we could differentiate use cases, identify common patterns, and then create domain-specific promises. only 4 cases remain of "ioctl" remain: - pax/tar/cpio experience great difficulty finding tape drives

rtwn: fix iq calibration

2017-01-22 Thread Stefan Sperling
FreeBSD committed a couple of interesting things in r307529 https://svnweb.freebsd.org/base?view=revision=r307529 Unfortunately the commit is a giant patch bomb which makes it hard to pick out individual fixes :-( This patch extracts what I believe "fix IQ calibration bug" refers to. The current

define pvbus in conf/files

2017-01-22 Thread Reyk Floeter
Hi, when fixing my virtio config breakage, I found the following comment in sys/conf/files, followed by a few bus defines: ---snip--- # Attributes which machine-independent bus support can be attached to. # These should be defined here, because some of these busses can have # devices which

Re: usbdevs: logitech: cleanup and new ids

2017-01-22 Thread James Hastings
On 1/23/17, Jonathan Gray wrote: > On Mon, Jan 23, 2017 at 01:56:20AM -0500, James Hastings wrote: >> Hello @tech >> >> Recently found a pile of old Logitech webcams to test with uvideo(4). >> s/QUICKCAM/QKCAM. >> shorten device strings. >> Add many new Logitech device ids. >> >>

Re: usbdevs: logitech: cleanup and new ids

2017-01-22 Thread Jonathan Gray
On Mon, Jan 23, 2017 at 01:56:20AM -0500, James Hastings wrote: > Hello @tech > > Recently found a pile of old Logitech webcams to test with uvideo(4). > s/QUICKCAM/QKCAM. > shorten device strings. > Add many new Logitech device ids. > > dev/usb/usbdevs > dev/usb/uaudio.c > dev/usb/uvideo.c USB

Re: add support for multiple transmit queues on interfaces

2017-01-22 Thread David Gwynne
hrvoje popovski hit a problem where the kernel would panic under load. i mistakenly called an interfaces qstart routine directly from if_enqueue rather than via the ifq serializer. this meant that txeof routines on network cards calling ifq_restart would cause the start routine to run

usbdevs: logitech: cleanup and new ids

2017-01-22 Thread James Hastings
Hello @tech Recently found a pile of old Logitech webcams to test with uvideo(4). s/QUICKCAM/QKCAM. shorten device strings. Add many new Logitech device ids. dev/usb/usbdevs dev/usb/uaudio.c dev/usb/uvideo.c Index: dev/usb/uaudio.c

use ifqueue packet statistics

2017-01-22 Thread David Gwynne
ifqueues count packets, therefore if_enqueue doesnt have to. this adds reading of the ifq counters into the if_data values so userland still looks right. this is another step toward multiple tx queues. ok? Index: if.c === RCS