<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mtd/maps, branch v5.10.78</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.78</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.78'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-05-14T07:50:09+00:00</updated>
<entry>
<title>mtd: maps: fix error return code of physmap_flash_remove()</title>
<updated>2021-05-14T07:50:09+00:00</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2021-03-08T03:44:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5133b4bdc98e0cb3c94152d4b208f260ca1e57b9'/>
<id>urn:sha1:5133b4bdc98e0cb3c94152d4b208f260ca1e57b9</id>
<content type='text'>
[ Upstream commit 620b90d30c08684dc6ebee07c72755d997f9d1f6 ]

When platform_get_drvdata() returns NULL to info, no error return code
of physmap_flash_remove() is assigned.
To fix this bug, err is assigned with -EINVAL in this case

Fixes: 73566edf9b91 ("[MTD] Convert physmap to platform driver")
Reported-by: TOTE Robot &lt;oslab@tsinghua.edu.cn&gt;
Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210308034446.3052-1-baijiaju1990@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: physmap: physmap-bt1-rom: Fix unintentional stack access</title>
<updated>2021-05-11T12:47:13+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-02-12T10:40:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34ec706bf0b7c4ca249a729c1bcb91f706c7a7be'/>
<id>urn:sha1:34ec706bf0b7c4ca249a729c1bcb91f706c7a7be</id>
<content type='text'>
commit 683313993dbe1651c7aa00bb42a041d70e914925 upstream.

Cast &amp;data to (char *) in order to avoid unintentionally accessing
the stack.

Notice that data is of type u32, so any increment to &amp;data
will be in the order of 4-byte chunks, and this piece of code
is actually intended to be a byte offset.

Fixes: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically mapped ROM support")
Addresses-Coverity-ID: 1497765 ("Out-of-bounds access")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Acked-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210212104022.GA242669@embeddedor
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: maps: vmu-flash: fix typos for struct memcard</title>
<updated>2020-10-02T07:08:27+00:00</updated>
<author>
<name>Bernard Zhao</name>
<email>bernard@vivo.com</email>
</author>
<published>2020-09-22T11:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0626258af6eab7db900d5485e9b3710198c45d43'/>
<id>urn:sha1:0626258af6eab7db900d5485e9b3710198c45d43</id>
<content type='text'>
Change struct memcard`s element "removeable" -&gt; "removable".

Signed-off-by: Bernard Zhao &lt;bernard@vivo.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200922112814.26761-1-bernard@vivo.com
</content>
</entry>
<entry>
<title>mtd: physmap: Add Baikal-T1 physically mapped ROM support</title>
<updated>2020-10-02T07:08:22+00:00</updated>
<author>
<name>Serge Semin</name>
<email>Sergey.Semin@baikalelectronics.ru</email>
</author>
<published>2020-09-20T11:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3e79e7682e075326df8041b826b03453acacd0a'/>
<id>urn:sha1:b3e79e7682e075326df8041b826b03453acacd0a</id>
<content type='text'>
Baikal-T1 Boot Controller provides an access to a RO storages, which are
physically mapped into the SoC MMIO space. In particularly there are
Internal ROM embedded into the SoC with a pre-installed firmware,
externally attached SPI flash (also accessed in the read-only mode) and a
memory region, which mirrors one of them in accordance with the currently
enabled system boot mode (also called Boot ROM).

This commit adds the Internal ROM support to the physmap driver of the MTD
kernel subsystem. The driver will create the Internal ROM MTD as long as
it is defined in the system dts file. The physically mapped SPI flash
region will be used to implement the SPI-mem interface. The mirroring
memory region won't be accessible directly since it's redundant due to
both bootable regions being exposed anyway.

Note we had to create a dedicated code for the ROMs since read from the
corresponding memory regions must be done via the dword-aligned addresses.

Signed-off-by: Serge Semin &lt;Sergey.Semin@baikalelectronics.ru&gt;
Cc: Alexey Malahov &lt;Alexey.Malahov@baikalelectronics.ru&gt;
Cc: Pavel Parkhomenko &lt;Pavel.Parkhomenko@baikalelectronics.ru&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: linux-mips@vger.kernel.org
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200920111445.21816-1-Sergey.Semin@baikalelectronics.ru
</content>
</entry>
<entry>
<title>mtd: maps: vmu-flash: simplify the return expression of probe_maple_vmu</title>
<updated>2020-10-02T07:08:13+00:00</updated>
<author>
<name>Liu Shixin</name>
<email>liushixin2@huawei.com</email>
</author>
<published>2020-09-19T10:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6aec345ed83a834ea796220741e5d8ca94299d6e'/>
<id>urn:sha1:6aec345ed83a834ea796220741e5d8ca94299d6e</id>
<content type='text'>
Simplify the return expression.

Signed-off-by: Liu Shixin &lt;liushixin2@huawei.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200919100854.1639267-1-liushixin2@huawei.com
</content>
</entry>
<entry>
<title>mtd: maps: physmap: Retain mtd-name property from dts</title>
<updated>2020-08-27T12:16:29+00:00</updated>
<author>
<name>Chris Packham</name>
<email>chris.packham@alliedtelesis.co.nz</email>
</author>
<published>2020-08-24T02:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b2108429ce7405e14d26c37eccd627fc35c605a'/>
<id>urn:sha1:9b2108429ce7405e14d26c37eccd627fc35c605a</id>
<content type='text'>
In physmap_flash_of_init() the maps[].name can be populated based on the
optional 'linux,mtd-name' property in the dts. Make sure this is
retained when filling in the rest of the map[] data.

Signed-off-by: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200824025744.25992-1-chris.packham@alliedtelesis.co.nz
</content>
</entry>
<entry>
<title>mtd: Replace HTTP links with HTTPS ones</title>
<updated>2020-08-02T20:17:19+00:00</updated>
<author>
<name>Alexander A. Klimov</name>
<email>grandmaster@al2klimov.de</email>
</author>
<published>2020-07-13T16:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c13ac5552546c8971c0a4a3e947e25b0f8786aa9'/>
<id>urn:sha1:c13ac5552546c8971c0a4a3e947e25b0f8786aa9</id>
<content type='text'>
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov &lt;grandmaster@al2klimov.de&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd: physmap_of_gemini: remove defined but not used symbol 'syscon_match'</title>
<updated>2020-06-05T08:15:44+00:00</updated>
<author>
<name>Jason Yan</name>
<email>yanaijie@huawei.com</email>
</author>
<published>2020-04-03T08:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9029537c93b6f7347cf213d4e3b5c935a4d07ac8'/>
<id>urn:sha1:9029537c93b6f7347cf213d4e3b5c935a4d07ac8</id>
<content type='text'>
It's not used by anyone now, remove it. Fix the following gcc warning:

drivers/mtd/maps/physmap-gemini.c:49:34: warning: ‘syscon_match’ defined
but not used [-Wunused-const-variable=]
 static const struct of_device_id syscon_match[] = {
                                  ^~~~~~~~~~~~

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Jason Yan &lt;yanaijie@huawei.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd: Convert fallthrough comments into statements</title>
<updated>2020-03-30T08:14:54+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2020-03-25T21:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=025a06c1104cd8995646b761d117816b5f28c873'/>
<id>urn:sha1:025a06c1104cd8995646b761d117816b5f28c873</id>
<content type='text'>
Use Joe Perches cvt_fallthrough.pl script to convert

	/* fallthrough */

comments (and its derivatives) into a

	fallthrough;

statement. This automatically drops useless ones.

Do it MTD-wide.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Acked-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Acked-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Link: https://lore.kernel.org/linux-mtd/20200325212115.14170-1-miquel.raynal@bootlin.com
</content>
</entry>
<entry>
<title>mtd: maps: sa1100-flash: Replace zero-length array with flexible-array member</title>
<updated>2020-03-24T22:02:30+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-03-19T22:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1ffdbfad00a3c424cadfd307b5bb9c466638532'/>
<id>urn:sha1:f1ffdbfad00a3c424cadfd307b5bb9c466638532</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200319224200.GA25162@embeddedor.com
</content>
</entry>
</feed>
