mailing list of musl libc
 help / color / mirror / code / Atom feed
* Re: musl on a different syscall layer?
@ 2018-08-13 23:12 Alexander Revin
  2018-08-15  0:45 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Revin @ 2018-08-13 23:12 UTC (permalink / raw)
  To: musl

> On Wed, Sep 17, 2014 at 7:02 PM,  <u-wsnj@...ey.se> wrote:
>> On Wed, Sep 17, 2014 at 01:53:46PM -0400, Rich Felker wrote:
>>> The main requirement is having equivalent functionality available. On
>>> the BSD targets I've asked BSD folks about, there's supposedly no
>>> equivalent of futex except inthe Linux compat layer, which is pretty
>>> much a show-stopper unless/until it can be remedied. clone is a big
>>> unknown to me too. The other big potential problem is if the native
>>> syscall API requires a stack to communicate with the kernel (one or
>>> more BSDs require this, IIRC), since at least __unmapself needs to be
>>> able to call SYS_munmap and SYS_exit without a stack.
>>
>> Oh I see.
>>
>> This means "not much to hope for" (pity but good to know).

> I don't think NetBSD uses the stack for syscalls on any common
> architecture, maybe on some of the obscure ones, but maybe you don't
> want to support them.
>
> Adding futex support to NetBSD would be an interesting project; it is
> not in the compat layer at present either, so that is a good reason to
> add it. NetBSD is pretty friendly...
>
> Justin (justin@...bsd.org)

Hi guys, sorry for reviving a dead thread, but do you know if things
has changed ever since? I'm asking also because it would be nice to
unify efforts of porting musl to another archs - for example, openrisc
or m68k - though there're ports for both Linux and NetBSD, libc
support is kind of scattered over large codebase.

Best,
Alex


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: musl on a different syscall layer?
  2018-08-13 23:12 musl on a different syscall layer? Alexander Revin
@ 2018-08-15  0:45 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2018-08-15  0:45 UTC (permalink / raw)
  To: Alexander Revin; +Cc: musl

On Tue, Aug 14, 2018 at 01:12:56AM +0200, Alexander Revin wrote:
> > On Wed, Sep 17, 2014 at 7:02 PM,  <u-wsnj@...ey.se> wrote:
> >> On Wed, Sep 17, 2014 at 01:53:46PM -0400, Rich Felker wrote:
> >>> The main requirement is having equivalent functionality available. On
> >>> the BSD targets I've asked BSD folks about, there's supposedly no
> >>> equivalent of futex except inthe Linux compat layer, which is pretty
> >>> much a show-stopper unless/until it can be remedied. clone is a big
> >>> unknown to me too. The other big potential problem is if the native
> >>> syscall API requires a stack to communicate with the kernel (one or
> >>> more BSDs require this, IIRC), since at least __unmapself needs to be
> >>> able to call SYS_munmap and SYS_exit without a stack.
> >>
> >> Oh I see.
> >>
> >> This means "not much to hope for" (pity but good to know).
> 
> > I don't think NetBSD uses the stack for syscalls on any common
> > architecture, maybe on some of the obscure ones, but maybe you don't
> > want to support them.
> >
> > Adding futex support to NetBSD would be an interesting project; it is
> > not in the compat layer at present either, so that is a good reason to
> > add it. NetBSD is pretty friendly...
> >
> > Justin (justin@...bsd.org)
> 
> Hi guys, sorry for reviving a dead thread, but do you know if things
> has changed ever since? I'm asking also because it would be nice to
> unify efforts of porting musl to another archs - for example, openrisc
> or m68k - though there're ports for both Linux and NetBSD, libc
> support is kind of scattered over large codebase.

I'm not aware of anything more on the NetBSD side.

Note that "syscalls using stack" is no longer a show-stopper for musl.
There's a portable, albeit less efficient, version of __unmapself that
switches to a shared stack protected by a lock (with the magic exit
futex automatically unlocking it atomically with thread termination).
But this depends on that compat functionality or equivalent.

Rich


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-15  0:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 23:12 musl on a different syscall layer? Alexander Revin
2018-08-15  0:45 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).