Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5527943rwi; Mon, 17 Oct 2022 23:45:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6LIyh0SFAFu+3Wscr0cgR0iJOxxutHkWav0JqsViQKp+NfRYHMn9dbzjhWpOwKTXJx3pUm X-Received: by 2002:a17:907:31c4:b0:78d:9b2f:4e1a with SMTP id xf4-20020a17090731c400b0078d9b2f4e1amr1184152ejb.306.1666075517617; Mon, 17 Oct 2022 23:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666075517; cv=none; d=google.com; s=arc-20160816; b=Er0Q0kKSb+WfaoX0yBQ5BnA66RnOe/hITxh6pzEkSv9xCTLUVsXX8Hiy9IDRKikl4v 3qasRdyynvbFIrVBIW9d0xDkr62QcmcmuhOMKHnK5UzaLigZvgMCXHGMeXqfLfAFhVZb JMNMG3aIKUh51chZQBm2EjnoOB5wg8aWNkyghyG9TwWxvWz06foLElv7yaPnlA+sk0WB LafyshEnivgr5vyhk6lm4uu0fBRTBIxClvADVL+IkRZv57yGs7XXuL/Kz1RJ1HLeCk6+ 3L3Te4vimIBr9oZxJ3UzhlS8o4J4aVjNvGXDJb22amQFqB/c5jNegnnLH8mcRR1cnybD Z0VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:cc:from :references:to:subject; bh=2U/XTgDbUxO0uJKmBsSsE6schLn+Z8Tcrh/HK1J176A=; b=Er9sywj0eL0AzONvswdl79AQJRQOzPD580u2VaUjH6RKcMjdHdD1nCHG7BsTflb+xy zVogqbU87e+jG6IlM3CKFJuDEYsmq1cqb8HzrUl7pYjioZDcKHKVcmGmYU1iUsYV2bEv 6KkdFgbtFKTRUL3eJGDctajZ7ooj+RK91vtvWmMvq5bE6M9wSXcfJilG4vTbbBJxaSWo zidhJhFz/F2Mjqwg2U/U4XlBR4H7ngI0GBDXk3Zho3wlnePnDwmKyGnPQtPHLDKSdawh 5zja2e1BhoLfnFsBqQdwQc2LaTNv0rv2y1UbigPNmbYRsGXZevvSzSIYKDe4hytLhsG0 lYoA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a056402004400b004588172def1si9515393edu.410.2022.10.17.23.44.51; Mon, 17 Oct 2022 23:45:17 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbiJRGVS (ORCPT + 99 others); Tue, 18 Oct 2022 02:21:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbiJRGVQ (ORCPT ); Tue, 18 Oct 2022 02:21:16 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE9168CD4 for ; Mon, 17 Oct 2022 23:21:14 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Ms3Zz0YxtzJn2G; Tue, 18 Oct 2022 14:18:35 +0800 (CST) Received: from [10.174.151.185] (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 14:21:12 +0800 Subject: Re: [PATCH V3 1/1] x86/sgx: Add code to inject hwpoison into SGX memory To: Thomas Tai References: <20221017223305.578073-1-thomas.tai@oracle.com> <20221017223305.578073-2-thomas.tai@oracle.com> From: Miaohe Lin CC: , , , , , , , Message-ID: <4a7c4187-5df3-f153-189b-62fae7de4cd2@huawei.com> Date: Tue, 18 Oct 2022 14:21:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20221017223305.578073-2-thomas.tai@oracle.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 On 2022/10/18 6:33, Thomas Tai wrote: > Inspired by commit c6acb1e7bf46 ("x86/sgx: Add hook to error injection > address validation"), add a similar code in hwpoison_inject function to > check if the address is located in SGX Memory. The error will then be > handled by the arch_memory_failure function in the SGX driver. After > injection, the action_result() will print out the page type and the > action taken. > > Signed-off-by: Thomas Tai Many thanks for your work. The patch looks good to me. Reviewed-by: Miaohe Lin Thanks, Miaohe Lin