Skip to content

nostack option for ARM system calls #577

@Ioan-Cristian

Description

@Ioan-Cristian

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions