On the commit title: please use generic tags, in this case we've use "security/keys:" for previous commits. It's worth noting that these changes are not Morello-specific, they work for purecap in general.
On 02/09/2022 14:07, carsten.haitzler@foss.arm.com wrote:
From: Carsten Haitzler carsten.haitzler@foss.arm.com
Move unsigned long to uintptr_t for userspace ABI for purecap to work.
Dependent on patch series:
Author: Vincenzo Frascino vincenzo.frascino@arm.com Subject: [linux-morello] [PATCH v2 0/5] morello: Enable docker by default
This is not useful in the commit message, because naturally that patch won't be merged before its dependency. You can put this in the patch notes instead. In any case that series is merged now so no dependency any more :)
Signed-off-by: Carsten Haitzler carsten.haitzler@foss.arm.com
security/keys/keyctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 96a92a645216..104fc313691d 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -1866,8 +1866,8 @@ long keyctl_capabilities(unsigned char __user *_buffer, size_t buflen) /*
- The key control system call
*/ -SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3,
unsigned long, arg4, unsigned long, arg5)
+SYSCALL_DEFINE5(keyctl, int, option, uintptr_t, arg2, uintptr_t, arg3,
uintptr_t, arg4, uintptr_t, arg5)
You may want to have a look at the section "Representing user pointers" in [1], the right (and only) type we should use here is user_uintptr_t. uintptr_t corresponds to kernel pointers, so we normally shouldn't make use of it for the purpose of supporting PCuABI. Unfortunately the compiler doesn't warn when casting plain integers to capabilities in hybrid, which would have helped here.
Kevin
[1] https://git.morello-project.org/morello/kernel/linux/-/blob/morello/master/D...
{ switch (option) { case KEYCTL_GET_KEYRING_ID: