<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/video/fbdev/core/fbmem.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-02-08T18:24:47Z</updated>
<entry>
<title>fbdev: fbmem: fix memory access if logo is bigger than the screen</title>
<updated>2019-02-08T18:24:47Z</updated>
<author>
<name>Manfred Schlaegl</name>
<email>manfred.schlaegl@ginzinger.com</email>
</author>
<published>2019-02-08T18:24:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a5399db139cb3ad9b8502d8b1bd02da9ce0b9df0'/>
<id>urn:sha1:a5399db139cb3ad9b8502d8b1bd02da9ce0b9df0</id>
<content type='text'>
There is no clipping on the x or y axis for logos larger that the framebuffer
size. Therefore: a logo bigger than screen size leads to invalid memory access:

[    1.254664] Backtrace:
[    1.254728] [&lt;c02714e0&gt;] (cfb_imageblit) from [&lt;c026184c&gt;] (fb_show_logo+0x620/0x684)
[    1.254763]  r10:00000003 r9:00027fd8 r8:c6a40000 r7:c6a36e50 r6:00000000 r5:c06b81e4
[    1.254774]  r4:c6a3e800
[    1.254810] [&lt;c026122c&gt;] (fb_show_logo) from [&lt;c026c1e4&gt;] (fbcon_switch+0x3fc/0x46c)
[    1.254842]  r10:c6a3e824 r9:c6a3e800 r8:00000000 r7:c6a0c000 r6:c070b014 r5:c6a3e800
[    1.254852]  r4:c6808c00
[    1.254889] [&lt;c026bde8&gt;] (fbcon_switch) from [&lt;c029c8f8&gt;] (redraw_screen+0xf0/0x1e8)
[    1.254918]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:c070d5a0 r5:00000080
[    1.254928]  r4:c6808c00
[    1.254961] [&lt;c029c808&gt;] (redraw_screen) from [&lt;c029d264&gt;] (do_bind_con_driver+0x194/0x2e4)
[    1.254991]  r9:00000000 r8:00000000 r7:00000014 r6:c070d5a0 r5:c070d5a0 r4:c070d5a0

So prevent displaying a logo bigger than screen size and avoid invalid
memory access.

Signed-off-by: Manfred Schlaegl &lt;manfred.schlaegl@ginzinger.com&gt;
Signed-off-by: Martin Kepplinger &lt;martin.kepplinger@ginzinger.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd line option</title>
<updated>2019-01-16T16:42:35Z</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2019-01-16T16:42:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=890d14d2d4b57ff5a149309da3ed36c8a529987f'/>
<id>urn:sha1:890d14d2d4b57ff5a149309da3ed36c8a529987f</id>
<content type='text'>
A command line option is much more flexible than a config option and
the supporting code is small. Gets rid of #ifdefs in the code too...

Suggested-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: fbmem: add config option to center the bootup logo</title>
<updated>2018-12-20T18:13:08Z</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-12-20T18:13:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3d8b1933eb1c3c94ef8667996dbff6994d5d552f'/>
<id>urn:sha1:3d8b1933eb1c3c94ef8667996dbff6994d5d552f</id>
<content type='text'>
If there are extra logos (CONFIG_FB_LOGO_EXTRA) the heights of these
extra logos are not considered when centering the first logo vertically.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: fbmem: make fb_show_logo_line return the end instead of the height</title>
<updated>2018-12-20T18:13:08Z</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-12-20T18:13:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e41f184d83a3a1e12abbf00a829d9de579d6b0fe'/>
<id>urn:sha1:e41f184d83a3a1e12abbf00a829d9de579d6b0fe</id>
<content type='text'>
In preparation for allowing centering of the bootup logo, make
fb_show_logo_line return where the next free framebuffer line is,
instead of returning the height of the shown logo.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: fbmem: behave better with small rotated displays and many CPUs</title>
<updated>2018-12-20T18:13:07Z</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-12-20T18:13:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f75df8d4b4fabfad7e3cba2debfad12741c6fde7'/>
<id>urn:sha1:f75df8d4b4fabfad7e3cba2debfad12741c6fde7</id>
<content type='text'>
Blitting an image with "negative" offsets is not working since there
is no clipping. It hopefully just crashes. For the bootup logo, there
is protection so that blitting does not happen as the image is drawn
further and further to the right (ROTATE_UR) or further and further
down (ROTATE_CW). There is however no protection when drawing in the
opposite directions (ROTATE_UD and ROTATE_CCW).

Add back this protection.

The regression is 20-odd years old but the mindless warning-killing
mentality displayed in commit 34bdb666f4b2 ("fbdev: fbmem: remove
positive test on unsigned values") is also to blame, methinks.

Fixes: 448d479747b8 ("fbdev: fb_do_show_logo() updates")
Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Fabian Frederick &lt;ffrederick@users.sourceforge.net&gt;
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
cc: Geoff Levand &lt;geoff@infradead.org&gt;
Cc: James Simmons &lt;jsimmons@users.sf.net&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>fbdev: Add FBINFO_HIDE_SMEM_START flag</title>
<updated>2018-09-11T12:11:54Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-08-22T08:54:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=da6c7707caf3736c1cf968606bd97c07e79625d4'/>
<id>urn:sha1:da6c7707caf3736c1cf968606bd97c07e79625d4</id>
<content type='text'>
DRM drivers really, really, really don't want random userspace to
share buffer behind it's back, bypassing the dma-buf buffer sharing
machanism. For that reason we've ruthlessly rejected any IOCTL
exposing the physical address of any graphics buffer.

Unfortunately fbdev comes with that built-in. We could just set
smem_start to 0, but that means we'd have to hand-roll our own fb_mmap
implementation. For good reasons many drivers do that, but
smem_start/length is still super convenient.

Hence instead just stop the leak in the ioctl, to keep fb mmap working
as-is. A second patch will set this flag for all drm drivers.

Acked-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Cc: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180822085405.10787-3-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>fbdev: fix kerneldoc</title>
<updated>2018-09-07T19:49:13Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2018-09-07T17:47:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d3147adcfd95d21a0509ff4f2a87a671a3392e65'/>
<id>urn:sha1:d3147adcfd95d21a0509ff4f2a87a671a3392e65</id>
<content type='text'>
As noticed by kbuild test robot &lt;lkp@intel.com&gt;,
remove_conflicting_pci_framebuffers()'s second argument
is called res_id not resource_id. Fix this.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/38ca9044455a33e398b45e0281643cc24da3c2fc.1536342224.git.mirq-linux@rere.qmqm.pl
</content>
</entry>
<entry>
<title>fbdev: add remove_conflicting_pci_framebuffers()</title>
<updated>2018-09-03T16:15:40Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2018-09-01T14:08:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4d18975c78f2d5c91792356501cf369e67594241'/>
<id>urn:sha1:4d18975c78f2d5c91792356501cf369e67594241</id>
<content type='text'>
Almost all PCI drivers using remove_conflicting_framebuffers() wrap it
with the same code.

v2: add kerneldoc for DRM helper
v3: propagate remove_conflicting_framebuffers() return value
  + move kerneldoc to where function is implemented

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/7db1c278276de420eb45a1b71d06b5eb6bbd49ef.1535810304.git.mirq-linux@rere.qmqm.pl
</content>
</entry>
<entry>
<title>fbdev: add kerneldoc do remove_conflicting_framebuffers()</title>
<updated>2018-09-03T16:15:26Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2018-09-01T14:08:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=69aa5355ab0da7a73ef95aff647a054590e48416'/>
<id>urn:sha1:69aa5355ab0da7a73ef95aff647a054590e48416</id>
<content type='text'>
Document remove_conflicting_framebuffers() behaviour.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/283fef19815b991700b56119d8d5874a2a8da44e.1535810304.git.mirq-linux@rere.qmqm.pl
</content>
</entry>
<entry>
<title>fbdev: allow apertures == NULL in remove_conflicting_framebuffers()</title>
<updated>2018-09-03T16:14:55Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2018-09-01T14:08:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5fa793d36646ee313361a764eac2503d0a561a7c'/>
<id>urn:sha1:5fa793d36646ee313361a764eac2503d0a561a7c</id>
<content type='text'>
Interpret (otherwise-invalid) NULL apertures argument to mean all-memory
range. This will allow to remove several duplicates of this code
from drivers in following patches.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/b5fed539fe569035139c8594c23effd8c39f12ca.1535810304.git.mirq-linux@rere.qmqm.pl
</content>
</entry>
</feed>
