Yuntao Wang writes:
> The end parameter received by kimage_is_destination_range() should be the
> last valid byte address of the target memory segment plus 1. However, in
> the locate_mem_hole_bottom_up() and locate_mem_hole_top_down() functions,
> the corresponding value passed to
On 12/15/23 at 12:38am, Yuntao Wang wrote:
> The purpose of crash_exclude_mem_range() is to remove all memory ranges
> that overlap with [mstart-mend]. However, the current logic only removes
> the first overlapping memory range.
>
> Commit a2e9a95d2190 ("kexec: Improve & fix
On Tue, Dec 05 2023 at 03:45, Kirill A. Shutemov wrote:
> ACPI MADT doesn't allow to offline CPU after it got woke up.
>
> Currently hotplug prevented based on the confidential computing
Currently CPU hotplug is prevented...
Other than that:
Reviewed-by: Thomas Gleixner
On Tue, Dec 05 2023 at 03:44, Kirill A. Shutemov wrote:
>
> +static bool cpu_hotplug_offline_disabled;
__ro_after_init?
Other than that:
Reviewed-by: Thomas Gleixner
___
kexec mailing list
kexec@lists.infradead.org
On Tue, Dec 05 2023 at 03:45, Kirill A. Shutemov wrote:
> ACPI MADT doesn't allow to offline CPU after it got woke up. It limits
to offline a CPU after it was onlined. This limits kexec: ...
> kexec: the second kernel won't be able to use more than one CPU.
... one CPU, which is enough to cover
On Tue, Dec 05 2023 at 03:45, Kirill A. Shutemov wrote:
> MADT Multiprocessor Wakeup structure version 1 brings support of CPU
> offlining: BIOS provides a reset vector where the CPU has to jump to
> offline itself.
CPU has to jump to for offlining itself.
> The new TEST mailbox command can be
On 12/15/23 at 11:46am, Eric W. Biederman wrote:
> Yuntao Wang writes:
>
> > The end parameter received by kimage_is_destination_range() should be the
> > last valid byte address of the target memory segment plus 1. However, in
> > the locate_mem_hole_bottom_up() and locate_mem_hole_top_down()
The current Kernel behavior is IMA measurements snapshot is taken at
kexec 'load' and not at kexec 'execute'. IMA log is then carried
over to the new Kernel after kexec 'execute'.
New events can be measured after the IMA log snapshot at kexec 'load'
and before the system boots to the new Kernel.
Refactor ima_dump_measurement_list() to move the memory allocation part
to a separate function ima_alloc_kexec_file_buf() to allocate buffer of
size 'kexec_segment_size' at kexec 'load'. Make the local variables in
function ima_dump_measurement_list() global, so that they can be accessed
from
If the new measurements are added to the IMA log while it is being
being copied to the kexec buffer during kexec 'execute', it can miss
copying those new measurements to the kexec buffer, and the buffer can go
out of sync with TPM PCRs. This could result in breaking the integrity
of the
Implement kimage_map_segment() to enable mapping of IMA buffer source
pages to the kimage structure post kexec 'load'. This function, accepting
a kimage pointer, an address, and a size, will gather the source pages
within the specified address range, create an array of page pointers, and
map these
IMA currently allocates half a PAGE_SIZE for the extra events that would
be measured between kexec 'load' and 'execute'. Depending on the IMA
policy and the system state, that memory may not be sufficient to hold
the extra IMA events measured after kexec 'load'. The memory
requirements vary from
Implement function kimage_file_post_load() to call ima_kexec_post_load()
This ensures the IMA buffer allocated at kexec 'load' is mapped to a
segment in the next loaded Kernel image.
Modify the kexec_file_load() syscall to call kimage_file_post_load() after
the image has been loaded and prepared
On 12/15/23 at 11:29am, Sourabh Jain wrote:
..
> > > +static void update_crash_elfcorehdr(struct kimage *image, struct
> > > memory_notify *mn)
> > > +{
> > > + int ret;
> > > + struct crash_mem *cmem = NULL;
> > > + struct kexec_segment *ksegment;
> > > + void *ptr, *mem, *elfbuf = NULL;
> >
There could be a potential mismatch between IMA measurements and TPM PCR
quotes caused by the indeterminate interval between kexec 'load' and
'execute'. Memory allocated at kexec 'load' for IMA log buffer may run
out. It can lead to missing events in the IMA log after a soft reboot to
the new
ima_dump_measurement_list() is called from ima_add_kexec_buffer() during
kexec 'load', which may result in loss of IMA measurements between kexec
'load' and 'execute'. It needs to be called during kexec 'execute'.
Implement ima_update_kexec_buffer(), to be called during kexec 'execute'.
Move
On Fri, 15 Dec 2023 23:15:10 +0800, Baoquan He wrote:
> On 12/15/23 at 12:38am, Yuntao Wang wrote:
> > The purpose of crash_exclude_mem_range() is to remove all memory ranges
> > that overlap with [mstart-mend]. However, the current logic only removes
> > the first overlapping memory range.
> >
>
On 12/16/23 at 09:54am, Yuntao Wang wrote:
> On Fri, 15 Dec 2023 23:15:10 +0800, Baoquan He wrote:
> > On 12/15/23 at 12:38am, Yuntao Wang wrote:
> > > The purpose of crash_exclude_mem_range() is to remove all memory ranges
> > > that overlap with [mstart-mend]. However, the current logic only
The end parameter received by kimage_is_destination_range() should be the
last valid byte address of the target memory segment plus 1. However, in
the locate_mem_hole_bottom_up() and locate_mem_hole_top_down() functions,
the corresponding value passed to kimage_is_destination_range() is the last
The end parameter received by kimage_is_destination_range() should be the
last valid byte address of the target memory segment plus 1. However, in
the locate_mem_hole_bottom_up() and locate_mem_hole_top_down() functions,
the corresponding value passed to kimage_is_destination_range() is the last
When an error is detected, use pr_err() instead of pr_debug() to output
log message.
In addition, remove the unnecessary return from set_page_address().
Signed-off-by: Yuntao Wang
---
arch/x86/kernel/kexec-bzimage64.c | 2 +-
mm/highmem.c | 2 --
2 files changed, 1
This series includes some bug fixes and cleanups for kexec.
Yuntao Wang (3):
kexec_file: fix incorrect end value passed to
kimage_is_destination_range()
kexec_file: fix incorrect temp_start value in
locate_mem_hole_top_down()
x86/kexec: use pr_err() instead of pr_debug() when an
temp_end represents the address of the last available byte. Therefore, the
starting address of the memory segment with temp_end as its last available
byte and a size of `kbuf->memsz`, that is, the value of temp_start, should
be `temp_end - kbuf->memsz + 1` instead of `temp_end - kbuf->memsz`.
remove second include of linux/kexec.h
Signed-off-by: Wang Jinchao
---
kernel/crash_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index efe87d501c8c..d72985222b16 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -13,7 +13,6 @@
On 12/15/23 at 04:54pm, Wang Jinchao wrote:
> remove second include of linux/kexec.h
Good catch.
Acked-by: Baoquan He
>
> Signed-off-by: Wang Jinchao
> ---
> kernel/crash_core.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> index
25 matches
Mail list logo