linux/drivers/of
Frank Rowand 48d499bd89 of: unittest: overlay: ensure proper alignment of copied FDT
The Devicetree standard specifies an 8 byte alignment of the FDT.
Code in libfdt expects this alignment for an FDT image in memory.
kmemdup() returns 4 byte alignment on openrisc.  Replace kmemdup()
with kmalloc(), align pointer, memcpy() to get proper alignment.

The 4 byte alignment exposed a related bug which triggered a crash
on openrisc with:
commit 79edff1206 ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9")
as reported in:
https://lore.kernel.org/lkml/20210327224116.69309-1-linux@roeck-us.net/

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Link: https://lore.kernel.org/r/20210408204508.2276230-1-frowand.list@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
2021-04-08 16:38:47 -05:00
..
unittest-data of: unittest: Use bigger address cells to catch parser regressions 2020-08-03 16:24:49 -06:00
address.c arm64 updates for 5.11: 2020-12-14 16:24:30 -08:00
base.c of: base: improve error msg in of_phandle_iterator_next() 2021-01-15 11:26:09 -06:00
device.c Devicetree updates for v5.12: 2021-02-22 10:05:12 -08:00
dynamic.c driver core: Add fwnode link support 2020-12-09 19:10:21 +01:00
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
fdt.c of: properly check for error returned by fdt_get_name() 2021-04-07 13:07:30 -05:00
irq.c of/irq: Make of_msi_map_rid() PCI bus agnostic 2020-07-28 15:51:32 +01:00
Kconfig net: phy: Move of_mdio from drivers/of to drivers/net/mdio 2020-10-10 10:55:05 -07:00
kobj.c of: Fix a refcounting bug in __of_attach_node_sysfs() 2020-05-27 19:30:25 -06:00
Makefile net: phy: Move of_mdio from drivers/of to drivers/net/mdio 2020-10-10 10:55:05 -07:00
of_net.c net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
of_numa.c of, numa: Validate some distance map rules 2018-11-08 12:44:34 -06:00
of_private.h of: unittest: overlay: ensure proper alignment of copied FDT 2021-04-08 16:38:47 -05:00
of_reserved_mem.c of: Fix reserved-memory overlap detection 2020-10-25 20:37:55 -05:00
overlay.c of: unittest: overlay: ensure proper alignment of copied FDT 2021-04-08 16:38:47 -05:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
platform.c of: Remove of_dev_{get,put}() 2021-02-12 19:23:39 -06:00
property.c driver core: Delete pointless parameter in fwnode_operations.add_links 2020-12-09 19:14:48 +01:00
resolver.c of: overlay: log the error cause on resolver failure 2020-03-02 11:32:44 -06:00
unittest.c of: unittest: overlay: ensure proper alignment of copied FDT 2021-04-08 16:38:47 -05:00