Re: ioctl32 consolidation -- call for testing

Ben Collins (bcollins@debian.org)
Thu, 27 Feb 2003 15:34:40 -0500


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-29275-1046378350-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Thu, Feb 27, 2003 at 12:13:02PM -0800, David S. Miller wrote:
> From: Ben Collins <bcollins@debian.org>
> Date: Thu, 27 Feb 2003 15:27:39 -0500
>
> Here it is. Sparc64's macros for ioctl32's assumed that cmd was u_int
> instead of u_long. This look ok to you, Dave?
>
> We would love to see that patch :-)

It was real small...so small that it slipped through mutt's open() call
and never got attached :)

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

--=_courier-29275-1046378350-0001-2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sparc64-ioctl32.diff"

--- arch/sparc64/kernel/ioctl32.c~ 2003-02-27 14:54:49.000000000 -0500 +++ arch/sparc64/kernel/ioctl32.c 2003-02-27 15:19:29.000000000 -0500 @@ -11,6 +11,7 @@ #include <linux/config.h> #include <linux/types.h> #include <linux/compat.h> +#include <linux/ioctl32.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/smp.h> @@ -4274,10 +4275,14 @@ #define BNEPGETCONNLIST _IOR('B', 210, int) #define BNEPGETCONNINFO _IOR('B', 211, int) -#define COMPATIBLE_IOCTL(cmd) asm volatile(".word %0, sys_ioctl, 0" : : "i" (cmd)); -#define HANDLE_IOCTL(cmd,handler) asm volatile(".word %0, %1, 0" : : "i" (cmd), "i" (handler)); -#define IOCTL_TABLE_START void ioctl32_foo(void) { asm volatile(".data\n.global ioctl_start\nioctl_start:"); -#define IOCTL_TABLE_END asm volatile("\n.global ioctl_end\nioctl_end:\n\t.previous"); } +typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); + +#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) +#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, +#define IOCTL_TABLE_START \ + struct ioctl_trans ioctl_start[] = { +#define IOCTL_TABLE_END \ + }; struct ioctl_trans ioctl_end[0]; IOCTL_TABLE_START /* List here exlicitly which ioctl's are known to have

--=_courier-29275-1046378350-0001-2--