Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp834512pxb; Tue, 12 Apr 2022 14:47:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCswgjNN7AoFp4F+LkOqP1/ESQdT7qFbfKvKKPeCvLtLlYDEFXFxpGjyduV3WCt87uoPR3 X-Received: by 2002:a17:902:cccf:b0:156:31a:736e with SMTP id z15-20020a170902cccf00b00156031a736emr39314936ple.76.1649800049179; Tue, 12 Apr 2022 14:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649800049; cv=none; d=google.com; s=arc-20160816; b=p03p3r/zys7hXIzPAdsueqUg9fAPkCmlX5v3oO6CQY+u7xvKI0pINxIQtc12yhAJqK 94jdYJkRTG5xC7zENHmUA0VqwamgfKNrTXBTp7bBUOplEj0ki202v1xKKsXmAaj3vl2V aWDLgl2NrF3jOqZ1x0hHiT2slabPLtE2SuEqs0MWP0E+PxtFqX2g19lNg0qhlDBTOY/p rLPVoQ4wFIHmLwqoIWYIMIN/YP2DIi0BmkVX6uJ4xsQ6L7hYOwKtH7fcrRS9joW6noQB XMWUO6GVZt+F067aDK1RJWQHPwubDv33T80bbmUCdPaN6lbil3IYkrF+9NiSt20dbc1f UCjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=CRI3wbzC2S1KvdHplc/ghiqEuxrRQZsxm3RgVQee6aQ=; b=oZxroLV4n+ssgRGch5E/g+iZSZd2lLTbf0P+VSSbgX9WTq8OB0D3iIfGJKAOhCDe7S H1MiCSdBPWmWaUSznNCMZOgkJUPrL0KsE0/1hsBlpfCCn6/MB3naP75O6Ua3mB4IrtdQ No5IPB/uHAPQqfALxBKzOxx+0K5GZ/Oqpld9x5gq/W8UGJrNEkocjTCwhmCh1fwekXc3 n2xVMUfG2it8nW2BnXMI0Kj00KAtUGTOkJCnLS9uyw01mkMzeLbdl51MqOlmnsOIb6pu el17rM5D7rqIB1XmYdKuQ7qdMDR2UAeeNEEWnGDQpbwh9x1fIQrKgggH3CDilSV0rpAJ RPLg== 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 t5-20020a17090aae0500b001c6cd25051csi12341423pjq.79.2022.04.12.14.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:47:29 -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 D25D551592; Tue, 12 Apr 2022 13:46:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355545AbiDLIIc (ORCPT + 99 others); Tue, 12 Apr 2022 04:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355269AbiDLH1X (ORCPT ); Tue, 12 Apr 2022 03:27:23 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7263748E63 for ; Tue, 12 Apr 2022 00:07:24 -0700 (PDT) Received: from kwepemi100007.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Kcxbq64fRz1HBnL; Tue, 12 Apr 2022 15:06:47 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi100007.china.huawei.com (7.221.188.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 12 Apr 2022 15:07:21 +0800 Received: from localhost.localdomain (10.175.112.125) 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.2375.24; Tue, 12 Apr 2022 15:07:20 +0800 From: Tong Tiangen To: Mark Rutland , James Morse , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Robin Murphy , Dave Hansen , Catalin Marinas , Will Deacon , Alexander Viro , , "H . Peter Anvin" CC: , , , Kefeng Wang , Xie XiuQi , Tong Tiangen Subject: [RFC PATCH -next V3 1/6] x86: fix function define in copy_mc_to_user Date: Tue, 12 Apr 2022 07:25:47 +0000 Message-ID: <20220412072552.2526871-2-tongtiangen@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 In-Reply-To: <20220412072552.2526871-1-tongtiangen@huawei.com> References: <20220412072552.2526871-1-tongtiangen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.125] 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=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 X86 has it's implementation of copy_mc_to_user but not use #define to declare. This may cause problems, for example, if other architectures open CONFIG_ARCH_HAS_COPY_MC, but want to use copy_mc_to_user() outside the architecture, the code add to include/linux/uaddess.h is as follows: #ifndef copy_mc_to_user static inline unsigned long __must_check copy_mc_to_user(void *dst, const void *src, size_t cnt) { ... } #endif Then this definition will conflict with the implementation of X86 and cause compilation errors. Fixes: ec6347bb4339 ("x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()") Signed-off-by: Tong Tiangen --- arch/x86/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index f78e2b3501a1..e18c5f098025 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -415,6 +415,7 @@ copy_mc_to_kernel(void *to, const void *from, unsigned len); unsigned long __must_check copy_mc_to_user(void *to, const void *from, unsigned len); +#define copy_mc_to_user copy_mc_to_user #endif /* -- 2.18.0.huawei.25