<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_bufs.c, branch v4.19.148</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.148</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.148'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-07-14T06:11:14+00:00</updated>
<entry>
<title>drm: return -EFAULT if copy_to_user() fails</title>
<updated>2019-07-14T06:11:14+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2019-06-18T13:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a02ac12d2d4844de77f876e96b93ec3f2226af6a'/>
<id>urn:sha1:a02ac12d2d4844de77f876e96b93ec3f2226af6a</id>
<content type='text'>
[ Upstream commit 74b67efa8d7b4f90137f0ab9a80dd319da050350 ]

The copy_from_user() function returns the number of bytes remaining
to be copied but we want to return a negative error code.  Otherwise
the callers treat it as a successful copy.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190618131843.GA29463@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/bufs: Fix Spectre v1 vulnerability</title>
<updated>2019-02-12T18:46:56+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-10-16T09:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8b9f4f627c3057e67d7dd8cf82c81d6eb1ccde1'/>
<id>urn:sha1:a8b9f4f627c3057e67d7dd8cf82c81d6eb1ccde1</id>
<content type='text'>
[ Upstream commit a37805098900a6e73a55b3a43b7d3bcd987bb3f4 ]

idx can be indirectly controlled by user-space, hence leading to a
potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

drivers/gpu/drm/drm_bufs.c:1420 drm_legacy_freebufs() warn: potential
spectre issue 'dma-&gt;buflist' [r] (local cap)

Fix this by sanitizing idx before using it to index dma-&gt;buflist

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&amp;m=152449131114778&amp;w=2

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181016095549.GA23586@embeddedor.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: dma_bufs: Fixed checkpatch issues</title>
<updated>2018-03-19T13:31:20+00:00</updated>
<author>
<name>Paul McQuade</name>
<email>paulmcquad@gmail.com</email>
</author>
<published>2018-03-19T00:52:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2bcfcbfc1ddd59c9335de5d4dcd20c45354535fc'/>
<id>urn:sha1:2bcfcbfc1ddd59c9335de5d4dcd20c45354535fc</id>
<content type='text'>
Fix a couple of checkpatch issues

Signed-off-by: Paul McQuade &lt;paulmcquad@gmail.com&gt;
[seanpaul squashed series of 4 into one patch, and changed commit msg]
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180319005225.1545-1-paulmcquad@gmail.com
</content>
</entry>
<entry>
<title>switch compat_drm_mapbufs() to drm_ioctl_kernel()</title>
<updated>2017-07-04T17:16:26+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-05-25T20:24:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87d3ce1169d329bc4cab41996fccb68c06b5725b'/>
<id>urn:sha1:87d3ce1169d329bc4cab41996fccb68c06b5725b</id>
<content type='text'>
Another horror like addbufs; this one is even uglier.  With that
done, drm_ioc32.c should be sane.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch compat_drm_infobufs() to drm_ioctl_kernel()</title>
<updated>2017-05-27T19:39:32+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2017-05-24T21:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c7640ab625829fd08b7fa0160c6fd188e70b5fe'/>
<id>urn:sha1:5c7640ab625829fd08b7fa0160c6fd188e70b5fe</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>GPU-DRM: Replace a kzalloc() call by kcalloc() in drm_legacy_addbufs_sg()</title>
<updated>2016-09-21T11:24:27+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2016-09-19T15:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5a2ecd857a224c4fbeeaa4f60f09bea3fc1837e'/>
<id>urn:sha1:b5a2ecd857a224c4fbeeaa4f60f09bea3fc1837e</id>
<content type='text'>
The script "checkpatch.pl" can point information out like the following.

WARNING: Prefer kcalloc over kzalloc with multiply

Thus fix the affected source code place.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/b340d1ca-f114-a523-e6d1-afe7fd6c3826@users.sourceforge.net
</content>
</entry>
<entry>
<title>GPU-DRM: Replace a kzalloc() call by kcalloc() in drm_legacy_addbufs_agp()</title>
<updated>2016-09-21T11:24:27+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2016-09-19T15:24:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=81a441378d6e5b030af5429fe2ca1763de0f053a'/>
<id>urn:sha1:81a441378d6e5b030af5429fe2ca1763de0f053a</id>
<content type='text'>
The script "checkpatch.pl" can point information out like the following.

WARNING: Prefer kcalloc over kzalloc with multiply

Thus fix the affected source code place.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/606c22f3-5da5-2e84-783d-bfe5289b4a01@users.sourceforge.net
</content>
</entry>
<entry>
<title>GPU-DRM: Replace two kzalloc() calls by kcalloc() in drm_legacy_addbufs_pci()</title>
<updated>2016-09-21T11:24:27+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2016-09-19T15:17:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed6dee41927b6acad9f209899f360d4167f3f452'/>
<id>urn:sha1:ed6dee41927b6acad9f209899f360d4167f3f452</id>
<content type='text'>
The script "checkpatch.pl" can point information out like the following.

WARNING: Prefer kcalloc over kzalloc with multiply

Thus fix the affected source code places.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/51f88f44-130d-48ac-f531-32ca9ae3919f@users.sourceforge.net
</content>
</entry>
<entry>
<title>GPU-DRM: Use kmalloc_array() in drm_legacy_addbufs_pci()</title>
<updated>2016-09-21T11:24:27+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2016-09-19T15:07:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2027400893a2fa03d764f62ca8e0c677d7691234'/>
<id>urn:sha1:2027400893a2fa03d764f62ca8e0c677d7691234</id>
<content type='text'>
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/b71c8fee-8e84-9f1b-8569-f1ae8b879cc5@users.sourceforge.net
</content>
</entry>
<entry>
<title>drm: Used DRM_LEGACY for all legacy functions</title>
<updated>2016-08-08T08:05:23+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-08-03T19:11:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa5386459f06dc3b9181d4c954f980b127d1a32f'/>
<id>urn:sha1:fa5386459f06dc3b9181d4c954f980b127d1a32f</id>
<content type='text'>
Except for nouveau, only legacy drivers need this really. And nouveau
is already marked up with DRIVER_KMS_LEGACY_CONTEXT as the special
case.

I've tried to be careful to leave everything related to modeset still
using the DRIVER_MODESET flag. Otherwise it's a direct replacement of
!DRIVER_MODESET with DRIVER_LEGACY checks. Also helps readability
since fewer negative checks overall.

Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Reviewed-by: Frank Binns &lt;frank.binns@imgtec.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1470251470-30830-2-git-send-email-daniel.vetter@ffwll.ch
</content>
</entry>
</feed>
