Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1089883pxb; Wed, 6 Apr 2022 08:28:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1USUQBE3Idn0QBSJFn05G+rzaYw67CE2tVFLWa7X8zV/kLMbnTim9q6d9bh7oLCpugT+L X-Received: by 2002:a17:90a:4604:b0:1bc:8bdd:4a63 with SMTP id w4-20020a17090a460400b001bc8bdd4a63mr10530160pjg.147.1649258930068; Wed, 06 Apr 2022 08:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649258930; cv=none; d=google.com; s=arc-20160816; b=0O0mX+wCTVtsLsBuQywPp+fAA/nItawMu1+zLfrMhnQ5FGxXzrNHDoIMvtD9Fz2Tzq r46jlwPpoDu9QbzmhZixTUGOg6+a/GsfJXS8c81a5O4UNpEczy9IkG7KgXuY/1SXhkbW 9hLY9A1Y8RxCpDATQEyYNYBZsSKApKOmeOH0qF0aB1aSqLwIbIUAtU3O/n1bahIMo4J7 qgjLguernkeJXlnAZbGcrCwF8SofIbxYMkU0N5IYCgbTLuy2NhUf4OKIg8JGzOcOFV+t IoFJjW3m4at3pv+RR0MPKxiWR6tPq2BKlXB/9guiE7lDBN//T051Z8/KqldiCgw5qrUM DN6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=v3o3S7nsZaLqzzOiJkspTJYLsMkqtBgjvsC5PDsoxUg=; b=jWS+wqMRqYY98oW79B6BHRE3vQY/+Tlx0afZLbw6uy7mUr/D4rACtVGILVTttOo28Y 2RoIygthYyaHWdWOcsXPUxzO1l7LhPjU+3bnqZet8fAfqn0V2LSFtyijqnO3TnLLf0/i /eoq9Ak2AGTPkJuwm9+kLxH0QC0JY9nSPrgjDEVlkqypBWTlJbjR/10fFcheSxnp2Dlc 8RzmyPovDNMfBzFr1EylrRXtZDMbCZ5rDqxkkGdFUBXhyZysRFBYT+jEeoy3siiMoMQ9 xuacR8my2HvBxyuo5kdFKTnoqACLjlFoFqyz1q7xuke6P8ApMP0K5TQJWrQX/vgKe3Tv Mjhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j64-20020a638043000000b0039cbaf5c7f9si808483pgd.126.2022.04.06.08.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 08:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2311C4DFBF1; Wed, 6 Apr 2022 06:37:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233669AbiDFNjZ (ORCPT + 99 others); Wed, 6 Apr 2022 09:39:25 -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 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.