Re: pthread_cond_signal(3) tweak

2019-01-28 Thread Mark Kettenis
> Date: Mon, 28 Jan 2019 14:46:28 -0200 > From: Martin Pieuchot > > Amend the manual, per POSIX [0], the function "shall unblock at least > one of the threads". > > This can happen in our implementation when the function is called w/o > holding the corresponding mutex. If a thread is blocking o

Re: [PATCH v2] Huawei E8372 USB Mobile Broadband in HiLink Mode, Generic HiLink Mode Logic

2019-01-28 Thread James Hebden
On Mon, Jan 28, 2019 at 02:33:14PM +, Stuart Henderson wrote: > On 2019/01/28 16:59, James Hebden wrote: > > The patch should allow the device to register a cdce interface, rather > > than USB serial devices, allowing the device to be used at full > > capacity. > > > > Patch follows. > > Does

pckbc(4) diff

2019-01-28 Thread Marcus Glocker
On some machines when the pckbc(4) keyboard controller driver attaches to the console, it's possible to inject characters by moving your mouse in to the keyboard channel. When injecting enough noise the keyboard will stop operating at some point. A nice way to test this, e.g. on my ThinkPad, is b

Re: dhclient.conf example for unwind

2019-01-28 Thread Florian Obser
Maybe. It is very early and we are not yet sure how to hook up unwind to asr (our libc resolver) How unwind, resolv.conf and asr interact is subtle. I'm worried on how hand rolled stuff that parses resolv.conf itself will react to unwind coming and going. On January 28, 2019 5:05:23 PM GMT+01:

futex(2) based pthread_rwlock*

2019-01-28 Thread Martin Pieuchot
Summer is really warm here. No need to make my machines hotter by spinning a lot. So here's a futex(2) based pthread_rwlock* implementation. I should look familiar to those of you that reviewed the mutex & semaphore implementations. It uses amotic cas & inc/dec. I moved the existing implementa

pthread_cond_signal(3) tweak

2019-01-28 Thread Martin Pieuchot
Amend the manual, per POSIX [0], the function "shall unblock at least one of the threads". This can happen in our implementation when the function is called w/o holding the corresponding mutex. If a thread is blocking on the futex lock, the sequence number will change and futex(2) will return EAG

dhclient.conf example for unwind

2019-01-28 Thread Sebastian Benoit
Add the line mentioned in unwind(8) to /etc/examples/dhclient.conf. ok? Index: dhclient.conf === RCS file: /cvs/src/etc/examples/dhclient.conf,v retrieving revision 1.2 diff -u -p -r1.2 dhclient.conf --- dhclient.conf 16 Oct 20

Re: bridge_output() plumbing

2019-01-28 Thread Alexander Bluhm
On Mon, Jan 28, 2019 at 10:03:51AM -0200, Martin Pieuchot wrote: > Some plumbing to makes upcoming locking changes easier to review: > > - Move the `m_len' check first, this does require any locking and will > save us a lock/unlock dance. > > - Use the `!ETHER_IS_MULTICAST()' idiom to be cohere

Re: [PATCH v2] Huawei E8372 USB Mobile Broadband in HiLink Mode, Generic HiLink Mode Logic

2019-01-28 Thread Stuart Henderson
On 2019/01/28 16:59, James Hebden wrote: > Hello, > > I have reworked this patch and tested on 6.4. It's now working properly. > I was able to clean up and streamline some of the logic too. I have > checked and it applies cleanly against -current as well. > > This patch makes handling of E-Series

Re: Export per-TDB counters

2019-01-28 Thread Alexander Bluhm
On Sat, Jan 26, 2019 at 05:46:10PM -0200, Martin Pieuchot wrote: > Last time I enabled this code, I forgot to whitelist the extension for > SADB_GET. Thanks to the help from Mark Patruck, who originally reported > the regression with iked(8) via bugs@, I came up with the diff below. > > ok to ena

Re: Silent error in pfkeyv2_send()

2019-01-28 Thread Alexander Bluhm
On Sat, Jan 26, 2019 at 05:52:46PM -0200, Martin Pieuchot wrote: > If pfkeyv2_send() tries to send a message without a required extension > or with a non-allowed extension it will silently fail. I spent many > hours debugging the code exporting counters because of this. I'd like > to return an er

Re: MPLSv6 1/2: kernel diff

2019-01-28 Thread Claudio Jeker
On Mon, Jan 28, 2019 at 01:36:44PM +1000, David Gwynne wrote: > > > > On 27 Dec 2018, at 5:42 pm, Claudio Jeker wrote: > > > > On Wed, Dec 26, 2018 at 09:27:59PM +0100, Denis Fondras wrote: > >> Resend because of nasty typo :/ > >> > >> On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot

bridge_output() plumbing

2019-01-28 Thread Martin Pieuchot
Some plumbing to makes upcoming locking changes easier to review: - Move the `m_len' check first, this does require any locking and will save us a lock/unlock dance. - Use the `!ETHER_IS_MULTICAST()' idiom to be coherent with the rest of the driver. It is also clear that if the bridge(4) is

Re: MPLSv6 1/2: kernel diff

2019-01-28 Thread Martin Pieuchot
On 28/01/19(Mon) 13:36, David Gwynne wrote: > > > > On 27 Dec 2018, at 5:42 pm, Claudio Jeker wrote: > > > > On Wed, Dec 26, 2018 at 09:27:59PM +0100, Denis Fondras wrote: > >> Resend because of nasty typo :/ > >> > >> On Mon, Dec 24, 2018 at 08:43:10PM -0200, Martin Pieuchot wrote: > >>> I'm

Re: strlcpy() or strscpy()?

2019-01-28 Thread Martijn van Duren
I think the others have given a decent explanation, but I would like to elaborate a little furter. The Linux documentation says the following: Preferred to strlcpy since the API doesn't require reading memory from the src string beyond the specified "count" bytes, and since the return value is