Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4868251pxb; Wed, 20 Apr 2022 11:49:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtyNQa1N42QTYQglht0CeEseA8Y3nr8G6JICwrXFqmqt+5PyCceneDBMX7y/03BGkCAvxq X-Received: by 2002:a17:902:b10c:b0:154:a3b5:b33a with SMTP id q12-20020a170902b10c00b00154a3b5b33amr21329292plr.3.1650480573837; Wed, 20 Apr 2022 11:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650480573; cv=none; d=google.com; s=arc-20160816; b=jr5Ms7r+T7Tm5pd8/mXMIwWI3svCRcu43YQUhAh/muED4rL3SiqkU/YxL6VvwaoeIe uzgivhst2Mmjw3Hdod80a/eZ5QnC7Xhz0scW8bhOe9VbHmmiIP2nX65LF9rHtjVvfd+l p8CgkJC+5GbOT1WjzGUwdTm1G+r+Jx9pZ5QogdciuFltYcoxmDKu7yYu+ue/OF6/ZkVG DW4W7itOaf1iyWmegLaXT/NPA5kGo1vCuyGbKzGnwxupaZL4B6zuTFRCn3gQzNg78Haj 8XBBDQqOnoiLp8A1XYCcOlh3MxbZ5MuCQvkuxZsTy7vRFKXOV7/6dG4PAIGOHoAYDBN/ wbGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GjMvoz1V3ZFrHXn2hAJu3ulz1upY0kn50qmp9c0idd0=; b=0Ek4zaq7ba4KSHMTyuE0vViJaJt9kJVCyTZPtvJK43KpQtzYHZi74QKyxXtn46PTQ9 tkCgWVYMoe3mpJtnjSvC5km7Ydh2cyk9cLvasABn/qTKznjk+QEJ+jsEPnzA0MSMCQ4S /fpMaboZsL/JgxVKGcUXIVNIHXFKQWUzZPXyQWtbX4JGWXE14qdRe4vGTEDCEHDhjkdp Cbnv2HDNZLnjgA55iTSHbpvFOqHQhYbMmJO5Yl9GzvI/tbbeJahVkRe1w2vvMQ1iqB/0 nwuTs2QtctlNqjHpSu9PEDL+SzLcoaJlGGbEOASVtM9gVo+MfC66SFupCxUtUbJByJFL b66Q== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a63ae05000000b003816043f0fcsi3161822pgf.753.2022.04.20.11.49.17; Wed, 20 Apr 2022 11:49:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358646AbiDTAq1 (ORCPT + 99 others); Tue, 19 Apr 2022 20:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358628AbiDTAqT (ORCPT ); Tue, 19 Apr 2022 20:46:19 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B3C82C117; Tue, 19 Apr 2022 17:43:34 -0700 (PDT) Received: (Authenticated sender: joao@overdrivepizza.com) by mail.gandi.net (Postfix) with ESMTPSA id E24A91BF205; Wed, 20 Apr 2022 00:43:27 +0000 (UTC) From: joao@overdrivepizza.com To: linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Cc: joao@overdrivepizza.com, peterz@infradead.org, jpoimboe@redhat.com, andrew.cooper3@citrix.com, keescook@chromium.org, samitolvanen@google.com, mark.rutland@arm.com, hjl.tools@gmail.com, alyssa.milburn@linux.intel.com, ndesaulniers@google.com, gabriel.gomes@linux.intel.com, rick.p.edgecombe@intel.com Subject: [RFC PATCH 07/11] x86/lib: Prevent UACCESS call warning from objtool Date: Tue, 19 Apr 2022 17:42:37 -0700 Message-Id: <20220420004241.2093-8-joao@overdrivepizza.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420004241.2093-1-joao@overdrivepizza.com> References: <20220420004241.2093-1-joao@overdrivepizza.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Joao Moreira Objtool emits a warning whenever it finds a call that may happen with UACCESS enabled. Prevent this b not emitting calls to the __fineibt_handler in such circumstances, making the function coarse-grained. Signed-off-by: Joao Moreira --- arch/x86/lib/copy_mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/lib/copy_mc.c b/arch/x86/lib/copy_mc.c index 80efd45a7761..554e6c6ecea2 100644 --- a/arch/x86/lib/copy_mc.c +++ b/arch/x86/lib/copy_mc.c @@ -22,7 +22,7 @@ void enable_copy_mc_fragile(void) * Similar to copy_user_handle_tail, probe for the write fault point, or * source exception point. */ -__visible notrace unsigned long +__visible notrace unsigned long __coarseendbr copy_mc_fragile_handle_tail(char *to, char *from, unsigned len) { for (; len; --len, to++, from++) -- 2.35.1