<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm/mm, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-07-22T08:21:44Z</updated>
<entry>
<title>ARM: 9212/1: domain: Modify Kconfig help text</title>
<updated>2022-07-22T08:21:44Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2022-06-19T19:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9987bb02667ffe5971881933119c6eaed7c3a9ed'/>
<id>urn:sha1:9987bb02667ffe5971881933119c6eaed7c3a9ed</id>
<content type='text'>
[ Upstream commit 2bf6204240fddb22cc4940b9e3f40c538390212e ]

After the removal of set_fs() the reference to set_fs() is stale.
Alter the helptext to reflect what the config option really does.

Fixes: 8ac6f5d7f84b ("ARM: 9113/1: uaccess: remove set_fs() implementation")
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9210/1: Mark the FDT_FIXED sections as shareable</title>
<updated>2022-07-22T08:21:23Z</updated>
<author>
<name>Zhen Lei</name>
</author>
<published>2022-06-13T14:05:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=079fe72a31c404ce66515dc90ebdf774aa59386e'/>
<id>urn:sha1:079fe72a31c404ce66515dc90ebdf774aa59386e</id>
<content type='text'>
[ Upstream commit 598f0a99fa8a35be44b27106b43ddc66417af3b1 ]

commit 7a1be318f579 ("ARM: 9012/1: move device tree mapping out of linear
region") use FDT_FIXED_BASE to map the whole FDT_FIXED_SIZE memory area
which contains fdt. But it only reserves the exact physical memory that
fdt occupied. Unfortunately, this mapping is non-shareable. An illegal or
speculative read access can bring the RAM content from non-fdt zone into
cache, PIPT makes it to be hit by subsequently read access through
shareable mapping(such as linear mapping), and the cache consistency
between cores is lost due to non-shareable property.

|&lt;---------FDT_FIXED_SIZE------&gt;|
|                               |
 -------------------------------
| &lt;non-fdt&gt; | &lt;fdt&gt; | &lt;non-fdt&gt; |
 -------------------------------

1. CoreA read &lt;non-fdt&gt; through MT_ROM mapping, the old data is loaded
   into the cache.
2. CoreB write &lt;non-fdt&gt; to update data through linear mapping. CoreA
   received the notification to invalid the corresponding cachelines, but
   the property non-shareable makes it to be ignored.
3. CoreA read &lt;non-fdt&gt; through linear mapping, cache hit, the old data
   is read.

To eliminate this risk, add a new memory type MT_MEMORY_RO. Compared to
MT_ROM, it is shareable and non-executable.

Here's an example:
  list_del corruption. prev-&gt;next should be c0ecbf74, but was c08410dc
  kernel BUG at lib/list_debug.c:53!
  ... ...
  PC is at __list_del_entry_valid+0x58/0x98
  LR is at __list_del_entry_valid+0x58/0x98
  psr: 60000093
  sp : c0ecbf30  ip : 00000000  fp : 00000001
  r10: c08410d0  r9 : 00000001  r8 : c0825e0c
  r7 : 20000013  r6 : c08410d0  r5 : c0ecbf74  r4 : c0ecbf74
  r3 : c0825d08  r2 : 00000000  r1 : df7ce6f4  r0 : 00000044
  ... ...
  Stack: (0xc0ecbf30 to 0xc0ecc000)
  bf20:                                     c0ecbf74 c0164fd0 c0ecbf70 c0165170
  bf40: c0eca000 c0840c00 c0840c00 c0824500 c0825e0c c0189bbc c088f404 60000013
  bf60: 60000013 c0e85100 000004ec 00000000 c0ebcdc0 c0ecbf74 c0ecbf74 c0825d08
  ... ...                                           &lt;  next     prev  &gt;
  (__list_del_entry_valid) from (__list_del_entry+0xc/0x20)
  (__list_del_entry) from (finish_swait+0x60/0x7c)
  (finish_swait) from (rcu_gp_kthread+0x560/0xa20)
  (rcu_gp_kthread) from (kthread+0x14c/0x15c)
  (kthread) from (ret_from_fork+0x14/0x24)

The faulty list node to be deleted is a local variable, its address is
c0ecbf74. The dumped stack shows that 'prev' = c0ecbf74, but its value
before lib/list_debug.c:53 is c08410dc. A large amount of printing results
in swapping out the cacheline containing the old data(MT_ROM mapping is
read only, so the cacheline cannot be dirty), and the subsequent dump
operation obtains new data from the DDR.

Fixes: 7a1be318f579 ("ARM: 9012/1: move device tree mapping out of linear region")
Suggested-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Zhen Lei &lt;thunder.leizhen@huawei.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9209/1: Spectre-BHB: avoid pr_info() every time a CPU comes out of idle</title>
<updated>2022-07-22T08:21:23Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2022-05-31T08:53:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c10f57d82df1566af2ad3b5e6a81c35622889d08'/>
<id>urn:sha1:c10f57d82df1566af2ad3b5e6a81c35622889d08</id>
<content type='text'>
[ Upstream commit 0609e200246bfd3b7516091c491bec4308349055 ]

Jon reports that the Spectre-BHB init code is filling up the kernel log
with spurious notifications about which mitigation has been enabled,
every time any CPU comes out of a low power state.

Given that Spectre-BHB mitigations are system wide, only a single
mitigation can be enabled, and we already print an error if two types of
CPUs coexist in a single system that require different Spectre-BHB
mitigations.

This means that the pr_info() that describes the selected mitigation
does not need to be emitted for each CPU anyway, and so we can simply
emit it only once.

In order to clarify the above in the log message, update it to describe
that the selected mitigation will be enabled on all CPUs, including ones
that are unaffected. If another CPU comes up later that is affected and
requires a different mitigation, we report an error as before.

Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround")
Tested-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9214/1: alignment: advance IT state after emulating Thumb instruction</title>
<updated>2022-07-22T08:21:20Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2022-06-30T15:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05c214703f286006db285078e70cec4416e5bf7b'/>
<id>urn:sha1:05c214703f286006db285078e70cec4416e5bf7b</id>
<content type='text'>
commit e5c46fde75e43c15a29b40e5fc5641727f97ae47 upstream.

After emulating a misaligned load or store issued in Thumb mode, we have
to advance the IT state by hand, or it will get out of sync with the
actual instruction stream, which means we'll end up applying the wrong
condition code to subsequent instructions. This might corrupt the
program state rather catastrophically.

So borrow the it_advance() helper from the probing code, and use it on
CPSR if the emulated instruction is Thumb.

Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9213/1: Print message about disabled Spectre workarounds only once</title>
<updated>2022-07-22T08:21:20Z</updated>
<author>
<name>Dmitry Osipenko</name>
</author>
<published>2022-06-28T07:55:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bac88b10f0f8e442fc1b8b4a72b29d708208805'/>
<id>urn:sha1:9bac88b10f0f8e442fc1b8b4a72b29d708208805</id>
<content type='text'>
commit e4ced82deb5fb17222fb82e092c3f8311955b585 upstream.

Print the message about disabled Spectre workarounds only once. The
message is printed each time CPU goes out from idling state on NVIDIA
Tegra boards, causing storm in KMSG that makes system unusable.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm</title>
<updated>2022-05-19T16:08:29Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-05-19T16:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99b056443e6fc61b896607434107b825aec1f10c'/>
<id>urn:sha1:99b056443e6fc61b896607434107b825aec1f10c</id>
<content type='text'>
Pull ARM fixes from Russell King:
 "Two further fixes for Spectre-BHB from Ard for Cortex A15 and to use
  the wide branch instruction for Thumb2"

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
  ARM: 9196/1: spectre-bhb: enable for Cortex-A15
</content>
</entry>
<entry>
<title>ARM: 9196/1: spectre-bhb: enable for Cortex-A15</title>
<updated>2022-05-18T10:38:04Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2022-04-20T08:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0dc14aa94ccd8ba35eb17a0f9b123d1566efd39e'/>
<id>urn:sha1:0dc14aa94ccd8ba35eb17a0f9b123d1566efd39e</id>
<content type='text'>
The Spectre-BHB mitigations were inadvertently left disabled for
Cortex-A15, due to the fact that cpu_v7_bugs_init() is not called in
that case. So fix that.

Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround")
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map</title>
<updated>2022-05-10T00:34:28Z</updated>
<author>
<name>Mike Rapoport</name>
</author>
<published>2022-05-10T00:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=260364d112bc822005224667c0c9b1b17a53eafd'/>
<id>urn:sha1:260364d112bc822005224667c0c9b1b17a53eafd</id>
<content type='text'>
The semantics of pfn_valid() is to check presence of the memory map for a
PFN and not whether a PFN is covered by the linear map.  The memory map
may be present for NOMAP memory regions, but they won't be mapped in the
linear mapping.  Accessing such regions via __va() when they are
memremap()'ed will cause a crash.

On v5.4.y the crash happens on qemu-arm with UEFI [1]:

&lt;1&gt;[    0.084476] 8&lt;--- cut here ---
&lt;1&gt;[    0.084595] Unable to handle kernel paging request at virtual address dfb76000
&lt;1&gt;[    0.084938] pgd = (ptrval)
&lt;1&gt;[    0.085038] [dfb76000] *pgd=5f7fe801, *pte=00000000, *ppte=00000000

...

&lt;4&gt;[    0.093923] [&lt;c0ed6ce8&gt;] (memcpy) from [&lt;c16a06f8&gt;] (dmi_setup+0x60/0x418)
&lt;4&gt;[    0.094204] [&lt;c16a06f8&gt;] (dmi_setup) from [&lt;c16a38d4&gt;] (arm_dmi_init+0x8/0x10)
&lt;4&gt;[    0.094408] [&lt;c16a38d4&gt;] (arm_dmi_init) from [&lt;c0302e9c&gt;] (do_one_initcall+0x50/0x228)
&lt;4&gt;[    0.094619] [&lt;c0302e9c&gt;] (do_one_initcall) from [&lt;c16011e4&gt;] (kernel_init_freeable+0x15c/0x1f8)
&lt;4&gt;[    0.094841] [&lt;c16011e4&gt;] (kernel_init_freeable) from [&lt;c0f028cc&gt;] (kernel_init+0x8/0x10c)
&lt;4&gt;[    0.095057] [&lt;c0f028cc&gt;] (kernel_init) from [&lt;c03010e8&gt;] (ret_from_fork+0x14/0x2c)

On kernels v5.10.y and newer the same crash won't reproduce on ARM because
commit b10d6bca8720 ("arch, drivers: replace for_each_membock() with
for_each_mem_range()") changed the way memory regions are registered in
the resource tree, but that merely covers up the problem.

On ARM64 memory resources registered in yet another way and there the
issue of wrong usage of pfn_valid() to ensure availability of the linear
map is also covered.

Implement arch_memremap_can_ram_remap() on ARM and ARM64 to prevent access
to NOMAP regions via the linear mapping in memremap().

Link: https://lore.kernel.org/all/Yl65zxGgFzF1Okac@sirena.org.uk
Link: https://lkml.kernel.org/r/20220426060107.7618-1-rppt@kernel.org
Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Reported-by: "kernelci.org bot" &lt;bot@kernelci.org&gt;
Tested-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Mark-PK Tsai &lt;mark-pk.tsai@mediatek.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[5.4+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'hardening-v5.18-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2022-03-31T18:43:01Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2022-03-31T18:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f87cbd0565eb7e2fa15296c74210658db1346431'/>
<id>urn:sha1:f87cbd0565eb7e2fa15296c74210658db1346431</id>
<content type='text'>
Pull hardening updates from Kees Cook:
 "This addresses an -Warray-bounds warning found under a few ARM
  defconfigs, and disables long-broken HARDENED_USERCOPY_PAGESPAN"

* tag 'hardening-v5.18-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  ARM/dma-mapping: Remove CMA code when not built with CMA
  usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN
</content>
</entry>
<entry>
<title>ARM/dma-mapping: Remove CMA code when not built with CMA</title>
<updated>2022-03-31T18:19:25Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2022-03-09T17:37:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=229a08a4f4e4f9949801cc39b6480ddc9c487183'/>
<id>urn:sha1:229a08a4f4e4f9949801cc39b6480ddc9c487183</id>
<content type='text'>
The MAX_CMA_AREAS could be set to 0, which would result in code that would
attempt to operate beyond the end of a zero-sized array. If CONFIG_CMA
is disabled, just remove this code entirely. Found when building arm
on GCC 10.x for several defconfigs (e.g. axm55xx_defconfig) under
-Warray-bounds:

arch/arm/mm/dma-mapping.c:396:22: warning: array subscript &lt;unknown&gt; is outside array bounds of 'struct dma_contig_early_reserve[0]' [-Warray-bounds]
  396 |         dma_mmu_remap[dma_mmu_remap_num].size = size;
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
arch/arm/mm/dma-mapping.c:389:40: note: while referencing 'dma_mmu_remap'
  389 | static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata;
      |                                        ^~~~~~~~~~~~~

Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Martin Oliveira &lt;martin.oliveira@eideticom.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Zi Yan &lt;ziy@nvidia.com&gt;
Cc: Hari Bathini &lt;hbathini@linux.ibm.com&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Mike Kravetz &lt;mike.kravetz@oracle.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/all/6243ee60.1c69fb81.16de6.7dbf@mx.google.com/
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/lkml/20220310070041.GA24874@lst.de
Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Link: https://lore.kernel.org/lkml/9059fa71-330f-f04f-b155-2850abb72a71@redhat.com
</content>
</entry>
</feed>
