tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support for "pshared" POSIX semaphores



Hi.

From: Jason Thorpe <thorpej%me.com@localhost>, Date: Fri, 1 Feb 2019 20:37:00 -0800

> -port-arm +tech-kern
> 
>> On Jan 24, 2019, at 5:58 AM, Jared McNeill <jmcneill%invisible.ca@localhost> wrote:
>> 
>> The tab crashes are related to http://gnats.netbsd.org/53273, which can be worked around by setting the autostart properties to false. The other crashes are not related, feel free to debug and fix them!
> 
> I’ve added support for “pshared” POSIX semaphores … it was beyond simply “broken” as described in lib/53273; there’s no way it could have ever worked.
> 
> My approach avoids breaking the client ABI, by ensuring that identifiers the kernel vends for pshared semaphores have a specific format, that works in both 32-bit (native or on 64-bit in compat) and 64-bit systems.  These specially-formatted IDs are substituted for the pointer to the user land semaphore structure in the pshared case; pshared semaphores don’t have any user land state.
> 
> Patch is here: https://patch-diff.githubusercontent.com/raw/thorpej/netbsd-src/pull/5.diff
> 
> I added a unit test for them, that (duh :-) passes.  I’ll try to test it w/ firefox52 on my Pinebook tomorrow.

Thank you very much!
On NetBSD/amd64-current with your patch, pkgsrc/www/firefox-65.0.1nb1
with browser.tabs.remote.autostart=true works fine.

However your patch fot sys/kern/uipc_sem.c fails in
nooptions DIAGNOSTIC.
KASSERT related lines (near 1080th) may be included by #if defined(DEBUG).

I will be back to porting of wip/chromium.

> -- thorpej
> 

--
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3



Home | Main Index | Thread Index | Old Index