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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52724C433EF for ; Wed, 6 Apr 2022 10:02:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3D0A6B0072; Wed, 6 Apr 2022 06:02:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DECDC6B0073; Wed, 6 Apr 2022 06:02:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CDC416B0074; Wed, 6 Apr 2022 06:02:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id C1E126B0072 for ; Wed, 6 Apr 2022 06:02:34 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 995E662081 for ; Wed, 6 Apr 2022 10:02:24 +0000 (UTC) X-FDA: 79326014208.04.84F6EB9 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf26.hostedemail.com (Postfix) with ESMTP id B14E9140008 for ; Wed, 6 Apr 2022 10:02:22 +0000 (UTC) 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 X-Stat-Signature: im56fj85juez999c978p3fqdqf4qf8dg X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: B14E9140008 Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of tongtiangen@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=tongtiangen@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-HE-Tag: 1649239342-955390 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 在 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.