RE: [PATCH] uts: Don't randomize "struct uts_namespace".

2018-07-11 Thread Kazuhito Hagio
Hi Tetsuo, Thanks for your report. On Friday, July 6, 2018 7:10 PM, Tetsuo Handa wrote: > Hello Ken'ichi, > > I noticed that makedumpfile ( https://sourceforge.net/p/makedumpfile/code/ ) > can no longer detect kernel version correctly because "struct uts_namespace" > (which is exposed to

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-07-11 Thread Omar Sandoval
On Wed, Jul 11, 2018 at 09:06:27PM +0530, Bhupesh Sharma wrote: > Hi James, > > On Wed, Jul 11, 2018 at 6:54 PM, James Morse wrote: > > Hi Bhupesh, > > > > (CC: +Omar) > > > > On 20/06/18 08:26, Bhupesh Sharma wrote: > >> On Wed, Jun 20, 2018 at 7:46 AM, Jin, Yanjiang > >> wrote: > From:

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-07-11 Thread Bhupesh Sharma
Hi James, On Wed, Jul 11, 2018 at 6:54 PM, James Morse wrote: > Hi Bhupesh, > > (CC: +Omar) > > On 20/06/18 08:26, Bhupesh Sharma wrote: >> On Wed, Jun 20, 2018 at 7:46 AM, Jin, Yanjiang >> wrote: From: Bhupesh Sharma [mailto:bhsha...@redhat.com] On Tue, Jun 19, 2018 at 4:56 PM, James

Fwd: Re: [PATCH] uts: Don't randomize "struct uts_namespace".

2018-07-11 Thread Tetsuo Handa
Subject: Re: [PATCH] uts: Don't randomize "struct uts_namespace". To: Linus Torvalds , Ken'ichi Ohmichi , Masaki Tachibana , Kazuhito Hagio Cc: Kees Cook , Linux Kernel Mailing List From: Tetsuo Handa Date: Sat, 7 Jul 2018 08:10:08 +0900 Hello Ken'ichi, I noticed that makedumpfile (

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-07-11 Thread James Morse
Hi Bhupesh, (CC: +Omar) On 20/06/18 08:26, Bhupesh Sharma wrote: > On Wed, Jun 20, 2018 at 7:46 AM, Jin, Yanjiang > wrote: >>> From: Bhupesh Sharma [mailto:bhsha...@redhat.com] >>> On Tue, Jun 19, 2018 at 4:56 PM, James Morse wrote: I'm suggesting adding the contents of vmcoreinfo as a

Re: [kbuild-all] [PATCH v6 2/4] resource: Use list_head to link sibling resource

2018-07-11 Thread Baoquan He
On 07/10/18 at 08:59am, Ye Xiaolong wrote: > Hi, > > On 07/08, Baoquan He wrote: > >Hi, > > > >On 07/05/18 at 01:00am, kbuild test robot wrote: > >> Hi Baoquan, > >> > >> I love your patch! Yet something to improve: > >> > >> [auto build test ERROR on linus/master] > >> [also build test ERROR

Re: [kbuild-all] [PATCH v6 2/4] resource: Use list_head to link sibling resource

2018-07-11 Thread Ye Xiaolong
Hi, On 07/08, Baoquan He wrote: >Hi, > >On 07/05/18 at 01:00am, kbuild test robot wrote: >> Hi Baoquan, >> >> I love your patch! Yet something to improve: >> >> [auto build test ERROR on linus/master] >> [also build test ERROR on v4.18-rc3 next-20180704] >> [if your patch is applied to the

[PATCH v11 06/15] arm64: add image head flag definitions

2018-07-11 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 v11 13/15] include: pe.h: remove message[] from mz header definition

2018-07-11 Thread AKASHI Takahiro
message[] field won't be part of the definition of mz header. This change is crucial for enabling kexec_file_load on arm64 because arm64's "Image" binary, as in PE format, doesn't have any data for it and accordingly the following check in pefile_parse_binary() will fail: chkaddr(cursor,

[PATCH v11 11/15] arm64: kexec_file: add crash dump support

2018-07-11 Thread AKASHI Takahiro
Enabling crash dump (kdump) includes * prepare contents of ELF header of a core dump file, /proc/vmcore, using crash_prepare_elf64_headers(), and * add two device tree properties, "linux,usable-memory-range" and "linux,elfcorehdr", which represent respectively a memory range to be used by

[PATCH v11 04/15] kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump

2018-07-11 Thread AKASHI Takahiro
In kdump case, there exists only one dedicated memoblock region as usable memory (crashk_res). With this patch, kexec_walk_memblock() runs a given callback function on this region. Signed-off-by: AKASHI Takahiro Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- kernel/kexec_file.c | 3 +++ 1

[PATCH v11 07/15] arm64: cpufeature: add MMFR0 helper functions

2018-07-11 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 v11 09/15] arm64: kexec_file: load initrd and device-tree

2018-07-11 Thread AKASHI Takahiro
load_other_segments() is expected to allocate and place all the necessary memory segments other than kernel, including initrd and device-tree blob (and elf core header for crash). While most of the code was borrowed from kexec-tools' counterpart, users may not be allowed to specify dtb explicitly,

[PATCH v11 15/15] arm64: kexec_file: add kaslr support

2018-07-11 Thread AKASHI Takahiro
Adding "kaslr-seed" to dtb enables triggering kaslr, or kernel virtual address randomization, at secondary kernel boot. We always do this as it will have no harm on kaslr-incapable kernel. We don't have any "switch" to turn off this feature directly, but still can suppress it by passing "nokaslr"

[PATCH v11 05/15] of/fdt: add helper functions for handling properties

2018-07-11 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 v11 08/15] arm64: enable KEXEC_FILE config

2018-07-11 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 v11 14/15] arm64: kexec_file: add kernel signature verification support

2018-07-11 Thread AKASHI Takahiro
With this patch, kernel verification can be done without IMA security subsystem enabled. Turn on CONFIG_KEXEC_VERIFY_SIG instead. On x86, a signature is embedded into a PE file (Microsoft's format) header of binary. Since arm64's "Image" can also be seen as a PE file as far as CONFIG_EFI is

[PATCH v11 10/15] arm64: kexec_file: allow for loading Image-format kernel

2018-07-11 Thread AKASHI Takahiro
This patch provides kexec_file_ops for "Image"-format kernel. In this implementation, a binary is always loaded with a fixed offset identified in text_offset field of its header. Regarding signature verification for trusted boot, this patch doesn't contains CONFIG_KEXEC_VERIFY_SIG support, which

[PATCH v11 12/15] arm64: kexec_file: invoke the kernel without purgatory

2018-07-11 Thread AKASHI Takahiro
On arm64, purgatory would do almost nothing. So just invoke secondary kernel directly by jumping into its entry code. While, in this case, cpu_soft_restart() must be called with dtb address in the fifth argument, the behavior still stays compatible with kexec_load case as long as the argument is

[PATCH v11 03/15] powerpc, kexec_file: factor out memblock-based arch_kexec_walk_mem()

2018-07-11 Thread AKASHI Takahiro
Memblock list is another source for usable system memory layout. So powerpc's arch_kexec_walk_mem() is moved to kexec_file.c so that other memblock-based architectures, particularly arm64, can also utilise it. A moved function is now renamed to kexec_walk_memblock() and merged into the existing

[PATCH v11 02/15] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-07-11 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 +

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

2018-07-11 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 v11 00/15] subject: arm64: kexec: add kexec_file_load() support

2018-07-11 Thread AKASHI Takahiro
This is the eleventh round of implementing kexec_file_load() support on arm64.[1] (See "Changes" below) Most of the code is based on kexec-tools. This patch series enables us to * load the kernel by specifying its file descriptor, instead of user- filled buffer, at kexec_file_load()

Re: [PATCH v5 7/8] ima: based on policy warn about loading firmware (pre-allocated buffer)

2018-07-11 Thread Ard Biesheuvel
On 10 July 2018 at 21:19, Bjorn Andersson wrote: > On Mon 09 Jul 23:56 PDT 2018, Ard Biesheuvel wrote: > >> On 10 July 2018 at 08:51, Ard Biesheuvel wrote: >> > On 9 July 2018 at 21:41, Mimi Zohar wrote: >> >> On Mon, 2018-07-02 at 17:30 +0200, Ard Biesheuvel wrote: >> >>> On 2 July 2018 at