From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=44.245.243.92 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795976525; b=RLbYZQ6V34oxvAxGZ1/+CtyDrC+LlQWKgQ6jbMbP4ZGxFt2dppG74Lx9i9FKnzx8h7xE o4bqxzMP5c4pg2LBvdhzaA5bd3KoRMARdwOGT+VsPuduXsKUwap41WQTniSywyNy7LauP abNNbm4/ZBalkD/QbqAMOec+8cHcAglHVeYCDegPHiDkd9a4ZreseuDFdMLnzFToXFpi2 ONmomhhWygbE1n0xLZzdAIzpq5Y3BKBtzA7nxzIyrte7oXV4rTKIN+R4mja1e+LP/5dU4 sAPnvnKAVRvPNLWk611ME0SlLs9Ce2xhqa/SDZBbA78wPARoeYGkfZm+t8Zh5rdSVNA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795976525; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:Received:Received:X-Farcaster-Flow-ID:Received:Received: From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy; bh=kbEjYixzTXEub2Id/OKzRek/8TgM6wMfGduGuOyX7fc=; b=U+lydGVElaQ9fffJp0ZFDL/KGQ2ZDzrJOF+oIYSM2kb4M6AIoVYJKViQTpBFZGm0a2T1 rp9MA2SgkQJDHZSLYqP8V9f57adoOJ8v/3y7GnFrAwRnGheUYzou7+xghNXwW/MbJTDcl n1mM8wmJwA29LaeEOcgmlo4eQJHZqduGKxRoIumgBNRCMe/d39EPU5L4VN7bwOF9HSqsP PNHhA9fb6HyXdmRCBpzYdhlGZyVP/aasEBJDUSQnZAnxGY3y/cwbIGCaDcLTHwdugQQah yezBSJB7mHeD/oTcleR46utRskY9nK+5aL6SV+HUt7cHPgbJrVP95oUaQ6vMHJh4IFQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=amazon.com; spf=pass smtp.mailfrom=amazon.de; dkim=pass header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=P3mJDqp+; arc=none smtp.remote-ip=44.245.243.92 Received: from pdx-out-001.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-001.esa.us-west-2.outbound.mail-perimeter.amazon.com [44.245.243.92]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FE2D606A31C; Sun, 29 Nov 2026 18:22:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6FE2D606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=P3mJDqp+ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1795976521; x=1827512521; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kbEjYixzTXEub2Id/OKzRek/8TgM6wMfGduGuOyX7fc=; b=P3mJDqp+d+ChX/NWBleHAd/zc46WugeZ1LRRTVtjUAs0giMV3b6sLmGJ MJDeDd0PllXd5W8pRzkH7PDMhvcuonHtJK6fSBqbPCoJgwnySzqm7jhzA GafzZi3XvY/abWGQKao/90TdunRSwlLrfHWUILaC7++XBq2wC/q8AHCEm x73vHl6GqGxoh4arZ34F4zH23wDZ0skUrWEjteDn26T037NR386qKBFUQ JZZdy+QEVEWF66uLD7AxFUAL7EbTl+trbZK3dxhRTxe7GLahz6OAbcUze c4QiKfTzmh0WLkKoy3KT9kmn5NV1xWG+EXYa6OKyRsv+EcOf9EMWE0pxd A==; X-CSE-ConnectionGUID: v7qtM1bxQUu1TzCCpnj8Ug== X-CSE-MsgGUID: eUS3GPehRMWZshH/2I9CQA== X-IronPort-AV: E=Sophos;i="6.27,241,1787011200"; d="scan'208";a="34939675" Received: from ip-10-5-9-48.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.9.48]) by internal-pdx-out-001.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2026 18:21:58 +0000 Received: from EX19MTAUWA002.ant.amazon.com [205.251.233.178:26171] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.6.41:2525] with esmtp (Farcaster) id cb552a80-6dde-4001-9113-7868ab2b96f4; Sun, 29 Nov 2026 18:21:58 +0000 (UTC) X-Farcaster-Flow-ID: cb552a80-6dde-4001-9113-7868ab2b96f4 Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.57; Sun, 29 Nov 2026 18:21:58 +0000 Received: from ip-10-253-83-51.amazon.com (172.19.99.218) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.57; Sun, 29 Nov 2026 18:21:54 +0000 From: Alexander Graf To: Greg Kroah-Hartman , Arnd Bergmann CC: The AWS Nitro Enclaves Team , , Paolo Bonzini , "Stefano Garzarella" , Stefan Hajnoczi , Marek Szyprowski , Robin Murphy , Andrew Morton , "David Hildenbrand" , Mike Rapoport , "Jonathan Corbet" , Shuah Khan , "Randy Dunlap" , , , , , , , , , Subject: [PATCH v2 00/23] nitro_enclaves: Fix enclave release, command retries and the CPU pool Date: Sun, 29 Nov 2026 18:21:29 +0000 Message-ID: X-Mailer: git-send-email 2.47.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D031UWA003.ant.amazon.com (10.13.139.47) To EX19D001UWA001.ant.amazon.com (10.13.138.214) While working with AI on the nitro_enclaves driver, it stumbled over a few issues in the code. None of them are out of the ordinary, but they all fix legit corner cases that are better to have fixed upstream. While at it, I also realized that the MAINTAINERS file is outdated. Alexandru Ciobotaru no longer works on Nitro Enclaves. I'm taking over the maintainer role instead. Alex Changes in v2: - Rebase onto v7.4-rc4+ - Move the MAINTAINERS update to the front - New patch "nitro_enclaves: Request write access to enclave memory regions" to require write permission when pinning an enclave's memory - New patch "nitro_enclaves: Online and offline pool CPUs with no pool lock held" so that no driver lock is held across CPU hotplug (Sashiko) - New patch "nitro_enclaves: Free the CPU pool when driver registration fails" so that a failed module init does not leave the pool CPUs offline (Sashiko) - New patch "nitro_enclaves: Free the CPU pool that ne_exit() does not see" for a module load that fails or an rmmod that races a ne_cpus write - Add the Fixes: tag on the interrupt setup reorder (Sashiko) - Clear a rejected boot-time ne_cpus value (Sashiko) - Refuse a CPU list that does not fit the parameter buffer v1: https://lore.kernel.org/r/cover.1794300000.git.graf@amazon.com Alexander Graf (23): MAINTAINERS: Take over the Nitro Enclaves driver nitro_enclaves: Release the reference on a rejected region page nitro_enclaves: Request write access to enclave memory regions nitro_enclaves: Split freeing the slot from freeing the enclave nitro_enclaves: Ignore the reply of a failed slot info command nitro_enclaves: Retry a command the device asks us to retry nitro_enclaves: Stop sending commands to a broken device nitro_enclaves: Set up the device state before requesting its interrupts nitro_enclaves: Online and offline pool CPUs with no pool lock held nitro_enclaves: Wait for file operations before unbinding the PCI device nitro_enclaves: Let the region tracking arrays fall back to vmalloc nitro_enclaves: Do not return enclave threads to a replaced CPU pool nitro_enclaves: Do not report a torn down CPU pool as set nitro_enclaves: Keep the CPU pool when the new CPU list does not parse nitro_enclaves: Put the CPU pool back when the new CPU list is refused nitro_enclaves: Initialise the CPU pool mutex statically nitro_enclaves: Free the CPU pool when driver registration fails nitro_enclaves: Free the CPU pool that ne_exit() does not see nitro_enclaves: Build the boot-time CPU pool once the CPUs are online nitro_enclaves: Set up the CPU pool under the CPU hotplug read lock nitro_enclaves: Let 32-bit processes use the ioctl interface nitro_enclaves: Index CPU pool cores by sibling mask nitro_enclaves: Time the wait for the device to turn off by the clock MAINTAINERS | 2 +- drivers/virt/nitro_enclaves/ne_misc_dev.c | 804 ++++++++++++++++------ drivers/virt/nitro_enclaves/ne_misc_dev.h | 24 +- drivers/virt/nitro_enclaves/ne_pci_dev.c | 236 ++++++- drivers/virt/nitro_enclaves/ne_pci_dev.h | 4 + 5 files changed, 814 insertions(+), 256 deletions(-) base-commit: 4f069ab1ec243e6b60dc438772905855c60774e8 -- 2.47.1