[DragonFlyBSD - Submit #2907] (New) Extend IOCPARM_MAX

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat Apr 30 22:52:07 PDT 2016


Issue #2907 has been reported by tkusumi.

----------------------------------------
Submit #2907: Extend IOCPARM_MAX
http://bugs.dragonflybsd.org/issues/2907

* Author: tkusumi
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Matt,

I'd like to bring in this diff from FreeBSD which extends IOCPARM_MAX size.
This patch was originally added for ZFS in 2010.
https://leaf.dragonflybsd.org/~tkusumi/diff/598dc07f.patch

Larger IOCPARM_MAX is necessary to port autofs to DragonFly.
Without this, autofs ioctl fails at mapped_ioctl() with ENOTTY as the ioctl structure size exceeds IOCPARM_MAX which is page size.

 667         /*
 668          * Interpret high order word to find amount of data to be
 669          * copied to/from the user's address space.
 670          */
 671         size = IOCPARM_LEN(com);
 672         if (size > IOCPARM_MAX) {
 673                 error = ENOTTY;
 674                 goto done;
 675         }

Autofs header could define the structure using, say (MAXPATHLEN / 2) instead of MAXPATHLEN in order to just pass this test,
which still seems large enough in most cases, but it may break portability of userspace config files.
https://github.com/freebsd/freebsd/blob/master/sys/fs/autofs/autofs_ioctl.h




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Submit mailing list