On Wed, Oct 12, 2022 at 07:08:48PM +0200, Kevin Brodsky wrote:
On 11/10/2022 22:05, Beata Michalska wrote:
On Wed, Sep 28, 2022 at 04:31:42PM +0100, Kevin Brodsky wrote:
Add a new uapi header to define generic CHERI concepts with arm64-specific values.
To start with, provide a macro representing the VMem software permission, as defined in the PCuABI specification. The macro name matches CheriBSD, facilitating its use in a (somewhat) OS-agnostic way.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com
arch/arm64/include/uapi/asm/cheri.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 arch/arm64/include/uapi/asm/cheri.h
diff --git a/arch/arm64/include/uapi/asm/cheri.h b/arch/arm64/include/uapi/asm/cheri.h new file mode 100644 index 000000000000..8f2b8f885fda --- /dev/null +++ b/arch/arm64/include/uapi/asm/cheri.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _UAPI__ASM_CHERI_H +#define _UAPI__ASM_CHERI_H
+#define CHERI_PERM_SW_VMEM (1 << 2) /* User[0] permission */
This is Morello specific software permission bit, in somewhat generic header, but I do appreciate it's arch specific so there should be no confusion there, still it made be ... pause for a moment there. Not sure if adding a comment would make much difference here though.
It is a Morello-specific value for a CHERI-generic constant (each CHERI architecture needs to define the appropriate value in its own uapi/asm/cheri.h). I'm not sure what exactly to say here as it's simply the implementation of the spec.
I guess I was looking for any mention of Morello here (may it be a comment). But overall you are right and it is supposed to be self-explanatory, so feel free to ignore me here.
--- BR B.
Kevin
BR B.
+#endif /* _UAPI__ASM_CHERI_H */
2.34.1
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org