Re: [PATCH v7 02/12] iov_iter, x86: Be consistent about the __user tag on copy_mc_to_user()

From: Borislav Petkov
Date: Thu Sep 28 2023 - 10:47:15 EST


On Mon, Sep 25, 2023 at 01:02:59PM +0100, David Howells wrote:
> copy_mc_to_user() has the destination marked __user on powerpc, but not on
> x86; the latter results in a sparse warning in lib/iov_iter.c.
>
> Fix this by applying the tag on x86 too.
>
> Fixes: ec6347bb4339 ("x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()")
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> cc: Ingo Molnar <mingo@xxxxxxxxxx>
> cc: Borislav Petkov <bp@xxxxxxxxx>
> cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
> cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
> cc: Jens Axboe <axboe@xxxxxxxxx>
> cc: Christoph Hellwig <hch@xxxxxx>
> cc: Christian Brauner <christian@xxxxxxxxxx>
> cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> cc: David Laight <David.Laight@xxxxxxxxxx>
> cc: x86@xxxxxxxxxx
> cc: linux-block@xxxxxxxxxxxxxxx
> cc: linux-fsdevel@xxxxxxxxxxxxxxx
> cc: linux-mm@xxxxxxxxx
> ---
> arch/x86/include/asm/uaccess.h | 2 +-
> arch/x86/lib/copy_mc.c | 8 ++++----
> 2 files changed, 5 insertions(+), 5 deletions(-)

Acked-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette