<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm/boot/compressed/Makefile, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-05-12T06:39:28Z</updated>
<entry>
<title>ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld</title>
<updated>2021-05-12T06:39:28Z</updated>
<author>
<name>Ard Biesheuvel</name>
</author>
<published>2021-02-05T18:23:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=578f7183fd1d4d0e2c2a0915ab7a208b0bb38567'/>
<id>urn:sha1:578f7183fd1d4d0e2c2a0915ab7a208b0bb38567</id>
<content type='text'>
commit c4e792d1acce31c2eb7b9193ab06ab94de05bf42 upstream.

The LLVM ld.lld linker uses a different symbol type for __bss_start,
resulting in the calculation of KBSS_SZ to be thrown off. Up until now,
this has gone unnoticed as it only affects the appended DTB case, but
pending changes for ARM in the way the decompressed kernel is cleaned
from the caches has uncovered this problem.

On a ld.lld build:

  $ nm vmlinux |grep bss_
  c1c22034 D __bss_start
  c1c86e98 B __bss_stop

resulting in

  $ readelf -s arch/arm/boot/compressed/vmlinux | grep bss_size
  433: c1c86e98     0 NOTYPE  GLOBAL DEFAULT  ABS _kernel_bss_size

which is obviously incorrect, and may cause the cache clean to access
unmapped memory, or cause the size calculation to wrap, resulting in no
cache clean to be performed at all.

Fix this by updating the sed regex to take D type symbols into account.

Link: https://lore.kernel.org/linux-arm-kernel/6c65bcef-d4e7-25fa-43cf-2c435bb61bb9@collabora.com/
Link: https://lore.kernel.org/linux-arm-kernel/20210205085220.31232-1-ardb@kernel.org/

Cc: &lt;stable@vger.kernel.org&gt; # v4.19+
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Reported-by: Guillaume Tucker &lt;guillaume.tucker@collabora.com&gt;
Reported-by: "kernelci.org bot" &lt;bot@kernelci.org&gt;
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9045/1: uncompress: Validate start of physical memory against passed DTB</title>
<updated>2021-02-01T19:42:13Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2021-01-04T13:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0673cb38951215060d7993b43ad3c45cd413c2c3'/>
<id>urn:sha1:0673cb38951215060d7993b43ad3c45cd413c2c3</id>
<content type='text'>
Currently, the start address of physical memory is obtained by masking
the program counter with a fixed mask of 0xf8000000.  This mask value
was chosen as a balance between the requirements of different platforms.
However, this does require that the start address of physical memory is
a multiple of 128 MiB, precluding booting Linux on platforms where this
requirement is not fulfilled.

Fix this limitation by validating the masked address against the memory
information in the passed DTB.  Only use the start address
from DTB when masking would yield an out-of-range address, prefer the
traditional method in all other cases.  Note that this applies only to the
explicitly passed DTB on modern systems, and not to a DTB appended to
the kernel, or to ATAGS.  The appended DTB may need to be augmented by
information from ATAGS, which may need to rely on knowledge of the start
address of physical memory itself.

This allows to boot Linux on r7s9210/rza2mevb using the 64 MiB of SDRAM
on the RZA2MEVB sub board, which is located at 0x0C000000 (CS3 space),
i.e. not at a multiple of 128 MiB.

Suggested-by: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Suggested-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Acked-by: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux</title>
<updated>2020-12-22T21:34:27Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2020-12-22T21:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c45647f9f562b52915b43b6bb447827cebf511bd'/>
<id>urn:sha1:c45647f9f562b52915b43b6bb447827cebf511bd</id>
<content type='text'>
Pull ARM updates from Russell King:

 - Rework phys/virt translation

 - Add KASan support

 - Move DT out of linear map region

 - Use more PC-relative addressing in assembly

 - Remove FP emulation handling while in kernel mode

 - Link with '-z norelro'

 - remove old check for GCC &lt;= 4.2 in ARM unwinder code

 - disable big endian if using clang's linker

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (46 commits)
  ARM: 9027/1: head.S: explicitly map DT even if it lives in the first physical section
  ARM: 9038/1: Link with '-z norelro'
  ARM: 9037/1: uncompress: Add OF_DT_MAGIC macro
  ARM: 9036/1: uncompress: Fix dbgadtb size parameter name
  ARM: 9035/1: uncompress: Add be32tocpu macro
  ARM: 9033/1: arm/smp: Drop the macro S(x,s)
  ARM: 9032/1: arm/mm: Convert PUD level pgtable helper macros into functions
  ARM: 9031/1: hyp-stub: remove unused .L__boot_cpu_mode_offset symbol
  ARM: 9044/1: vfp: use undef hook for VFP support detection
  ARM: 9034/1: __div64_32(): straighten up inline asm constraints
  ARM: 9030/1: entry: omit FP emulation for UND exceptions taken in kernel mode
  ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler
  ARM: 9028/1: disable KASAN in call stack capturing routines
  ARM: 9026/1: unwind: remove old check for GCC &lt;= 4.2
  ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD
  ARM: 9024/1: Drop useless cast of "u64" to "long long"
  ARM: 9023/1: Spelling s/mmeory/memory/
  ARM: 9022/1: Change arch/arm/lib/mem*.S to use WEAK instead of .weak
  ARM: kvm: replace open coded VA-&gt;PA calculations with adr_l call
  ARM: head.S: use PC relative insn sequence to calculate PHYS_OFFSET
  ...
</content>
</entry>
<entry>
<title>kbuild: Hoist '--orphan-handling' into Kconfig</title>
<updated>2020-12-01T13:45:36Z</updated>
<author>
<name>Nathan Chancellor</name>
</author>
<published>2020-11-19T20:46:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59612b24f78a0b61fe078ec9dff2e48e9cec52c0'/>
<id>urn:sha1:59612b24f78a0b61fe078ec9dff2e48e9cec52c0</id>
<content type='text'>
Currently, '--orphan-handling=warn' is spread out across four different
architectures in their respective Makefiles, which makes it a little
unruly to deal with in case it needs to be disabled for a specific
linker version (in this case, ld.lld 10.0.1).

To make it easier to control this, hoist this warning into Kconfig and
the main Makefile so that disabling it is simpler, as the warning will
only be enabled in a couple places (main Makefile and a couple of
compressed boot folders that blow away LDFLAGS_vmlinx) and making it
conditional is easier due to Kconfig syntax. One small additional
benefit of this is saving a call to ld-option on incremental builds
because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN.

To keep the list of supported architectures the same, introduce
CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to
gain this automatically after all of the sections are specified and size
asserted. A special thanks to Kees Cook for the help text on this
config.

Link: https://github.com/ClangBuiltLinux/linux/issues/1187
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt; (powerpc)
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>ARM: 9013/2: Disable KASan instrumentation for some code</title>
<updated>2020-10-27T12:11:04Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2020-10-25T22:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5d44e7e3507b0ad868f68e0c5bca6a57afa1b8b'/>
<id>urn:sha1:d5d44e7e3507b0ad868f68e0c5bca6a57afa1b8b</id>
<content type='text'>
Disable instrumentation for arch/arm/boot/compressed/*
since that code is executed before the kernel has even
set up its mappings and definately out of scope for
KASan.

Disable instrumentation of arch/arm/vdso/* because that code
is not linked with the kernel image, so the KASan management
code would fail to link.

Disable instrumentation of arch/arm/mm/physaddr.c. See commit
ec6d06efb0ba ("arm64: Add support for CONFIG_DEBUG_VIRTUAL")
for more details.

Disable kasan check in the function unwind_pop_register because
it does not matter that kasan checks failed when unwind_pop_register()
reads the stack memory of a task.

Cc: Andrey Ryabinin &lt;aryabinin@virtuozzo.com&gt;
Cc: Alexander Potapenko &lt;glider@google.com&gt;
Cc: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: kasan-dev@googlegroups.com
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Tested-by: Ard Biesheuvel &lt;ardb@kernel.org&gt; # QEMU/KVM/mach-virt/LPAE/8G
Tested-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt; # Brahma SoCs
Tested-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt; # i.MX6Q
Reported-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reported-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Abbott Liu &lt;liuwenliang@huawei.com&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm</title>
<updated>2020-10-20T16:18:31Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2020-10-20T16:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=709ebe6dff50405ae83551578bc08c0f78b05158'/>
<id>urn:sha1:709ebe6dff50405ae83551578bc08c0f78b05158</id>
<content type='text'>
Pull ARM updates from Russell King:

 - handle inexact watchpoint addresses (Douglas Anderson)

 - decompressor serial debug cleanups (Linus Walleij)

 - update L2 cache prefetch bits (Guillaume Tucker)

 - add text offset and malloc size to the decompressor kexec data

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: add malloc size to decompressor kexec size structure
  ARM: add TEXT_OFFSET to decompressor kexec image structure
  ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values
  ARM: 9010/1: uncompress: Print the location of appended DTB
  ARM: 9009/1: uncompress: Enable debug in head.S
  ARM: 9008/1: uncompress: Drop excess whitespace print
  ARM: 9006/1: uncompress: Wait for ready and busy in debug prints
  ARM: 9005/1: debug: Select flow control for all debug UARTs
  ARM: 9004/1: debug: Split waituart to CTS and TXRDY
  ARM: 9003/1: uncompress: Delete unused debug macros
  ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses
</content>
</entry>
<entry>
<title>ARM: add malloc size to decompressor kexec size structure</title>
<updated>2020-09-15T13:36:26Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2020-08-06T09:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adc5f7029376049873289be305d507022281b8dd'/>
<id>urn:sha1:adc5f7029376049873289be305d507022281b8dd</id>
<content type='text'>
Add the required malloc size to the decompressor kexec size structure.

Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: add TEXT_OFFSET to decompressor kexec image structure</title>
<updated>2020-09-15T13:36:25Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2018-04-03T11:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83dfeedb6663ea8cdf93f41191ef313de5b7a2ba'/>
<id>urn:sha1:83dfeedb6663ea8cdf93f41191ef313de5b7a2ba</id>
<content type='text'>
Add the TEXT_OFFSET to the decompressor's kexec image structure to
kexec knows what offset to use.

Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 9009/1: uncompress: Enable debug in head.S</title>
<updated>2020-09-15T13:35:31Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2020-09-04T08:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2596a72d338481b49a678ab880338fd5a661e663'/>
<id>urn:sha1:2596a72d338481b49a678ab880338fd5a661e663</id>
<content type='text'>
The assembly file head.S includes some debug code that does
not get enabled when we select CONFIG_DEBUG_UNCOMPRESS.
The debug in head.S relies on the user tagging on -DDEBUG
on the compilation command line.

To simplify debugging, tag on -DDEBUG so that we also get
these debug messages when selecting CONFIG_DEBUG_UNCOMPRESS.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>arm/boot: Warn on orphan section placement</title>
<updated>2020-09-03T08:28:35Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2020-09-02T02:53:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4409d2f8dfe7d5088567d4ba00133f876ee586c7'/>
<id>urn:sha1:4409d2f8dfe7d5088567d4ba00133f876ee586c7</id>
<content type='text'>
We don't want to depend on the linker's orphan section placement
heuristics as these can vary between linkers, and may change between
versions. All sections need to be explicitly handled in the linker script.

With all sections now handled, enable orphan section warning.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Link: https://lore.kernel.org/r/20200902025347.2504702-4-keescook@chromium.org
</content>
</entry>
</feed>
