Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2810140rwb; Mon, 15 Aug 2022 11:48:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR6pa6SkxE6DWf3onjJJCOToKvrqeXL1KAxbKHwjZHsAjLLc6Vjbc8lXn4wVuflUSU8L35+d X-Received: by 2002:a17:907:94d2:b0:730:87c1:e86d with SMTP id dn18-20020a17090794d200b0073087c1e86dmr11648887ejc.37.1660589282970; Mon, 15 Aug 2022 11:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589282; cv=none; d=google.com; s=arc-20160816; b=WvKIpwesQNff3sXGdM7RjcWBwfECS2yn2fBaHyq+AXp9DphFMdaPR3kmnP5PG9OXF0 m4fr5v3ijy3bK7G51XhuXLjoastVElMT458qEm6003MdmedsJltah69NoeU2wNVIrMie DIEevS7Vu1EZdoYJ0QkjQmdVGcRoTzf+J2yMwPJQLkubQ+s7y5KV88JRa3/5ULAGB0CR 3DeLc6r8HVYT8yjiTNEBfgwI4PI4M+fM9MZzPuEI5ZDO5bOL+XcoX+xaZLF1DB505yz6 1lyuCdMBgysgnB0+4alSzRMs8Jzs/VKutThK+Y0IJE2hBR/3DO7ISvT7MZA++9DKZjpK P6Tw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SVo/ZDAKW5pqO7nX8FqO8VcVjDmEdNUtDKwcOK/RUWs=; b=JdYdIOR4zkhnkd3OZHNcr3iNwSAnYSaxsLrJMO2CpzPui2qcIuDoMKCvnCnXxSWppG MaD/dEgkD9yFq8o/E0jb9ETm/llV69U2Fw3oJSuvm9omvN3q1VOtlfz0fR7O7EaBxpUP S+ZoI4jq6g+xBQcrCrWmthc5JmUrGEE05IOdbvxEDqzKipYF/hx5BgmQ3H4Qyl9cpVsp f9wWXmETeqbMJ2f1/lr06T/daReaPESwplGKrNB6k8mnP/78oAor20xCk4KmuLbwZqzG M4vYTDdTVFRNuoHbSsPzQBT4NwwlBTKQ1L9yvAl05GPeyrxM2C6WREehNykhbUq7I7u2 WdsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vM2jt4fN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a50ec10000000b0044202417985si7758858edr.108.2022.08.15.11.47.36; Mon, 15 Aug 2022 11:48:02 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vM2jt4fN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241036AbiHOShq (ORCPT + 99 others); Mon, 15 Aug 2022 14:37:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244054AbiHOSgX (ORCPT ); Mon, 15 Aug 2022 14:36:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73FC02D1D4; Mon, 15 Aug 2022 11:23:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AE1DAB81062; Mon, 15 Aug 2022 18:23:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAF3BC433D6; Mon, 15 Aug 2022 18:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587789; bh=xF4ZESeti/WorROBW8Be43lu84T42KyEAFY2zI+iyTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vM2jt4fNenvvSdtgRJcGhk9LLpCD1b6c8jjEjgumrptnyXiqaXezU/0PHgY4O4ARO WCxNRa9l6YKu9+86dgK573EXoSO4V7zKp/BEAw4wO52tdnfQFewEhV2VaLpwY7eHLy y4X/d6cYWOOauz0OH/vTCQ/aYwP48ZA454zXFMiU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tony Luck , Omar Avelar , Dan Williams , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.15 188/779] ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP Date: Mon, 15 Aug 2022 19:57:12 +0200 Message-Id: <20220815180345.290854764@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: Dan Williams [ Upstream commit b13a3e5fd40b7d1b394c5ecbb5eb301a4c38e7b2 ] When a platform marks a memory range as "special purpose" it is not onlined as System RAM by default. However, it is still suitable for error injection. Add IORES_DESC_SOFT_RESERVED to einj_error_inject() as a permissible memory type in the sanity checking of the arguments to _EINJ. Fixes: 262b45ae3ab4 ("x86/efi: EFI soft reservation to E820 enumeration") Reviewed-by: Tony Luck Reported-by: Omar Avelar Signed-off-by: Dan Williams Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/apei/einj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c index 2882450c443e..2e0ab898cce3 100644 --- a/drivers/acpi/apei/einj.c +++ b/drivers/acpi/apei/einj.c @@ -544,6 +544,8 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, ((region_intersects(base_addr, size, IORESOURCE_SYSTEM_RAM, IORES_DESC_NONE) != REGION_INTERSECTS) && (region_intersects(base_addr, size, IORESOURCE_MEM, IORES_DESC_PERSISTENT_MEMORY) + != REGION_INTERSECTS) && + (region_intersects(base_addr, size, IORESOURCE_MEM, IORES_DESC_SOFT_RESERVED) != REGION_INTERSECTS))) return -EINVAL; -- 2.35.1