On 9/2/22 08:42, Carsten Haitzler wrote:
Given this is going to stay here - shall I do the below as a purecap enablement patch on top of yours below? I already had these fixes in my tree except the compat define which is what i was hunting for/missing. I've also fixed LTP to match too - but I thought I'd polish off kernel first.
Yes please, you can post it separately and give to the maintainers indication (cover?) that there is a direct dependency on my series.
Thank you for that.
Vincenzo
On 9/1/22 21:12, Carsten Haitzler wrote:
while I'm at it this is missing part of the fix. I had the other bits but failing in compat. missing this:
-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)
in keyctl.c - then LTP passes tests. so merge of my (as yet unsubmitted patch) and yours - i've verified with LTP.
On 8/31/22 15:37, Vincenzo Frascino wrote:
With the introduction of capabilities and PCuABI being enabled when dealing with the user pointers does expect a capability.
Address the compilation issues below triggered by otherwise implicit conversion that might lead to unexpected behaviour when operating on capabilities.
make[1]: linux/security/keys/keyring.c:93 error: incompatible function pointer types initializing 'long (*)(const struct key *, char *, size_t)' (aka 'long (*)(const struct key *, char *, unsigned long)') with an expression of type 'long (const struct key *, char * __capability, size_t)' (aka 'long (const struct key *, char * __capability, unsigned long)') [-Werror,-Wincompatible-function-pointer-types] .read = keyring_read,
Note: User defined interface is in separate compilation unit.
Signed-off-by: Vincenzo Frascino vincenzo.frascino@arm.com
security/keys/keyring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 5e6a90760753..4448758f643a 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -79,7 +79,7 @@ static void keyring_revoke(struct key *keyring); static void keyring_destroy(struct key *keyring); static void keyring_describe(const struct key *keyring, struct seq_file *m); static long keyring_read(const struct key *keyring, - char __user *buffer, size_t buflen); + char *buffer, size_t buflen); struct key_type key_type_keyring = { .name = "keyring",
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org