[PATCH v2 1/5] x86: Consolidate elf_x86_probe routines

2021-09-13 Thread Zhaofeng Li
Signed-off-by: Zhaofeng Li --- kexec/arch/i386/kexec-elf-x86.c | 44 +++- kexec/arch/i386/kexec-x86.h | 1 + kexec/arch/x86_64/kexec-elf-x86_64.c | 28 ++ 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/kexec/arch/i386/kexec-

[PATCH v2 5/5] multiboot2: Accept x86-64 images

2021-09-13 Thread Zhaofeng Li
Signed-off-by: Zhaofeng Li --- kexec/arch/i386/kexec-mb2-x86.c | 6 -- kexec/arch/x86_64/kexec-x86_64.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c index f3e6b38..36fef20 100644 --- a/kexec/arch/i3

[PATCH v2 3/5] multiboot2: Use rel_min and rel_max for buffer destinations

2021-09-13 Thread Zhaofeng Li
This would segfault if mhi.rel_tag didn't exist. Signed-off-by: Zhaofeng Li --- kexec/arch/i386/kexec-mb2-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c index 6bbe35e..f3c6438 100644 --- a/kexec/arch

[PATCH v2 0/5] kexec-tools: multiboot2: Accept x86-64 images

2021-09-13 Thread Zhaofeng Li
Hi Simon, Thanks for your review! In this patchset I have addressed your comments and included an extra fix. Zhaofeng -- This patch series adds support for loading x86-64 ELF images with the multiboot2 header and fixes a couple of related issues. Changes since v1: - Coding style fixes - Fixed

[PATCH v2 2/5] multiboot2: Correct MBI size calculation

2021-09-13 Thread Zhaofeng Li
tag_load_base_addr is dependent on rel_tag, and tag_framebuffer was not accounted for. Signed-off-by: Zhaofeng Li --- kexec/arch/i386/kexec-mb2-x86.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2

[PATCH v2 4/5] multiboot2: Avoid first 0x500 bytes

2021-09-13 Thread Zhaofeng Li
In some cases, add_buffer will actually try to allocate the buffer at 0x0, which may not be acceptable by some kernels. Let's avoid the first 0x500 bytes so we don't screw up the IVT and BDA. Signed-off-by: Zhaofeng Li --- kexec/arch/i386/kexec-mb2-x86.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v4] lockdown,selinux: fix wrong subject in some SELinux lockdown checks

2021-09-13 Thread Paul Moore
On Mon, Sep 13, 2021 at 10:02 AM Ondrej Mosnacek wrote: > > Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > lockdown") added an implementation of the locked_down LSM hook to > SELinux, with the aim to restrict which domains are allowed to perform > operations that would breach

Re: [PATCH v2 00/12] x86/sev: KEXEC/KDUMP support for SEV-ES guests

2021-09-13 Thread Dave Hansen
On 9/13/21 9:14 AM, Joerg Roedel wrote: > On Mon, Sep 13, 2021 at 09:02:38AM -0700, Dave Hansen wrote: >> On 9/13/21 8:55 AM, Joerg Roedel wrote: >>> This does not work under SEV-ES, because the hypervisor has no access >>> to the vCPU registers and can't make modifications to them. So an >>> SEV-E

Re: [PATCH v2 00/12] x86/sev: KEXEC/KDUMP support for SEV-ES guests

2021-09-13 Thread Joerg Roedel
On Mon, Sep 13, 2021 at 09:02:38AM -0700, Dave Hansen wrote: > On 9/13/21 8:55 AM, Joerg Roedel wrote: > > This does not work under SEV-ES, because the hypervisor has no access > > to the vCPU registers and can't make modifications to them. So an > > SEV-ES guest needs to reset the vCPU itself and

Re: [PATCH v2 00/12] x86/sev: KEXEC/KDUMP support for SEV-ES guests

2021-09-13 Thread Dave Hansen
On 9/13/21 8:55 AM, Joerg Roedel wrote: > This does not work under SEV-ES, because the hypervisor has no access > to the vCPU registers and can't make modifications to them. So an > SEV-ES guest needs to reset the vCPU itself and park it using the > AP-reset-hold protocol. Upon wakeup the guest nee

[PATCH v4] lockdown, selinux: fix wrong subject in some SELinux lockdown checks

2021-09-13 Thread Ondrej Mosnacek
Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of the locked_down LSM hook to SELinux, with the aim to restrict which domains are allowed to perform operations that would breach lockdown. However, in several places the security_locked_down() h

Re: [PATCH 3/3] multiboot2: Accept x86-64 images

2021-09-13 Thread Simon Horman
On Fri, Sep 10, 2021 at 07:49:00PM -0700, Zhaofeng Li wrote: > Signed-off-by: Zhaofeng Li > --- > kexec/arch/i386/kexec-mb2-x86.c | 34 ++-- > kexec/arch/x86_64/kexec-x86_64.c | 4 ++-- > 2 files changed, 34 insertions(+), 4 deletions(-) > > diff --git a/kexec/arch/

Re: [PATCH 1/3] multiboot2: Correct MBI size calculation

2021-09-13 Thread Simon Horman
On Fri, Sep 10, 2021 at 07:48:58PM -0700, Zhaofeng Li wrote: > tag_load_base_addr is dependent on rel_tag, and tag_framebuffer was > not accounted for. > > Signed-off-by: Zhaofeng Li > --- > kexec/arch/i386/kexec-mb2-x86.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-)

Re: [PATCH 2/3] multiboot2: Use rel_min and rel_max for mbi destination

2021-09-13 Thread Simon Horman
On Fri, Sep 10, 2021 at 07:48:59PM -0700, Zhaofeng Li wrote: > This would segfault if mhi.rel_tag didn't exist. > > Signed-off-by: Zhaofeng Li Does the same problem exist a little further up, around line 574, also in multiboot2_x86_load() ? /* Pick the next aligned spot

Re: [PATCH] Refer FDT tokens with symbolic names

2021-09-13 Thread Simon Horman
On Sat, Sep 11, 2021 at 10:02:00PM +0530, Sourabh Jain wrote: > Replace hardcoded FDT structure block tokens with proper names to > improve code readability. > > Signed-off-by: Sourabh Jain Thanks, applied. ___ kexec mailing list kexec@lists.infradead