From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=44.246.77.92 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795977255; b=zmPM13DfPM8yhiKHfsQqR9fJDRzG0u0TLyeOfcA8QoUFHAJxX5vQ6uNM2ww2/dLPMxwl +JDuU/DP0doOS0nHxD3OjBkBrLwedFN1ifHHVQKeok8qz36EUNJw9maAubCfYPXpvSb5A 0TjU6+5J0FXFITX8bSvTcG7HvRpqkvqrCBdQSRuKTmkWH0qwqtByYJVTIj5FT40xsYEHb 2UfN+suX/QeGkwmWFnRehk3UN/McMsuuECzfcGvE+DpzPmwfy+ZrNswSFIWswO3mNou9o +ziRj0HFWQrBD9tLhDXKBMnTaNZQ2eNxjgKTyoOyz2DZdTPW2uptWIQ4aS4u1GUXIxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795977255; 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:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy; bh=7voYFqYcyPAT5mrYDLH0WMxsc9qWraCzww32JJ7nVlo=; b=BQHU7UO9GVvO4biFSH+ZkpZ0oxokhZ4X3xEn4l39rfG+SaBDjbOtrCpnoCz5SukSszNf 15mo8ylGWFr/lkgbq2UdnLhysQ4+iDPq8CrIeWKciOyVk+1iu15vkGT6kWm/QBp8a28CK l/lhvk8zQ7IAy3oDUi+TIWwtp7swdc8PxqH7bmB2dHkIWy9BYgZ1t7ux5+lnVwA0sVMUC JFBzqBqch2a/m14GCAMuF/+xoVAdfvxhMkLFq4PZYR/NE8etplYN642pGibuOFdKqbdo8 H4LYXzPuuTj1sJ1Yx4u2444Ep4rZOVGU7uM2IxBEyBTYEGzXvNrYDbD4FPjlYALbonQ== 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=QHzRpsVz; arc=none smtp.remote-ip=44.246.77.92 Received: from pdx-out-004.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-004.esa.us-west-2.outbound.mail-perimeter.amazon.com [44.246.77.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 9E2FD606A330; Sun, 29 Nov 2026 18:34:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9E2FD606A330 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) header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=QHzRpsVz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1795977254; x=1827513254; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7voYFqYcyPAT5mrYDLH0WMxsc9qWraCzww32JJ7nVlo=; b=QHzRpsVzxkG6mQQSbhx++/DpSWcJKUKt4yfARkwta107IbEGHhz5ZvVn w9Wu/e5JKouVPxD5qwMcj92nSY624XojFSEsaFlKTtll+m7mXQIEUoo7t UeOwXkYa5vWdKOe5S5xddUlCj5GOocaRpb0l9myWIs2Qto9GwNdOX1Cg8 AyyTGvhiMVWJZuaXPfM4LndOhGR5fRmBCMKjS+zKICuCDf3mkLD3nvTEx ujCOpmoh2yWeii25fwIRcaog7MrcaScQldJng154BGcLtueVJgCZNPKV/ DydLcLzYQDSdqP6d1HPweC71aVwVBb8jmOE641fCWhGoV/jMLPh0si4it w==; X-CSE-ConnectionGUID: HdnyDbRFQxKPk4K0Zv07OQ== X-CSE-MsgGUID: cRtore7fQE69Cg5iVLBeCg== X-IronPort-AV: E=Sophos;i="6.27,241,1787011200"; d="scan'208";a="35371486" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-004.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2026 18:34:14 +0000 Received: from EX19MTAUWC002.ant.amazon.com [205.251.233.111:12537] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.27.231:2525] with esmtp (Farcaster) id cdd7b329-de1c-4df8-8d2b-745b75b2ffaf; Sun, 29 Nov 2026 18:34:14 +0000 (UTC) X-Farcaster-Flow-ID: cdd7b329-de1c-4df8-8d2b-745b75b2ffaf Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) 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:34:13 +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:34:10 +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 21/23] nitro_enclaves: Let 32-bit processes use the ioctl interface Date: Sun, 29 Nov 2026 18:21:50 +0000 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: 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: EX19D031UWC002.ant.amazon.com (10.13.139.212) To EX19D001UWA001.ant.amazon.com (10.13.138.214) A 32-bit process on a 64-bit kernel gets -ENOTTY for every NE ioctl, because neither the misc device nor an enclave fd sets .compat_ioctl. The ioctl arguments don't require translation, so just add the default compat_ioctl pointer to them and hence enable 32bit user space to drive the device as well. Fixes: 38907e124088 ("nitro_enclaves: Add logic for creating an enclave VM") Signed-off-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c b/drivers/virt/nitro_enclaves/ne_misc_dev.c index 7fc6b0bb5dbc6..51ecea0fcf9b5 100644 --- a/drivers/virt/nitro_enclaves/ne_misc_dev.c +++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c @@ -68,6 +68,7 @@ static const struct file_operations ne_fops = { .owner = THIS_MODULE, .llseek = noop_llseek, .unlocked_ioctl = ne_ioctl, + .compat_ioctl = compat_ptr_ioctl, }; static struct miscdevice ne_misc_dev = { @@ -1855,6 +1856,7 @@ static const struct file_operations ne_enclave_fops = { .llseek = noop_llseek, .poll = ne_enclave_poll, .unlocked_ioctl = ne_enclave_ioctl, + .compat_ioctl = compat_ptr_ioctl, .release = ne_enclave_release, }; -- 2.47.1