CHERIoT-Platform / llvm-project

Fork of LLVM adding CHERIoT, based on the CHERI LLVM fork
4 stars 6 forks source link

[CHERIoT] Zero sret pointers before cross-compartment calls. #25

Closed davidchisnall closed 6 months ago

davidchisnall commented 6 months ago

Functions that use the sret variant of the calling convention pass a pointer to space for the callee to store their return values in. When this is a cross-compartment call, we need to avoid information leakage.

It is generally better to pass an out parameter and pass a store-only pointer for this use, but we should still make this work correctly.