On 01/09/2022 10:39, Vincenzo Frascino wrote:
On 9/1/22 09:16, Kevin Brodsky wrote:
On 31/08/2022 16: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/net/bridge/br_ioctl.c: error: use of __capability is ambiguous void __user **argp, void __user *data)
Signed-off-by: Vincenzo Frascino vincenzo.frascino@arm.com
net/bridge/br_ioctl.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index f213ed108361..6c11d6e15102 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c @@ -105,7 +105,11 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) #define BR_UARGS_MAX 4 static int br_dev_read_uargs(unsigned long *args, size_t nr_args, +#if defined(CONFIG_CHERI_PURECAP_UABI)
Nit: we've always used #ifdef CONFIG_... for such fixups so far, see for instance 54b8a7a3d2d4 ("linux/regset.h: Fix the position of __capability in double pointers"), it would be good to stay consistent with that.
Sure will do in v2, even if grep'ing the kernel shows equal distributions of both the cases.
Oh sure I meant the #ifdef CONFIG_CHERI_PURECAP_UABI fixups specifically, not #if/#ifdef in general :)
Kevin
Kevin
+ void * __capability * __capability argp, void __user *data) +#else void __user **argp, void __user *data) +#endif { int ret;
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org