Maamoun TK <[email protected]> writes:

> I created a couple of merge requests in the repo, with those MRs merged I
> think the powerpc code is stable to be included in the upcoming version of
> nettle.

Thanks. I've merged the "Use 32-bit offset to load data". 

For the other one,
https://git.lysator.liu.se/nettle/nettle/-/merge_requests/15 "Use signal
to detect CPU features when getauxval() isn't available", can you
explain for which systems is that needed? In the current code, you
handle gnu/linux (depends on glibc, I guess), freebsd and aix.

I hesitate adding signal code, because it seems a bit dangerous and
brittle for a library to modify signal handlers. In particular, I worry
about what happens to other threads, since sigaction modifies the
process-global signal handler.

The fat setup code is otherwise threadsafe, under the assumption that
writes to a function pointer variable is atomic on the relevant
architecture. In the unlikely case that we get concurrent calls to
fat_init, both threads will get to the same conclusion and store
identical values in the target variables, so then it shouldn't matter in
which order (and how late) writes propagate to other cores.

If there's some way to setup (and restore) a thread-local signal handler
for SIGILL, that would be safer, but I don't know if that's at all
possible.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs

Reply via email to