[PATCH v2 21/23] nitro_enclaves: Let 32-bit processes use the ioctl interface
From: Alexander Graf
Date: Sun Nov 29 2026 - 13:34:18 EST
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 <graf@xxxxxxxxxx>
---
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