Fix and test mldsa-native integration on IAR #656

Open
opened 2026-01-13 06:26:29 -06:00 by gilles-peskine-arm · 4 comments
gilles-peskine-arm commented 2026-01-13 06:26:29 -06:00 (Migrated from github.com)

mldsa-native claims to be portable C90. But our integration isn't working with MSVC out of the box even though mldsa-native itself is tested on MSVC. And looking at sys.h, it seems that every compiler that isn't MSVC is assumed to have GCC attributes.

The goal of this task is to get our integration working on IAR. (Defined by local testing since we don't have IAR in our CI.) We may need to patch mldsa-native, in which case we should upstream these patches.

mldsa-native claims to be portable C90. But [our integration isn't working with MSVC out of the box](https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/655) even though mldsa-native itself is tested on MSVC. And looking at `sys.h`, it seems that every compiler that isn't MSVC is assumed to have GCC attributes. The goal of this task is to get our integration working on IAR. (Defined by local testing since we don't have IAR in our CI.) We may need to patch mldsa-native, in which case we should upstream these patches.
mkannwischer commented 2026-01-14 19:51:19 -06:00 (Migrated from github.com)

I think the fix in https://github.com/pq-code-package/mldsa-native/pull/884 will fix the issue for the MLD_INLINE and MLD_ALWAYS_INLINE macros. Did you see any other problematic places? I don't have IAR, so I can't test if there are other problems.

I think the fix in https://github.com/pq-code-package/mldsa-native/pull/884 will fix the issue for the `MLD_INLINE` and `MLD_ALWAYS_INLINE` macros. Did you see any other problematic places? I don't have IAR, so I can't test if there are other problems.
gilles-peskine-arm commented 2026-01-15 07:30:26 -06:00 (Migrated from github.com)

Thanks for fixing this so quickly! IAR is now happy with mldsa_native.c. I'm leaving this issue open so we remember to test our integration manually with IAR once we have proper testing in place.

Thanks for fixing this so quickly! IAR is now happy with `mldsa_native.c`. I'm leaving this issue open so we remember to test our integration manually with IAR once we have proper testing in place.
hanno-becker commented 2026-04-28 07:39:00 -05:00 (Migrated from github.com)

We don't have an IAR test in mldsa-native at the moment. If a side-product of this issue you can give some advise on how to add this to the mldsa-native CI, that would be great.

We don't have an IAR test in mldsa-native at the moment. If a side-product of this issue you can give some advise on how to add this to the mldsa-native CI, that would be great.
gilles-peskine-arm commented 2026-04-28 07:46:44 -05:00 (Migrated from github.com)

IAR requires a license. We do have a license (for arm targets), but we haven't hooked our CI to our license server, so for now we just test locally.

Mostly IAR exercises our fallback code paths where we have special handling for GCC-like compilers and for MSVC. It also tends to complain about some idioms that we use in Mbed TLS (https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/708 shows the kind of fixes we've made). Nothing has turned up in mldsa-native.

IAR requires a license. We do have a license (for arm targets), but we haven't hooked our CI to our license server, so for now we just test locally. Mostly IAR exercises our fallback code paths where we have special handling for GCC-like compilers and for MSVC. It also tends to complain about some idioms that we use in Mbed TLS (https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/708 shows the kind of fixes we've made). Nothing has turned up in mldsa-native.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto#656
No description provided.