[libc-commits] [libc] [libc][c23] add memset_explicit (PR #83577)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Mar 5 13:26:11 PST 2024


https://github.com/nickdesaulniers requested changes to this pull request.

Please add to the commit message that this fixes https://github.com/llvm/llvm-project/issues/82817 so that the issue will auto close when merged.

As discussed in https://discourse.llvm.org/t/implement-memset-explicit/77312/5, the current implementation adds significant complexity which is not mandated, specified, or referenced in the standard.  As such, I'd prefer to see and initial PR that's just the memset + compiler barrier.  Once we have that basic implementation merged, we can start adding architecture specific mitigations behind a cmake flag, in a distinct PR.

I would like to have a cmake flag to opt into the arch-specific additional mitigations.  From there, we can then later add a generic "hardened libc" cmake flag that turns on all of these individual configurations to improve security.

https://github.com/llvm/llvm-project/pull/83577


More information about the libc-commits mailing list