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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFFEDC4332F for ; Tue, 18 Oct 2022 06:21:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EB9346B0072; Tue, 18 Oct 2022 02:21:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E68D36B0075; Tue, 18 Oct 2022 02:21:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D30736B0078; Tue, 18 Oct 2022 02:21:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C37646B0072 for ; Tue, 18 Oct 2022 02:21:20 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6C1D9120DEB for ; Tue, 18 Oct 2022 06:21:20 +0000 (UTC) X-FDA: 80033073120.25.427EB54 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf07.hostedemail.com (Postfix) with ESMTP id 955CB40032 for ; Tue, 18 Oct 2022 06:21:18 +0000 (UTC) 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666074079; h=from:from:sender: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=2U/XTgDbUxO0uJKmBsSsE6schLn+Z8Tcrh/HK1J176A=; b=t+Z6USQgkBy00o79f/HZ0Q8GuvF6zU/vLl5S2XDFYwjqHtEw3Cf5o9c4PG+eLvWjGPsco5 K5EqqyQOos1T0CD0YhjdOgZg6/tpJO8SDniSZ1i3k91o1uJIFfrMIVks5oDMMXS6wlVT6Y bsER2XEfP1qhpSn+BMptLq5G3R51hzg= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666074079; a=rsa-sha256; cv=none; b=oN8kLXvOhlSLV26QmOaAoW/G2xtkVjEUGa1yuET2Mpsvvfw9UkfI3Pq0Sx+S689+I0BKYp 3j6eGiYT2/2k1sriwsCuCD2L+rcvYdXIFmZ78k4TqAHv0Z0u1UUJuH0gu6+4jbOIRQgJKG 6hQ7fXX+5Z0bzxdawp4vP65m+0FNxhk= Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Stat-Signature: mka1k8z7w3feue4gks1pgxa3dcwhpmex X-Rspamd-Queue-Id: 955CB40032 X-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1666074078-465271 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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