<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/crash.c, 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>2021-06-07T10:14:45Z</updated>
<entry>
<title>x86/crash: Remove crash_reserve_low_1M()</title>
<updated>2021-06-07T10:14:45Z</updated>
<author>
<name>Mike Rapoport</name>
</author>
<published>2021-06-01T07:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23721c8e92f73f9f89e7362c50c2996a5c9ad483'/>
<id>urn:sha1:23721c8e92f73f9f89e7362c50c2996a5c9ad483</id>
<content type='text'>
The entire memory range under 1M is unconditionally reserved in
setup_arch(), so there is no need for crash_reserve_low_1M() anymore.

Remove this function.

Signed-off-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lkml.kernel.org/r/20210601075354.5149-4-rppt@kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'devicetree-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux</title>
<updated>2021-04-28T22:50:24Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-04-28T22:50:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0080665fbd0e6a771aee366bb2aa208626e43def'/>
<id>urn:sha1:0080665fbd0e6a771aee366bb2aa208626e43def</id>
<content type='text'>
Pull devicetree updates from Rob Herring:

 - Refactor powerpc and arm64 kexec DT handling to common code. This
   enables IMA on arm64.

 - Add kbuild support for applying DT overlays at build time. The first
   user are the DT unittests.

 - Fix kerneldoc formatting and W=1 warnings in drivers/of/

 - Fix handling 64-bit flag on PCI resources

 - Bump dtschema version required to v2021.2.1

 - Enable undocumented compatible checks for dtbs_check. This allows
   tracking of missing binding schemas.

 - DT docs improvements. Regroup the DT docs and add the example schema
   and DT kernel ABI docs to the doc build.

 - Convert Broadcom Bluetooth and video-mux bindings to schema

 - Add QCom sm8250 Venus video codec binding schema

 - Add vendor prefixes for AESOP, YIC System Co., Ltd, and Siliconfile
   Technologies Inc.

 - Cleanup of DT schema type references on common properties and
   standard unit properties

* tag 'devicetree-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (64 commits)
  powerpc: If kexec_build_elf_info() fails return immediately from elf64_load()
  powerpc: Free fdt on error in elf64_load()
  of: overlay: Fix kerneldoc warning in of_overlay_remove()
  of: linux/of.h: fix kernel-doc warnings
  of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses
  dt-bindings: bcm4329-fmac: add optional brcm,ccode-map
  docs: dt: update writing-schema.rst references
  dt-bindings: media: venus: Add sm8250 dt schema
  of: base: Fix spelling issue with function param 'prop'
  docs: dt: Add DT API documentation
  of: Add missing 'Return' section in kerneldoc comments
  of: Fix kerneldoc output formatting
  docs: dt: Group DT docs into relevant sub-sections
  docs: dt: Make 'Devicetree' wording more consistent
  docs: dt: writing-schema: Include the example schema in the doc build
  docs: dt: writing-schema: Remove spurious indentation
  dt-bindings: Fix reference in submitting-patches.rst to the DT ABI doc
  dt-bindings: ddr: Add optional manufacturer and revision ID to LPDDR3
  dt-bindings: media: video-interfaces: Drop the example
  devicetree: bindings: clock: Minor typo fix in the file armada3700-tbg-clock.txt
  ...
</content>
</entry>
<entry>
<title>x86/crash: Fix crash_setup_memmap_entries() out-of-bounds access</title>
<updated>2021-04-20T15:32:46Z</updated>
<author>
<name>Mike Galbraith</name>
</author>
<published>2021-04-16T12:02:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5849cdf8c120e3979c57d34be55b92d90a77a47e'/>
<id>urn:sha1:5849cdf8c120e3979c57d34be55b92d90a77a47e</id>
<content type='text'>
Commit in Fixes: added support for kexec-ing a kernel on panic using a
new system call. As part of it, it does prepare a memory map for the new
kernel.

However, while doing so, it wrongly accesses memory it has not
allocated: it accesses the first element of the cmem-&gt;ranges[] array in
memmap_exclude_ranges() but it has not allocated the memory for it in
crash_setup_memmap_entries(). As KASAN reports:

  BUG: KASAN: vmalloc-out-of-bounds in crash_setup_memmap_entries+0x17e/0x3a0
  Write of size 8 at addr ffffc90000426008 by task kexec/1187

  (gdb) list *crash_setup_memmap_entries+0x17e
  0xffffffff8107cafe is in crash_setup_memmap_entries (arch/x86/kernel/crash.c:322).
  317                                      unsigned long long mend)
  318     {
  319             unsigned long start, end;
  320
  321             cmem-&gt;ranges[0].start = mstart;
  322             cmem-&gt;ranges[0].end = mend;
  323             cmem-&gt;nr_ranges = 1;
  324
  325             /* Exclude elf header region */
  326             start = image-&gt;arch.elf_load_addr;
  (gdb)

Make sure the ranges array becomes a single element allocated.

 [ bp: Write a proper commit message. ]

Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")
Signed-off-by: Mike Galbraith &lt;efault@gmx.de&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Dave Young &lt;dyoung@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lkml.kernel.org/r/725fa3dc1da2737f0f6188a1a9701bead257ea9d.camel@gmx.de
</content>
</entry>
<entry>
<title>x86: Use ELF fields defined in 'struct kimage'</title>
<updated>2021-03-08T19:06:29Z</updated>
<author>
<name>Lakshmi Ramasubramanian</name>
</author>
<published>2021-02-21T17:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179350f00e0663cea76af83b843078eebe1bfbf4'/>
<id>urn:sha1:179350f00e0663cea76af83b843078eebe1bfbf4</id>
<content type='text'>
ELF related fields elf_headers, elf_headers_sz, and elf_load_addr
have been moved from 'struct kimage_arch' to 'struct kimage'.

Use the ELF fields defined in 'struct kimage'.

Suggested-by: Rob Herring &lt;robh@kernel.org&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Lakshmi Ramasubramanian &lt;nramas@linux.microsoft.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20210221174930.27324-5-nramas@linux.microsoft.com
</content>
</entry>
<entry>
<title>x86/crash: Correct the address boundary of function parameters</title>
<updated>2020-08-06T23:32:00Z</updated>
<author>
<name>Lianbo Jiang</name>
</author>
<published>2020-08-04T04:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3e1c3bb24e2ff2927af5e30c2bebe669bb84196'/>
<id>urn:sha1:a3e1c3bb24e2ff2927af5e30c2bebe669bb84196</id>
<content type='text'>
Let's carefully handle the boundary of the function parameter to make
sure that the arguments passed doesn't exceed the address range.

Signed-off-by: Lianbo Jiang &lt;lijiang@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Dave Young &lt;dyoung@redhat.com&gt;
Link: https://lore.kernel.org/r/20200804044933.1973-2-lijiang@redhat.com
</content>
</entry>
<entry>
<title>x86/crash: Use resource_size()</title>
<updated>2020-01-09T13:40:03Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2020-01-01T17:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1429b568ad71943a374aa4a8d3772d5a8816ddba'/>
<id>urn:sha1:1429b568ad71943a374aa4a8d3772d5a8816ddba</id>
<content type='text'>
Use resource_size() rather than a verbose computation on
the end and start fields.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

&lt;smpl&gt;
@@ struct resource ptr; @@
- (ptr.end - ptr.start + 1)
+ resource_size(&amp;ptr)
&lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: https://lkml.kernel.org/r/1577900990-8588-10-git-send-email-Julia.Lawall@inria.fr
</content>
</entry>
<entry>
<title>x86/crash: Align function arguments on opening braces</title>
<updated>2019-11-14T17:24:55Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2019-11-14T15:11:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9eff303725da6530b615e9258f696149baa51df6'/>
<id>urn:sha1:9eff303725da6530b615e9258f696149baa51df6</id>
<content type='text'>
... or let function calls stick out and thus remain on a single line,
even if the 80 cols rule is violated by a couple of chars, for better
readability.

No functional changes.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20191114172200.19563-1-bp@alien8.de
</content>
</entry>
<entry>
<title>x86/kdump: Remove the backup region handling</title>
<updated>2019-11-14T17:24:43Z</updated>
<author>
<name>Lianbo Jiang</name>
</author>
<published>2019-11-08T09:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c321eb2b843bf25946100b7e2de4054f71ec068'/>
<id>urn:sha1:7c321eb2b843bf25946100b7e2de4054f71ec068</id>
<content type='text'>
When the crashkernel kernel command line option is specified, the low
1M memory will always be reserved now. Therefore, it's not necessary to
create a backup region anymore and also no need to copy the contents of
the first 640k to it.

Remove all the code related to handling that backup region.

 [ bp: Massage commit message. ]

Signed-off-by: Lianbo Jiang &lt;lijiang@redhat.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: bhe@redhat.com
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: d.hatayama@fujitsu.com
Cc: dhowells@redhat.com
Cc: ebiederm@xmission.com
Cc: horms@verge.net.au
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jürgen Gross &lt;jgross@suse.com&gt;
Cc: kexec@lists.infradead.org
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: vgoyal@redhat.com
Cc: x86-ml &lt;x86@kernel.org&gt;
Link: https://lkml.kernel.org/r/20191108090027.11082-3-lijiang@redhat.com
</content>
</entry>
<entry>
<title>x86/kdump: Always reserve the low 1M when the crashkernel option is specified</title>
<updated>2019-11-14T12:54:33Z</updated>
<author>
<name>Lianbo Jiang</name>
</author>
<published>2019-11-08T09:00:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f599d84231fd27e42f4ca2a786a6641e8cddf00'/>
<id>urn:sha1:6f599d84231fd27e42f4ca2a786a6641e8cddf00</id>
<content type='text'>
On x86, purgatory() copies the first 640K of memory to a backup region
because the kernel needs those first 640K for the real mode trampoline
during boot, among others.

However, when SME is enabled, the kernel cannot properly copy the old
memory to the backup area but reads only its encrypted contents. The
result is that the crash tool gets invalid pointers when parsing vmcore:

  crash&gt; kmem -s|grep -i invalid
  kmem: dma-kmalloc-512: slab:ffffd77680001c00 invalid freepointer:a6086ac099f0c5a4
  kmem: dma-kmalloc-512: slab:ffffd77680001c00 invalid freepointer:a6086ac099f0c5a4
  crash&gt;

So reserve the remaining low 1M memory when the crashkernel option is
specified (after reserving real mode memory) so that allocated memory
does not fall into the low 1M area and thus the copying of the contents
of the first 640k to a backup region in purgatory() can be avoided
altogether.

This way, it does not need to be included in crash dumps or used for
anything except the trampolines that must live in the low 1M.

 [ bp: Heavily rewrite commit message, flip check logic in
   crash_reserve_low_1M().]

Signed-off-by: Lianbo Jiang &lt;lijiang@redhat.com&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Cc: bhe@redhat.com
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: d.hatayama@fujitsu.com
Cc: dhowells@redhat.com
Cc: ebiederm@xmission.com
Cc: horms@verge.net.au
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jürgen Gross &lt;jgross@suse.com&gt;
Cc: kexec@lists.infradead.org
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: vgoyal@redhat.com
Cc: x86-ml &lt;x86@kernel.org&gt;
Link: https://lkml.kernel.org/r/20191108090027.11082-2-lijiang@redhat.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=204793
</content>
</entry>
<entry>
<title>x86/crash: Remove unnecessary comparison</title>
<updated>2019-07-24T14:50:15Z</updated>
<author>
<name>Nikolas Nyby</name>
</author>
<published>2019-07-24T04:13:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4599c6671b8119ed5455e4ed6b967b461c27a9f7'/>
<id>urn:sha1:4599c6671b8119ed5455e4ed6b967b461c27a9f7</id>
<content type='text'>
The ret comparison and return are unnecessary as of commit f296f2634920
("x86/kexec: Remove walk_iomem_res() call with GART type")

elf_header_exclude_ranges() returns ret in any case, with or without this
comparison.

[ tglx: Use a proper commit reference instead of full SHA ]

Signed-off-by: Nikolas Nyby &lt;nikolas@gnu.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lkml.kernel.org/r/20190724041337.8346-1-nikolas@gnu.org

</content>
</entry>
</feed>
