Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4908785pxv; Tue, 6 Jul 2021 12:07:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIeHiqc8aTt6JSu5j8a4LqGxTCbHcY/vfyR2Z75RtETwsEkBbCYkDJb9Yshm1gi+o/8zxN X-Received: by 2002:a50:fb95:: with SMTP id e21mr2875209edq.65.1625598471447; Tue, 06 Jul 2021 12:07:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625598471; cv=none; d=google.com; s=arc-20160816; b=S4FOX9FBYgRRdAhfAisjTFXmYOZPeDD4qhztUI676E9QevoBSqDcluOn7lQ3o2HuzQ Z5a+rm3jFl/n+VPkI7xSwq2RUX4C3HIZpe1SAIbJnYGpAqwH7a4iJVn3AKYSrdxcmtj+ +kRAYrbVgOWW8vw5WlDCaSGXyvmAC1FNep9OGj6AfuCz8L57irRGfH6QyPzxzxut9UGb sjAt/VCisZIAjyNQUUMtTg2/xyMKOgtAlHQzPVjFC/PkId1CCUPNCxza7AgXPrz1fxHc KS1rdutWYD1gpY+FOUWF7tNUXIJGrrl6gZspd1DnqI7+t/aLPAGrTNUCJe4PhIuPD64Z ew4g== 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=/zUOqhf987gOlRV93Rk6es87ueuzrC6YOkz3LOvG/Os=; b=U2n2rtq2WiP/2gIvYIjPkAV8/DIhH18ObuNtxdmvbt9crmlNvZ2svHocKtLW6Femck VUHFSuoDo65yQoO1+iBuPOi6VUSaSfGrldVVCDa5EbwTTd2qvNMoGkJMXq2l5uh96uh7 pKqxajzbUUaZbdzbXslaFBZWtnnc/FD1gAsrDrY2b1FmOTOG7HClLMunqbxfrc+8s4Ph XHx2SwzKwc6g95X6WCWesIa188tq5CPupi8LyWBclXuHh3zBzukVtAymeDShBdKwR5YU zs0GZQIQmWMM/rofksyWkwtuU+cByDUBOedEg74kM52uvHpz7NXDoga4yVyrstEVhjyU jTiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si15121595eds.399.2021.07.06.12.07.28; Tue, 06 Jul 2021 12:07:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbhGFTJJ (ORCPT + 99 others); Tue, 6 Jul 2021 15:09:09 -0400 Received: from mga11.intel.com ([192.55.52.93]:6713 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbhGFTJH (ORCPT ); Tue, 6 Jul 2021 15:09:07 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="206166886" X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="206166886" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 12:06:28 -0700 X-IronPort-AV: E=Sophos;i="5.83,329,1616482800"; d="scan'208";a="427687592" Received: from agluck-desk2.sc.intel.com ([10.3.52.146]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 12:06:27 -0700 From: Tony Luck To: Borislav Petkov Cc: Tony Luck , Ding Hui , naoya.horiguchi@nec.com, osalvador@suse.de, Youquan Song , huangcun@sangfor.com.cn, x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] x86/mce: Drop copyin special case for #MC Date: Tue, 6 Jul 2021 12:06:20 -0700 Message-Id: <20210706190620.1290391-4-tony.luck@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210706190620.1290391-1-tony.luck@intel.com> References: <20210706190620.1290391-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes to the iterator code to handle faults that are not on page boundaries mean that the special case for machine check during copy from user is no longer needed. Signed-off-by: Tony Luck --- arch/x86/lib/copy_user_64.S | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S index 57b79c577496..2797e630b9b1 100644 --- a/arch/x86/lib/copy_user_64.S +++ b/arch/x86/lib/copy_user_64.S @@ -234,24 +234,11 @@ EXPORT_SYMBOL(copy_user_enhanced_fast_string) */ SYM_CODE_START_LOCAL(.Lcopy_user_handle_tail) movl %edx,%ecx - cmp $X86_TRAP_MC,%eax /* check if X86_TRAP_MC */ - je 3f 1: rep movsb 2: mov %ecx,%eax ASM_CLAC ret - /* - * Return zero to pretend that this copy succeeded. This - * is counter-intuitive, but needed to prevent the code - * in lib/iov_iter.c from retrying and running back into - * the poison cache line again. The machine check handler - * will ensure that a SIGBUS is sent to the task. - */ -3: xorl %eax,%eax - ASM_CLAC - ret - _ASM_EXTABLE_CPY(1b, 2b) SYM_CODE_END(.Lcopy_user_handle_tail) -- 2.29.2