<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/video/Makefile, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-03-03T15:51:07Z</updated>
<entry>
<title>media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic</title>
<updated>2018-03-03T15:51:07Z</updated>
<author>
<name>Daniel Mentz</name>
</author>
<published>2018-02-14T12:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8466609ff96439973d04466ccc9d909c16d16977'/>
<id>urn:sha1:8466609ff96439973d04466ccc9d909c16d16977</id>
<content type='text'>
commit a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a upstream.

The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit
equivalent. It converts 32-bit data structures into its 64-bit
equivalents and needs to provide the data to the 64-bit ioctl in user
space memory which is commonly allocated using
compat_alloc_user_space().

However, due to how that function is implemented, it can only be called
a single time for every syscall invocation.

Supposedly to avoid this limitation, the existing code uses a mix of
memory from the kernel stack and memory allocated through
compat_alloc_user_space().

Under normal circumstances, this would not work, because the 64-bit
ioctl expects all pointers to point to user space memory. As a
workaround, set_fs(KERNEL_DS) is called to temporarily disable this
extra safety check and allow kernel pointers. However, this might
introduce a security vulnerability: The result of the 32-bit to 64-bit
conversion is writeable by user space because the output buffer has been
allocated via compat_alloc_user_space(). A malicious user space process
could then manipulate pointers inside this output buffer, and due to the
previous set_fs(KERNEL_DS) call, functions like get_user() or put_user()
no longer prevent kernel memory access.

The new approach is to pre-calculate the total amount of user space
memory that is needed, allocate it using compat_alloc_user_space() and
then divide up the allocated memory to accommodate all data structures
that need to be converted.

An alternative approach would have been to retain the union type karg
that they allocated on the kernel stack in do_video_ioctl(), copy all
data from user space into karg and then back to user space. However, we
decided against this approach because it does not align with other
compat syscall implementations. Instead, we tried to replicate the
get_user/put_user pairs as found in other places in the kernel:

    if (get_user(clipcount, &amp;up-&gt;clipcount) ||
        put_user(clipcount, &amp;kp-&gt;clipcount)) return -EFAULT;

Notes from hans.verkuil@cisco.com:

This patch was taken from:
    https://github.com/LineageOS/android_kernel_samsung_apq8084/commit/97b733953c06e4f0398ade18850f0817778255f7

Clearly nobody could be bothered to upstream this patch or at minimum
tell us :-( We only heard about this a week ago.

This patch was rebased and cleaned up. Compared to the original I
also swapped the order of the convert_in_user arguments so that they
matched copy_in_user. It was hard to review otherwise. I also replaced
the ALLOC_USER_SPACE/ALLOC_AND_GET by a normal function.

Fixes: 6b5a9492ca ("v4l: introduce string control support.")

Signed-off-by: Daniel Mentz &lt;danielmentz@google.com&gt;
Co-developed-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
[bwh: Rebased on top of some earlier fixes]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor</title>
<updated>2011-11-03T20:29:11Z</updated>
<author>
<name>Sylwester Nawrocki</name>
</author>
<published>2011-10-04T17:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfa8dd3a05248457fce18712e7bc0499030b3100'/>
<id>urn:sha1:bfa8dd3a05248457fce18712e7bc0499030b3100</id>
<content type='text'>
This driver exposes preview mode operation of the S5K6AAFX sensor with
embedded SoC ISP. The native capture (snapshot) operation mode is not
supported.
Following controls are available:
 manual/auto exposure and gain, power line frequency (anti-flicker),
 saturation, sharpness, brightness, contrast, white balance temperature,
 color effects, horizontal/vertical image flip, frame interval,
 auto white balance.
RGB component gains are currently exposed through private controls.

Reviewed-by: Sakari Ailus &lt;sakari.ailus@iki.fi&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] move cx25821 out of staging</title>
<updated>2011-11-03T09:58:21Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2011-11-02T01:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6ce55de3abcc4910fef1d79212a17480c154704'/>
<id>urn:sha1:d6ce55de3abcc4910fef1d79212a17480c154704</id>
<content type='text'>
This driver had the major issues already fixed. Move it out
of staging.

Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] move tm6000 to drivers/media/video</title>
<updated>2011-09-23T12:32:35Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2011-09-23T12:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be304970850806abea880da95fbfb743a4d9f87d'/>
<id>urn:sha1:be304970850806abea880da95fbfb743a4d9f87d</id>
<content type='text'>
The serious bugs got fixed already.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] mt9t001: Aptina (Micron) MT9T001 3MP sensor driver</title>
<updated>2011-09-21T18:31:08Z</updated>
<author>
<name>Laurent Pinchart</name>
</author>
<published>2010-06-14T12:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a54b86a71dfec88d9b12f0e003ebc4ebb4b1f0a'/>
<id>urn:sha1:0a54b86a71dfec88d9b12f0e003ebc4ebb4b1f0a</id>
<content type='text'>
The MT9T001 is a parallel 3MP sensor from Aptina (formerly Micron)
controlled through I2C.

The driver creates a V4L2 subdevice. It currently supports binning and
cropping, and the gain, exposure, test pattern and black level controls.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] mt9p031: Aptina (Micron) MT9P031 5MP sensor driver</title>
<updated>2011-09-11T12:49:28Z</updated>
<author>
<name>Javier Martin</name>
</author>
<published>2011-06-20T11:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=418d93ac0be6d4a410731b80af4e836614ffe73e'/>
<id>urn:sha1:418d93ac0be6d4a410731b80af4e836614ffe73e</id>
<content type='text'>
The MT9P031 is a parallel 12-bit 5MP sensor from Aptina (formerly
Micron) controlled through I2C.

The driver creates a V4L2 subdevice. It currently supports skipping,
cropping, automatic binning, and gain, exposure, h/v flip and test
pattern controls.

Signed-off-by: Javier Martin &lt;javier.martin@vista-silicon.com&gt;
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] drivers/media: do not use EXTRA_CFLAGS</title>
<updated>2011-09-03T21:50:59Z</updated>
<author>
<name>Arnaud Lacombe</name>
</author>
<published>2011-08-15T05:07:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f5c14d3d3d7a3f508f2fffa62731f13f8efdfba'/>
<id>urn:sha1:3f5c14d3d3d7a3f508f2fffa62731f13f8efdfba</id>
<content type='text'>
Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg &lt;sam@neptun.(none)&gt;
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Cc: linux-media@vger.kernel.org
Signed-off-by: Arnaud Lacombe &lt;lacombar@gmail.com&gt;
Acked-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] V4L: initial driver for ov5642 CMOS sensor</title>
<updated>2011-07-27T20:56:09Z</updated>
<author>
<name>Bastian Hecht</name>
</author>
<published>2011-06-24T10:57:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b52a851d9182e8a20704152d537c7e19ed34cc99'/>
<id>urn:sha1:b52a851d9182e8a20704152d537c7e19ed34cc99</id>
<content type='text'>
This is an initial driver release for the Omnivision 5642 CMOS sensor.

Signed-off-by: Bastian Hecht &lt;hechtb@gmail.com&gt;
Signed-off-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] v4l: s5p-tv: add drivers for HDMI on Samsung S5P platform</title>
<updated>2011-07-27T20:56:01Z</updated>
<author>
<name>Tomasz Stanislawski</name>
</author>
<published>2011-03-02T16:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a52074ee7ad0b9ed4b4180c843d1c3114374e172'/>
<id>urn:sha1:a52074ee7ad0b9ed4b4180c843d1c3114374e172</id>
<content type='text'>
Add drivers for HDMI outputs on Samsung platforms from S5P family.

Drivers are using:
- v4l2 framework
- runtime PM

Signed-off-by: Tomasz Stanislawski &lt;t.stanislaws@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
<entry>
<title>[media] MFC: Add MFC 5.1 V4L2 driver</title>
<updated>2011-07-27T20:56:00Z</updated>
<author>
<name>Kamil Debski</name>
</author>
<published>2011-06-21T13:51:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af935746781088f28904601469671d244d2f653b'/>
<id>urn:sha1:af935746781088f28904601469671d244d2f653b</id>
<content type='text'>
Multi Format Codec 5.1 is a hardware video coding acceleration
module found in the S5PV210 and Exynos4 Samsung SoCs. It is
capable of handling a range of video codecs and this driver
provides a V4L2 interface for video decoding and encoding.

Signed-off-by: Kamil Debski &lt;k.debski@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Jeongtae Park &lt;jtp.park@samsung.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
</content>
</entry>
</feed>
