From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46FD1C433EF for ; Wed, 6 Apr 2022 13:37:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233687AbiDFNj1 (ORCPT ); Wed, 6 Apr 2022 09:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233498AbiDFNjG (ORCPT ); Wed, 6 Apr 2022 09:39:06 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 730976984C2 for ; Wed, 6 Apr 2022 03:40:46 -0700 (PDT) Received: from kwepemi500002.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KYKmb0ZQpz1HBYK; Wed, 6 Apr 2022 18:01:51 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi500002.china.huawei.com (7.221.188.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Apr 2022 18:02:17 +0800 Received: from [10.174.179.234] (10.174.179.234) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 6 Apr 2022 18:02:16 +0800 Message-ID: <99acc7d2-a11b-250b-f614-18077fb76cc0@huawei.com> Date: Wed, 6 Apr 2022 18:02:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [RFC PATCH -next V2 1/7] x86: fix copy_mc_to_user compile error To: Borislav Petkov CC: Andrew Morton , Thomas Gleixner , Ingo Molnar , Dave Hansen , Catalin Marinas , Will Deacon , Alexander Viro , , "H. Peter Anvin" , , , References: <20220406091311.3354723-1-tongtiangen@huawei.com> <20220406091311.3354723-2-tongtiangen@huawei.com> From: Tong Tiangen In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.234] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 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@huawei.com/ Thanks. Tong.