Re: [PATCH] m68k: add missing __user annotation in get_user()

From: Geert Uytterhoeven
Date: Mon May 25 2020 - 04:48:04 EST

On Wed, May 20, 2020 at 8:58 AM Jason Wang <jasowang@xxxxxxxxxx> wrote:
> The ptr is a pointer to userspace memory. So we need annotate it with
> __user otherwise we may get sparse warnings like:
> drivers/vhost/vhost.c:1603:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const *__gu_ptr @@ got unsigned int [noderef] [usertypvoid const *__gu_ptr @@
> drivers/vhost/vhost.c:1603:13: sparse: expected void const *__gu_ptr
> drivers/vhost/vhost.c:1603:13: sparse: got unsigned int [noderef] [usertype] <asn:1> *idxp
> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Cc: linux-m68k@xxxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>

Fixes: 7124330dabe5b3cb ("m68k/uaccess: Revive 64-bit get_user()")

Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
i.e. will queue in the m68k for-v5.8 branch.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds