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-next>] [day] [month] [year] [list]
Message-ID: <ufabojfv3ry.fsf@epithumia.math.uh.edu>
Date:	Mon, 16 Jul 2012 15:40:01 -0500
From:	"Jason L Tibbitts III" <tibbs@...h.uh.edu>
To:	Sakari Ailus <sakari.ailus@....fi>
Cc:	RĂ©mi Denis-Courmont <remi@...lab.net>,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	Hans Verkuil <hans.verkuil@...co.com>,
	linux-kernel@...r.kernel.org
Subject: Commit 6016af "[media] v4l2: use __u32 rather than enums in ioctl() structs" breaks C++ users of V4L2

I ran into problems compiling the program ZoneMinder on Fedora rawhide
(currently using something around 3.5rc6) which do not appear with 3.4
kernels.  With help this was traced to commit
6016af82eafcb6e086a8f2a2197b46029a843d68, "[media] v4l2: use __u32
rather than enums in ioctl() structs" which changed videodev2.h in a way
which appears to be incompatible with C++.

This results in code such as the following:
        enum v4l2_buf_type type = v4l2_data.fmt.type;
failing to compile with:
  zm_local_camera.cpp:1523:49: error: invalid conversion from '__u32
  {aka unsigned int}' to 'v4l2_buf_type' [-fpermissive]
but only when compiled with the headers from a 3.5 kernel.

I'm very far from a C++ expert.  I talked with some people who do grok
it and the issue comes down to restrictions on assignments of ints to
enums and additionally that enums in C++ don't have defined size.

 - J<
--
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