[set,get,make,swap]context from glibc for amd64 implementation and question for Norman

Josef Söntgen josef.soentgen at genode-labs.com
Fri Mar 12 14:15:27 CET 2021

Hello Alexander,

thanks for keeping the golang port effort going.

> as a part of efforts related to golang port I make separate patch for
> 21.02 genode related to implementation of
> setcontext/getcontext/makecontext/swapcontext family in libc
> as a base I borrow some code from glibc, and remove related files
> (mostly _ucontext.h/ucontext.h) from genode

May I ask what is the reason for choosing and incorporating the glibc
implementation rather than using/enabling the one in the FreeBSD libc?

> related 2 patches are in https://github.com/tor-m6/genode.git in 21.02 repo
> main one contains implementation to be applied to libc port
> aux patch contains only simple test for these functions, you can run it as 
> I  need also to add C support for
> alloc_secondary_stack/free_secondary_stack in dummies.cc to be able to
> use them during allocation of stack for makecontext/etc (it should
> work even in C files - current code do requires C++, I even can’t test
> patch without them). May be this is wrong place for the wrappers…
> current problems with the patch: is support only x86_64 (while can be
> easily extended to arm64) on nova (while should work on other OSes),
> and it do not support signals save/restore (while seems that not many
> of them supported by genode currently). Also some removal of code from
> libc is not that clear and correct (implement it in patch).
> Question for Norman (and may be other maintainers):
> is it suitable for main genode code, or I should keep patch only in my fork?
> Is it worth to make a pull request?

Strictly speaking containg such a large patch makes the commit
unsuitable for the Genode main repo as the burden of maintaing it
falls on our shoulders at the end and the reason for including it in the
first place is not immediately clear.

For better or worse, we still lack the resources (read man-power) as well
as a deeper understanding for the issues at hand when it comes to the
requirements of the golang-runtime (which somewhat is a consequence of
the lack of resources) that such an undertaking arguably deserves.


Josef Söntgen
Genode Labs

http://www.genode-labs.com/ · http://genode.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20210312/7ceb4293/attachment.sig>

More information about the users mailing list