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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBD32C433EF for ; Tue, 16 Nov 2021 00:06:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3CD461027 for ; Tue, 16 Nov 2021 00:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353382AbhKPAJl (ORCPT ); Mon, 15 Nov 2021 19:09:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347421AbhKOUe7 (ORCPT ); Mon, 15 Nov 2021 15:34:59 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB923C043198; Mon, 15 Nov 2021 12:22:36 -0800 (PST) Date: Mon, 15 Nov 2021 20:22:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637007750; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NR92JQCn7a2l/EiF12ySCHJYPqalk/lgZ8kDZk3kdss=; b=L6j/SeRHLugEmKMlkMyoy9tnvOjNAb0E/oAFwmar9LeKZ6zyHWgqbIva/T+I9tgx8kTzfq PkcSbVFxuV4CoWbE35Tx938sS3wOQlHrAW233VQS3IrlREg8b3hvenHBhOQBrlOiNo8y9o Mo6CBCFK/iLuLHG2WfVyOYj1faNGYCEwvg6R3y19+WJ+99ZB30NI1/s09FjJgr2Y2funNZ 8m7XHkkmgkUxH526Rab601WP+CVjUKTIMPCYQ091MuZDHgZQZ2xBPYTE4tZC983WeSMsPy sCQ/dyhH3e8Eb76a/hD6tf+sM1Tf4bRC3yT1hX9yWc+a0NHe2x0nqJlYPuy/Qw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637007750; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NR92JQCn7a2l/EiF12ySCHJYPqalk/lgZ8kDZk3kdss=; b=pE+bunUpmMsrb3+EvOSfiFsfrDJccQLZUGu5fefqrMzxT1gj2BjXaR7ar/wXmLh28fCFFk /xpmIiazTUmIXpCA== From: "tip-bot2 for Tony Luck" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sgx] x86/sgx: Add check for SGX pages to ghes_do_memory_failure() Cc: Tony Luck , Dave Hansen , Jarkko Sakkinen , Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20211026220050.697075-8-tony.luck@intel.com> References: <20211026220050.697075-8-tony.luck@intel.com> MIME-Version: 1.0 Message-ID: <163700774934.414.80458506710567335.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/sgx branch of tip: Commit-ID: 3ad6fd77a2d62e8f4465b429b65805eaf88e1b9e Gitweb: https://git.kernel.org/tip/3ad6fd77a2d62e8f4465b429b65805eaf88e1b9e Author: Tony Luck AuthorDate: Tue, 26 Oct 2021 15:00:50 -07:00 Committer: Dave Hansen CommitterDate: Mon, 15 Nov 2021 11:13:16 -08:00 x86/sgx: Add check for SGX pages to ghes_do_memory_failure() SGX EPC pages do not have a "struct page" associated with them so the pfn_valid() sanity check fails and results in a warning message to the console. Add an additional check to skip the warning if the address of the error is in an SGX EPC page. Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Tested-by: Reinette Chatre Link: https://lkml.kernel.org/r/20211026220050.697075-8-tony.luck@intel.com --- drivers/acpi/apei/ghes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 0c8330e..0c5c9ac 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -449,7 +449,7 @@ static bool ghes_do_memory_failure(u64 physical_addr, int flags) return false; pfn = PHYS_PFN(physical_addr); - if (!pfn_valid(pfn)) { + if (!pfn_valid(pfn) && !arch_is_platform_page(physical_addr)) { pr_warn_ratelimited(FW_WARN GHES_PFX "Invalid address in generic error data: %#llx\n", physical_addr);