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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.
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 <pr...@linux.vnet.ibm.com>
---
arch/x86/kernel/machine_kexec_64.
.
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 <
if-block.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_fil
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git
lation 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 <pr...@linux.vnet.ibm.co
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 34 --
1 file changed, 12 inse
);
^
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 <pr...@linux.vnet.ibm.com>
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/i
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
{ar
hat 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 <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
arch/powerpc/ke
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 <pr...@linux.vnet.ibm.com>
---
arch/s390/Kbuild | 1 +
arch/s390/include/asm/purgatory.
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 purg
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 <pr...@linux.vnet.ibm.com>
---
include/linu
Add support to load a crash kernel to the image loader. This requires
extending the purgatory.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
arch/s390/kernel/kexec_image.c| 6 +-
arch/s390/kernel/machine_
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 <pr...@linux.vnet.ibm.com>
---
arch/s390/include/asm/kexec.h | 1 +
arc
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 <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
--
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 <pr...@linux.vnet.ibm.com>
---
arch/s390/Kconfig | 4 +
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 <pr...@linux.vnet.ibm.
On Mon, 12 Feb 2018 11:56:25 +0100
Philippe Ombredanne <pombreda...@nexb.com> wrote:
> On Mon, Feb 12, 2018 at 11:07 AM, Philipp Rudo <pr...@linux.vnet.ibm.com>
> wrote:
> > This patch adds the kexec_file_load system call to s390 as well as the arch
> > specific
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 <pr...@linux.vnet.ibm.com>
---
arch/s390/Kbuild | 1 +
arch/s390/include/asm/purgatory.
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 <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
--
Add support to load a crash kernel to the image loader. This requires
extending the purgatory.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
arch/s390/kernel/kexec_image.c| 6 +-
arch/s390/kernel/machine_
hat 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 <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
arch/powerpc/ke
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
{ar
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 <pr...@linux.vnet.ibm.
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 <pr...@linux.vnet.ibm.com>
---
include/linu
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git
);
^
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 <pr...@linux.vnet.ibm.com>
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/i
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 <pr...@linux.vnet.ibm.com>
---
arch/x86/kernel/machine_kexec_64.
-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 const
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.
if-block.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_fil
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 34 --
1 file changed, 12 inse
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 <pr...@linux.vnet.ibm.com>
---
arch/s390/include/asm/kexec.h | 1 +
arc
lation 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 <pr...@linux.vnet.ibm.co
.
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 <
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 <pr...@linux.vnet.ibm.com>
---
arch/s390/Kconfig | 4 +
s nice, but still 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.
> >
Hi Dave
On Fri, 23 Feb 2018 16:34:05 +0800
Dave Young <dyo...@redhat.com> 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 differen
On Mon, 12 Mar 2018 15:42:18 +0800
Dave Young <dyo...@redhat.com> 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 <dyo...@redhat.com> wrote:
> &g
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 <dyo...@redhat.com> wrote:
> Hi Philipp,
> On 03/09/18 at 03:25pm, Philipp Rudo wrote:
> > Hi Dave,
Hi Dave,
On Thu, 15 Mar 2018 15:34:22 +0800
Dave Young <dyo...@redhat.com> 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
Hi Dave,
On Fri, 9 Mar 2018 13:33:48 +0800
Dave Young <dyo...@redhat.com> 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
Hi Dave,
On Fri, 9 Mar 2018 11:18:05 +0800
Dave Young <dyo...@redhat.com> 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
Hi Dave,
On Fri, 9 Mar 2018 11:14:20 +0800
Dave Young <dyo...@redhat.com> 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 sectio
Hi Dave,
On Fri, 9 Mar 2018 12:43:53 +0800
Dave Young <dyo...@redhat.com> 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.
> >
> >
Hi Dave,
On Fri, 9 Mar 2018 13:19:40 +0800
Dave Young <dyo...@redhat.com> 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
> > patch
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
Hi Dave,
sorry for the late answer.
On Fri, 16 Mar 2018 14:41:02 +0800
Dave Young <dyo...@redhat.com> wrote:
> On 03/15/18 at 11:13am, Philipp Rudo wrote:
> > Hi Dave,
> >
> > On Thu, 15 Mar 2018 15:34:22 +0800
> > Dave Young <dyo...@redhat.com> wro
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 <pr...@linux.vnet.ibm.com>
---
arch/x86/kernel/machine_kexec_64.
to 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 <pr...@linux.vnet.ibm.com>
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purga
if-block.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_fil
);
^
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 <pr...@linux.vnet.ibm.com>
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/i
.
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 <
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_purgatory
kexec_file: Use re
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git
lation 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 <pr...@linux.vnet.ibm.co
hat 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 <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
arch/powerpc/ke
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 34 --
1 file changed, 12 inse
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.
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 <pr...@linux.vnet.ibm.com>
---
include/linu
12:27:40 +0100 Philipp Rudo <pr...@linux.vnet.ibm.com>
> wrote:
>
> > here is the updated patch set including Dave's comments.
>
> There were some syntactic clashes with the "kexec_file, x86, powerpc:
> refactoring for other architecutres" series. Please che
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
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
>
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}(),
> > >
.
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 <
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 <pr...@linux.vnet.ibm.com>
---
include/linu
if-block.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
kernel/kexec_file.c | 76 +
1 file changed, 30 insertions(+), 46 deletions(-)
diff --git a/kernel/kexec_fil
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 34 --
1 file changed, 12 inse
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 <pr...@linux.vnet.ibm.com>
---
arch/x86/kernel/machine_kexec_64.
hat 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 <pr...@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com>
---
arch/powerpc/ke
th 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_purgatory
ke
lation 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 <pr...@linux.vnet.ibm.co
On Tue, 27 Feb 2018 11:03:07 +0900
AKASHI Takahiro <takahiro.aka...@linaro.org> 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 <takahiro.aka...@linaro.org>
ory into two functions, one for each task, and call
them directly from kexec_load_purgatory.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.c | 200 +++-
1 file changed, 103 insertions(+), 97 deletions(-)
diff --git
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 <pr...@linux.vnet.ibm.com>
---
kernel/kexec_file.
The code to verify the new kernels sha digest are applicable for all
architectures. Move it to common code.
Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com>
---
arch/x86/purgatory/Makefile| 3 +++
arch/x86/purgatory/purgatory.c | 2 +-
{ar
);
^
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 <pr...@linux.vnet.ibm.com>
---
include/linux/kexec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/i
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
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
> >
ed 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.
> >
> > No changes made
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,
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
>
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
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 ++
1 file
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/kexec.h |
lation 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
hat 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/kernel/kexec-bzima
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
to 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
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..4938f7aacd09
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_64.c | 56
);
^
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
.
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
---
kernel
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_purgatory
kexec_file: Use re
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.
> &
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
>
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 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
1 - 100 of 161 matches
Mail list logo