Re: read(2) on directories

2016-08-08 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > "Todd C. Miller" writes: > >> From source inspection, Net and Free appear to allow read(2) of >> dirs to succeed. However, since Linux, Mac OS X and Solaris have >> the EISDIR behavior I think it is probably safe

Re: socket splice task

2016-08-08 Thread Alexander Bluhm
On Mon, Aug 08, 2016 at 11:52:58AM +0200, Martin Pieuchot wrote: > On 07/30/16 00:17, Alexander Bluhm wrote: > > Spliced TCP sockets become faster if we put the output part into > > its own task thread. This is inspired by userland copy where we > > also have to go through the scheduler. This

Re: read(2) on directories

2016-08-08 Thread Theo de Raadt
> > "Todd C. Miller" writes: > > > >> From source inspection, Net and Free appear to allow read(2) of > >> dirs to succeed. However, since Linux, Mac OS X and Solaris have > >> the EISDIR behavior I think it is probably safe from a portability > >> standpoint. > >> >

Re: read(2) on directories

2016-08-08 Thread Theo de Raadt
>> From source inspection, Net and Free appear to allow read(2) of >> dirs to succeed. However, since Linux, Mac OS X and Solaris have >> the EISDIR behavior I think it is probably safe from a portability >> standpoint. I want to explain why I chose the semantic of "read returns 0", about 20

Re: ksh, ctrl-r followed by arrow key leaves "[D" or "[C" artifacts

2016-08-08 Thread Ingo Schwarze
Hi Martin, Martin Natano wrote on Mon, Aug 08, 2016 at 08:21:50AM +0200: > On Mon, Aug 08, 2016 at 03:33:23AM +0200, Ingo Schwarze wrote: >> redirecting from misc@ to tech@ because i'm appending a patch >> at the very end, lightly tested. >> >> This has indeed been annoying me for years, but it

Re: Update: FreeType 2.6.5

2016-08-08 Thread Matthieu Herrb
On Thu, Aug 04, 2016 at 10:55:29AM +0200, David Coppa wrote: > > Here's the update to the latest freetype. > > $ check_sym > /usr/X11R6/lib/libfreetype.so.25.0 --> obj/libfreetype.so.25.0 > Dynamic export changes: > added: > af_armn_dflt_style_class > af_armn_nonbase_uniranges >

pmap7.c cleanup

2016-08-08 Thread Mark Kettenis
The page tables are cached now, and given the significant speedup, I don't think we'll ever go back. So let's ditch the code that tries to check and patch up incorrect memory attributes. Also realize that pmap_clean_page(pg, FALSE) doesn't do anything anymore so remove those calls and drop the

Re: ext2fs_vinit() cleanup

2016-08-08 Thread Ted Unangst
Martin Natano wrote: > ext2fs has only one set of specops/fifoops, so no need to pass those to > the function. This also allows to get rid of the EXT2FS_FIFOOPS define. > > Ok? ok

Re: move ufs_vinit() to ffs

2016-08-08 Thread Ted Unangst
Martin Natano wrote: > The ufs_vinit() function should really be called ffs_vinit(). The only > place it is called from is ffs_vget(). And again, the FIFOOPS macro can > be killed. > > Ok? ok

ral(4) support RT5390 and RT5392

2016-08-08 Thread James Hastings
Hi all, The following patch adds RT5390/RT5392 support to ral(4). Ported from FreeBSD r278551 and r36. Running smoothly with RT3090 and various RT5390 cards. Requires updated ral-rt2860 firmware Index: ral.4 === RCS file:

Re: pmap7.c cleanup

2016-08-08 Thread Daniel Bolgheroni
On Mon, Aug 08, 2016 at 09:17:39PM +0200, Mark Kettenis wrote: > This diff should not introduce any change in behaviour. Another round tested with a kernel build and works for me on BeagleBone Black. -- db

sparc* ld.so: delete obsolete __plt_{start,end} handling

2016-08-08 Thread Philip Guenther
As noted by kettenis@, all sparc64 binaries from 6.0-release forward should have their .plt segments marked as RWX, and thus initially mapped as RW but updated to RX after relocation. Given that, mprotecting [__plt_start, __plt_end) is no longer necessary there. I've eyeballed the readelf

Re: RELRO: mwuauahhahaha

2016-08-08 Thread Philip Guenther
On Sun, 7 Aug 2016, Philip Guenther wrote: > I'm looking for anyone with alpha or landisk that can test relro there. > Just add "|| defined(__alpha__) || defined(__sh__)" to the #if in the > first chunk below, then: This has been done now (thanks theo!) ...and there are some padding issues

Re: ksh, ctrl-r followed by arrow key leaves "[D" or "[C" artifacts

2016-08-08 Thread Martin Natano
On Mon, Aug 08, 2016 at 03:33:23AM +0200, Ingo Schwarze wrote: > Hi Dave, > > redirecting from misc@ to tech@ because i'm appending a patch > at the very end, lightly tested. > > This has indeed been annoying me for years, but it never occurred > to me that i might be able to figure out what's

Re: RELRO: support in ld.so

2016-08-08 Thread Mark Kettenis
> Date: Sat, 6 Aug 2016 18:58:57 -0700 > From: Philip Guenther > > Let's teach ld.so to look for a PT_GNU_RELRO section per object and, if > present, mprotect(PROT_READ) the range it covers *instead of* the > __got_start .. __got_end range. > > Two interesting bits are in

Re: man9/config_attach.9: incorporate config_deactivate information

2016-08-08 Thread Martin Pieuchot
On 08/08/16 07:38, Ian Sutton wrote: > On Sun, Aug 07, 2016 at 10:50:49PM -0600, Theo de Raadt wrote: >> Your diff also contained: >> >> -.Fn config_detach "struct device *dev" "int flags" >> +.Fn config_detach "struct device *dev" > > Argh! I had initially given config_deactivate() a flags

Re: RELRO: static PIE support

2016-08-08 Thread Mark Kettenis
> Date: Sun, 7 Aug 2016 20:01:58 -0700 > From: Philip Guenther > > On Sun, 7 Aug 2016, Philip Guenther wrote: > > > On Sun, Aug 7, 2016 at 4:45 AM, Mark Kettenis > > wrote: > > >> Date: Sat, 6 Aug 2016 22:17:47 -0700 > > >> From: Philip Guenther

Re: uvm kentry free list: use an SLIST instead of RB abuse

2016-08-08 Thread David Gwynne
> On 8 Aug 2016, at 10:46 PM, Mark Kettenis wrote: > >> Date: Mon, 8 Aug 2016 21:56:23 +1000 >> From: David Gwynne >> >> the current tracking of free static map entries is done as hand >> rolled list manipulations using pointers in an rb_entry.

Re: Fix Wacom Intuos S 2 descriptor and make wsmouse work

2016-08-08 Thread Martin Pieuchot
On 08/08/16 13:31, Frank Groeneveld wrote: > [...] >> I afraid you'll need to match the two interfaces of your device, >> something which is not trivial with the current framework. > > Do you know of a driver that currently does this? Search for UHIDEV_CLAIM_ALLREPORTID, at least upd(4) uses it.

Re: uvm kentry free list: use an SLIST instead of RB abuse

2016-08-08 Thread Mark Kettenis
> Date: Mon, 8 Aug 2016 21:56:23 +1000 > From: David Gwynne > > the current tracking of free static map entries is done as hand > rolled list manipulations using pointers in an rb_entry. it's really > confusing to read. > > since its simple list manipulations, this replaces

Re: Fix Wacom Intuos S 2 descriptor and make wsmouse work

2016-08-08 Thread Martin Pieuchot
On 08/07/16 19:30, Frank Groeneveld wrote: > I recently acquired a new Wacom drawing tablet: an Intuos Draw, which > seems to be called an Intuos S 2 internally. I couldn't get this tablet > to work in OpenBSD. One of the HID descriptors describes a mouse, so > ums(4) attaches to it, but no data

Re: Fix Wacom Intuos S 2 descriptor and make wsmouse work

2016-08-08 Thread Frank Groeneveld
On Mon, Aug 08, 2016 at 11:12:02AM +0200, Martin Pieuchot wrote: > > ... > > Is the attached patch acceptable? Or would it be better to write a > > seperate driver, such as uwacom, that does the same as ums, except that > > it doesn't call hidms_input, but implements that itself? > > I believe

uvm kentry free list: use an SLIST instead of RB abuse

2016-08-08 Thread David Gwynne
the current tracking of free static map entries is done as hand rolled list manipulations using pointers in an rb_entry. it's really confusing to read. since its simple list manipulations, this replaces the hand rolled code with an SLIST. ok? Index: uvm.h

rtable_walk() hand and route prio

2016-08-08 Thread Martin Pieuchot
On the train back from n2k16 I found the real cause of the hang reported by Dimitris Papastamos [0] and exposed by our recent changes to the routing table. When an interface is removed/detached the kernel delete all the corresponding route entries. At this moment the interface is DOWN and the

Correct order of route removal

2016-08-08 Thread Martin Pieuchot
The rtable_walk() & prio bug I just sent a fix for should theoretically not cause any trouble. Sadly it is piled on top of another bug for which a fix is attached. When an interface is removed the current code starts by purging all its corresponding route entries. This is wrong because the

Re: socket splice task

2016-08-08 Thread Mark Kettenis
> From: Martin Pieuchot > Date: Mon, 8 Aug 2016 12:17:30 +0200 > > On 07/30/16 02:41, Alexander Bluhm wrote: > > On Fri, Jul 29, 2016 at 08:07:14PM -0400, Ted Unangst wrote: > >> There's a sched_yield() in taskq_thread(). Something's not quite right. > > > > It is a

Re: socket splice task

2016-08-08 Thread Martin Pieuchot
On 07/30/16 00:17, Alexander Bluhm wrote: > Hi, > > Spliced TCP sockets become faster if we put the output part into > its own task thread. This is inspired by userland copy where we > also have to go through the scheduler. This gives the socket buffer > a chance to be filled up and

Re: nd6 router adv problem: valid lifetime is 0

2016-08-08 Thread Martin Pieuchot
On 08/06/16 00:00, Stuart Henderson wrote: > An update on this. > > Looking at flags after a hint from phrased - they're not setting the > on-link flag (intentionally, to prevent flooding multicast NDs over the > wlan, which makes sense) so it's hitting the XXX case in nd6_rtr.c which > replaces

Re: ksh, ctrl-r followed by arrow key leaves "[D" or "[C" artifacts

2016-08-08 Thread Alexander Hall
On Mon, Aug 08, 2016 at 08:21:50AM +0200, Martin Natano wrote: > On Mon, Aug 08, 2016 at 03:33:23AM +0200, Ingo Schwarze wrote: > > Hi Dave, > > > > redirecting from misc@ to tech@ because i'm appending a patch > > at the very end, lightly tested. > > > > This has indeed been annoying me for

zaurus/armish/armv7: move cpu_setup() call

2016-08-08 Thread Mark Kettenis
As patrick@ found earlier, on Cortex-A53 we have to enable the data cache before doing any atomic operations. Currently we do this in cpu_configure(), which is really late, after several kernel subsystems get initialized. And some of those subsystems use mutexes, which use atomic operations...

Re: uvm kentry free list: use an SLIST instead of RB abuse

2016-08-08 Thread Mark Kettenis
> From: David Gwynne > Date: Mon, 8 Aug 2016 23:14:13 +1000 > > > On 8 Aug 2016, at 10:46 PM, Mark Kettenis wrote: > > > >> Date: Mon, 8 Aug 2016 21:56:23 +1000 > >> From: David Gwynne > >> > >> the current tracking of free

Re: socket splice task

2016-08-08 Thread Alexander Bluhm
On Mon, Aug 08, 2016 at 12:17:30PM +0200, Martin Pieuchot wrote: > On 07/30/16 02:41, Alexander Bluhm wrote: > Are you sure it is not set? Or does the scheduler keeps selecting your > task? After some printf debugging I can say that it is not set. The scheduler is switching between softnet and