[v2 0/2] Fix --kexec-syscall-auto on s390x

2020-03-13 Thread Petr Tesarik
From: Petr Tesarik As noticed by Raymund Will, kexec -la does not work on kernels without the kexec_file_load(2) syscall, revealing some shortcomings in the automatic syscall selection. Petr Tesarik (2): kexec-tools: Fix kexec_file_load(2) error handling kexec-tools: Reset getopt before

[v2 1/2] kexec-tools: Fix kexec_file_load(2) error handling

2020-03-13 Thread Petr Tesarik
From: Petr Tesarik The handling of kexec_file_load() error conditions needs some improvement. First, on failure, the system call itself returns -1 and sets errno. It is wrong to check the return value itself. Second, do_kexec_file_load() mixes different types of error codes (-1, return value

[v2 2/2] kexec-tools: Reset getopt before falling back to legacy syscall

2020-03-13 Thread Petr Tesarik
From: Petr Tesarik The modules may need to parse the arguments again after kexec_file_load(2) failed, but getopt is not reset. This change fixes the --initrd option on s390x. Without this patch, it will fail to load the initrd on kernels that do not implement kexec_file_load(2). Signed-off-by:

Re: [PATCH] kexec-tools: Fix kexec_file_load(2) error handling

2020-03-13 Thread Petr Tesarik
Hold on, a follow-up patch is needed to fix --kexec-syscall-auto on s390x. I'm going to resend as a two-patch series. Petr T On Thu, 12 Mar 2020 21:17:40 +0100 Petr Tesarik wrote: > The handling of kexec_file_load() error conditions needs some > improvement. > > First, on failure, the system

Re: more barriers: Re: [PATCH 1/2] printk: add lockless buffer

2020-03-13 Thread John Ogness
Hi, This is quite a long response. I can summarize here: - Several new memory barrier pairs were identified. - The placement of a memory barrier was incorrect. There are now quite a few changes queued up for v2. I will try to get this posted soon. Also, I believe we've now identified the