Re: [PATCH v8 2/7] crash: prototype change for crash_prepare_elf64_headers

2022-05-12 Thread Eric DeVolder
On 5/12/22 03:42, David Hildenbrand wrote: On 05.05.22 20:45, Eric DeVolder wrote: From within crash_prepare_elf64_headers() there is a need to reference the struct kimage hotplug members. As such, this change passes the struct kimage as a parameter to the crash_prepare_elf64_headers().

Re: [PATCH v8 3/7] crash: add generic infrastructure for crash hotplug support

2022-05-12 Thread Eric DeVolder
David, Great questions! See inline responses below. eric On 5/12/22 03:52, David Hildenbrand wrote: On 05.05.22 20:45, Eric DeVolder wrote: CPU and memory change notifications are received in order to regenerate the elfcorehdr. To support cpu hotplug, a callback is registered to capture the

Re: [PATCH 11/30] um: Improve panic notifiers consistency and ordering

2022-05-12 Thread Guilherme G. Piccoli
On 10/05/2022 11:28, Petr Mladek wrote: > [...] > It is not clear to me why user mode linux should not care about > the other notifiers. It might be because I do not know much > about the user mode linux. > > Is the because they always create core dump or are never running > in a hypervisor or

Re: [PATCH 23/30] printk: kmsg_dump: Introduce helper to inform number of dumpers

2022-05-12 Thread Guilherme G. Piccoli
On 10/05/2022 14:40, Steven Rostedt wrote: > On Wed, 27 Apr 2022 19:49:17 -0300 > "Guilherme G. Piccoli" wrote: > >> Currently we don't have a way to check if there are dumpers set, >> except counting the list members maybe. This patch introduces a very >> simple helper to provide this

Re: [PATCH 10/30] alpha: Clean-up the panic notifier code

2022-05-12 Thread Guilherme G. Piccoli
On 10/05/2022 11:16, Petr Mladek wrote: > [...] > Yeah, it is pretty strange behavior. > > I looked into the history. This notifier was added into the alpha code > in 2.4.0-test2pre2. In this historic code, the default panic() code > either rebooted after a timeout or ended in a infinite loop.

Re: [PATCH 22/30] panic: Introduce the panic post-reboot notifier list

2022-05-12 Thread Guilherme G. Piccoli
On 11/05/2022 13:45, Heiko Carstens wrote: > [...] >> >> Hey S390/SPARC folks, sorry for the ping! >> >> Any reviews on this V1 would be greatly appreciated, I'm working on V2 >> and seeking feedback in the non-reviewed patches. > > Sorry, missed that this is quite s390 specific. So, yes, this

Re: [PATCH 22/30] panic: Introduce the panic post-reboot notifier list

2022-05-12 Thread Heiko Carstens
On Mon, May 09, 2022 at 11:16:10AM -0300, Guilherme G. Piccoli wrote: > On 27/04/2022 19:49, Guilherme G. Piccoli wrote: > > Currently we have 3 notifier lists in the panic path, which will > > be wired in a way to allow the notifier callbacks to run in > > different moments at panic time, in a

Re: [PATCH v8 3/7] crash: add generic infrastructure for crash hotplug support

2022-05-12 Thread David Hildenbrand
On 05.05.22 20:45, Eric DeVolder wrote: > CPU and memory change notifications are received in order to > regenerate the elfcorehdr. > > To support cpu hotplug, a callback is registered to capture the > CPUHP_AP_ONLINE_DYN online and offline events via > cpuhp_setup_state_nocalls(). > > To

Re: [PATCH v8 2/7] crash: prototype change for crash_prepare_elf64_headers

2022-05-12 Thread David Hildenbrand
On 05.05.22 20:45, Eric DeVolder wrote: > From within crash_prepare_elf64_headers() there is a need to > reference the struct kimage hotplug members. As such, this > change passes the struct kimage as a parameter to the > crash_prepare_elf64_headers(). You should make it clearer that the hotplug

Re: [PATCH v8 2/4] kexec, KEYS: make the code in bzImage64_verify_sig generic

2022-05-12 Thread Baoquan He
On 05/12/22 at 03:01pm, Coiby Xu wrote: > commit 278311e417be ("kexec, KEYS: Make use of platform keyring for > signature verify") adds platform keyring support on x86 kexec but not > arm64. > > The code in bzImage64_verify_sig makes use of system keyrings including > .buitin_trusted_keys,

[PATCH v8 4/4] kexec, KEYS, s390: Make use of built-in and secondary keyring for signature verification

2022-05-12 Thread Coiby Xu
From: Michal Suchanek commit e23a8020ce4e ("s390/kexec_file: Signature verification prototype") adds support for KEXEC_SIG verification with keys from platform keyring but the built-in keys and secondary keyring are not used. Add support for the built-in keys and secondary keyring as x86 does.

[PATCH v8 3/4] arm64: kexec_file: use more system keyrings to verify kernel image signature

2022-05-12 Thread Coiby Xu
Currently, a problem faced by arm64 is if a kernel image is signed by a MOK key, loading it via the kexec_file_load() system call would be rejected with the error "Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7". This happens because image_verify_sig uses only

[PATCH v8 2/4] kexec, KEYS: make the code in bzImage64_verify_sig generic

2022-05-12 Thread Coiby Xu
commit 278311e417be ("kexec, KEYS: Make use of platform keyring for signature verify") adds platform keyring support on x86 kexec but not arm64. The code in bzImage64_verify_sig makes use of system keyrings including .buitin_trusted_keys, .secondary_trusted_keys and .platform keyring to verify

[PATCH v8 1/4] kexec: clean up arch_kexec_kernel_verify_sig

2022-05-12 Thread Coiby Xu
Currently there is no arch-specific implementation of arch_kexec_kernel_verify_sig. Even if we want to add an implementation for an architecture in the future, we can simply use "(struct kexec_file_ops*)->verify_sig". So clean it up. Suggested-by: Eric W. Biederman Reviewed-by: Michal Suchanek

[PATCH v8 0/4] use more system keyrings to verify arm64 and s390 kexec kernel image signature

2022-05-12 Thread Coiby Xu
Currently, a problem faced by arm64 is if a kernel image is signed by a MOK key, loading it via the kexec_file_load() system call would be rejected with the error "Lockdown: kexec: kexec of unsigned images is restricted; see man kernel_lockdown.7". This happens because arm64 uses only the primary

Re: [PATCH v7 2/4] kexec, KEYS: make the code in bzImage64_verify_sig generic

2022-05-12 Thread Baoquan He
On 05/12/22 at 12:33pm, Coiby Xu wrote: > On Thu, May 12, 2022 at 11:52:09AM +0800, Baoquan He wrote: > > On 05/12/22 at 10:46am, Baoquan He wrote: > > > On 05/12/22 at 10:34am, Coiby Xu wrote: > > > > commit 278311e417be ("kexec, KEYS: Make use of platform keyring for > > > > signature verify")