Re: [PATCH 0/2] kexec: Remove unnecessary arch hook

2022-12-20 Thread Baoquan He
On 12/15/22 at 12:23pm, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > There are no arch-specific things in arch_kexec_kernel_image_load(), so > remove it and just use the generic version. This patchset looks good to me, thx. Acked-by: Baoquan He Since it cleans up the last arch specific

Re: [PATCH 0/2] kexec: Remove unnecessary arch hook

2022-12-20 Thread Baoquan He
On 12/17/22 at 09:58am, Bjorn Helgaas wrote: > On Sat, Dec 17, 2022 at 05:48:51PM +0800, Baoquan He wrote: > > On 12/15/22 at 12:23pm, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > There are no arch-specific things in arch_kexec_kernel_image_load(), so > > > remove it and just use

Re: [PATCH v3 3/3] kexec: Introduce parameters load_limit_reboot and load_limit_panic

2022-12-20 Thread Steven Rostedt
On Wed, 21 Dec 2022 02:22:57 +0100 Ricardo Ribalda wrote: > > > + kexec_core.load_limit_reboot= > > > + kexec_core.load_limit_panic= > > > + [KNL] > > > + This parameter specifies a limit to the number of > > > times > > > + a

[PATCH makedumpfile] Fix incorrect exclusion of slab pages on Linux 6.2-rc1

2022-12-20 Thread 萩尾 一仁
From: Kazuhito Hagio * Required for kernel 6.2 Kernel commit 130d4df57390 ("mm/sl[au]b: rearrange struct slab fields to allow larger rcu_head"), which is contained in Linux 6.2-rc1 and later, made the offset of slab.slabs equal to page.mapping's one. As a result, "makedumpfile -d 8", which

Re: [PATCH v3 3/3] kexec: Introduce parameters load_limit_reboot and load_limit_panic

2022-12-20 Thread Ricardo Ribalda
Hi Steven Thanks for your review!!! Will send a new version. After giving it a thought... you are right :). setting the current value should return -EINVAL. We should only return OK if we actually do something. On Wed, 21 Dec 2022 at 01:22, Steven Rostedt wrote: > > On Tue, 20 Dec 2022

Re: [PATCH v3 3/3] kexec: Introduce parameters load_limit_reboot and load_limit_panic

2022-12-20 Thread Steven Rostedt
On Tue, 20 Dec 2022 23:05:45 +0100 Ricardo Ribalda wrote: I hate to be the grammar police, but.. > Add two parameter to specify how many times a kexec kernel can be loaded. "parameters" > > The sysadmin can set different limits for kexec panic and kexec reboot > kernels. > > The value

[PATCH v3 2/3] kexec: Factor out kexec_load_permitted

2022-12-20 Thread Ricardo Ribalda
Both syscalls (kexec and kexec_file) do the same check, lets factor it out. Signed-off-by: Ricardo Ribalda --- include/linux/kexec.h | 3 ++- kernel/kexec.c| 2 +- kernel/kexec_core.c | 11 ++- kernel/kexec_file.c | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-)

[PATCH v3 1/3] Documentation: sysctl: Correct kexec_load_disabled

2022-12-20 Thread Ricardo Ribalda
kexec_load_disabled affects both ``kexec_load`` and ``kexec_file_load`` syscalls. Make it explicit. Signed-off-by: Ricardo Ribalda --- Documentation/admin-guide/sysctl/kernel.rst | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v3 3/3] kexec: Introduce parameters load_limit_reboot and load_limit_panic

2022-12-20 Thread Ricardo Ribalda
Add two parameter to specify how many times a kexec kernel can be loaded. The sysadmin can set different limits for kexec panic and kexec reboot kernels. The value can be modified at runtime via sysfs, but only with a value smaller than the current one (except -1). Signed-off-by: Ricardo

Re: [PATCH v2 3/3] kexec: Introduce paramters load_limit_reboot and load_limit_panic

2022-12-20 Thread Ricardo Ribalda
Hi Joel Thanks for looking into this On Thu, 15 Dec 2022 at 20:16, Joel Fernandes wrote: > > Hi Ricardo, > > On Thu, Dec 08, 2022 at 05:38:02PM +0100, Ricardo Ribalda wrote: > > Add two parameter to specify how many times a kexec kernel can be loaded. > > > > The sysadmin can set different

[PATCH v3 0/3] kexec: Add new parameter to limit the access to kexec

2022-12-20 Thread Ricardo Ribalda
Add two parameter to specify how many times a kexec kernel can be loaded. These parameter allow hardening the system. While we are at it, fix a documentation issue and refactor some code. To: Jonathan Corbet To: Eric Biederman Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc:

Re: [PATCH] Revert "x86/apic/x2apic: Implement IPI shorthands support"

2022-12-20 Thread Baoquan He
On 12/20/22 at 12:38pm, Peter Zijlstra wrote: > On Tue, Dec 20, 2022 at 01:34:58PM +0800, Baoquan He wrote: > > This reverts commit 43931d350f30c6cd8c2f498d54ef7d65750abc92. > > > > On kvm guest with 4 cpus deployed, when adding 'nr_cpus=2' to normal > > kernel's cmdline, and triggering crash to

Re: [PATCH] Revert "x86/apic/x2apic: Implement IPI shorthands support"

2022-12-20 Thread Peter Zijlstra
On Tue, Dec 20, 2022 at 01:34:58PM +0800, Baoquan He wrote: > This reverts commit 43931d350f30c6cd8c2f498d54ef7d65750abc92. > > On kvm guest with 4 cpus deployed, when adding 'nr_cpus=2' to normal > kernel's cmdline, and triggering crash to jump to kdump kernel, kdump > kernel will stably hang.