Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mirage-crypto-rng.unix: add Hurd support #174

Merged
merged 1 commit into from Mar 29, 2023
Merged

mirage-crypto-rng.unix: add Hurd support #174

merged 1 commit into from Mar 29, 2023

Conversation

pinotree
Copy link
Contributor

@pinotree pinotree commented Mar 9, 2023

Implement raw_getrandom() for Hurd, using getrandom() as available in GNU libc.

@hannesm
Copy link
Member

hannesm commented Mar 23, 2023

Thanks @pinotree. Is there a path to test such a Hurd system in CI (GitHub actions)? Is the C define of Hurd really __GNU__, isn't there something like __HURD__ as well? (__GNU__ looks pretty coarse, and other systems may define this as well).

@hannesm
Copy link
Member

hannesm commented Mar 23, 2023

Also, can't we fold that into the __linux ifdef (starting at line 8), since the actual code is the same.

Implement raw_getrandom() for Hurd, using getrandom() as available in
GNU libc.
@pinotree
Copy link
Contributor Author

Is there a path to test such a Hurd system in CI (GitHub actions)?

Unfortunately not.

Is the C define of Hurd really __GNU__, isn't there something like __HURD__ as well? (__GNU__ looks pretty coarse, and other systems may define this as well).

Considering GNU/Hurd used to be considered "the GNU system", it got __GNU__ as identifier; it has also __gnu_hurd__. There is no risk that other OSes will use __GNU__ now, as it would clash with GNU/Hurd.

[1] https://github.com/cpredef/predef/blob/master/OperatingSystems.md#gnu-aka-gnuhurd

Also, can't we fold that into the __linux ifdef (starting at line 8), since the actual code is the same.

Sure. Sometimes sharing code branches with other OSes is helpful, sometimes only adds extra maintenance burder.

@hannesm hannesm merged commit 5e08d74 into mirage:main Mar 29, 2023
27 checks passed
@hannesm
Copy link
Member

hannesm commented Mar 29, 2023

Thanks. Also thanks for the link to the predef.

@pinotree pinotree deleted the hurd branch March 29, 2023 08:32
hannesm added a commit to hannesm/opam-repository that referenced this pull request Sep 18, 2023
…age, mirage-crypto-rng-lwt, mirage-crypto-rng-eio, mirage-crypto-rng-async, mirage-crypto-pk and mirage-crypto-ec (0.11.2)

CHANGES:

* mirage-crypto-rng-eio: improve portability by using eio 0.7's monotonic clock
  interface instead of mtime.clock.os. (mirage/mirage-crypto#176 @TheLortex)
* mirage-crypto-rng-eio: update to eio 0.12 (mirage/mirage-crypto#182 @talex5)
* mirage-crypto-rng: fix typo in RNG setup (mirage/mirage-crypto#179 @samueldurantes)
* macOS: on arm64 with clang 14.0.3, avoid instcombine (due to miscompilations)
  reported by @samoht mit-plv/fiat-crypto#1606 (comment)
  re-reported in ulrikstrid/ocaml-jose#63 and mirleft/ocaml-tls#478
  (mirage/mirage-crypto#185 @hannesm @kit-ty-kate)
* avoid "stringop-overflow" warning on PPC64 and S390x (spurious warnings) when
  in devel mode (mirage/mirage-crypto#178 mirage/mirage-crypto#184 @avsm @hannesm)
* stricter C prototypes, unsigned/signed integers (mirage/mirage-crypto#175 @MisterDA @haesbaert
  @avsm @hannesm)
* support DragonFlyBSD (mirage/mirage-crypto#181 @movepointsolutions)
* support GNU/Hurd (mirage/mirage-crypto#174 @pinotree)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants