Re: [PATCH 5.15 0/6] arm64: kexec_file: use more system keyrings to verify kernel image signature + dependencies

2022-09-26 Thread AKASHI Takahiro
On Mon, Sep 26, 2022 at 09:40:25AM +0200, Michal Such??nek wrote: > On Mon, Sep 26, 2022 at 08:47:32AM +0200, Greg Kroah-Hartman wrote: > > On Sat, Sep 24, 2022 at 01:55:23PM +0200, Michal Suchánek wrote: > > > On Sat, Sep 24, 2022 at 12:13:34PM +0200, Greg Kroah-Hartman wrote: > > > > On Sat, Sep

Re: [PATCH v4 2/2] arm64: kexec_file: add crash dump support

2020-01-16 Thread AKASHI Takahiro
On Thu, Jan 16, 2020 at 06:08:58PM +, Will Deacon wrote: > On Tue, Jan 14, 2020 at 02:38:26PM +0900, AKASHI Takahiro wrote: > > On Mon, Jan 13, 2020 at 11:21:06AM +, Will Deacon wrote: > > > On Fri, Jan 10, 2020 at 11:19:16AM -0500, Pavel Tatashin wrote: > > > &

Re: [PATCH v4 2/2] arm64: kexec_file: add crash dump support

2020-01-13 Thread AKASHI Takahiro
ote: > > > > On Thu, Jan 09, 2020 at 09:46:55AM +0900, AKASHI Takahiro wrote: > > > > > On Wed, Jan 08, 2020 at 05:48:39PM +, Will Deacon wrote: > > > > > > On Mon, Dec 16, 2019 at 11:12:47AM +0900, AKASHI Takahiro wrote: > > > > > > >

Re: [PATCH v4 2/2] arm64: kexec_file: add crash dump support

2020-01-08 Thread AKASHI Takahiro
On Wed, Jan 08, 2020 at 05:48:39PM +, Will Deacon wrote: > On Mon, Dec 16, 2019 at 11:12:47AM +0900, AKASHI Takahiro wrote: > > Enabling crash dump (kdump) includes > > * prepare contents of ELF header of a core dump file, /proc/vmcore, > > using crash_prepare_elf64_hea

Re: [PATCH v2 2/3] arm64: kexec: allocate memory space avoiding reserved regions

2019-12-17 Thread AKASHI Takahiro
On Mon, Dec 16, 2019 at 09:16:06AM -0500, Masayoshi Mizuma wrote: > On Mon, Dec 16, 2019 at 11:22:56AM +0530, Bhupesh Sharma wrote: > > Thanks Masa, [...] > > Since this is an old thread, it would be useful for people looking at > > the same, if you can add some comments/details about why you

[PATCH v4 2/2] arm64: kexec_file: add crash dump support

2019-12-15 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Tested-and-reviewed-by: Bhupesh Sharma --- arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4

[PATCH v4 0/2] arm64: kexec_file: add kdump

2019-12-15 Thread AKASHI Takahiro
14, 2019) * rebased to v5.4-rc7 * no functional changes v1 (Sept 12, 2019) * on top of v5.3-rc8 AKASHI Takahiro (2): libfdt: include fdt_addresses.c arm64: kexec_file: add crash dump support arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4

[PATCH v4 1/2] libfdt: include fdt_addresses.c

2019-12-15 Thread AKASHI Takahiro
In the implementation of kexec_file_loaded-based kdump for arm64, fdt_appendprop_addrrange() will be needed. So include fdt_addresses.c in making libfdt. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- lib/Makefile| 2 +- lib/fdt_addresses.c | 2 ++ 2 files

Re: [PATCH v2 3/3] arm64: kexec_file: add crash dump support

2019-12-15 Thread AKASHI Takahiro
I have forgot to address Bhupesh's comment below in my v3. I'm going to repost my patch. Thank you, Bhupesh, for your review. -Takahiro Akashi On Thu, Dec 05, 2019 at 02:14:14AM +0530, Bhupesh Sharma wrote: > On 11/14/2019 10:45 AM, AKASHI Takahiro wrote: > >Enabling crash dump (kdump)

[PATCH v3 1/2] libfdt: include fdt_addresses.c

2019-12-08 Thread AKASHI Takahiro
In the implementation of kexec_file_loaded-based kdump for arm64, fdt_appendprop_addrrange() will be needed. So include fdt_addresses.c in making libfdt. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- lib/Makefile| 2 +- lib/fdt_addresses.c | 2 ++ 2 files

[PATCH v3 0/2] arm64: kexec_file: add kdump

2019-12-08 Thread AKASHI Takahiro
rebased to v5.5-rc1 * remove v2's patch#2 as the same fix has been applied * Otherwise, no functional changes (since v1) Changes in v2 (Nov 14, 2019) * rebased to v5.4-rc7 * no functional changes v1 (Sept 12, 2019) * on top of v5.3-rc8 AKASHI Takahiro (2): libfdt: include fdt_addresses.c arm64: k

[PATCH v3 2/2] arm64: kexec_file: add crash dump support

2019-12-08 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4 - arch/arm64/kernel/machin

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-18 Thread AKASHI Takahiro
Hi Prabhakar, On Tue, Nov 19, 2019 at 12:02:46PM +0530, Prabhakar Kushwaha wrote: > Hi Akashi, > > On Fri, Nov 15, 2019 at 7:29 AM AKASHI Takahiro > wrote: > > > > Bhupesh, > > > > On Fri, Nov 15, 2019 at 01:24:17AM +0530, Bhupesh Sharma wrote: > > >

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-14 Thread AKASHI Takahiro
Bhupesh, On Fri, Nov 15, 2019 at 01:24:17AM +0530, Bhupesh Sharma wrote: > Hi Akashi, > > On Wed, Nov 13, 2019 at 12:11 PM AKASHI Takahiro > wrote: > > > > Hi Bhupesh, > > > > Do you have a corresponding patch for userspace tools, > > including crash u

[PATCH v2 2/3] libfdt: include fdt_addresses.c

2019-11-13 Thread AKASHI Takahiro
In the implementation of kexec_file_loaded-based kdump for arm64, fdt_appendprop_addrrange() will be needed. So include fdt_addresses.c in making libfdt. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- lib/Makefile| 2 +- lib/fdt_addresses.c | 2 ++ 2 files

[PATCH v2 3/3] arm64: kexec_file: add crash dump support

2019-11-13 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4 - arch/arm64/kernel/machin

[PATCH v2 0/3] arm64: kexec_file: add kdump

2019-11-13 Thread AKASHI Takahiro
o v5.4-rc7 * no functional changes AKASHI Takahiro (3): libfdt: define UINT32_MAX in libfdt_env.h libfdt: include fdt_addresses.c arm64: kexec_file: add crash dump support arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4 - arch/arm64/kernel/machine_ke

[PATCH v2 1/3] libfdt: define UINT32_MAX in libfdt_env.h

2019-11-13 Thread AKASHI Takahiro
In the implementation of kexec_file_load-based kdump for arm64, fdt_appendprop_addrrange() will be used, but fdt_addresses.c will fail to compile due to missing UINT32_MAX. So just define it in libfdt_env.h. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- include/linux

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-12 Thread AKASHI Takahiro
Hi Bhupesh, Do you have a corresponding patch for userspace tools, including crash util and/or makedumpfile? Otherwise, we can't verify that a generated core file is correctly handled. Thanks, -Takahiro Akashi On Mon, Nov 11, 2019 at 01:31:19PM +0530, Bhupesh Sharma wrote: > Changes since v3: >

Re: [PATCH 0/3] arm64: kexec_file: add kdump

2019-10-06 Thread AKASHI Takahiro
to keep reviewing my patch. Thanks, -Takahiro Akashi On Thu, Sep 12, 2019 at 03:01:47PM +0900, AKASHI Takahiro wrote: > This is the last piece of my kexec_file_load implementation for arm64. > It is now ready for being merged as some relevant patch to dtc/libfdt[1] > has finally been integrate

[PATCH 3/3] arm64: kexec_file: add crash dump support

2019-09-12 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4 - arch/arm64/kernel/machin

[PATCH 2/3] libfdt: include fdt_addresses.c

2019-09-11 Thread AKASHI Takahiro
In the implementation of kexec_file_loaded-based kdump for arm64, fdt_appendprop_addrrange() will be needed. So include fdt_addresses.c in making libfdt. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- lib/Makefile| 2 +- lib/fdt_addresses.c | 2 ++ 2 files

[PATCH 1/3] libfdt: define UINT32_MAX in libfdt_env.h

2019-09-11 Thread AKASHI Takahiro
In the implementation of kexec_file_load-based kdump for arm64, fdt_appendprop_addrrange() will be used, but fdt_addresses.c will fail to compile due to missing UINT32_MAX. So just define it in libfdt_env.h. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- include/linux

[PATCH 0/3] arm64: kexec_file: add kdump

2019-09-11 Thread AKASHI Takahiro
8-November/612641.html AKASHI Takahiro (3): libfdt: define UINT32_MAX in libfdt_env.h libfdt: include fdt_addresses.c arm64: kexec_file: add crash dump support arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/kexec_image.c| 4 - arch/arm64/kernel/machine_kexec_fi

[PATCH v2 0/3] arm64: handle "reserved" entries in /proc/iomem

2019-01-11 Thread AKASHI Takahiro
de or data, and they are expected to be preserved across kexec'ing. With this patch[1], kexec/kdump will be allowed to handle them properly. [1] https://git.linaro.org/people/takahiro.akashi/kexec-tools.git arm64/resv_mem AKASHI Takahiro (3): kexec: add variant helper functions for handling memory regions ar

[PATCH v2 2/3] arm64: kexec: allocate memory space avoiding reserved regions

2019-01-11 Thread AKASHI Takahiro
ctly. Note that, for safety, unknown regions, in addition to "reserved" ones, will also be excluded. Signed-off-by: AKASHI Takahiro --- kexec/arch/arm64/kexec-arm64.c | 146 - 1 file changed, 87 insertions(+), 59 deletions(-) diff --git a/kexec/arch/arm64/kexec-

[PATCH v2 3/3] arm64: kdump: deal with a lot of resource entries in /proc/iomem

2019-01-11 Thread AKASHI Takahiro
memory ranges, using mem_regions_alloc_and_xxx() functions. Signed-off-by: AKASHI Takahiro --- kexec/arch/arm64/crashdump-arm64.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.

[PATCH v2 1/3] kexec: add variant helper functions for handling memory regions

2019-01-11 Thread AKASHI Takahiro
mem_regions_alloc_and_add() and mem_regions_alloc_and_exclude() are functionally equivalent to, respectively, mem_regions_add() and mem_regions_exclude() except the formers will re-allocate memory dynamically when no more entries are available in 'ranges' array. Signed-off-by: AKASHI Takahiro

[PATCH] arm64: add kexec_file_load support

2019-01-11 Thread AKASHI Takahiro
# My kexec_file patch for arm64 is now merged in v5.0-rc1. With this patch, kexec_file_load() system call is supported. Signed-off-by: AKASHI Takahiro --- kexec/arch/arm64/kexec-arm64.c| 10 +- kexec/arch/arm64/kexec-elf-arm64.c| 9 + kexec/arch/arm64/kexec-image

[PATCH] arm64: kexec_file: return successfully even if kaslr-seed doesn't exist

2019-01-10 Thread AKASHI Takahiro
rt") Signed-off-by: AKASHI Takahiro --- arch/arm64/kernel/machine_kexec_file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c index 10e33860e47a..f2c211a6229b 100644 --- a/arch/arm64/kernel/

Re: [PATCH v16 06/16] lib: fdt: add a helper function for handling memory range property

2018-12-11 Thread AKASHI, Takahiro
On Tue, Dec 11, 2018 at 10:09:07AM +, James Morse wrote: > Hi Akashi, > > On 11/12/2018 06:17, AKASHI, Takahiro wrote: > > On Fri, Dec 07, 2018 at 10:12:47AM +, James Morse wrote: > >> On 06/12/2018 15:54, Will Deacon wrote: > >>> On Thu, Dec 06, 2

Re: [PATCH v16 16/16] arm64: kexec_file: add kaslr support

2018-12-10 Thread AKASHI Takahiro
On Tue, Dec 11, 2018 at 02:50:02PM +0900, AKASHI Takahiro wrote: > On Fri, Nov 30, 2018 at 01:19:44PM +, Will Deacon wrote: > > On Thu, Nov 15, 2018 at 02:52:55PM +0900, AKASHI Takahiro wrote: > > > Adding "kaslr-seed" to dtb enables triggering kaslr, or

Re: [PATCH v16 06/16] lib: fdt: add a helper function for handling memory range property

2018-12-10 Thread AKASHI, Takahiro
James, On Fri, Dec 07, 2018 at 10:12:47AM +, James Morse wrote: > Hi Akashi, Will, > > On 06/12/2018 15:54, Will Deacon wrote: > > On Thu, Dec 06, 2018 at 08:47:04AM -0600, Rob Herring wrote: > >> On Wed, Nov 14, 2018 at 11:52 PM AKASHI Takahiro > >>

Re: [PATCH v16 16/16] arm64: kexec_file: add kaslr support

2018-12-10 Thread AKASHI Takahiro
On Fri, Nov 30, 2018 at 01:19:44PM +, Will Deacon wrote: > On Thu, Nov 15, 2018 at 02:52:55PM +0900, AKASHI Takahiro wrote: > > Adding "kaslr-seed" to dtb enables triggering kaslr, or kernel virtual > > address randomization, at secondary kernel boot. We always do

Re: [PATCH v16 15/16] arm64: kexec_file: add kernel signature verification support

2018-12-10 Thread AKASHI Takahiro
On Fri, Nov 30, 2018 at 01:21:14PM +, Will Deacon wrote: > On Thu, Nov 15, 2018 at 02:52:54PM +0900, AKASHI Takahiro wrote: > > With this patch, kernel verification can be done without IMA security > > subsystem enabled. Turn on CONFIG_KEXEC_VERIFY_SIG instead. > > &g

Re: [PATCH 4/4] kexec/kexec-arm64.c: Add missing error handling paths

2018-12-03 Thread AKASHI Takahiro
oad_crashdump_segments: elfcorehdr 0xbfff-0xbfff33ff >get_cells_size: #address-cells:2 #size-cells:2 >cells_size_fitted: bfff-bfff33ff >cells_size_fitted: 8ee0-bfff >setup_2nd_dtb: /chosen node not found - can't create dtb for dump kernel: > FDT_ERR_NO

[PATCH v16 15/16] arm64: kexec_file: add kernel signature verification support

2018-11-14 Thread AKASHI Takahiro
CONFIG_EFI is enabled, we adopt this format for kernel signing. You can create a signed kernel image with: $ sbsign --key ${KEY} --cert ${CERT} Image Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/Kconfig

[PATCH v16 16/16] arm64: kexec_file: add kaslr support

2018-11-14 Thread AKASHI Takahiro
by passing "nokaslr" as a kernel boot argument. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/machine_kexec_file.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/machine_kex

[PATCH v16 13/16] arm64: kexec_file: invoke the kernel without purgatory

2018-11-14 Thread AKASHI Takahiro
is null. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/cpu-reset.S | 8 arch/arm64/kernel/machine_kexec.c | 12 ++-- arch/arm64/kernel/relocate_kernel.S | 3 ++- 3 files changed, 16 insertions(+), 7

[PATCH v16 14/16] include: pe.h: remove message[] from mz header definition

2018-11-14 Thread AKASHI Takahiro
ddr(cursor, mz->peaddr, sizeof(*pe)); Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Cc: David Howells Cc: Vivek Goyal Cc: Herbert Xu Cc: David S. Miller --- include/linux/pe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pe.h b/include/lin

[PATCH v16 12/16] arm64: kexec_file: add crash dump support

2018-11-14 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Cc: Rob Herring Cc: Frank Rowand Cc: devicet...@vger.kernel.org --- arch/arm64/include/asm/kexec.h | 4 ++ arch/arm64/kernel/

[PATCH v16 10/16] arm64: kexec_file: load initrd and device-tree

2018-11-14 Thread AKASHI Takahiro
, instead, the dtb presented by the original boot loader is reused. arch_kimage_kernel_post_load_cleanup() is responsible for freeing arm64- specific data allocated in load_other_segments(). Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch

[PATCH v16 08/16] arm64: cpufeature: add MMFR0 helper functions

2018-11-14 Thread AKASHI Takahiro
Those helper functions for MMFR0 register will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/cpufeature.h | 48 + 1 file changed, 48 insertions(+) diff

[PATCH v16 11/16] arm64: kexec_file: allow for loading Image-format kernel

2018-11-14 Thread AKASHI Takahiro
, you must have IMA enforced with, at least, the following security policy: "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig" See more details about IMA here: https://sourceforge.net/p/linux-ima/wiki/Home/ Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon

[PATCH v16 09/16] arm64: enable KEXEC_FILE config

2018-11-14 Thread AKASHI Takahiro
Modify arm64/Kconfig to enable kexec_file_load support. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/Kconfig | 9 + arch/arm64/kernel/Makefile | 3 ++- arch/arm64/kernel/machine_kexec_file.c

[PATCH v16 07/16] arm64: add image head flag definitions

2018-11-14 Thread AKASHI Takahiro
Those image head's flags will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/include/asm/image.h | 59 ++ arch/arm64/kernel/head.S | 3 +- arch/arm64/kernel

[PATCH v16 06/16] lib: fdt: add a helper function for handling memory range property

2018-11-14 Thread AKASHI Takahiro
Added function, fdt_setprop_reg(), will be used later to handle kexec-specific property in arm64's kexec_file implementation. It will possibly be merged into libfdt in the future. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand Cc: devicet...@vger.kernel.org --- include/linux

[PATCH v16 04/16] powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem()

2018-11-14 Thread AKASHI Takahiro
(), the current kexec_walk_memblock() won't work for kdump either in this form, this will be fixed in the next patch. Signed-off-by: AKASHI Takahiro Cc: "Eric W. Biederman" Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Acked-by: James Morse --- arch/powerpc/kernel/machine_kexec_file

[PATCH v16 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-11-14 Thread AKASHI Takahiro
Change this function from static to global so that arm64 can implement its own arch_kimage_file_post_load_cleanup() later using kexec_image_post_load_cleanup_default(). Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- include/linux/kexec.h | 1 + kernel

[PATCH v16 05/16] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump

2018-11-14 Thread AKASHI Takahiro
In kdump case, there exists only one dedicated memblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Cosmetic change: 0 to MEMBLOCK_NONE at for_each_free_mem_range*() Signed-off-by: AKASHI Takahiro Acked-by: Dave

[PATCH v16 03/16] s390, kexec_file: drop arch_kexec_mem_walk()

2018-11-14 Thread AKASHI Takahiro
her on system resource or memblock, will be put in one common place so that it will satisfy all the architectures' need. Signed-off-by: AKASHI Takahiro Reviewed-by: Philipp Rudo Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- arch/s390/ker

[PATCH v16 01/16] asm-generic: add kexec_file_load system call to unistd.h

2018-11-14 Thread AKASHI Takahiro
The initial user of this system call number is arm64. Signed-off-by: AKASHI Takahiro Acked-by: Arnd Bergmann --- include/uapi/asm-generic/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index

[PATCH v16 00/16] arm64: kexec: add kexec_file_load() support

2018-11-14 Thread AKASHI Takahiro
(at least, for this series) Patch #1 to #10 are essential part for KEXEC_FILE support (additionally allowing for IMA-based verification): Patch #1 to #6 are all preparatory patches on generic side. Patch #7 to #11 are to enable kexec_file_load on arm64. Patch #12 to #13 are for KEXEC_VERIFY_SIG (

Re: [PATCH] kexec/dt-ops.c: Fix check against 'fdt_add_subnode' return value

2018-11-11 Thread AKASHI Takahiro
d. Thank you. -Takahiro Akashi > [1]. http://lists.infradead.org/pipermail/kexec/2018-October/021746.html > > Cc: Simon Horman > Cc: AKASHI Takahiro > Reported-by: Vicente Bergas > Signed-off-by: Bhupesh Sharma > --- > kexec/dt-ops.c | 2 +- > 1 file changed, 1 inse

Re: [PATCH v15 11/16] arm64: kexec_file: allow for loading Image-format kernel

2018-10-10 Thread AKASHI Takahiro
Mark, On Tue, Oct 09, 2018 at 04:28:00PM +0100, Mark Rutland wrote: > On Fri, Sep 28, 2018 at 03:48:36PM +0900, AKASHI Takahiro wrote: > > This patch provides kexec_file_ops for "Image"-format kernel. In this > > implementation, a binary is always loaded with

Re: [PATCH v15 07/16] arm64: add image head flag definitions

2018-10-09 Thread AKASHI Takahiro
Mark, On Tue, Oct 09, 2018 at 04:04:05PM +0100, Mark Rutland wrote: > On Tue, Oct 02, 2018 at 04:59:40PM +0900, AKASHI Takahiro wrote: > > Hi Mark, > > > > On Mon, Oct 01, 2018 at 01:52:26PM +0100, Mark Rutland wrote: > > > On Fri, Sep 28, 2018 at 03:48:32P

Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-10-09 Thread AKASHI, Takahiro
Frank, Rob, On Tue, Oct 09, 2018 at 10:47:15AM -0700, Frank Rowand wrote: > On 10/08/18 17:37, AKASHI, Takahiro wrote: > > On Fri, Oct 05, 2018 at 08:23:57AM -0500, Rob Herring wrote: > >> On Thu, Oct 4, 2018 at 10:07 PM AKASHI, Takahiro > >> wrote: > >>

Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-10-09 Thread AKASHI, Takahiro
Frank, On Tue, Oct 09, 2018 at 11:02:29AM -0700, Frank Rowand wrote: > On 10/04/18 22:06, AKASHI, Takahiro wrote: > > Frank, > > > > # I haven't reply to your comments. > > > > On Fri, Sep 28, 2018 at 02:13:58PM -0700, Frank Rowand wrote: > >> On 09/28

Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-10-08 Thread AKASHI, Takahiro
On Fri, Oct 05, 2018 at 08:23:57AM -0500, Rob Herring wrote: > On Thu, Oct 4, 2018 at 10:07 PM AKASHI, Takahiro > wrote: > > > > Rob, > > > > # I haven't replied to this comment yet. > > > > On Fri, Sep 28, 2018 at 08:44:42AM -0500, Rob Herring wrote: &

Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-10-04 Thread AKASHI, Takahiro
Frank, # I haven't reply to your comments. On Fri, Sep 28, 2018 at 02:13:58PM -0700, Frank Rowand wrote: > On 09/28/18 06:44, Rob Herring wrote: > > +David Gibson > > > > On Fri, Sep 28, 2018 at 1:48 AM AKASHI Takahiro > > wrote: > >> > >> These

Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-10-04 Thread AKASHI, Takahiro
Rob, # I haven't replied to this comment yet. On Fri, Sep 28, 2018 at 08:44:42AM -0500, Rob Herring wrote: > +David Gibson > > On Fri, Sep 28, 2018 at 1:48 AM AKASHI Takahiro > wrote: > > > > These functions will be used later to handle kexec-specific properties &

Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-10-02 Thread AKASHI, Takahiro
On Tue, Oct 02, 2018 at 02:47:10PM +1000, David Gibson wrote: > On Fri, Sep 28, 2018 at 08:44:42AM -0500, Rob Herring wrote: > > +David Gibson > > > > On Fri, Sep 28, 2018 at 1:48 AM AKASHI Takahiro > > wrote: > > > > > > These functions will be u

Re: [PATCH v15 07/16] arm64: add image head flag definitions

2018-10-02 Thread AKASHI Takahiro
Hi Mark, On Mon, Oct 01, 2018 at 01:52:26PM +0100, Mark Rutland wrote: > On Fri, Sep 28, 2018 at 03:48:32PM +0900, AKASHI Takahiro wrote: > > Those image head's flags will be used later by kexec_file loader. > > > > Signed-off-by: AKASHI Takahiro > > Cc: Catalin M

Re: [PATCH v15 04/16] powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem()

2018-10-02 Thread AKASHI Takahiro
On Sun, Sep 30, 2018 at 06:08:34PM +0800, Dave Young wrote: > Hi AKASHI, > > On 09/28/18 at 03:48pm, AKASHI Takahiro wrote: > > Memblock list is another source for usable system memory layout. > > So move powerpc's arch_kexec_walk_mem() to common code so that oth

[PATCH v15 15/16] arm64: kexec_file: add kernel signature verification support

2018-09-28 Thread AKASHI Takahiro
CONFIG_EFI is enabled, we adopt this format for kernel signing. You can create a signed kernel image with: $ sbsign --key ${KEY} --cert ${CERT} Image Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/Kconfig

[PATCH v15 14/16] include: pe.h: remove message[] from mz header definition

2018-09-28 Thread AKASHI Takahiro
ddr(cursor, mz->peaddr, sizeof(*pe)); Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Cc: David Howells Cc: Vivek Goyal Cc: Herbert Xu Cc: David S. Miller --- include/linux/pe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pe.h b/include/lin

[PATCH v15 16/16] arm64: kexec_file: add kaslr support

2018-09-28 Thread AKASHI Takahiro
by passing "nokaslr" as a kernel boot argument. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/machine_kexec_file.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/kernel/machine_kex

[PATCH v15 12/16] arm64: kexec_file: add crash dump support

2018-09-28 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Cc: Rob Herring Cc: Frank Rowand Cc: devicet...@vger.kernel.org --- arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/

[PATCH v15 13/16] arm64: kexec_file: invoke the kernel without purgatory

2018-09-28 Thread AKASHI Takahiro
is null. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/cpu-reset.S | 8 arch/arm64/kernel/machine_kexec.c | 12 ++-- arch/arm64/kernel/relocate_kernel.S | 3 ++- 3 files changed, 16 insertions(+), 7

[PATCH v15 10/16] arm64: kexec_file: load initrd and device-tree

2018-09-28 Thread AKASHI Takahiro
, instead, the dtb presented by the original boot loader is reused. arch_kimage_kernel_post_load_cleanup() is responsible for freeing arm64- specific data allocated in load_other_segments(). Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch

[PATCH v15 11/16] arm64: kexec_file: allow for loading Image-format kernel

2018-09-28 Thread AKASHI Takahiro
, you must have IMA enforced with, at least, the following security policy: "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig" See more details about IMA here: https://sourceforge.net/p/linux-ima/wiki/Home/ Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon

[PATCH v15 09/16] arm64: enable KEXEC_FILE config

2018-09-28 Thread AKASHI Takahiro
Modify arm64/Kconfig to enable kexec_file_load support. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/Kconfig | 9 + arch/arm64/kernel/Makefile | 3 ++- arch/arm64/kernel/machine_kexec_file.c

[PATCH v15 08/16] arm64: cpufeature: add MMFR0 helper functions

2018-09-28 Thread AKASHI Takahiro
Those helper functions for MMFR0 register will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/cpufeature.h | 48 + 1 file changed, 48 insertions(+) diff

[PATCH v15 05/16] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump

2018-09-28 Thread AKASHI Takahiro
In kdump case, there exists only one dedicated memblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Cosmetic change: 0 to MEMBLOCK_NONE at for_each_free_mem_range*() Signed-off-by: AKASHI Takahiro Cc: Dave Young Cc

[PATCH v15 07/16] arm64: add image head flag definitions

2018-09-28 Thread AKASHI Takahiro
Those image head's flags will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/include/asm/boot.h | 15 +++ arch/arm64/kernel/head.S | 2 +- 2 files changed, 16 insertions(+), 1

[PATCH v15 06/16] of/fdt: add helper functions for handling properties

2018-09-28 Thread AKASHI Takahiro
These functions will be used later to handle kexec-specific properties in arm64's kexec_file implementation. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand Cc: devicet...@vger.kernel.org --- drivers/of/fdt.c | 56 ++ include/linux

[PATCH v15 03/16] s390, kexec_file: drop arch_kexec_mem_walk()

2018-09-28 Thread AKASHI Takahiro
her on system resource or memblock, will be put in one common place so that it will satisfy all the architectures' need. Signed-off-by: AKASHI Takahiro Reviewed-by: Philipp Rudo Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- arch/s390/ker

[PATCH v15 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-09-28 Thread AKASHI Takahiro
Change this function from static to global so that arm64 can implement its own arch_kimage_file_post_load_cleanup() later using kexec_image_post_load_cleanup_default(). Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- include/linux/kexec.h | 1 + kernel

[PATCH v15 04/16] powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem()

2018-09-28 Thread AKASHI Takahiro
(), the current kexec_walk_memblock() won't work for kdump either in this form, this will be fixed in the next patch. Signed-off-by: AKASHI Takahiro Cc: "Eric W. Biederman" Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Acked-by: James Morse --- arch/powerpc/kernel/machine_kexec_file

[PATCH v15 00/16] arm64: kexec: add kexec_file_load() support

2018-09-28 Thread AKASHI Takahiro
pport (at least, for this series) Patch #1 to #10 are essential part for KEXEC_FILE support (additionally allowing for IMA-based verification): Patch #1 to #6 are all preparatory patches on generic side. Patch #7 to #11 are to enable kexec_file_load on arm64. Patch #12 to #13 are for KEXEC_V

[PATCH v15 01/16] asm-generic: add kexec_file_load system call to unistd.h

2018-09-28 Thread AKASHI Takahiro
The initial user of this system call number is arm64. Signed-off-by: AKASHI Takahiro Acked-by: Arnd Bergmann --- include/uapi/asm-generic/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index

Re: [PATCH v14 06/16] of/fdt: add helper functions for handling properties

2018-09-25 Thread AKASHI Takahiro
means most or all of my previous suggested function name changes are > > no longer > > useful. > > > > Please add devicet...@vger.kernel.org to the next version of this patch and > > to > > the patches that use the functions in this patch. > > >

Re: [PATCH v14 06/16] of/fdt: add helper functions for handling properties

2018-09-09 Thread AKASHI Takahiro
Frank, Thank you for the comments. I will address all of them, but have one question: On Fri, Sep 07, 2018 at 12:53:58PM -0700, Frank Rowand wrote: > On 09/07/18 01:00, AKASHI Takahiro wrote: > > These functions will be used later to handle kexec-specific properties > > in arm

[PATCH v14 16/16] arm64: kexec_file: add kaslr support

2018-09-07 Thread AKASHI Takahiro
by passing "nokaslr" as a kernel boot argument. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/machine_kexec_file.c | 45 ++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/kernel/machine_kex

[PATCH v14 05/16] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump

2018-09-07 Thread AKASHI Takahiro
In kdump case, there exists only one dedicated memblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Cosmetic change: 0 to MEMBLOCK_NONE at for_each_free_mem_range*() Signed-off-by: AKASHI Takahiro Cc: Dave Young Cc

[PATCH v14 03/16] s390, kexec_file: drop arch_kexec_mem_walk()

2018-09-07 Thread AKASHI Takahiro
her on system resource or memblock, will be put in one common place so that it will satisfy all the architectures' need. Signed-off-by: AKASHI Takahiro Reviewed-by: Philipp Rudo Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- arch/s390/ker

[PATCH v14 15/16] arm64: kexec_file: add kernel signature verification support

2018-09-07 Thread AKASHI Takahiro
CONFIG_EFI is enabled, we adopt this format for kernel signing. You can create a signed kernel image with: $ sbsign --key ${KEY} --cert ${CERT} Image Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/Kconfig

[PATCH v14 14/16] include: pe.h: remove message[] from mz header definition

2018-09-07 Thread AKASHI Takahiro
ddr(cursor, mz->peaddr, sizeof(*pe)); Signed-off-by: AKASHI Takahiro Reviewed-by: Ard Biesheuvel Cc: David Howells Cc: Vivek Goyal Cc: Herbert Xu Cc: David S. Miller --- include/linux/pe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pe.h b/include/lin

[PATCH v14 13/16] arm64: kexec_file: invoke the kernel without purgatory

2018-09-07 Thread AKASHI Takahiro
is null. Signed-off-by: AKASHI Takahiro Reviewed-by: James Morse Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/cpu-reset.S | 8 arch/arm64/kernel/machine_kexec.c | 12 ++-- arch/arm64/kernel/relocate_kernel.S | 3 ++- 3 files changed, 16 insertions(+), 7

[PATCH v14 12/16] arm64: kexec_file: add crash dump support

2018-09-07 Thread AKASHI Takahiro
y range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/kexec.h | 4 + arch/arm64/kernel/machine_kexec_file.c | 113 - 2 files cha

[PATCH v14 11/16] arm64: kexec_file: allow for loading Image-format kernel

2018-09-07 Thread AKASHI Takahiro
, you must have IMA enforced with, at least, the following security policy: "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig" See more details about IMA here: https://sourceforge.net/p/linux-ima/wiki/Home/ Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon

[PATCH v14 10/16] arm64: kexec_file: load initrd and device-tree

2018-09-07 Thread AKASHI Takahiro
, instead, the dtb presented by the original boot loader is reused. arch_kimage_kernel_post_load_cleanup() is responsible for freeing arm64- specific data allocated in load_other_segments(). Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch

[PATCH v14 09/16] arm64: enable KEXEC_FILE config

2018-09-07 Thread AKASHI Takahiro
Modify arm64/Kconfig to enable kexec_file_load support. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/Kconfig | 9 + arch/arm64/kernel/Makefile | 3 ++- arch/arm64/kernel/machine_kexec_file.c

[PATCH v14 08/16] arm64: cpufeature: add MMFR0 helper functions

2018-09-07 Thread AKASHI Takahiro
Those helper functions for MMFR0 register will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse --- arch/arm64/include/asm/cpufeature.h | 48 + 1 file changed, 48 insertions(+) diff

[PATCH v14 07/16] arm64: add image head flag definitions

2018-09-07 Thread AKASHI Takahiro
Those image head's flags will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/include/asm/boot.h | 15 +++ arch/arm64/kernel/head.S | 2 +- 2 files changed, 16 insertions(+), 1

[PATCH v14 06/16] of/fdt: add helper functions for handling properties

2018-09-07 Thread AKASHI Takahiro
These functions will be used later to handle kexec-specific properties in arm64's kexec_file implementation. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand --- drivers/of/fdt.c | 62 -- include/linux/of_fdt.h | 10 +-- 2 files

[PATCH v14 02/16] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-09-07 Thread AKASHI Takahiro
Change this function from static to global so that arm64 can implement its own arch_kimage_file_post_load_cleanup() later using kexec_image_post_load_cleanup_default(). Signed-off-by: AKASHI Takahiro Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- include/linux/kexec.h | 1 + kernel

[PATCH v14 04/16] powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem()

2018-09-07 Thread AKASHI Takahiro
(), the current kexec_walk_memblock() won't work for kdump either in this form, this will be fixed in the next patch. Signed-off-by: AKASHI Takahiro Cc: "Eric W. Biederman" Acked-by: Dave Young Cc: Vivek Goyal Cc: Baoquan He Acked-by: James Morse --- arch/powerpc/kernel/machine_kexec_file

[PATCH v14 01/16] asm-generic: add kexec_file_load system call to unistd.h

2018-09-07 Thread AKASHI Takahiro
The initial user of this system call number is arm64. Signed-off-by: AKASHI Takahiro Acked-by: Arnd Bergmann --- include/uapi/asm-generic/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index

[PATCH v14 00/16] subject: arm64: kexec: add kexec_file_load() support

2018-09-07 Thread AKASHI Takahiro
-check code from purgatory * modify purgatory asm to remove arch_kexec_apply_relocations_add() * drop older kernel support * drop vmlinux support (at least, for this series) Patch #1 to #10 are essential part for KEXEC_FILE support (additionally allowing for IMA-based verification): Patch #1 to #6

  1   2   3   4   5   6   7   8   9   10   >