<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/arch/s390/kernel/kexec_elf.c, branch docs-next</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-next</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-next'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2025-09-04T00:10:37+00:00</updated>
<entry>
<title>s390: kexec: initialize kexec_buf struct</title>
<updated>2025-09-04T00:10:37+00:00</updated>
<author>
<name>Breno Leitao</name>
<email>leitao@debian.org</email>
</author>
<published>2025-08-27T10:42:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e67f0bd05519012eaabaae68618ffc4ed30ab680'/>
<id>urn:sha1:e67f0bd05519012eaabaae68618ffc4ed30ab680</id>
<content type='text'>
The kexec_buf structure was previously declared without initialization.
commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.

This is also triggering a UBSAN warning when the uninitialized data was
accessed:

	------------[ cut here ]------------
	UBSAN: invalid-load in ./include/linux/kexec.h:210:10
	load of value 252 is not a valid value for type '_Bool'

Zero-initializing kexec_buf at declaration ensures all fields are
cleanly set, preventing future instances of uninitialized memory being
used.

Link: https://lkml.kernel.org/r/20250827-kbuf_all-v1-3-1df9882bb01a@debian.org
Fixes: bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Cc: Albert Ou &lt;aou@eecs.berkeley.edu&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Alexandre Ghiti &lt;alex@ghiti.fr&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Coiby Xu &lt;coxu@redhat.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;
Cc: Paul Walmsley &lt;paul.walmsley@sifive.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>s390, crash: wrap crash dumping code into crash related ifdefs</title>
<updated>2024-02-24T01:48:23+00:00</updated>
<author>
<name>Baoquan He</name>
<email>bhe@redhat.com</email>
</author>
<published>2024-01-24T05:12:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=865e2acd3eb971026a29e8b03443847a9ffb7d51'/>
<id>urn:sha1:865e2acd3eb971026a29e8b03443847a9ffb7d51</id>
<content type='text'>
Now crash codes under kernel/ folder has been split out from kexec
code, crash dumping can be separated from kexec reboot in config
items on s390 with some adjustments.

Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery.

Link: https://lkml.kernel.org/r/20240124051254.67105-10-bhe@redhat.com
Signed-off-by: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Hari Bathini &lt;hbathini@linux.ibm.com&gt;
Cc: Pingfan Liu &lt;piliu@redhat.com&gt;
Cc: Klara Modin &lt;klarasmodin@gmail.com&gt;
Cc: Michael Kelley &lt;mhklinux@outlook.com&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kexec: Fix file verification on S390</title>
<updated>2019-09-10T12:27:51+00:00</updated>
<author>
<name>Matthew Garrett</name>
<email>matthewgarrett@google.com</email>
</author>
<published>2019-09-10T10:03:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=45893a0abee6b5fd52994a3a1095735aeaec472b'/>
<id>urn:sha1:45893a0abee6b5fd52994a3a1095735aeaec472b</id>
<content type='text'>
I accidentally typoed this #ifdef, so verification would always be
disabled.

Signed-off-by: Matthew Garrett &lt;mjg59@google.com&gt;
Reported-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE</title>
<updated>2019-08-20T04:54:15+00:00</updated>
<author>
<name>Jiri Bohac</name>
<email>jbohac@suse.cz</email>
</author>
<published>2019-08-20T00:17:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=99d5cadfde2b1acb7650021df5abaa5ec447dd10'/>
<id>urn:sha1:99d5cadfde2b1acb7650021df5abaa5ec447dd10</id>
<content type='text'>
This is a preparatory patch for kexec_file_load() lockdown.  A locked down
kernel needs to prevent unsigned kernel images from being loaded with
kexec_file_load().  Currently, the only way to force the signature
verification is compiling with KEXEC_VERIFY_SIG.  This prevents loading
usigned images even when the kernel is not locked down at runtime.

This patch splits KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE.
Analogous to the MODULE_SIG and MODULE_SIG_FORCE for modules, KEXEC_SIG
turns on the signature verification but allows unsigned images to be
loaded.  KEXEC_SIG_FORCE disallows images without a valid signature.

Signed-off-by: Jiri Bohac &lt;jbohac@suse.cz&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg59@google.com&gt;
cc: kexec@lists.infradead.org
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>s390/kexec_file: Create ipl report and pass to next kernel</title>
<updated>2019-04-29T08:44:02+00:00</updated>
<author>
<name>Philipp Rudo</name>
<email>prudo@linux.ibm.com</email>
</author>
<published>2019-03-18T11:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=99feaa717e558cf4f2ad0faf53acac3cf9cc7438'/>
<id>urn:sha1:99feaa717e558cf4f2ad0faf53acac3cf9cc7438</id>
<content type='text'>
Signed-off-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/kexec_file: Signature verification prototype</title>
<updated>2019-04-29T08:44:01+00:00</updated>
<author>
<name>Philipp Rudo</name>
<email>prudo@linux.ibm.com</email>
</author>
<published>2019-02-26T09:50:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e23a8020ce4e094e10d717d39a8ce799243bf8c1'/>
<id>urn:sha1:e23a8020ce4e094e10d717d39a8ce799243bf8c1</id>
<content type='text'>
Add kernel signature verification to kexec_file. The verification is based
on module signature verification and works with kernel images signed via
scripts/sign-file.

Signed-off-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/kexec_file: Load new kernel to absolute 0</title>
<updated>2019-04-29T08:44:00+00:00</updated>
<author>
<name>Philipp Rudo</name>
<email>prudo@linux.ibm.com</email>
</author>
<published>2019-03-07T14:56:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=653beba24d4cd281b078eab48c9bce956939061c'/>
<id>urn:sha1:653beba24d4cd281b078eab48c9bce956939061c</id>
<content type='text'>
The leading 64 kB of a kernel image doesn't contain any data needed to boot
the new kernel when it was loaded via kexec_file. Thus kexec_file currently
strips them off before loading the image. Keep the leading 64 kB in order
to be able to pass a ipl_report to the next kernel.

Signed-off-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/kexec_file: Unify loader code</title>
<updated>2019-04-29T08:43:59+00:00</updated>
<author>
<name>Philipp Rudo</name>
<email>prudo@linux.ibm.com</email>
</author>
<published>2019-03-07T11:48:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8e4964261374aaec9f4a83de076ceb11c8cdc044'/>
<id>urn:sha1:8e4964261374aaec9f4a83de076ceb11c8cdc044</id>
<content type='text'>
s390_image_load and s390_elf_load have the same code to load the different
components. Combine this functionality in one shared function.

While at it move kexec_file_update_kernel into the new function as well.

Signed-off-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/kexec_file: Simplify parmarea access</title>
<updated>2019-04-29T08:43:57+00:00</updated>
<author>
<name>Philipp Rudo</name>
<email>prudo@linux.ibm.com</email>
</author>
<published>2019-03-06T16:36:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d0d249d75dda1b101624316a52d117be07b8ccff'/>
<id>urn:sha1:d0d249d75dda1b101624316a52d117be07b8ccff</id>
<content type='text'>
Access the parmarea in head.S via a struct instead of individual offsets.

While at it make the fields in the parmarea .quads.

Signed-off-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/kexec_file: Fix detection of text segment in ELF loader</title>
<updated>2019-04-29T08:43:46+00:00</updated>
<author>
<name>Philipp Rudo</name>
<email>prudo@linux.ibm.com</email>
</author>
<published>2019-04-01T10:48:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=729829d775c9a5217abc784b2f16087d79c4eec8'/>
<id>urn:sha1:729829d775c9a5217abc784b2f16087d79c4eec8</id>
<content type='text'>
To register data for the next kernel (command line, oldmem_base, etc.) the
current kernel needs to find the ELF segment that contains head.S. This is
currently done by checking ifor 'phdr-&gt;p_paddr == 0'. This works fine for
the current kernel build but in theory the first few pages could be
skipped. Make the detection more robust by checking if the entry point lies
within the segment.

Signed-off-by: Philipp Rudo &lt;prudo@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
</feed>
