Re: [RFC PATCH -next V2 1/7] x86: fix copy_mc_to_user compile error

From: Tong Tiangen
Date: Wed Apr 06 2022 - 09:37:29 EST




在 2022/4/6 17:22, Borislav Petkov 写道:
On Wed, Apr 06, 2022 at 09:13:05AM +0000, Tong Tiangen wrote:
The follow patch

There's no concept of "follow patch" in git - you need to explain this
differently.

will add copy_mc_to_user to include/linux/uaccess.h, X86
must declare Implemented to avoid compile error.

I don't know what that means. Try again pls.


This description is not good, will redescribe it in next version.

Here I describe the reasons for this:

Patch 3/7 in patchset[1] introduce copy_mc_to_user() in include/linux/uaccess.h and the prototype is:

static inline unsigned long __must_check
copy_mc_to_user(void *dst, const void *src, size_t cnt)

The prototype in x86 is:

unsigned long __must_check
copy_mc_to_user(void *to, const void *from, unsigned len);

This two are a little different, so I added the follow code to x86 to
avoid prototype conflict compile error.

#define copy_mc_to_user copy_mc_to_user

In addition, I think this #define should be added here.

[1]https://patchwork.kernel.org/project/linux-mm/cover/20220406091311.3354723-1-tongtiangen@xxxxxxxxxx/

Thanks.
Tong.