On Thu, Jan 12, 2023, at 13:50, Kevin Brodsky wrote:
PCuABI itself is defined by the PCuABI specification. However, the specification only documents the ABI itself and not internal kernel implementation aspects. To that effect, create a document under a new cheri/ subfolder, as well as an index file with some information about CHERI support in general.
Now that we have a generic PCuABI document, link to it from the related documents, and remove a now-redundant section from the user pointer doc. All CHERI / PCuABI-related documents are now reachable from Documentation/cheri/index.rst.
The PCuABI porting guide was initially added to the root of Documentation/ for lack of relevant subfolder, we can now move it to a more appropriate home.
Reviewed-by: Vincenzo Frascino vincenzo.frascino@arm.com Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com
Thanks, this helps clarify things a lot, and would have helped me in the initial review. I'm sure the question of what the types should be for an eventual mainline kernel version (and also how the compat interface should be used) will keep coming up in the future, but documenting what you have decided to do for the Morello version is an important step.
+| | ``(unsigned) long`` | 64-bit integer | 64-bit integer | | +| | ``(unsigned) long long`` | | | | +| | ``ptraddr_t`` | | | |
I only recently realized that 'long long' is also just 64-bit, not just 'long'. I think this is the most surprising bit here, though I can see how redefining it as a 128-bit type would mess things up in the kernel as well.
There is clearly no good solution here, and I saw that the informal rv128 ABI does the same thing, with the addition of a new 128-bit 'long long long' type.[1]
Arnd
[1] https://github.com/brucehoult/riscv-meta/blob/master/doc/src/rv128.md