Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1920302rdb; Sat, 2 Dec 2023 15:24:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvoW2mC4svviMT5hzzV9ZRw84jOwcuFn+T2ywa+VQCOLQkcCNanfbz4d9Naw91Key3MpoG X-Received: by 2002:a05:6358:cc82:b0:170:17eb:3793 with SMTP id gy2-20020a056358cc8200b0017017eb3793mr2366139rwb.59.1701559453559; Sat, 02 Dec 2023 15:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701559453; cv=none; d=google.com; s=arc-20160816; b=Y23JcQDTsP8Bc5GxW46HiVy/6+YxLfVOPl2iu9SepvK1EGBbo4R+KVppy4dlI2gUrw aTnhg1NLotVgJ93dbD+CBzVetxwVCZC8AljQwhaGLv2CVInwc/76cGQmgCiBvUK5VXMU BIs+4IIxAbu8TNN2YVr/2RpCuimA49J6CN0nPz6EZAyWjqyZSXP8jzVyDE1Ro1vI4YSz VGc64mP7fabDiuNU6OSICNqI+wVuRMroR8CYzE0vuwa7qmOyDrK5YgYTJ4UIvLBViU7c U6VQmuEvY7Jvt4cQ1EPuJQdm78wfJwvPA1stMtuHEVBkwlJG4XjGShVQYUV8PZiujeuZ FOAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9MUOeGeZ5B/ijKebEMHCI1M4SgxyUmLcB9iMR+JlMLs=; fh=S5jZoZqUsTKzXCucVQvHaxSBbN9mIEE0Gj5WEzgPtxM=; b=I0P8O/37OH4SW1BJeRn8vtAtJhDTiwt5n0Jne2n8n4RMPePia0cfGkNN+dePwuP9DE 6TFaiM4/nGKpO6jDBmCTjqohn3ZUzJscPJnrx4xbKeug8/U0PXlKKtu3Vu1OmgWtNEGt j0zlmQty1uuPFKBv9IJaSOO4/2ESlNLGOSVKp9YBWeQ0cv4HY6P3bFVs5ROcrCIT0aBQ 7SkrjJ7pHnx0X4qi9GIXLnNxxJS18WH6JER/g/cYtz9BzcV7uq31F47EayF9YYU3gnc2 I2atJ6cKYr5KwsT9LxKZZPQ2aOOoP2PElv0Z5DC3xr8Jv8u/RuR3BmzZY1zG9GZJfw6I KcEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=iMB1Y3tk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id pi13-20020a17090b1e4d00b00285aaf2d6aesi8231172pjb.116.2023.12.02.15.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 15:24:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=iMB1Y3tk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5A71E80658C4; Sat, 2 Dec 2023 15:24:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbjLBXYD (ORCPT + 99 others); Sat, 2 Dec 2023 18:24:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjLBXYB (ORCPT ); Sat, 2 Dec 2023 18:24:01 -0500 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3AD8124; Sat, 2 Dec 2023 15:24:07 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 049B240E025E; Sat, 2 Dec 2023 23:24:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Niido9d84076; Sat, 2 Dec 2023 23:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1701559440; bh=9MUOeGeZ5B/ijKebEMHCI1M4SgxyUmLcB9iMR+JlMLs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iMB1Y3tkckvcPzSIMFzmO3QkTWIi54wspB5lmz1p3wTg6sxvgAQFS/nx36pDTM0Sq NgyyYA2BJjSs7mKalgZjLnssy9RIcogY/ezUBLtJSnSwvaN+XnU5Q5hoPq6ey5XoNV 6i90Aks8zWvQzMrvKCE5JQCJaUAOU4vauU5u20R0RY+FOSPtmhNz7S07ruwEpCyljE Zb4HbsOKfUmciNg9PdeQk3uLL+uq60AT+D/jnZyFPFOlGc4/9lxSUnjq7/nrc6ngtY 0knlTxmZsBU3V9L64c5k459EgRJwLOUS5s1LkhThC/cC5hR+QwuT0CTvf6tC2xwiou yepw3gnX7/Y6zWZ0dZqtIdVdM/aKXqa0GEY1vGHu4DKt5YznVMOr4f/+IqoEJMgxvP FqKfr1f5QsXC4gL42/Xiy15FtLlx/TfRSPZ08FFR8FHMIOGAG9ZQE9lEweuHN39f8x DkjCdnOJpfKb0NLaNGgStt710K9S2259FgCEMmkaaHH88Y+snZGFi6BcpkfHXAuwuM G+Gr0/GajAaNadrPeOZf03ISMk2hx9VOPR7KTqjZPfUWklUcKDe6raWSXDSZXRxgAS 4hdDMInA/pVlpCBNIPHhSt1v1VTU4AAmV1i7LX110RdsrPcVsxU+SSFaTt6AF/cTVk CfeM1jrzHeYaLK5JmqqRPwG0= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 05E0D40E024E; Sat, 2 Dec 2023 23:23:26 +0000 (UTC) Date: Sun, 3 Dec 2023 00:23:19 +0100 From: Borislav Petkov To: ankita@nvidia.com Cc: jgg@nvidia.com, alex.williamson@redhat.com, naoya.horiguchi@nec.com, akpm@linux-foundation.org, tony.luck@intel.com, linmiaohe@huawei.com, rafael@kernel.org, lenb@kernel.org, james.morse@arm.com, shiju.jose@huawei.com, bhelgaas@google.com, pabeni@redhat.com, yishaih@nvidia.com, shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com, aniketa@nvidia.com, cjia@nvidia.com, kwankhede@nvidia.com, targupta@nvidia.com, vsethi@nvidia.com, acurrid@nvidia.com, apopple@nvidia.com, anuaggarwal@nvidia.com, jhubbard@nvidia.com, danw@nvidia.com, mochs@nvidia.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-edac@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v2 3/4] mm: Change ghes code to allow poison of non-struct pfn Message-ID: <20231202232319.GAZWu8Z6gsLp1kI5Dw@fat_crate.local> References: <20231123003513.24292-1-ankita@nvidia.com> <20231123003513.24292-4-ankita@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231123003513.24292-4-ankita@nvidia.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 02 Dec 2023 15:24:12 -0800 (PST) On Thu, Nov 23, 2023 at 06:05:11AM +0530, ankita@nvidia.com wrote: > - pfn = PHYS_PFN(physical_addr); > - 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); > - return false; > - } You don't just remove a pfn valid test just because your weird device can't stomach it - you extend it, like 3ad6fd77a2d6 ("x86/sgx: Add check for SGX pages to ghes_do_memory_failure()") did, for example. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette