Should ARM system calls be marked nostack as here. The Rust reference mentions that nostack must not be used if data is pushed on the stack. However, on ARMv*-M architectures, the hardware automatically pushes data on stack. Furthermore, the Tock kernel does use the process stack for storing process data on exception entry by setting the SPSEL bit to 1. I doubt the reference excludes hardware-related stack operations. As a consequence, the current libtock-rs results in undefined behaviour that just happens to work for the current LLVM backend. Note that libtock-c uses the memory clobber which covers all kinds of memory accesses, including the stack.
Am I missing something?
Should ARM system calls be marked
nostackas here. The Rust reference mentions thatnostackmust not be used if data is pushed on the stack. However, on ARMv*-M architectures, the hardware automatically pushes data on stack. Furthermore, the Tock kernel does use the process stack for storing process data on exception entry by setting the SPSEL bit to 1. I doubt the reference excludes hardware-related stack operations. As a consequence, the currentlibtock-rsresults in undefined behaviour that just happens to work for the current LLVM backend. Note that libtock-c uses thememoryclobber which covers all kinds of memory accesses, including the stack.Am I missing something?