lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Mar 2008 14:35:37 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Linux and Kernel Video <video4linux-list@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: v4l & compat_ioctl

On Fri, Mar 28, 2008 at 01:22:48PM +0100, Jiri Slaby wrote:
> On 03/28/2008 12:38 PM, Andi Kleen wrote:
> >BTW i haven't audited them, but if there is u64 or similar in there 
> >anywhere
> >be careful about alignment.
> 
> Well, not good, some ioctls have different numbers on 32 and 64 bit:

Then you need compat handlers to translate the numbers.

> struct v4l2_ext_controls {
>         __u32 ctrl_class;
>         __u32 count;
>         __u32 error_idx;
>         __u32 reserved[2];
>         struct v4l2_ext_control *controls;

Definitely conversion needed for the pointer too.

> };
> #define VIDIOC_G_EXT_CTRLS      _IOWR ('V', 71, struct v4l2_ext_controls)
> as an example.
> 
> And alignment is a problem here (v4l2_std_id is u64):

Yes needs conversion for the structure too.

> struct v4l2_standard {
>         __u32                index;
>         v4l2_std_id          id;
>         __u8                 name[24];
>         struct v4l2_fract    frameperiod; /* Frames, not fields */
>         __u32                framelines;
>         __u32                reserved[4];
> };
> which results in different ioctl numbers too.

-andi

> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ