Hi,
On Fri, 25 Sep 2020 10:56:25 -0400
Konrad Rzeszutek Wilk wrote:
> On Fri, Sep 25, 2020 at 11:05:58AM +0800, Dave Young wrote:
> > Hi,
> >
> > On 09/24/20 at 01:16pm, boris.ostrov...@oracle.com wrote:
> > >
> > > On 9/24/20 12:43 PM, Michael Kelley wrote:
> > > > From: Eric W. Biederman
Hi Konrad,
On Mon, 21 Sep 2020 16:18:12 -0400
Konrad Rzeszutek Wilk wrote:
> On Fri, Sep 18, 2020 at 05:47:43PM -0700, Andrew Morton wrote:
> > On Fri, 18 Sep 2020 11:25:46 +0800 Dave Young wrote:
> >
> > > crash_kexec_post_notifiers enables running various panic notifier
> > > before kdump
gt; Result with this patch:
> > root@vm0:~# cat /sys/kernel/debug/zcore/memmap
> > 3000 3000 1000
> >
> > The difference is due to memblocks getting merged, resources (currently)
> > not. So we might have some more ent
Hi Lianbo,
stupid me obviously never tested the kdump+initrd combination...
The patch below fixed the problem for me. Could please give it a try, too.
Thanks
Philipp
---
>From 3f77088c9139582261d2e3ee6476324fc1ded401 Mon Sep 17 00:00:00 2001
From: Philipp Rudo
Date: Tue, 12 May 2020 19:25
Hi Hans,
also adding Ingo on Cc.
I tested you patch on s390 and it does what it's supposed to do. The build now
fails with
LD arch/s390/purgatory/purgatory.chk
arch/s390/purgatory/purgatory: In function `sha256_update':
(.text+0x3bc2): undefined reference to `memzero_explicit'
/home/prud
Hi Bjorn,
in recent patches AKASHI [1] and I [2] made some changes to the declarations
you are touching and already removed some of the weak statements. The patches
got accepted on linux-next and will (hopefully) be pulled for v4.17. So you
should prepare for some merge conflicts. Nevertheless thr
Hi Andrew,
Hi Dave,
i checked out linux-next with the patches and it looks good to me. Also made a
quick test and everything works fine.
Thanks very much to both of you
Philipp
On Wed, 21 Mar 2018 16:00:42 -0700
Andrew Morton wrote:
> On Wed, 21 Mar 2018 12:27:40 +0100 Philipp Rudo
>
d stack validation turned off. objtool
SEGFAULTs on s390...
Philipp Rudo (11):
kexec_file: Silence compile warnings
kexec_file: Remove checks in kexec_purgatory_load
kexec_file: Make purgatory_info->ehdr const
kexec_file: Search symbols in read-only kexec_purgator
atory.
On the other hand the purgatory, although an ELF file on its own, is part
of the kernel. Thus not trusting the purgatory means not trusting the
kernel build itself.
So remove all validity checks on the purgatory and just trust the kernel
build.
Signed-off-by: Philipp Rudo
---
k
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git a/kernel/kexec_file.c b/ker
);
^
This is because the typedefs for kexec_file_load uses struct kimage before
it is declared. Fix this by simply forward declaring struct kimage.
Signed-off-by: Philipp Rudo
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/kexec.h b/include
change the signatures of arch_kexec_apply_relocations* to
take section pointers instead of just the index of the relocation section.
This removes the second lookup and sanity check of the sections in arch
code.
Signed-off-by: Philipp Rudo
---
arch/x86/kernel/machine_kexec
the extra if-block.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index d1c3ec8dc6b1..49
common code and changing
the include to linux/string.h both functions are no longer defined. Thus
definitions have to be provided in x86/purgatory/string.c
Signed-off-by: Philipp Rudo
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2
The main loop currently uses quite a lot of variables to update the section
headers. Some of them are unnecessary. So clean them up a little.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 34 --
1 file changed, 12 insertions(+), 22 deletions(-)
diff
The stripped purgatory does not contain a symtab. So when looking for
symbols this is done in read-only kexec_purgatory. Highlight this by
marking the corresponding variables as 'const'.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 38 ++--
The kexec_purgatory buffer is read-only. Thus all pointers into
kexec_purgatory are read-only, too. Point this out by explicitly marking
purgatory_info->ehdr as 'const' and update the comments in purgatory_info.
Signed-off-by: Philipp Rudo
---
include/linux
ion of the ELF standard but also makes the code very hard to
understand as you cannot tell if the memory you are using is read-only or
not.
Remove this mis-use and store the offset of the section in
pugaroty_info->purgatory_buf in sh_offset.
Signed-off-by: Philipp Rudo
---
arch/x
his change is that we can get rid of the
purgatory_info->purgatory_load_address field. As now the information stored
there can directly be accessed from kbuf->mem.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/powerpc/kernel/kexec_elf_64.c | 9 +
arch/x86/ker
Hi Dave,
sorry for the late answer.
On Fri, 16 Mar 2018 14:41:02 +0800
Dave Young wrote:
> On 03/15/18 at 11:13am, Philipp Rudo wrote:
> > Hi Dave,
> >
> > On Thu, 15 Mar 2018 15:34:22 +0800
> > Dave Young wrote:
> >
> > > On 03/12/18 at 03:40
Hi Dave,
On Thu, 15 Mar 2018 15:34:22 +0800
Dave Young wrote:
> On 03/12/18 at 03:40pm, Dave Young wrote:
> > Hi Philipp,
> > On 03/09/18 at 03:25pm, Philipp Rudo wrote:
> > > Hi Dave,
> > >
> > > On Fri, 9 Mar 2018 13:19:40 +0800
> >
Hi Ingo,
do you have an idea about this? This problem is currently holding me back to
send a v2 of the patch set.
Thanks
Philipp
On Mon, 12 Mar 2018 15:40:16 +0800
Dave Young wrote:
> Hi Philipp,
> On 03/09/18 at 03:25pm, Philipp Rudo wrote:
> > Hi Dave,
> >
> > On
On Mon, 12 Mar 2018 15:42:18 +0800
Dave Young wrote:
> Hi Philipp,
> On 03/09/18 at 11:02am, Philipp Rudo wrote:
> > Hi Dave,
> >
> >
> > On Fri, 9 Mar 2018 11:14:20 +0800
> > Dave Young wrote:
> >
> > > On 02/26/18 at 04:16pm, Phil
Hi Dave,
On Fri, 9 Mar 2018 13:19:40 +0800
Dave Young wrote:
> Hi Philipp,
> On 02/26/18 at 04:16pm, Philipp Rudo wrote:
> >
> > Hi everybody
> >
> > following the discussion with Dave and AKASHI, here are the common code
> > patches extracted from my r
Hi Dave,
On Fri, 9 Mar 2018 13:33:48 +0800
Dave Young wrote:
> On 03/09/18 at 01:19pm, Dave Young wrote:
> > Hi Philipp,
> > On 02/26/18 at 04:16pm, Philipp Rudo wrote:
> > >
> > > Hi everybody
> > >
> > > following the discussion with Dave
Hi Dave,
On Fri, 9 Mar 2018 12:43:53 +0800
Dave Young wrote:
> On 02/26/18 at 04:16pm, Philipp Rudo wrote:
> > The code to verify the new kernels sha digest are applicable for all
> > architectures. Move it to common code.
> >
> > Signed-off-by: Philipp Rudo
>
Hi Dave,
On Fri, 9 Mar 2018 11:14:20 +0800
Dave Young wrote:
> On 02/26/18 at 04:16pm, Philipp Rudo wrote:
> > The current code uses the sh_offset field in purgatory_info->sechdrs to
> > store a pointer to the current load address of the section. Depending
> > whe
Hi Dave,
On Fri, 9 Mar 2018 11:18:05 +0800
Dave Young wrote:
> Hi,
>
> On 02/26/18 at 04:16pm, Philipp Rudo wrote:
> > The main loop currently uses quite a lot of variables to update the section
> > headers. Some of them are unnecessary. So clean them up a little.
> &
On Tue, 27 Feb 2018 11:03:07 +0900
AKASHI Takahiro wrote:
> On Mon, Feb 26, 2018 at 12:17:18PM +0100, Philipp Rudo wrote:
> > Hi AKASHI
> >
> > On Thu, 22 Feb 2018 20:17:22 +0900
> > AKASHI Takahiro wrote:
> >
> > [...]
> >
> > >
);
^
This is because the typedefs for kexec_file_load uses struct kimage before
it is declared. Fix this by simply forward declaring struct kimage.
Signed-off-by: Philipp Rudo
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/kexec.h b/include
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
{arch/x86/purgatory => include/li
The stripped purgatory does not contain a symtab. So when looking for
symbols this is done in read-only kexec_purgatory. Highlight this by
marking the corresponding variables as 'const'.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 38 ++--
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git a/kernel/kexec_file.c b/ker
ion of the ELF standard but also makes the code very hard to
understand as you cannot tell if the memory you are using is read-only or
not.
Remove this mis-use and store the offset of the section in
pugaroty_info->purgatory_buf in sh_offset.
Signed-off-by: Philipp Rudo
---
arch/x
On x86 with the orc unwinder and stack validation turned off. objtool
SEGFAULTs on s390...
Philipp Rudo (11):
kexec_file: Silence compile warnings
kexec_file: Remove checks in kexec_purgatory_load
kexec_file: Make purgatory_info->ehdr const
kexec_file: Search symbols in read-only kexec_purg
his change is that we can get rid of the
purgatory_info->purgatory_load_address field. As now the information stored
there can directly be accessed from kbuf->mem.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/powerpc/kernel/kexec_elf_64.c | 9 +
arch/x86/ker
change the signatures of arch_kexec_apply_relocations* to
take section pointers instead of just the index of the relocation section.
This removes the second lookup and sanity check of the sections in arch
code.
Signed-off-by: Philipp Rudo
---
arch/x86/kernel/machine_kexec
The main loop currently uses quite a lot of variables to update the section
headers. Some of them are unnecessary. So clean them up a little.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 34 --
1 file changed, 12 insertions(+), 22 deletions(-)
diff
the extra if-block.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index d1c3ec8dc6b1..bb
The kexec_purgatory buffer is read-only. Thus all pointers into
kexec_purgatory are read-only, too. Point this out by explicitly marking
purgatory_info->ehdr as 'const' and update the comments in purgatory_info.
Signed-off-by: Philipp Rudo
---
include/linux
atory.
On the other hand the purgatory, although an ELF file on its own, is part
of the kernel. Thus not trusting the purgatory means not trusting the
kernel build itself.
So remove all validity checks on the purgatory and just trust the kernel
build.
Signed-off-by: Philipp Rudo
---
k
On Mon, 26 Feb 2018 19:01:39 +0900
AKASHI Takahiro wrote:
> On Fri, Feb 23, 2018 at 05:24:59PM +0800, Dave Young wrote:
> > Hi AKASHI,
> >
> > On 02/22/18 at 08:17pm, AKASHI Takahiro wrote:
> > > As arch_kexec_kernel_*_{probe,load}(),
> > > arch_kimage_file_post_load_cleanup()
> > > and arch_
Hi AKASHI
On Thu, 22 Feb 2018 20:17:22 +0900
AKASHI Takahiro wrote:
[...]
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 990adae52151..a6d14a768b3e 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -26,34 +26,83 @@
> #include
> #include "kexec_internal.h"
Hi Dave
Hi AKASHI
On Mon, 26 Feb 2018 10:21:02 +0900
AKASHI Takahiro wrote:
> >
> > Arch code need arch maintainer to review, maybe either of you can send
> > the common part first before the arch code, eg. AKASHI can split the common
> > cleanup patches and post them as a separate series, aft
Hi Dave
On Fri, 23 Feb 2018 16:34:05 +0800
Dave Young wrote:
> On 02/14/18 at 10:54am, Philipp Rudo wrote:
> > Hi Dave,
> >
> > I just browsed AKASHI's patches (v7). The way I see it the common code
> > changes
> > are on different areas of kexec_file
ill need read the
> details.
>
> On 02/12/18 at 11:07am, Philipp Rudo wrote:
> > Hi everybody
> >
> > resending the series as there was no reaction, yet. Furthermore i was told
> > that Andrew and the x86 list should also be CCed, so welcome.
> >
> > N
On Mon, 12 Feb 2018 11:56:25 +0100
Philippe Ombredanne wrote:
> On Mon, Feb 12, 2018 at 11:07 AM, Philipp Rudo
> wrote:
> > This patch adds the kexec_file_load system call to s390 as well as the arch
> > specific functions common code requires to work. Loaders for the differ
Cross-compiling with defconfig(*) works fine for both.
Thanks
Philipp
(*) On x86 with the orc unwinder turned off. objtool SEGFAULTs on s390...
Philipp Rudo (17):
kexec_file: Silence compile warnings
kexec_file: Remove checks in kexec_purgatory_load
kexec_file: Make purgatory_info->ehdr
The stripped purgatory does not contain a symtab. So when looking for
symbols this is done in read-only kexec_purgatory. Highlight this by
marking the corresponding variables as 'const'.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 38 ++--
change the signatures of arch_kexec_apply_relocations* to
take section pointers instead of just the index of the relocation section.
This removes the second lookup and sanity check of the sections in arch
code.
Signed-off-by: Philipp Rudo
---
arch/x86/kernel/machine_kexec
);
^
This is because the typedefs for kexec_file_load uses struct kimage before
it is declared. Fix this by simply forward declaring struct kimage.
Signed-off-by: Philipp Rudo
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/kexec.h b/include
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git a/kernel/kexec_file.c b/ker
The main loop currently uses quite a lot of variables to update the section
headers. Some of them are unnecessary. So clean them up a little.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 34 --
1 file changed, 12 insertions(+), 22 deletions(-)
diff
The kexec_purgatory buffer is read-only. Thus all pointers into
kexec_purgatory are read-only, too. Point this out by explicitly marking
purgatory_info->ehdr as 'const' and update the comments in purgatory_info.
Signed-off-by: Philipp Rudo
---
include/linux
the extra if-block.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index d1c3ec8dc6b1..bb
kexec_file_load needs to prepare the new kernels before they are loaded.
For that it has to know the offsets in head.S, e.g. to register the new
command line. Unfortunately there are no macros right now defining those
offsets. Define them now.
Signed-off-by: Philipp Rudo
---
arch/s390/include
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
{arch/x86/purgatory => include/li
his change is that we can get rid of the
purgatory_info->purgatory_load_address field. As now the information stored
there can directly be accessed from kbuf->mem.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/powerpc/kernel/kexec_elf_64.c | 9 +
arch/x86/ker
Add an image loader for kexec_file_load. For simplicity first skip crash
support. The functions defined in machine_kexec_file will later be shared
with the ELF loader.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/s390/include/asm/kexec.h | 22 ++
arch
The common code expects the architecture to have a purgatory that runs
between the two kernels. Add it now. For simplicity first skip crash
support.
Signed-off-by: Philipp Rudo
---
arch/s390/Kbuild | 1 +
arch/s390/include/asm/purgatory.h | 17 +++
arch/s390/kernel/asm
Add support to load a crash kernel to the image loader. This requires
extending the purgatory.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/s390/kernel/kexec_image.c| 6 +-
arch/s390/kernel/machine_kexec_file.c | 45 -
arch/s390/purgatory/head.S
ion of the ELF standard but also makes the code very hard to
understand as you cannot tell if the memory you are using is read-only or
not.
Remove this mis-use and store the offset of the section in
pugaroty_info->purgatory_buf in sh_offset.
Signed-off-by: Philipp Rudo
---
arch/x
Add an ELF loader for kexec_file. The main task here is to do proper sanity
checks on the ELF file. Basically all other functionality was already
implemented for the image loader.
Signed-off-by: Philipp Rudo
---
arch/s390/include/asm/kexec.h | 1 +
arch/s390/kernel/Makefile
atory.
On the other hand the purgatory, although an ELF file on its own, is part
of the kernel. Thus not trusting the purgatory means not trusting the
kernel build itself.
So remove all validity checks on the purgatory and just trust the kernel
build.
Signed-off-by: Philipp Rudo
---
k
This patch adds the kexec_file_load system call to s390 as well as the arch
specific functions common code requires to work. Loaders for the different
file types will be added later.
Signed-off-by: Philipp Rudo
---
arch/s390/Kconfig | 4 +
arch/s390/kernel/Makefile
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
{arch/x86/purgatory => include/li
his change is that we can get rid of the
purgatory_info->purgatory_load_address field. As now the information stored
there can directly be accessed from kbuf->mem.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/powerpc/kernel/kexec_elf_64.c | 9 +
arch/x86/ker
The common code expects the architecture to have a purgatory that runs
between the two kernels. Add it now. For simplicity first skip crash
support.
Signed-off-by: Philipp Rudo
---
arch/s390/Kbuild | 1 +
arch/s390/include/asm/purgatory.h | 17 +++
arch/s390/kernel/asm
Add an image loader for kexec_file_load. For simplicity first skip crash
support. The functions defined in machine_kexec_file will later be shared
with the ELF loader.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/s390/include/asm/kexec.h | 22 ++
arch
This patch adds the kexec_file_load system call to s390 as well as the arch
specific functions common code requires to work. Loaders for the different
file types will be added later.
Signed-off-by: Philipp Rudo
---
arch/s390/Kconfig | 4 +
arch/s390/kernel/Makefile
kexec_file_load needs to prepare the new kernels before they are loaded.
For that it has to know the offsets in head.S, e.g. to register the new
command line. Unfortunately there are no macros right now defining those
offsets. Define them now.
Signed-off-by: Philipp Rudo
---
arch/s390/include
Add support to load a crash kernel to the image loader. This requires
extending the purgatory.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
arch/s390/kernel/kexec_image.c| 6 +-
arch/s390/kernel/machine_kexec_file.c | 45 -
arch/s390/purgatory/head.S
Add an ELF loader for kexec_file. The main task here is to do proper sanity
checks on the ELF file. Basically all other functionality was already
implemented for the image loader.
Signed-off-by: Philipp Rudo
---
arch/s390/include/asm/kexec.h | 1 +
arch/s390/kernel/Makefile
The main loop currently uses quite a lot of variables to update the section
headers. Some of them are unnecessary. So clean them up a little.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 34 --
1 file changed, 12 insertions(+), 22 deletions(-)
diff
ion of the ELF standard but also makes the code very hard to
understand as you cannot tell if the memory you are using is read-only or
not.
Remove this mis-use and store the offset of the section in
pugaroty_info->purgatory_buf in sh_offset.
Signed-off-by: Philipp Rudo
---
arch/x
);
^
This is because the typedefs for kexec_file_load uses struct kimage before
it is declared. Fix this by simply forward declaring struct kimage.
Signed-off-by: Philipp Rudo
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/kexec.h b/include
atory.
On the other hand the purgatory, although an ELF file on its own, is part
of the kernel. Thus not trusting the purgatory means not trusting the
kernel build itself.
So remove all validity checks on the purgatory and just trust the kernel
build.
Signed-off-by: Philipp Rudo
---
k
change the signatures of arch_kexec_apply_relocations* to
take section pointers instead of just the index of the relocation section.
This removes the second lookup and sanity check of the sections in arch
code.
Signed-off-by: Philipp Rudo
---
arch/x86/kernel/machine_kexec
The stripped purgatory does not contain a symtab. So when looking for
symbols this is done in read-only kexec_purgatory. Highlight this by
marking the corresponding variables as 'const'.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 38 ++--
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git a/kernel/kexec_file.c b/ker
the extra if-block.
Signed-off-by: Philipp Rudo
Reviewed-by: Martin Schwidefsky
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index d1c3ec8dc6b1..bb
The kexec_purgatory buffer is read-only. Thus all pointers into
kexec_purgatory are read-only, too. Point this out by explicitly marking
purgatory_info->ehdr as 'const' and update the comments in purgatory_info.
Signed-off-by: Philipp Rudo
---
include/linux
t have a way to test
it. Cross-compiling with defconfig(*) works fine for both.
Thanks
Philipp
(*) On x86 with the orc unwinder turned off. objtool SEGFAULTs on s390...
Philipp Rudo (17):
kexec_file: Silence compile warnings
kexec_file: Remove checks in kexec_purgatory_load
kexec_file: Make
83 matches
Mail list logo