In the commit title: considering the patch impacts various files, I think the most appropriate tag is "proc:". It would also be good to have a title more similar to patch 1 (just "fix proc_ioctl" is very vague).
On 17/05/2023 15:40, Pawel Zalewski wrote:
The module net:sunrpc:cache.c will effectively use the same callback cache_ioctl for pointers passed from file_operations.unlocked_ioctl and proc_ops.proc_ioctl and it expects pointers as the argument. Thus to be able to pass CHERI capabilities, the .proc_ioctl fp's arg input should also be of user_uintptr_t type.
The proc_compat_ioctl handler in the pci/proc.c module is replaced with compat_noptr_ioctl as the arg is not being passed as a pointer into the proc_bus_pci_ioctl handler.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk
drivers/pci/proc.c | 4 ++-- include/linux/proc_fs.h | 2 +- net/sunrpc/cache.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index f967709082d6..dfd7a3d3a89e 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -192,7 +192,7 @@ struct pci_filp_private { #endif /* HAVE_PCI_MMAP */ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
user_uintptr_t arg)
There's still one tab that has gone missing here.
Apart from these two nits, the series looks good to me.
Kevin