<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/video/fbdev/pxafb.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-11-08T15:20:38Z</updated>
<entry>
<title>fbdev: pxafb: Fix possible use after free in pxafb_task()</title>
<updated>2024-11-08T15:20:38Z</updated>
<author>
<name>Kaixin Wang</name>
</author>
<published>2024-09-11T14:29:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d0a07f68b66269e167def6c0b90a219cd3e7473'/>
<id>urn:sha1:6d0a07f68b66269e167def6c0b90a219cd3e7473</id>
<content type='text'>
[ Upstream commit 4a6921095eb04a900e0000da83d9475eb958e61e ]

In the pxafb_probe function, it calls the pxafb_init_fbinfo function,
after which &amp;fbi-&gt;task is associated with pxafb_task. Moreover,
within this pxafb_init_fbinfo function, the pxafb_blank function
within the &amp;pxafb_ops struct is capable of scheduling work.

If we remove the module which will call pxafb_remove to make cleanup,
it will call unregister_framebuffer function which can call
do_unregister_framebuffer to free fbi-&gt;fb through
put_fb_info(fb_info), while the work mentioned above will be used.
The sequence of operations that may lead to a UAF bug is as follows:

CPU0                                                CPU1

                                   | pxafb_task
pxafb_remove                       |
unregister_framebuffer(info)       |
do_unregister_framebuffer(fb_info) |
put_fb_info(fb_info)               |
// free fbi-&gt;fb                    | set_ctrlr_state(fbi, state)
                                   | __pxafb_lcd_power(fbi, 0)
                                   | fbi-&gt;lcd_power(on, &amp;fbi-&gt;fb.var)
                                   | //use fbi-&gt;fb

Fix it by ensuring that the work is canceled before proceeding
with the cleanup in pxafb_remove.

Note that only root user can remove the driver at runtime.

Signed-off-by: Kaixin Wang &lt;kxwang23@m.fudan.edu.cn&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call</title>
<updated>2020-08-19T06:16:06Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2020-04-29T08:45:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9411fcc9a4894b9a79b312bd51b3df6b4cc4105'/>
<id>urn:sha1:d9411fcc9a4894b9a79b312bd51b3df6b4cc4105</id>
<content type='text'>
[ Upstream commit 499a2c41b954518c372873202d5e7714e22010c4 ]

'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()'
not 'dma_free_wc()'.
The correct dma_free_ function is already used in the error handling path
of the probe function.

Fixes: 77e196752bdd ("[ARM] pxafb: allow video memory size to be configurable")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Cc: Jani Nikula &lt;jani.nikula@intel.com&gt;
cc: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Cc: Eric Miao &lt;eric.miao@marvell.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200429084505.108897-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>video: pxafb: Remove cpufreq policy notifier</title>
<updated>2019-08-26T08:02:02Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2019-07-23T06:14:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c7d7b4bb172709f71975c2a6e95c9715171603f'/>
<id>urn:sha1:8c7d7b4bb172709f71975c2a6e95c9715171603f</id>
<content type='text'>
The cpufreq policy notifier's CPUFREQ_ADJUST notification is going to
get removed soon.

The notifier callback pxafb_freq_policy() isn't doing anything apart
from printing a debug message on CPUFREQ_ADJUST notification. There is
no point in keeping an otherwise empty callback and registering the
notifier.

Remove it.

Acked-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>docs: fb: convert docs to ReST and rename to *.rst</title>
<updated>2019-06-14T20:21:11Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2019-06-12T17:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab42b818954c040fa13639dc031d8541edcecb4b'/>
<id>urn:sha1:ab42b818954c040fa13639dc031d8541edcecb4b</id>
<content type='text'>
The conversion is actually:
  - add blank lines and identation in order to identify paragraphs;
  - fix tables markups;
  - add some lists markups;
  - mark literal blocks;
  - adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Also, removed the Maintained by, as requested by Geert.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"</title>
<updated>2018-12-20T18:13:08Z</updated>
<author>
<name>YueHaibing</name>
</author>
<published>2018-12-20T18:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2607391882fca37463187e7f2a9c76dec286947e'/>
<id>urn:sha1:2607391882fca37463187e7f2a9c76dec286947e</id>
<content type='text'>
'info-&gt;modes' got allocated with devm_kcalloc in of_get_pxafb_display.

This gives this error message:
  ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ allocated data

Fixes: c8f96304ec8b4 ("video: fbdev: pxafb: switch to devm_* API")
Cc: stable@kernel.org [v4.19+]
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Reviewed-by: Daniel Mack &lt;daniel@zonque.org&gt;
Cc: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: pxafb: Add support for lcd-supply regulator</title>
<updated>2018-07-24T17:11:26Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2018-07-24T17:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31e1391af210fdbf177966579a83d14e6a4cd828'/>
<id>urn:sha1:31e1391af210fdbf177966579a83d14e6a4cd828</id>
<content type='text'>
Optionally obtain a lcd-supply regulator during probe and use it in
__pxafb_lcd_power() to switch the power supply of LCD panels.

This helps boards booted from DT to control such voltages without
callbacks.

Signed-off-by: Daniel Mack &lt;daniel@zonque.org&gt;
Reviewed-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: pxafb: handle errors from pxafb_init_fbinfo() correctly</title>
<updated>2018-07-24T17:11:25Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2018-07-24T17:11:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2f2058e3d295fbaa5f681c1651cb5a8df840966'/>
<id>urn:sha1:a2f2058e3d295fbaa5f681c1651cb5a8df840966</id>
<content type='text'>
pxafb_init_fbinfo() can not only report errors caused by failed
allocations but also when the clock can't be found.

To fix this, return an error pointer instead of NULL in case of errors,
and up-chain the result.

Signed-off-by: Daniel Mack &lt;daniel@zonque.org&gt;
Reviewed-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: pxafb: switch to devm_* API</title>
<updated>2018-07-24T17:11:25Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2018-07-24T17:11:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8f96304ec8b49f361c2ede3b3a73a2291e0f687'/>
<id>urn:sha1:c8f96304ec8b49f361c2ede3b3a73a2291e0f687</id>
<content type='text'>
This helps us clean up the probe() and remove() implementations.

Signed-off-by: Daniel Mack &lt;daniel@zonque.org&gt;
Reviewed-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: pxafb: clear allocated memory for video modes</title>
<updated>2018-07-24T17:11:25Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2018-07-24T17:11:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b951d80aaf224b1f774e10def672f5e37488e4ee'/>
<id>urn:sha1:b951d80aaf224b1f774e10def672f5e37488e4ee</id>
<content type='text'>
When parsing the video modes from DT properties, make sure to zero out
memory before using it. This is important because not all fields in the mode
struct are explicitly initialized, even though they are used later on.

Fixes: 420a488278e86 ("video: fbdev: pxafb: initial devicetree conversion")
Reviewed-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Daniel Mack &lt;daniel@zonque.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
<entry>
<title>video: fbdev: pxafb: match_string() conversion fixup</title>
<updated>2018-05-15T16:03:23Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
</author>
<published>2018-05-15T16:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dbeef4fe697bfc0c071a88fe565182ce9729a7ba'/>
<id>urn:sha1:dbeef4fe697bfc0c071a88fe565182ce9729a7ba</id>
<content type='text'>
"unknown" lcd_types[] entry is needed for proper operation of
the driver, add it back.

Fixes: 6d09dfe70f8f ("video: fbdev: pxafb: Convert to use match_string() helper")
Reported-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
</entry>
</feed>
