Re: [PATCH] arm64: Add support to supply 'kaslr-seed' to secondary kernel

2018-04-24 Thread AKASHI, Takahiro
Bhupesh, On 23 April 2018 at 20:05, Bhupesh Sharma wrote: > Hello Akashi, > > On Tue, Apr 17, 2018 at 12:35 AM, Bhupesh Sharma wrote: >> Hello Akashi, >> >> Thanks for the review comments. >> >> On Mon, Apr 16, 2018 at 8:00 AM, AKASHI Takahiro >> wrote: >>> Bhupesh, >>> >>> On Sun, Apr 15, 2018

Re: [Xen-devel] RFC Xen signature verification for kexec

2018-04-24 Thread George Dunlap
On Mon, Apr 23, 2018 at 11:33 AM, Jan Beulich wrote: On 23.04.18 at 12:25, wrote: >> On Mon, Apr 23, 2018 at 12:55:45AM -0600, Jan Beulich wrote: >>> >>> On 20.04.18 at 21:12, wrote: >>> > Two options for signature verification in Xen >>> > >>> > This proposal outlines two options under con

Re: [Xen-devel] RFC Xen signature verification for kexec

2018-04-24 Thread Daniel Kiper
On Tue, Apr 24, 2018 at 10:46:38AM +0100, George Dunlap wrote: > On Mon, Apr 23, 2018 at 11:33 AM, Jan Beulich wrote: > On 23.04.18 at 12:25, wrote: > >> On Mon, Apr 23, 2018 at 12:55:45AM -0600, Jan Beulich wrote: > >>> >>> On 20.04.18 at 21:12, wrote: > >>> > Two options for signature ver

Re: [PATCH 2/2] Check PG_swapbacked for swap cache pages

2018-04-24 Thread Petr Tesarik
Hi Masaki-san, what is the status of this patch? Do you have any concerns? TIA, Petr T On Fri, 13 Apr 2018 18:29:59 +0200 Petr Tesarik wrote: > When page cache is filtered out (dump level bitmap includes 2 or 4), > makedumpfile checks the PG_swapcache bit, but since kernel commit > 6326fec1122

Re: [Xen-devel] RFC Xen signature verification for kexec

2018-04-24 Thread Jan Beulich
>>> On 24.04.18 at 12:13, wrote: > On Tue, Apr 24, 2018 at 10:46:38AM +0100, George Dunlap wrote: >> On Mon, Apr 23, 2018 at 11:33 AM, Jan Beulich wrote: >> On 23.04.18 at 12:25, wrote: >> >> On Mon, Apr 23, 2018 at 12:55:45AM -0600, Jan Beulich wrote: >> >>> >>> On 20.04.18 at 21:12, wrot

Re: [RFC] arm64: extra entries in /proc/iomem for kexec

2018-04-24 Thread James Morse
Hi Akashi, On 16/04/18 11:08, AKASHI Takahiro wrote: > On Thu, Apr 12, 2018 at 05:01:52PM +0100, James Morse wrote: >> On 05/04/18 03:42, AKASHI Takahiro wrote: >>> On Mon, Apr 02, 2018 at 10:53:32AM +0900, AKASHI Takahiro wrote: Basically, changes that I made on /proc/iomem in my new format

Re: [PATCH net-next v5 0/3] kernel: add support to collect hardware logs in crash recovery kernel

2018-04-24 Thread David Miller
From: Rahul Lakkireddy Date: Sat, 21 Apr 2018 22:35:52 +0530 > Patch 1 adds API to vmcore module to allow drivers to register callback > to collect the device specific hardware/firmware logs. The logs will > be added to /proc/vmcore as elf notes. > > Patch 2 updates read and mmap logic to appen

RE: [PATCH 2/2] Check PG_swapbacked for swap cache pages

2018-04-24 Thread Masaki Tachibana
Hi Petr, Sorry. I can't take time enough for makedumpfile recently. I would like to reply by May 11th. Please wait some weeks. Thanks Tachibana > -Original Message- > From: Petr Tesarik [mailto:ptesa...@suse.cz] > Sent: Tuesday, April 24, 2018 7:43 PM > To: Tachibana Masaki() ; Nakayama

[PATCH v9 00/11] arm64: kexec: add kexec_file_load() support

2018-04-24 Thread AKASHI Takahiro
This is the ninth round of implementing kexec_file_load() support on arm64.[1] 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() system call, and * optionally

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

2018-04-24 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 v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-04-24 Thread AKASHI Takahiro
On arm64, purugatory would do almosty nothing. So just invoke secondary kernel directy 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 v9 02/11] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-04-24 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 Cc: Dave Young Cc: Vivek Goyal Cc: Baoquan He --- include/linux/kexec.h | 1 + kernel/kexec_f

[PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-04-24 Thread AKASHI Takahiro
We need to prevent firmware-reserved memory regions, particularly EFI memory map as well as ACPI tables, from being corrupted by loading kernel/initrd (or other kexec buffers). We also want to support memory allocation in top-down manner in addition to default bottom-up. So let's have arm64 specifi

[PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-04-24 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 i

[PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-04-24 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 v9 07/11] arm64: kexec_file: add crash dump support

2018-04-24 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 repsectively a memory range to be used by cra

[PATCH v9 10/11] arm64: kexec_file: add kernel signature verification support

2018-04-24 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 enable

[PATCH v9 08/11] arm64: enable KEXEC_FILE config

2018-04-24 Thread AKASHI Takahiro
Modify arm64/Kconfig to enable kexec_file_load support. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index eb2cf4938f6d..d8f0dcdb8b96 100644 ---

[PATCH v9 09/11] include: pe.h: remove message[] from mz header definition

2018-04-24 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 v9 11/11] arm64: kexec_file: add kaslr support

2018-04-24 Thread AKASHI Takahiro
Adding "kalsr-seed" to dtb enables triggering kaslr, or kernel virtual address randomization, at secondary kernel boot. We always do this as it wll 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" a