gh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b#130960
gh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b#130960gpshead merged 8 commits into
Conversation
remove fstar_uint128_gcc64.h and fstar_uint128_msvc.h make regen-sbom
#include resolved using non-portable Microsoft search rules
from Makefile.pre.in to fix makefile based builds
|
Ok so I need to debug the krmlrenamings bug and review this PR. I should be able to tackle this early next week. Let me know if this is more pressing and I'll see what I can do. Thanks! |
Sorry, something went wrong.
|
Oh for me this is absolutely not pressing. Have a great weekend! |
Sorry, something went wrong.
msprotz
left a comment
There was a problem hiding this comment.
This all looks great to me -- one more round of updating from upstream and you'll be good (the copy0, malloc_with_key0 will be fixed).
Just want to double-check that you're ok with slightly more verbose headers, in exchange for a simpler process for refreshing HACL*.
Finally, FStar_UInt128.h can go I think.
Thanks so much!
Sorry, something went wrong.
remove FStar_UInt128.h revert interim fixes in blake2module.c regen sbom
Regarding the "extra cruft": when I started, I could not use the "uncrufting" out of the box and it was easier for me to "just go with what comes from hacl-star". As you mention, it is easier for people like me who are no hacl-star experts to sync with upstream if there is less "uncrufting" happening. At least I'd like to keep the folder structure closer - creating a "public" stub But that's just my take on it - happy to adopt all changes you and the other reviewers suggest in |
Sorry, something went wrong.
|
Do you e.g. mean the call to Lines 231 to 238 in 9d759b6
cpython/Modules/_hacl/Hacl_Hash_SHA3.c Lines 989 to 990 in 9d759b6 which wasn't checked above in sha3module.c :-o
What about code parts in case Blake2b_256:
digest_length = Hacl_Hash_Blake2b_Simd256_digest(self->blake2b_256_state, digest);
break;Can they fail, too, and if so, how do they signal their failure? Sorry for so many questions here, I am totally new to this part of the Python code (TBH, this code is quite new anyway :). I am just the guy who stumbled over blake2module.c not compiling with clang-cl on Windows for older clangs and then found out that, coincidentally, around the same time this came up in #130213 for older clangs on Linux, too. Since then I tried to help and learn - but that could go over my head now :) |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 427dfab 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F130960%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 427dfab 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F130960%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
|
re: blurb to add the news:
yep, Build seems fine. as would Library. don't overthink it. the important thing is that we have a news entry. some thing cross categories. |
Sorry, something went wrong.
|
@chris-eibl no worries! I'm already super grateful with your huge help so far... let me recap -- to be clear, I think all of this can be dealt with later: For Hacl_Streaming_HMAC:
For all hash algorithms (NEW with this PR):
For SHA3/Keccak only:
I think all of these can be handled as a followup, I just thought it would be good to have it in writing here so that you can decide which of these are worth checking for. The reason I brought up other hash algorithms is that, since you requested (or maybe @picnixz ?) proper out of memory handling in HACL*, we now may return NULL for other algorithms (like hash algorithms), meaning that this PR will introduce new possibly-NULL return values as a side-effect of updating the vendored copy of HACL*. For the record, Python ignores MaximumLengthExceeded on the basis that this cannot happen in practice. |
Sorry, something went wrong.
|
(I requested it and in my HMAC PR I'm handling and converting possible return codes from HACL*) |
Sorry, something went wrong.
|
Is there anything left do be done in this PR? Is this feasible for alpha 7 (2025-04-08, the last alpha)? |
Sorry, something went wrong.
Yes.
I think we can still ship something just before the beta (so until May). But the HMAC PR is ready technically, and everything is completed on my side (tests pass on my machine and everything builds correctly).
It would be treated as a bugfix and not a new feature so no worries here I think. |
Sorry, something went wrong.
|
I've actually just observed that:
A follow-up PR could be done to raise/check that we raise PyErr_NoMemory() in existing hash functions. |
Sorry, something went wrong.
Shall we create an issue so that this does not get lost? What is the common approach here in such cases? |
Sorry, something went wrong.
Yes, create a new issue from my comment for instance. The title can be like "Handle NULL returned by HACL* allocation functions" |
Sorry, something went wrong.
…2917aa0f594b (pythonGH-130960) Updates the HACL* implementation used by hashlib from upstream sources.
Vendor hacl_star from rev hacl-star/hacl-star@322f6d5 which integrated hacl-star/hacl-star#1025 on main.
How to blurb it?
If the abstraction (PR-1025) is the only change worth noting here in Python since the last sync (hacl-star/hacl-star@f218923ef2417d963d7efc7951593ae6aef613f7=), then maybe
"update to latest hacl-star to fix build issues with older clang compilers"
but where would it belong? In Misc/NEWS.d/next/Build?