From patchwork Wed Sep 28 15:38:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Tai X-Patchwork-Id: 12992473 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 C52A4C32771 for ; Wed, 28 Sep 2022 16:08:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 56F116B0073; Wed, 28 Sep 2022 12:08:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 51E336B007B; Wed, 28 Sep 2022 12:08:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C0276B007D; Wed, 28 Sep 2022 12:08:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 293976B0073 for ; Wed, 28 Sep 2022 12:08:17 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0303D1C6950 for ; Wed, 28 Sep 2022 16:08:16 +0000 (UTC) X-FDA: 79961976234.28.06CD1B2 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf06.hostedemail.com (Postfix) with ESMTP id 54D6A181E02 for ; Wed, 28 Sep 2022 15:40:16 +0000 (UTC) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28SE5W2C032167; Wed, 28 Sep 2022 15:38:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2022-7-12; bh=hCFmLg8CsGpQXJilBEzskBgYXRzHr8lcMkotFLngLig=; b=qeLWdqHZEMKIAE6Od27GB2c2x+B4Jh6BcKOyju9QEJVdX1FEBLIuGFzdpJxEa75T2gTy n6+Me6KTZe5avWqF34ntc0EU1655MY/pvdHs3oDBHrIutHIczx0afOLefPvueNI05mY8 s26h8ztJY9tdXaBWUze5WYRwZ2QpwPYWZ+3OARPjgHmIQ1sf5IiGRV0w0LQIHukaHWt3 lTWTkb+A2KaqzkdjWaRqbN+WXkrfytxDg91qzfqdZyYY6URDZ/1gjVChKPQkjGvOP+IR 4cuRPEGNXLFKn+wfgzGvCDkDLXtgZ9ONo+Hy94ZISJmqAqDPl60TFUvbKgsSDYrWszVq pA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3jst0kt1jx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Sep 2022 15:38:03 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 28SDbAM2002244; Wed, 28 Sep 2022 15:38:02 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3jtps6e57r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Sep 2022 15:38:02 +0000 Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28SFc1nr022830; Wed, 28 Sep 2022 15:38:01 GMT Received: from brm-x62-20.us.oracle.com (brm-x62-20.us.oracle.com [10.80.150.35]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3jtps6e576-1; Wed, 28 Sep 2022 15:38:01 +0000 From: Thomas Tai To: tony.luck@intel.com, dave.hansen@linux.intel.com, jarkko@kernel.org, reinette.chatre@intel.co, naoya.horiguchi@nec.com, linmiaohe@huawei.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, thomas.tai@oracle.com Subject: [PATCH V2 0/1] x86/sgx: Add code to inject hwpoison into SGX memory Date: Wed, 28 Sep 2022 11:38:31 -0400 Message-Id: <20220928153832.1032566-1-thomas.tai@oracle.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-28_07,2022-09-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=918 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209280092 X-Proofpoint-GUID: IQh-LFHvtOo--K_tQRJrrNoDMLciFHC_ X-Proofpoint-ORIG-GUID: IQh-LFHvtOo--K_tQRJrrNoDMLciFHC_ ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664379616; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=hCFmLg8CsGpQXJilBEzskBgYXRzHr8lcMkotFLngLig=; b=R/n4M095Ko9jBY+LSShq9DFptZUQUw6WRenDh1emzG9sdFjFzV85MeptyyaafqGFrtj4g5 cqi9uc+HQiKvnQDLAiqc0L52YhdO4jYkRQif7GYuzX6NZ25E6B4GEWomHY25o2Krrjxx3Z pwpPfLbso76VQX9G3OYBuDEifH+PMPE= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=qeLWdqHZ; spf=pass (imf06.hostedemail.com: domain of thomas.tai@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=thomas.tai@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664379616; a=rsa-sha256; cv=none; b=IjI6j3/Ec0MSnyouH9KJu2hPDJu/hSZdRqMoXqygvoTVMmhkWwcvtTlRrUfrZ+xSjkMfCn BFyhYm7nIsVqk0JyarQU9231Vp3uTdb1YlO2oBtLJfZLdmgJ6z2fgxfXP0a2Aogk7D+Rqv Bmh/kKbtzEKVaj1DxFwT6WF2L51zH9U= X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 54D6A181E02 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=qeLWdqHZ; spf=pass (imf06.hostedemail.com: domain of thomas.tai@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=thomas.tai@oracle.com; dmarc=pass (policy=none) header.from=oracle.com X-Stat-Signature: ci37hfoa5yrk1ppb1oms3d5wue8hsexq X-HE-Tag: 1664379616-817239 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: This patch adds code to inject hwpoison into SGX memory. The SGX memory is processor reserved memory that cannot be directly accessed by system software. Changes since v1: - Add a comment in hwpoison_inject as suggested by Miaohe - v1: Reviewed-by: Tony Luck - v1: Reviewed-by: Miaohe Lin Thomas Tai (1): x86/sgx: Add code to inject hwpoison into SGX memory Documentation/mm/hwpoison.rst | 44 +++++++++++++++++++++++++++++++++++ mm/hwpoison-inject.c | 4 ++++ 2 files changed, 48 insertions(+)