Re: Does grep need a version?

2015-12-07 Thread Theo de Raadt
> Bob Beck wrote: > > Since I can't think of a sane reason to check this and care in any > > script, yes, kill it. > > ok beck@ > > Theo pointed out that there may be ports that check the version. I was > considering that too. However, we haven't bumped from 0.9 since 2003. > ggrep is now on 2.22,

Re: ksh(1): utf8 in emacs editing mode

2015-12-07 Thread Sebastien Marie
On Tue, Dec 08, 2015 at 01:19:35AM +0100, Ingo Schwarze wrote: > Hi, > > i'd like to propose a simplified version of this patch Frederic Nowak > posted a few weeks ago for commit. Our experience is probably > not yet sufficient to develop a full-blown solution for all UTF-8 > problems in ksh(1),

Re: Does grep need a version?

2015-12-07 Thread Michael McConville
Bob Beck wrote: > Since I can't think of a sane reason to check this and care in any > script, yes, kill it. > ok beck@ Theo pointed out that there may be ports that check the version. I was considering that too. However, we haven't bumped from 0.9 since 2003. ggrep is now on 2.22, so I have hope

Re: Does grep need a version?

2015-12-07 Thread Bob Beck
Since I can't think of a sane reason to check this and care in any script, yes, kill it. ok beck@ On Mon, Dec 7, 2015 at 10:06 PM, Michael McConville wrote: > It's been 0.9 since the original import in 2003... > > > Index: grep.1 > =

Re: 3rd party Xbox 360 USB controller support

2015-12-07 Thread Jeremy Evans
On 12/07 12:52, Martin Pieuchot wrote: > On 05/12/15(Sat) 15:22, Christian Heckendorf wrote: > > The previous thread[1] discussing these controllers includes two > > patches but they seem to have been merged for the commit in a way > > that limits support to only Microsoft controllers. 3rd party Xb

Does grep need a version?

2015-12-07 Thread Michael McConville
It's been 0.9 since the original import in 2003... Index: grep.1 === RCS file: /cvs/src/usr.bin/grep/grep.1,v retrieving revision 1.43 diff -u -p -r1.43 grep.1 --- grep.1 13 Jan 2015 04:45:34 - 1.43 +++ grep.1 8 De

Re: dhclient hang

2015-12-07 Thread Bob Beck
I think trying again for a different lease is the right thing.. I'm really tired of dhclient exiting for stupid reasons ;) On Mon, Dec 7, 2015 at 3:11 PM, Kenneth Westerback wrote: > I don't understand what you mean by hang? Does it hang the box? I would > expect dhclient to reject the offer and

Re: dhclient hang

2015-12-07 Thread Kenneth Westerback
I don't understand what you mean by hang? Does it hang the box? I would expect dhclient to reject the offer and try again. Does dhclient never try again? I'll take a closer look tomorrow, but if it isn't now it should be easy to fix dhclient to try again for a different lease. Ken On 7 Dec 2

Re: preparing multitouch support - request for tests

2015-12-07 Thread Ulf Brosziewski
Hi, here are the diffs again, as tgz archive (it's the version I posted last week, which doesn't include the latest bug fix: hilms is incomplete in that version and won't work with tablets, only with mice). On 12/07/15 15:59, Matthieu Herrb wrote: On Thu, Dec 03, 2015 at 12:20:15AM +0100, Ulf B

Re: [PATCH] doas authentication type

2015-12-07 Thread Stuart Henderson
On 2015/11/25 00:14, Stuart Henderson wrote: > On 2015/11/24 11:24, Richard Johnson wrote: > > We use 2-factor authn for sudo & doas, as well as for most logins. > > Presently, we transport Yubikey and other HOTP strings across RADIUS to an > > otpd authserver > > Interesting...is that a fork of t

vlan doesn thave to handle SIOCGIFADDR

2015-12-07 Thread David Gwynne
cos the stack can do it for it. ok? Index: if_vlan.c === RCS file: /cvs/src/sys/net/if_vlan.c,v retrieving revision 1.149 diff -u -p -r1.149 if_vlan.c --- if_vlan.c 5 Dec 2015 10:07:55 - 1.149 +++ if_vlan.c 8 Dec 2015 0

Re: preparing multitouch support - request for tests

2015-12-07 Thread Ulf Brosziewski
I believe your remarks and questions concern crucial points, which probably deserve some discussion and careful examination. Please note that behind the extension of the interface that wsmouse provides to the hardware drivers, there is an approach that is somewhat different from, e.g., what Linux

Re: ksh(1): utf8 in emacs editing mode

2015-12-07 Thread Ingo Schwarze
Hi, i'd like to propose a simplified version of this patch Frederic Nowak posted a few weeks ago for commit. Our experience is probably not yet sufficient to develop a full-blown solution for all UTF-8 problems in ksh(1), but this is very non-intrusive and makes the following commands better with

patch 4/4 add keyboard backlight support to asmc(4)

2015-12-07 Thread Joerg Jung
Hi, here comes another diff of the series for the keyboard backlight support. Please find below a diff which enables keyboard backlight control on Intel Apple Laptops via asmc(4). This diff uses introduced wskbd(4) hooks from previously sent diffs and also introduces locking and minor refactorin

patch 3/4 add generic keyboard backlight support

2015-12-07 Thread Joerg Jung
Hi, here comes the third part of the series for generic keyboard backlight support. Please find below a diff which adds they key(code)s for keyboard backlight control, as found on all recent Intel based Apple Laptop Keyboards. While here, also add keys for display brightness control found on App

patch 1/4 add generic keyboard backlight support

2015-12-07 Thread Joerg Jung
Hi, here comes a series of small diffs which add generic support for keyboard backlights. Please find below the first diff, which adds new ioctls to wskbd(4) to control keyboard backlights. In contrast to an earlier diff from jcs, I have chosen to use a struct in favor of a simple (unsigned) int

patch 2/4 add generic keyboard backlight support

2015-12-07 Thread Joerg Jung
Hi, here comes the second part of the series for generic keyboard backlight support. Please find below the userland part which adds a backlight variable to wsconsctl(8). I have chosen to use the percentage format, so it looks like this: $ doas wsconsctl keyboard.backlight=80 keyboard.ba

Re: [patch] fix urtw on big-endian CPU (PPC)

2015-12-07 Thread Stefan Sperling
On Mon, Dec 07, 2015 at 09:31:11PM +0100, Cédric TESSIER wrote: > Hi, > > I'm bringing my old Mac Mini G4 back to life, and I had an issue with a > wireless dongle (RTL8187 rev 0x04, RFv2). > > urtw interface was available, but wasn't working at all. > > Investigations highlighted an endianness

[patch] mailwrapper: remove broken fallback code

2015-12-07 Thread Serguey Parkhomovsky
If /etc/mailer.conf doesn't exist, mailwrapper tries to run sendmail, giving a confusing error message: mailwrapper: cannot exec /usr/libexec/sendmail/sendmail: No such file or directory This patch removes this fallback code. I believe this is cleaner than updating the fallback since we w

Re: Do not pass NULL to rtdeletemsg()

2015-12-07 Thread Vincent Gross
On 12/07/15 14:57, Martin Pieuchot wrote: > If the interface is gone that means you're dealing with a cached route > so there's no need to try to remove it from the table. > > Better be explicit and do that before calling rtdeletemsg() rather than > inside. > > ok? ok vgross@ > > Index: netine

Re: [patch] Convert modulus to arc4random_uniform

2015-12-07 Thread Theo Buehler
> I'll look into hack tonight when I have more time. Honestly, I would prefer to leave hack as it is right now since it will take some work to repair it anyway. I would not want to add another layer of (potential) complications. > > > Index: lib/libc/stdlib/rand.c > > > =

Re: [vi] Remove needless (m|c)alloc aliases

2015-12-07 Thread Theo Buehler
On Mon, Dec 07, 2015 at 03:44:12PM -0500, Michael McConville wrote: > No binary change. ok? ok tb@

[vi] Remove needless (m|c)alloc aliases

2015-12-07 Thread Michael McConville
No binary change. ok? Index: cl/cl_main.c === RCS file: /cvs/src/usr.bin/vi/cl/cl_main.c,v retrieving revision 1.27 diff -u -p -r1.27 cl_main.c --- cl/cl_main.c7 Dec 2015 20:39:19 - 1.27 +++ cl/cl_main.c7 De

[patch] fix urtw on big-endian CPU (PPC)

2015-12-07 Thread Cédric TESSIER
Hi, I'm bringing my old Mac Mini G4 back to life, and I had an issue with a wireless dongle (RTL8187 rev 0x04, RFv2). urtw interface was available, but wasn't working at all. Investigations highlighted an endianness related issue. I've written a quick and dirty patch which make the interface fu

Re: Remove vi allocation casting

2015-12-07 Thread Theo Buehler
On Mon, Dec 07, 2015 at 02:59:52PM -0500, Michael McConville wrote: > It's definitely time for these to go. > > The allocation macros would probably be better as functions (e.g. > xmalloc) these days, too. I'll save that diff for another time, though. > > No binary change. confirmed and complete

Re: [patch] Convert modulus to arc4random_uniform

2015-12-07 Thread Matthew Martin
On Mon, Dec 07, 2015 at 09:33:47AM +0100, Theo Buehler wrote: > I think some of these are ok, but I'm unsure about some of the others. > Here are some of my concerns: > > - since arc4random_uniform can potentially loop indefinitely, it > might interfere with predictable timing of some routines.

Re: [patch] dvmrpd: strings header cleanup

2015-12-07 Thread Claudio Jeker
On Mon, Dec 07, 2015 at 02:04:18PM -0500, Michael McConville wrote: > Serguey Parkhomovsky wrote: > > Fixes implicit memcpy declarations by using string.h instead of > > strings.h, and removes strings.h from files that don't need it. Also, > > change bzero(3) to memset(3). > > Thanks for this. >

Remove vi allocation casting

2015-12-07 Thread Michael McConville
It's definitely time for these to go. The allocation macros would probably be better as functions (e.g. xmalloc) these days, too. I'll save that diff for another time, though. No binary change. ok? Index: cl/cl_main.c === RCS file

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Kirill Bychkov
On Sun, December 6, 2015 22:10, Ian Darwin wrote: > > > On 2015-12-06 12:23 PM, Stuart Henderson wrote: >> On 2015/12/06 06:02, Mickael Torres wrote: >>> Hello, >>> >>> This is a kernel patch plus a utility called ugenctl I use to allow >>> selected USB devices to attach as ugen(4) instead of their

Re: [patch] dvmrpd: strings header cleanup

2015-12-07 Thread Michael McConville
Serguey Parkhomovsky wrote: > Fixes implicit memcpy declarations by using string.h instead of > strings.h, and removes strings.h from files that don't need it. Also, > change bzero(3) to memset(3). This is all committed now. Thanks! > Index: ask_nbrs2.c > =

Re: [patch] dvmrpd: strings header cleanup

2015-12-07 Thread Michael McConville
Serguey Parkhomovsky wrote: > Fixes implicit memcpy declarations by using string.h instead of > strings.h, and removes strings.h from files that don't need it. Also, > change bzero(3) to memset(3). Thanks for this. I just took care of the existing implicit declarations. Below is a diff for the re

[patch] dvmrpd: strings header cleanup

2015-12-07 Thread Serguey Parkhomovsky
Fixes implicit memcpy declarations by using string.h instead of strings.h, and removes strings.h from files that don't need it. Also, change bzero(3) to memset(3). Index: ask_nbrs2.c === RCS file: /cvs/src/usr.sbin/dvmrpd/ask_nbrs2.c,

Re: dhclient hang

2015-12-07 Thread Reyk Floeter
On Mon, Dec 07, 2015 at 06:36:06PM +0100, Martin Pieuchot wrote: > On 07/12/15(Mon) 18:43, Reyk Floeter wrote: > > On Mon, Dec 07, 2015 at 06:15:43PM +0100, Martin Pieuchot wrote: > > > On 07/12/15(Mon) 18:17, Reyk Floeter wrote: > > > > On Mon, Dec 07, 2015 at 04:56:56PM +0100, Martin Pieuchot wro

Re: dhclient hang

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 18:43, Reyk Floeter wrote: > On Mon, Dec 07, 2015 at 06:15:43PM +0100, Martin Pieuchot wrote: > > On 07/12/15(Mon) 18:17, Reyk Floeter wrote: > > > On Mon, Dec 07, 2015 at 04:56:56PM +0100, Martin Pieuchot wrote: > > > > If for some reason SIOCAIFADDR fails, exit instead of hanging

Re: Make em(4) more mpsafe again

2015-12-07 Thread Hrvoje Popovski
On 5.12.2015. 15:41, Claudio Jeker wrote: > So Mark and I spent some time to figure out what the issue was with ix(4) > based on that info I resurected the em(4) mpsafe diff that got backed out > and I applied the same fix. It is somewhat unclear if this fixes the > watchdog timeouts since in theor

Re: Overflowable int -> size_t in grep

2015-12-07 Thread Todd C. Miller
On Mon, 07 Dec 2015 02:32:50 -0500, Michael McConville wrote: > Does this look better? Or is PRId64 preferred for off_t? As Otto said, we generally use %lld for printing off_t and use a (long long) cast. With that change OK millert@ - todd

Re: Overflowable int -> size_t in grep

2015-12-07 Thread Theo de Raadt
> > Otto Moerbeek wrote: > > > On Mon, Dec 07, 2015 at 01:36:22AM -0500, Michael McConville wrote: > > > > This isn't a grave issue, but I came across it while exploring integer > > > > overflow and think it's worth sharing. > > > > > > > > grep represents line numbers with an int, which predictab

dhclient hang

2015-12-07 Thread Martin Pieuchot
If for some reason SIOCAIFADDR fails, exit instead of hanging. Without this diff I need to kill dhclient(8) with ctrl+C during boot if I happen to have the address offered by the server configured on a different interface. WARNING: do not try to do that on -current without my rt_delete diffs or y

iwm association fix

2015-12-07 Thread Stefan Sperling
While debugging my 802.11n code I got tired of iwm randomly failing to associate or even getting into a state where I had to reboot to get it to work again. In case it got hung, the newstate task was sleeping in "iwmauth" and never woke up, which made me revisit how this driver transitions to AUTH

umass: size for free

2015-12-07 Thread Mathieu -
Hello, I worked a bit on umass(4) recently and had a diff to pass the umassbus_softc's real size to free so here it is. At some point I pondered about deleting the whole abstraction, as it would simplify the free'ing, for we only have one implementation (umass_scsi_softc, as atapi uses it too). B

rtdeletemsg & KASSERT

2015-12-07 Thread Martin Pieuchot
The rtrequest_delete() refactoring exposed an existing bug and introduced a regression, both triggered by the same KASSERT(). The regression has been reported there: https://marc.info/?l=openbsd-bugs&m=144943901304713&w=2 The problem is that rt_if_remove() will triggers a rtflushclone1() if a R

Re: preparing multitouch support - request for tests

2015-12-07 Thread Matthieu Herrb
On Thu, Dec 03, 2015 at 12:20:15AM +0100, Ulf Brosziewski wrote: > The diffs below contain a complete and extensive rewrite of the > input-processing parts of wsmouse and the interface it provides to > the hardware drivers. It prepares the support for various kinds of > multitouch input, as well as

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 22:18, Xiaofan Chen wrote: > On Mon, Dec 7, 2015 at 7:42 PM, Martin Pieuchot wrote: > > I'd really prefer a solution that doesn't need any button. In other > > words to always be able to use your device from userland if the kernel > > is not using it. > > > > One way would be to

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Stuart Henderson
On 2015/12/07 22:11, Xiaofan Chen wrote: > Not so sure if there is a port of hidapi under OpenBSD. > Ref: http://www.signal11.us/oss/hidapi/ It isn't ported to OpenBSD, and it's one of those projects where they don't provide any infrastructure to build a library and suggest that people copy it to

Re: taskctx and revisiting if_start serialisation

2015-12-07 Thread David Gwynne
> On 7 Dec 2015, at 11:34 PM, Martin Pieuchot wrote: > > On 07/12/15(Mon) 19:37, David Gwynne wrote: >> On Sun, Dec 06, 2015 at 03:51:26PM +0100, Martin Pieuchot wrote: >>> On 06/12/15(Sun) 14:00, David Gwynne wrote: [...] the idea is you have a taskctx, which represents a serialising

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Xiaofan Chen
On Mon, Dec 7, 2015 at 7:42 PM, Martin Pieuchot wrote: > I'd really prefer a solution that doesn't need any button. In other > words to always be able to use your device from userland if the kernel > is not using it. > > One way would be to always attach a ugen(4) driver to every USB device, > I

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Xiaofan Chen
On Mon, Dec 7, 2015 at 8:19 PM, Mickael Torres wrote: > > Actually the device attaches as uhid. I don't know which kind of transfer > is used, I'll have to look into this, but the soft (pk2cmd) uses libusb > and only works when the device is attached as ugen. pk2cmd is only for PICkit 2 which is

Do not pass NULL to rtdeletemsg()

2015-12-07 Thread Martin Pieuchot
If the interface is gone that means you're dealing with a cached route so there's no need to try to remove it from the table. Better be explicit and do that before calling rtdeletemsg() rather than inside. ok? Index: netinet/ip_icmp.c =

Re: taskctx and revisiting if_start serialisation

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 19:37, David Gwynne wrote: > On Sun, Dec 06, 2015 at 03:51:26PM +0100, Martin Pieuchot wrote: > > On 06/12/15(Sun) 14:00, David Gwynne wrote: > > > [...] > > > the idea is you have a taskctx, which represents a serialising > > > context for tasks. tasks are submitted to the taskctx

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 13:19, Mickael Torres wrote: > [...] > Actually the device attaches as uhid. I don't know which kind of transfer > is used, I'll have to look into this, but the soft (pk2cmd) uses libusb > and only works when the device is attached as ugen. That's easy because the uhid(4) driver

Re: taskctx and revisiting if_start serialisation

2015-12-07 Thread Hrvoje Popovski
On 6.12.2015. 15:56, Hrvoje Popovski wrote: > On 6.12.2015. 5:00, David Gwynne wrote: >> the current code for serialising if_start calls for mpsafe nics does what it >> says. >> >> however, kettenis realised it doesnt help us much when we're trying >> to coordinate between the start and txeof side

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Mickael Torres
On 2015-12-07 12:42, Martin Pieuchot wrote: On 07/12/15(Mon) 00:36, Mickael Torres wrote: On 2015-12-06 20:10, Ian Darwin wrote: >On 2015-12-06 12:23 PM, Stuart Henderson wrote: >>On 2015/12/06 06:02, Mickael Torres wrote: >>>Hello, >>> >>>This is a kernel patch plus a utility called ugenctl I u

Re: preparing multitouch support - request for tests

2015-12-07 Thread Martin Pieuchot
On 06/12/15(Sun) 20:47, joshua stein wrote: > On Thu, 03 Dec 2015 at 00:20:15 +0100, Ulf Brosziewski wrote: > > The diffs below contain a complete and extensive rewrite of the > > input-processing parts of wsmouse and the interface it provides to > > the hardware drivers. It prepares the support fo

Re: 3rd party Xbox 360 USB controller support

2015-12-07 Thread Martin Pieuchot
On 05/12/15(Sat) 15:22, Christian Heckendorf wrote: > The previous thread[1] discussing these controllers includes two > patches but they seem to have been merged for the commit in a way > that limits support to only Microsoft controllers. 3rd party Xbox 360 > controllers have their own vendor and

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 00:36, Mickael Torres wrote: > On 2015-12-06 20:10, Ian Darwin wrote: > >On 2015-12-06 12:23 PM, Stuart Henderson wrote: > >>On 2015/12/06 06:02, Mickael Torres wrote: > >>>Hello, > >>> > >>>This is a kernel patch plus a utility called ugenctl I use to allow > >>>selected USB devic

Re: Overflowable int -> size_t in grep

2015-12-07 Thread Otto Moerbeek
On Mon, Dec 07, 2015 at 02:32:50AM -0500, Michael McConville wrote: > Otto Moerbeek wrote: > > On Mon, Dec 07, 2015 at 01:36:22AM -0500, Michael McConville wrote: > > > This isn't a grave issue, but I came across it while exploring integer > > > overflow and think it's worth sharing. > > > > > >

Re: Overflowable int -> size_t in grep

2015-12-07 Thread Joerg Sonnenberger
On Mon, Dec 07, 2015 at 02:32:50AM -0500, Michael McConville wrote: > Otto Moerbeek wrote: > > On Mon, Dec 07, 2015 at 01:36:22AM -0500, Michael McConville wrote: > > > This isn't a grave issue, but I came across it while exploring integer > > > overflow and think it's worth sharing. > > > > > > g

Re: taskctx and revisiting if_start serialisation

2015-12-07 Thread David Gwynne
On Sun, Dec 06, 2015 at 03:51:26PM +0100, Martin Pieuchot wrote: > On 06/12/15(Sun) 14:00, David Gwynne wrote: > > the current code for serialising if_start calls for mpsafe nics does > > what it says. > > > > however, kettenis realised it doesnt help us much when we're trying > > to coordinate be

Re: [patch] Convert modulus to arc4random_uniform

2015-12-07 Thread Theo Buehler
On Mon, Dec 07, 2015 at 12:49:17AM -0600, Matthew Martin wrote: > > Theo's diff inspired me to look for other cases of modulo bias. The > following diff converts most modulus operations on a random number to > use arc4random_uniform or & as appropriate. I excluded > > lib/libsqlite3/src/resolve.c