[PATCH 16/19] nitro_enclaves: Let 32-bit processes use the ioctl interface
From: Alexander Graf
Date: Wed Nov 11 2026 - 22:15:27 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 f8b066c990ce1..355eb0a684ec2 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 = {
@@ -1762,6 +1763,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