Re: [PATCH v3 00/17] kexec: Allow preservation of ftrace buffers

2024-02-09 Thread Philipp Rudo
Hi Alex, On Fri, 2 Feb 2024 13:58:52 +0100 Alexander Graf wrote: > Hi Philipp, > > On 29.01.24 17:34, Philipp Rudo wrote: > > Hi Alex, > > > > adding linux-integrity as there are some synergies with IMA_KEXEC (in case > > we > > get KHO to work). &g

Re: [PATCH v3 00/17] kexec: Allow preservation of ftrace buffers

2024-01-29 Thread Philipp Rudo
Hi Alex, adding linux-integrity as there are some synergies with IMA_KEXEC (in case we get KHO to work). Fist of all I believe that having a generic framework to pass information from one kernel to the other across kexec would be a good thing. But I'm afraid that you are ignoring some

Re: [RFC 0/3] kdump: Check mem_map of CMA area in kdump

2023-12-19 Thread Philipp Rudo
t it can easily be passed in between different kernels. But this would require the mm subsystem to maintain the page states in the CMA in two separate data structures. Personally I don't think that any of the three "fixes" is desirable. Thanks Philipp > Thanks, > > Pingfan > >

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-12-07 Thread Philipp Rudo
On Wed, 6 Dec 2023 16:19:51 +0100 Michal Hocko wrote: > On Wed 06-12-23 14:49:51, Michal Hocko wrote: > > On Wed 06-12-23 12:08:05, Philipp Rudo wrote: > [...] > > > If I understand Documentation/core-api/pin_user_pages.rst correctly you > > > missed case 1 Direc

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-12-07 Thread Philipp Rudo
On Thu, 7 Dec 2023 09:55:20 +0100 Michal Hocko wrote: > On Thu 07-12-23 12:23:13, Baoquan He wrote: > [...] > > We can't guarantee how swift the DMA transfer could be in the cma, case, > > it will be a venture. > > We can't guarantee this of course but AFAIK the DMA shouldn't take > minutes,

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-12-06 Thread Philipp Rudo
On Fri, 1 Dec 2023 17:59:02 +0100 Michal Hocko wrote: > On Fri 01-12-23 16:51:13, Philipp Rudo wrote: > > On Fri, 1 Dec 2023 12:55:52 +0100 > > Michal Hocko wrote: > > > > > On Fri 01-12-23 12:33:53, Philipp Rudo wrote: > > > [...] > >

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-12-01 Thread Philipp Rudo
On Fri, 1 Dec 2023 12:55:52 +0100 Michal Hocko wrote: > On Fri 01-12-23 12:33:53, Philipp Rudo wrote: > [...] > > And yes, those are all what-if concerns but unfortunately that is all > > we have right now. > > Should theoretical concerns without an actual evidence

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-12-01 Thread Philipp Rudo
Hi Jiri, I'd really love to see something like this to work. Although I also share the concerns about shitty device drivers corrupting the CMA. Please see my other mail for that. Anyway, one more comment below. On Fri, 24 Nov 2023 20:54:36 +0100 Jiri Bohac wrote: [...] > Now, specifying >

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-12-01 Thread Philipp Rudo
Hi Michal, On Thu, 30 Nov 2023 14:41:12 +0100 Michal Hocko wrote: > On Thu 30-11-23 20:31:44, Baoquan He wrote: > [...] > > > > which doesn't use the proper pinning API (which would migrate away from > > > > the CMA) then what is the worst case? We will get crash kernel corrupted > > > >

Re: [PATCH 0/2] Sign the Image which is zboot's payload

2023-09-25 Thread Philipp Rudo
Hi Dave, On Fri, 22 Sep 2023 13:41:22 +0800 Dave Young wrote: > Hi Jan, > > On Fri, 22 Sept 2023 at 13:19, Jan Hendrik Farr wrote: > > > > Hi Pingfan! > > > > On 21 21:37:01, Pingfan Liu wrote: > > > From: Pingfan Liu > > > > > > > > For security boot, the vmlinuz.efi will be signed so

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-25 Thread Philipp Rudo
Hi Jan, On Thu, 21 Sep 2023 00:02:25 +0200 Jan Hendrik Farr wrote: [...] > > Maybe we should do a BoF at LPC to discuss this further? > > I definetly won't be at LPC, is it possible to join virtually? Yes, LPC will be hybrid again this year. Virtual access costs $50 although you can apply

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-18 Thread Philipp Rudo
Hi Jan, On Thu, 14 Sep 2023 23:04:32 +0200 "Jan Hendrik Farr" wrote: > On Thu, Sep 14, 2023, at 8:51 PM, Philipp Rudo wrote: > > [...] > > > > In this context I hope it is also clear to you that when more and more > > people rely on the spec you need

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-14 Thread Philipp Rudo
Hi Jan, On Wed, 13 Sep 2023 16:42:33 +0200 "Jan Hendrik Farr" wrote: > On Wed, Sep 13, 2023, at 4:00 PM, Philipp Rudo wrote: [...] > In [5] Luca writes: > > [...] we fully intend for the UKI format to be an open and stable > > specification, that

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-14 Thread Philipp Rudo
Hi Lennart, On Thu, 14 Sep 2023 11:32:20 +0200 Lennart Poettering wrote: > On Mi, 13.09.23 16:00, Philipp Rudo (pr...@redhat.com) wrote: > > > For example there are two definitions for the UKI which contradict each > > other. > > The dedicated one [1] you have c

Re: [PATCH v2 0/2] x86/kexec: UKI Support

2023-09-13 Thread Philipp Rudo
Hi Jan, All in all the code looks fine to me. Nevertheless I don't think UKI support should be added at the moment. This is because IMHO you basically reinterpret the kexec_file systemcall and thus add a new uapi to the kernel. Once introduced it is extremely hard to remove or change an uapi

Re: [RFC PATCH 0/4] kdump: add generic functions to simplify crashkernel crashkernel in architecture

2023-07-10 Thread Philipp Rudo
Hi Baoquan, Hi Dave, On Sat, 8 Jul 2023 10:15:53 +0800 Dave Young wrote: > On 06/19/23 at 01:59pm, Baoquan He wrote: > > In the current arm64, crashkernel=,high support has been finished after > > several rounds of posting and careful reviewing. The code in arm64 which > > parses crashkernel

Re: [PATCH v5 1/2] kexec: Support purgatories with .text.hot sections

2023-04-03 Thread Philipp Rudo
dr > - + sechdrs[i].sh_size)) { > + + sechdrs[i].sh_size) && > + !WARN_ON(kbuf->image->start != pi->ehdr->e_entry)) { Looks good to me. I'm not sure if it is better to use WARN_ON

Re: [PATCH v3] kexec: Support purgatories with .text.hot sections

2023-04-03 Thread Philipp Rudo
Hi Ricardo, sorry for the late reply... On Mon, 27 Mar 2023 13:52:08 +0200 Ricardo Ribalda wrote: [...] > > I tried removing the -r from arch/x86/purgatory/Makefile and that resulted > into: > > [ 115.631578] BUG: unable to handle page fault for address: 93224d5c8e20 > [ 115.631583]

Re: [PATCH v3] kexec: Support purgatories with .text.hot sections

2023-03-24 Thread Philipp Rudo
--- > kexec: Fix kexec_file_load for llvm16 > > When upreving llvm I realised that kexec stopped working on my test > platform. This patch fixes it. > > To: Eric Biederman > Cc: Baoquan He > Cc: Philipp Rudo > Cc: kexec@lists.infradead.org > Cc: linu

Re: [PATCH 1/2] kexec: Default __NR_kexec_file_load is set to undefined

2023-03-03 Thread Philipp Rudo
Hi Baoquan, On Tue, 28 Feb 2023 21:32:26 +0800 Baoquan He wrote: > Hi Philipp, > > On 02/27/23 at 04:19pm, Philipp Rudo wrote: > .. > > > diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h > > > index be6ccd5..ea77936 100644 > > > --- a/

Re: [PATCH 1/2] kexec: Default __NR_kexec_file_load is set to undefined

2023-03-03 Thread Philipp Rudo
Hi Youling, On Tue, 28 Feb 2023 10:02:16 +0800 Youling Tang wrote: > Hi, Philipp > > On 02/27/2023 11:19 PM, Philipp Rudo wrote: > > Hi Youling, > > > > On Fri, 24 Feb 2023 17:51:07 +0800 > > Youling Tang wrote: > > > >> The initial

Re: [PATCH 1/2] kexec: Default __NR_kexec_file_load is set to undefined

2023-02-27 Thread Philipp Rudo
Hi Youling, On Fri, 24 Feb 2023 17:51:07 +0800 Youling Tang wrote: > The initial reason is that after the merger of 29fe5067ed07 > ("kexec: make -a the default"), kexec cannot be used on LoongArch, > MIPS .etc architectures. We need to add "-c" for normal use. The > current kexec_file_load

Re: Unified Kernel Image Support

2023-02-06 Thread Philipp Rudo
Hi, On Mon, 6 Feb 2023 17:19:33 +0800 Baoquan He wrote: > On 02/03/23 at 10:46pm, Yishen Miao wrote: > > Hello all, > > > > I am experimenting kexec on my box. It uses systemd-boot as the bootloader > > and boots from a unified kernel image (objcopy'ed cmdline, kernel, > > initrdramfs, and

Re: [PATCH] kexec: Enable runtime allocation of crash_image

2022-11-29 Thread Philipp Rudo
Ricardo, On Mon, 28 Nov 2022 18:07:06 +0100 Ricardo Ribalda wrote: > Hi Philipp > > > Thanks for your review. > > > On Mon, 28 Nov 2022 at 18:00, Philipp Rudo wrote: > > > > Hi Ricardo, > > > > On Thu, 24 Nov 2022 23:23:36 +0100 > > Rica

Re: [PATCH v1 2/2] kexec: Introduce kexec_reboot_disabled

2022-11-29 Thread Philipp Rudo
Hi Steven, On Mon, 28 Nov 2022 11:42:00 -0500 Steven Rostedt wrote: > On Thu, 24 Nov 2022 16:01:15 +0100 > Philipp Rudo wrote: > > > No, I think the implementation is fine. I'm currently only struggling > > to understand what problem kexec_reboot_disabled solves that

Re: [PATCH] kexec: Enable runtime allocation of crash_image

2022-11-28 Thread Philipp Rudo
p it is supposed to generate. Thanks Philipp > --- > kexec: Enable runtime allocation of crash_image > > To: Eric Biederman > Cc: kexec@lists.infradead.org > Cc: linux-ker...@vger.kernel.org > Cc: Sergey Senozhatsky > Cc: linux-ker...@vger.kernel.org > Cc: Ross Zwisler

Re: [PATCH v1 2/2] kexec: Introduce kexec_reboot_disabled

2022-11-28 Thread Philipp Rudo
Hi Ricardo, On Thu, 24 Nov 2022 23:32:34 +0100 Ricardo Ribalda wrote: > Hi Philipp > > > On Thu, 24 Nov 2022 at 16:01, Philipp Rudo wrote: > > > > On Thu, 24 Nov 2022 13:52:58 +0100 > > Ricardo Ribalda wrote: > > > > > On T

Re: [PATCH v1 2/2] kexec: Introduce kexec_reboot_disabled

2022-11-24 Thread Philipp Rudo
On Thu, 24 Nov 2022 13:52:58 +0100 Ricardo Ribalda wrote: > On Thu, 24 Nov 2022 at 12:40, Philipp Rudo wrote: > > > > Hi Ricardo, > > > > On Wed, 23 Nov 2022 09:58:08 +0100 > > Ricardo Ribalda wrote: > > > > > Hi Philipp > > &

Re: [PATCH v1 2/2] kexec: Introduce kexec_reboot_disabled

2022-11-24 Thread Philipp Rudo
UX_REBOOT_CMD_KEXEC also gets disabled as no kexec kernel can be loaded while kdump works. Thus there is no need to add the new interface. Or am I missing anything? Thanks Philipp > > On Mon, 21 Nov 2022 at 15:10, Philipp Rudo wrote: > > > > Hi Ricardo, > > > >

Re: [PATCH v1 2/2] kexec: Introduce kexec_reboot_disabled

2022-11-21 Thread Philipp Rudo
Hi Ricardo, On Thu, 17 Nov 2022 16:15:07 +0100 Ricardo Ribalda wrote: > Hi Philipp > > Thanks for your review! happy to help. > > On Thu, 17 Nov 2022 at 16:07, Philipp Rudo wrote: > > > > Hi Ricardo, > > > > all in all I think this patch makes sense.

Re: [PATCH RFC] kexec: Freeze processes before kexec

2022-11-17 Thread Philipp Rudo
Hi Steve, On Wed, 16 Nov 2022 15:16:10 -0500 Steven Rostedt wrote: > On Wed, 16 Nov 2022 19:56:24 + > "Joel Fernandes (Google)" wrote: > > > --- a/kernel/kexec_core.c > > +++ b/kernel/kexec_core.c > > @@ -1175,6 +1175,12 @@ int kernel_kexec(void) > > } else > > #endif > > { > > +

Re: [PATCH v1 2/2] kexec: Introduce kexec_reboot_disabled

2022-11-17 Thread Philipp Rudo
Hi Ricardo, all in all I think this patch makes sense. However, there is one point I don't like... On Mon, 14 Nov 2022 14:18:39 +0100 Ricardo Ribalda wrote: > Create a new toogle that disables LINUX_REBOOT_CMD_KEXEC, reducing the > attack surface to a system. > > Without this toogle, an

Re: [PATCH] kernel/crash_core.c : Remove redundant checks for ck_cmdline is NULL

2022-05-03 Thread Philipp Rudo
Hi lizhe, On Mon, 2 May 2022 18:11:20 +0800 (CST) lizhe wrote: > HI Philipp Rudo. > > > When ck_cmdline is NULL. The last three lines of this function are > equivalent to : > if ( ! NULL) > return NULL; > return NULL;

Re: [PATCH] kernel/crash_core.c : Remove redundant checks for ck_cmdline is NULL

2022-04-26 Thread Philipp Rudo
Hi lizhe, On Mon, 25 Apr 2022 08:38:57 -0700 lizhe wrote: > When ck_cmdline is NULL, the only caller of get_last_crashkernel() > has already done non-NULL check(see __parse_crashkernel()), > so it doesn't make any sense to make a check here sorry, but I still don't like the description.

Re: [PATCH] kernel/crash_core.c: No judgment required

2022-04-26 Thread Philipp Rudo
Hi, On Tue, 26 Apr 2022 10:17:18 +0200 Philipp Rudo wrote: > Hi lizhe, > > On Mon, 25 Apr 2022 14:22:31 +0800 (CST) > lizhe wrote: > > > HI : > > > > > > I found the problem at the first time and gave the solution, > > > > > > &g

Re: [PATCH] kernel/crash_core.c: No judgment required

2022-04-26 Thread Philipp Rudo
> > > > > > > At 2022-04-25 09:36:17, "Baoquan He" wrote: > >On 12/14/21 at 05:32pm, Philipp Rudo wrote: > >> Hi lizhe, > >> > >> On Thu, 9 Dec 2021 19:20:03 -0800 > >> lizhe wrote: > >> > >> &g

Re: [PATCH makedumpfile] Avoid false-positive mem_section validation with vmlinux

2022-04-25 Thread Philipp Rudo
> Reported-by: Dave Wysochanski > Signed-off-by: Kazuhito Hagio for me this patch looks fine and exactly addresses the problem, that mem_section has different types in the vmlinux and vmcoreinfo. So, for what I want Reviewed-and-Tested-by: Philipp Rudo > --- > makedumpfile.c | 3

Re: [PATCH 2/2] makedumpfile: break loop after last dumpable page

2022-04-07 Thread Philipp Rudo
Hi Kazu, On Thu, 7 Apr 2022 06:43:00 + HAGIO KAZUHITO(萩尾 一仁) wrote: > -Original Message- > > Once the last dumpable page was processed there is no need to finish the > > loop to the last page. Thus exit early to improve performance. > > > >

[PATCH 2/2] makedumpfile: break loop after last dumpable page

2022-04-04 Thread Philipp Rudo
Once the last dumpable page was processed there is no need to finish the loop to the last page. Thus exit early to improve performance. Signed-off-by: Philipp Rudo --- makedumpfile.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/makedumpfile.c b/makedumpfile.c index 2ef3458..c944d0e

[PATCH 1/2] makedumpfile: omit unnecessary calls to print_progress

2022-04-04 Thread Philipp Rudo
ere decrease in performance especially when the console is in line mode. Signed-off-by: Philipp Rudo --- makedumpfile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index 14556db..2ef3458 100644 --- a/makedumpfile.c +++ b/makedumpfil

[PATCH 0/2] makedumpfile: improve write_kdump_pages_cyclic

2022-04-04 Thread Philipp Rudo
to be included even when one of them would be enough to fix the problem described above. Thanks Philipp Philipp Rudo (2): makedumpfile: omit unnecessary calls to print_progress makedumpfile: break loop after last dumpable page makedumpfile.c | 10 -- 1 file changed, 8 insertions(+), 2

Re: running into OOM killer with kexec loading large ramdisk

2022-03-25 Thread Philipp Rudo
Hi Tobias, On Wed, 23 Mar 2022 12:14:59 +0100 Tobias Powalowski wrote: > Hi, > again me, > I try to load a 900MB ramdisk on a ramfs rootfs with kexec and a 10MB kernel. > With 2800MB RAM assigned to qemu. > Memory free by /proc/memstat: 2.2GB > It keeps on OOM killed while executing: > kexec

[PATCH] util_lib/elf_info: harden parsing of printk buffer

2022-03-23 Thread Philipp Rudo
ile [1]. [1] http://lists.infradead.org/pipermail/kexec/2022-March/024272.html Signed-off-by: Philipp Rudo --- util_lib/elf_info.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c index d252eff..ce71c60 100644 --- a/u

[PATCH v2 0/4] makedumpfile: harden parsing of old prink buffer

2022-03-14 Thread Philipp Rudo
first_idx. * Add patch 4 fixing a bug independent from the memory corruption but found while investigating it. Philipp Rudo (4): makedumpfile: add generic cycle detection makedumpfile: use pointer arithmetics for dump_dmesg makedumpfile: use cycle detection when parsing

[PATCH v2 3/4] makedumpfile: use cycle detection when parsing the prink log_buf

2022-03-14 Thread Philipp Rudo
corruptions with msg->len != 0. Reported-by: Audra Mitchell Suggested-by: Dave Wysochanski Signed-off-by: Philipp Rudo --- makedumpfile.c | 48 +++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/makedumpfile.c b/makedumpfile.

[PATCH v2 4/4] makedumpfile: print error when reading with unsupported compression

2022-03-14 Thread Philipp Rudo
message if it isn't. Reported-by: Dave Wysochanski Signed-off-by: Philipp Rudo --- makedumpfile.c | 56 ++ 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index b7ac999..56f3b6c 100644

[PATCH v2 1/4] makedumpfile: add generic cycle detection

2022-03-14 Thread Philipp Rudo
-off-by: Philipp Rudo --- Makefile | 2 +- detect_cycle.c | 99 ++ detect_cycle.h | 40 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 detect_cycle.c create mode 100644 detect_cycle.h diff --git

[PATCH v2 2/4] makedumpfile: use pointer arithmetics for dump_dmesg

2022-03-14 Thread Philipp Rudo
ed-off-by: Philipp Rudo --- makedumpfile.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index 7ed9756..9a05c96 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -5482,13 +5482,10 @@ dump_log_entry(char *logpt

Re: [PATCH 3/3] makedumpfile: use cycle detection when parsing the prink log_buf

2022-03-11 Thread Philipp Rudo
Hi Kazu, On Fri, 11 Mar 2022 07:59:47 + HAGIO KAZUHITO(萩尾 一仁) wrote: > -Original Message- > > Hi Dave, > > > > On Wed, 9 Mar 2022 03:48:12 -0500 > > David Wysochanski wrote: > > > > > On Mon, Mar 7, 2022 at 12:23 PM Philipp Rud

Re: [PATCH 3/3] makedumpfile: use cycle detection when parsing the prink log_buf

2022-03-10 Thread Philipp Rudo
Hi Dave, On Wed, 9 Mar 2022 03:48:12 -0500 David Wysochanski wrote: > On Mon, Mar 7, 2022 at 12:23 PM Philipp Rudo wrote: > > > > The old printk mechanism (> v3.5.0 and < v5.10.0) had a fixed size > > buffer (log_buf) that contains all messages. The location for the

[PATCH 0/3] makedumpfile: harden parsing of old prink buffer

2022-03-07 Thread Philipp Rudo
parts of makedumpfile. Thanks Philipp Philipp Rudo (3): makedumpfile: add generic cycle detection makedumpfile: use pointer arithmetics for dump_dmesg makedumpfile: use cycle detection when parsing the prink log_buf Makefile | 2 +- detect_cycle.

[PATCH 3/3] makedumpfile: use cycle detection when parsing the prink log_buf

2022-03-07 Thread Philipp Rudo
corruptions with msg->len != 0. Fixes: 36c2458 ("[PATCH] --dump-dmesg fix for post 3.5 kernels.") Reported-by: Audra Mitchell Suggested-by: Dave Wysochanski Signed-off-by: Philipp Rudo --- makedumpfile.c | 42 -- 1 file changed, 40 insertions

[PATCH 2/3] makedumpfile: use pointer arithmetics for dump_dmesg

2022-03-07 Thread Philipp Rudo
ed-off-by: Philipp Rudo --- makedumpfile.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/makedumpfile.c b/makedumpfile.c index 7ed9756..edf128b 100644 --- a/makedumpfile.c +++ b/makedumpfile.c @@ -5482,13 +5482,10 @@ dump_log_entry(char *logptr,

[PATCH 1/3] makedumpfile: add generic cycle detection

2022-03-07 Thread Philipp Rudo
-off-by: Philipp Rudo --- Makefile | 2 +- detect_cycle.c | 99 ++ detect_cycle.h | 40 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 detect_cycle.c create mode 100644 detect_cycle.h diff --git

Re: [RFC PATCH] kdump: Add support for crashkernel=auto

2022-02-15 Thread Philipp Rudo
Hi Petr, On Fri, 4 Feb 2022 06:34:19 +0100 Petr Tesařík wrote: > Hi Philipp, > > Dne 31. 01. 22 v 11:33 Philipp Rudo napsal(a): > > Hi, > > > > On Fri, 28 Jan 2022 11:31:49 +0100 > > Petr Tesařík wrote: > > > >> Hi Tiezhu Yang, >

Re: Is it possible to use a stream for initrd=

2022-02-15 Thread Philipp Rudo
Hi Tobias, On Wed, 9 Feb 2022 10:32:24 +0100 Tobias Powalowski wrote: > Sorry you misunderstood, I don't want to create the initrd.img file. > I want to pass the zstd directly to kexec initrd= option. sorry, that is not possible. The kexec-tools expect a file name with --initrd. Simply passing

Re: [RFC PATCH] kdump: Add support for crashkernel=auto

2022-01-31 Thread Philipp Rudo
Hi, On Fri, 28 Jan 2022 11:31:49 +0100 Petr Tesařík wrote: > Hi Tiezhu Yang, > > On Jan 28, 2022 at 02:20 Tiezhu Yang wrote: > >[...] > > Hi Petr, > > > > Thank you for your reply. > > > > This is a RFC patch, the initial aim of this patch is to discuss what is > > the proper way to support

Re: [PATCHv4 1/4] arm64: make phys_offset signed

2022-01-20 Thread Philipp Rudo
changing phys_offset from unsigned to signed. > > Signed-off-by: Pingfan Liu > Cc: Kairui Song > Cc: Simon Horman > Cc: Philipp Rudo > To: kexec@lists.infradead.org > --- > kexec/arch/arm64/kexec-arm64.c | 12 ++-- > kexec/arch/arm64/kexec-arm64.h | 2 +- > uti

Re: [PATCHv4 2/4] arm64/crashdump: unify routine to get page_offset

2022-01-20 Thread Philipp Rudo
troduce 52-bits VA kernel more > easily in the coming patch. > > Signed-off-by: Pingfan Liu > Cc: Kairui Song > Cc: Simon Horman > Cc: Philipp Rudo > To: kexec@lists.infradead.org looks good Reviewed-by: Philipp Rudo > --- > kexec/arch/arm64/crashdump-arm64.c | 2

Re: [PATCHv4 3/4] arm64: read VA_BITS from kcore for 52-bits VA kernel

2022-01-20 Thread Philipp Rudo
> Cc: Kairui Song > Cc: Simon Horman > Cc: Philipp Rudo > To: kexec@lists.infradead.org looks good Reviewed-by: Philipp Rudo > --- > kexec/arch/arm64/kexec-arm64.c | 34 ++ > util_lib/elf_info.c| 5 + > util_lib/include/e

Re: [PATCHv4 4/4] arm64: fix PAGE_OFFSET calc for flipped mm

2022-01-20 Thread Philipp Rudo
re bit to > get the VA_BITS, and shift the exact VA_BITS for PAGE_OFFSET. > > We can simply check if "_text > -1UL << (VA_BITS - 1)" is true to judge > which layout is being used and shift the page offset occordingly. > > Signed-off-by: Kairui Song > (reb

Re: [PATCH v2 3/5] add slurp_proc_file()

2021-12-15 Thread Philipp Rudo
Hi Sven, sorry, i need to nag again. On Wed, 15 Dec 2021 11:18:34 +0100 Sven Schnelle wrote: > slurp_file() cannot be used to read proc files, as they are returning > a size of zero in stat(). Add a function slurp_proc_file() which is > similar to slurp_file(), but doesn't require the size of

Re: [PATCH 3/3] arm64: read VA_BITS from kcore for 52-bits VA kernel

2021-12-15 Thread Philipp Rudo
Hi Pingfang, On Fri, 10 Dec 2021 11:07:35 +0800 Pingfan Liu wrote: > phys_to_virt() calculates virtual address. As a important factor, > page_offset is excepted to be accurate. > > Since arm64 kernel exposes va_bits through vmcore, using it. > > Signed-off-by: Pingfan Liu > --- >

Re: [PATCH 2/3] arm64/crashdump: unify routine to get page_offset

2021-12-15 Thread Philipp Rudo
Hi Pinfang, On Fri, 10 Dec 2021 11:07:34 +0800 Pingfan Liu wrote: > There are two funcs to get page_offset: > get_kernel_page_offset() > get_page_offset() > > Since get_kernel_page_offset() does not observe the kernel formula, and > remove it. Unify them in order to introduce 52-bits VA

Re: [PATCH] kernel/crash_core.c: No judgment required

2021-12-14 Thread Philipp Rudo
Hi lizhe, On Thu, 9 Dec 2021 19:20:03 -0800 lizhe wrote: > No judgment required ck_cmdline is NULL > its caller has alreadly judged, see __parse_crashkernel > function > > Signed-off-by: lizhe > --- > kernel/crash_core.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git

Re: [PATCH 1/1] s390: handle R_390_PLT32DBL reloc entries in machine_apply_elf_rel()

2021-12-13 Thread Philipp Rudo
Luckily the kexec-tools do proper error checking and die with "Unknown rela relocation: 0x14 0x73c0901c" when they encounter an unknown relocation type. Anyway, the code is correct Reviewed-by: Philipp Rudo > Furthermore, the clang C compiler has always behaved like desc

[PATCH v2] kernel/crash_core: suppress unknown crashkernel parameter warning

2021-12-08 Thread Philipp Rudo
fb0 ("init: print out unknown kernel parameters") Signed-off-by: Philipp Rudo Acked-by: Baoquan He --- v2: - improve commit message - add Acked-by from Baoquan --- kernel/crash_core.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kernel/crash_core.c b

Re: [PATCH v2 0/6] KEXEC_SIG with appended signature

2021-12-08 Thread Philipp Rudo
Hi Michal, On Tue, 7 Dec 2021 18:32:21 +0100 Michal Suchánek wrote: > On Tue, Dec 07, 2021 at 05:10:14PM +0100, Philipp Rudo wrote: > > Hi Michal, > > > > i finally had the time to take a closer look at the series. Except for > > the nit in patch 4 and my per

Re: [PATCH v2 6/6] module: Move duplicate mod_check_sig users code to mod_parse_sig

2021-12-07 Thread Philipp Rudo
Hi Michal, On Thu, 25 Nov 2021 19:02:44 +0100 Michal Suchanek wrote: > Multiple users of mod_check_sig check for the marker, then call > mod_check_sig, extract signature length, and remove the signature. > > Put this code in one place together with mod_check_sig. > > Signed-off-by: Michal

Re: [PATCH v2 4/6] module: strip the signature marker in the verification function.

2021-12-07 Thread Philipp Rudo
Hi Michal, On Thu, 25 Nov 2021 19:02:42 +0100 Michal Suchanek wrote: > It is stripped by each caller separately. > > Signed-off-by: Michal Suchanek > --- > arch/powerpc/kexec/elf_64.c | 9 - > arch/s390/kernel/machine_kexec_file.c | 9 - > kernel/module.c

Re: [PATCH v2 0/6] KEXEC_SIG with appended signature

2021-12-07 Thread Philipp Rudo
Hi Michal, i finally had the time to take a closer look at the series. Except for the nit in patch 4 and my personal preference in patch 6 the code looks good to me. What I don't like are the commit messages on the first commits. In my opinion they are so short that they are almost useless. For

Re: [PATCH 3/3] s390: add support for --reuse-cmdline

2021-12-07 Thread Philipp Rudo
Hi Sven, makes absolutely sense to have this option. One problem though... On Mon, 22 Nov 2021 08:14:01 +0100 Sven Schnelle wrote: > --reuse-cmdline reads the command line of the currently > running kernel from /proc/cmdline and uses that for the > kernel that should be kexec'd. > >

Re: [PATCH 1/3] s390: add variable command line size

2021-12-07 Thread Philipp Rudo
Hi Sven, On Mon, 22 Nov 2021 08:13:59 +0100 Sven Schnelle wrote: > Newer s390 kernels support a command line size longer than 896 > bytes. Such kernels contain a new member in the parameter area, > which might be utilized by tools like kexec. Older kernels have > the location initialized to

Re: [PATCH] kernel/crash_core: suppress unknown crashkernel parameter warning

2021-12-07 Thread Philipp Rudo
Hi Baoquan, On Tue, 7 Dec 2021 11:34:46 +0800 Baoquan He wrote: > On 12/06/21 at 12:17pm, Philipp Rudo wrote: > > When booting with crashkernel= on the kernel command line a warning > > similar to > > > > [0.038294] Kernel command line: ro console=ttyS0 crashke

[PATCH] kernel/crash_core: suppress unknown crashkernel parameter warning

2021-12-06 Thread Philipp Rudo
init: print out unknown kernel parameters") Signed-off-by: Philipp Rudo --- kernel/crash_core.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index eb53f5ec62c9..256cf6db573c 100644 --- a/kernel/crash_core.c +++ b/kernel/crash

Re: [PATCH] s390/kexec: fix memory leak of ipl report buffer

2021-10-29 Thread Philipp Rudo
age_arch to s390 to pass out the ipl report buffer > address, and introduce arch dependent function > arch_kimage_file_post_load_cleanup() to free it when unloaded. > > Signed-off-by: Baoquan He other than a missing Fixes: 99feaa717e55 ("s390/kexec_file: Create ipl report and pass to

[PATCH 2/2] makedumpfile: Fix --dry-run for incomplete dumps

2021-08-12 Thread Philipp Rudo
as file size for the output file and the second one by always returning TRUE for check_and_modify_headers. Fixes: 3422e1d ("[PATCH 1/2] Add --dry-run option to prevent writing the dumpfile") Signed-off-by: Philipp Rudo --- makedumpfile.c | 9 - 1 file changed, 8 insertions(+),

[PATCH 1/2] makedumpfile: Fix bad file descriptor error when using --dry-run

2021-08-12 Thread Philipp Rudo
in write_and_check_space will fail. Fix this by treating a dry run as if writing to STDOUT. Fixes: f0cfa86 ("[PATCH v2 3/3] Add -L option to limit output file size") Signed-off-by: Philipp Rudo --- makedumpfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makedu

[PATCH 0/2] makedumpfile: fix two bugs with --dry-run

2021-08-12 Thread Philipp Rudo
Hi, While playing with the --dry-run option I noticed two bugs. You can find the fixes below. Thanks Philipp Philipp Rudo (2): makedumpfile: Fix bad file descriptor error when using --dry-run makedumpfile: Fix --dry-run for incomplete dumps makedumpfile.c | 11 +-- 1 file changed

Re: [PATCH] Only allow to set crash_kexec_post_notifiers on boot time

2020-09-29 Thread Philipp Rudo
Hi, On Fri, 25 Sep 2020 10:56:25 -0400 Konrad Rzeszutek Wilk wrote: > On Fri, Sep 25, 2020 at 11:05:58AM +0800, Dave Young wrote: > > Hi, > > > > On 09/24/20 at 01:16pm, boris.ostrov...@oracle.com wrote: > > > > > > On 9/24/20 12:43 PM, Michael Kelley wrote: > > > > From: Eric W.

Re: [PATCH] Only allow to set crash_kexec_post_notifiers on boot time

2020-09-22 Thread Philipp Rudo
Hi Konrad, On Mon, 21 Sep 2020 16:18:12 -0400 Konrad Rzeszutek Wilk wrote: > On Fri, Sep 18, 2020 at 05:47:43PM -0700, Andrew Morton wrote: > > On Fri, 18 Sep 2020 11:25:46 +0800 Dave Young wrote: > > > > > crash_kexec_post_notifiers enables running various panic notifier > > > before

Re: [PATCH V40 08/29] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE

2019-08-30 Thread Philipp Rudo
Hi Matthew, found a typo ... On Mon, 19 Aug 2019 17:17:44 -0700 Matthew Garrett wrote: [...] > index 6d0635ceddd0..9b4f37a4edf1 100644 > --- a/arch/s390/kernel/kexec_elf.c > +++ b/arch/s390/kernel/kexec_elf.c > @@ -130,7 +130,7 @@ static int s390_elf_probe(const char *buf, unsigned long >

Re: [PATCH RFC] generic ELF support for kexec

2019-07-01 Thread Philipp Rudo
Hi Sven, On Tue, 25 Jun 2019 20:54:34 +0200 Sven Schnelle wrote: > Hi List, > > i recently started working on kexec for PA-RISC. While doing so, i figured > that powerpc already has support for reading ELF images inside of the Kernel. > My first attempt was to steal the source code and modify

Re: [PATCH v13 03/16] s390, kexec_file: drop arch_kexec_mem_walk()

2018-08-01 Thread Philipp Rudo
next patch, where all the > variant memory walks, either on system resource or memblock, will be > put in one common place so that it will satisfy all the architectures' > need. > > Signed-off-by: AKASHI Takahiro > Reviewed-by: Philipp Rudo > Cc: Martin Schwidefsky > Cc:

Re: [PATCH v12 03/16] s390, kexec_file: drop arch_kexec_mem_walk()

2018-07-24 Thread Philipp Rudo
Hi AKASHI, the patch looks good to me. Reviewed-by: Philipp Rudo Thanks Philipp On Tue, 24 Jul 2018 15:57:46 +0900 AKASHI Takahiro wrote: > Since s390 already knows where to locate buffers, calling > arch_kexec_mem_walk() has no sense. So we can just drop it as kbuf->mem &g

Re: [PATCH 0/1] x86/purgatory: Fix Makefile bug

2018-07-05 Thread Philipp Rudo
Hi Dave, On Thu, 5 Jul 2018 14:46:20 +0800 Dave Young wrote: > On 07/04/18 at 01:00pm, Philipp Rudo wrote: > > Hi everybody, > > > > when i moved the purgatories sha256 implementation to common code, i forgot > > to add FORCE to the new Makefile target. This patch

[PATCH 0/1] x86/purgatory: Fix Makefile bug

2018-07-04 Thread Philipp Rudo
Hi everybody, when i moved the purgatories sha256 implementation to common code, i forgot to add FORCE to the new Makefile target. This patch fixes it. Note: There is an equivalent bug in the s390 purgatory. The fix for that will go upstream via Martin. Thanks Philipp Philipp Rudo (1): x86

[PATCH 1/1] x86/purgatory: Add missing FORCE to Makefile target

2018-07-04 Thread Philipp Rudo
.17 Signed-off-by: Philipp Rudo --- arch/x86/purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile index 2e9ee023e6bc..81a8e33115ad 100644 --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile @@

Re: [PATCH] kexec/s390: Add support for kexec_file_load

2018-05-28 Thread Philipp Rudo
On Tue, 22 May 2018 10:11:04 +0200 Simon Horman <ho...@verge.net.au> wrote: > On Mon, May 21, 2018 at 02:24:40PM +0800, Dave Young wrote: > > On 05/16/18 at 02:27pm, Philipp Rudo wrote: > > > Since kernel 4.17-rc2 s390 supports the kexec_file_load system call. Add &

Re: [PATCH v1 0/2] kexec: Remove "weak" annotations from headers

2018-04-13 Thread Philipp Rudo
Hi Bjorn, in recent patches AKASHI [1] and I [2] made some changes to the declarations you are touching and already removed some of the weak statements. The patches got accepted on linux-next and will (hopefully) be pulled for v4.17. So you should prepare for some merge conflicts. Nevertheless

Re: [PATCH v2 00/11] kexec_file: Clean up purgatory load

2018-03-23 Thread Philipp Rudo
12:27:40 +0100 Philipp Rudo <pr...@linux.vnet.ibm.com> > wrote: > > > here is the updated patch set including Dave's comments. > > There were some syntactic clashes with the "kexec_file, x86, powerpc: > refactoring for other architecutres" series. Please che

[PATCH v2 11/11] kexec_file: Move purgatories sha256 to common code

2018-03-21 Thread Philipp Rudo
to common code and changing the include to linux/string.h both functions are no longer defined. Thus definitions have to be provided in x86/purgatory/string.c Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com> --- arch/x86/purgatory/Makefile| 3 +++ arch/x86/purgatory/purga

[PATCH v2 10/11] kexec_file: Allow archs to set purgatory load address

2018-03-21 Thread Philipp Rudo
hat we can get rid of the purgatory_info->purgatory_load_address field. As now the information stored there can directly be accessed from kbuf->mem. Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com> Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/powerpc/ke

[PATCH v2 05/11] kexec_file: Use read-only sections in arch_kexec_apply_relocations*

2018-03-21 Thread Philipp Rudo
the signatures of arch_kexec_apply_relocations* to take section pointers instead of just the index of the relocation section. This removes the second lookup and sanity check of the sections in arch code. Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com> --- arch/x86/kernel/machine_kexec_64.

[PATCH v2 02/11] kexec_file: Remove checks in kexec_purgatory_load

2018-03-21 Thread Philipp Rudo
. On the other hand the purgatory, although an ELF file on its own, is part of the kernel. Thus not trusting the purgatory means not trusting the kernel build itself. So remove all validity checks on the purgatory and just trust the kernel build. Signed-off-by: Philipp Rudo <

[PATCH v2 08/11] kexec_file: Remove unneeded variables in kexec_purgatory_setup_sechdrs

2018-03-21 Thread Philipp Rudo
The main loop currently uses quite a lot of variables to update the section headers. Some of them are unnecessary. So clean them up a little. Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com> --- kernel/kexec_file.c | 34 -- 1 file changed, 12 inse

[PATCH v2 09/11] kexec_file: Remove mis-use of sh_offset field during purgatory load

2018-03-21 Thread Philipp Rudo
lation of the ELF standard but also makes the code very hard to understand as you cannot tell if the memory you are using is read-only or not. Remove this mis-use and store the offset of the section in pugaroty_info->purgatory_buf in sh_offset. Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.co

[PATCH v2 06/11] kexec_file: Split up __kexec_load_puragory

2018-03-21 Thread Philipp Rudo
ory into two functions, one for each task, and call them directly from kexec_load_purgatory. Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com> --- kernel/kexec_file.c | 200 +++- 1 file changed, 103 insertions(+), 97 deletions(-) diff --git

[PATCH v2 00/11] kexec_file: Clean up purgatory load

2018-03-21 Thread Philipp Rudo
off. objtool SEGFAULTs on s390... Philipp Rudo (11): kexec_file: Silence compile warnings kexec_file: Remove checks in kexec_purgatory_load kexec_file: Make purgatory_info->ehdr const kexec_file: Search symbols in read-only kexec_purgatory kexec_file: Use re

[PATCH v2 07/11] kexec_file: Remove unneeded for-loop in kexec_purgatory_setup_sechdrs

2018-03-21 Thread Philipp Rudo
if-block. Signed-off-by: Philipp Rudo <pr...@linux.vnet.ibm.com> Reviewed-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- kernel/kexec_file.c | 76 + 1 file changed, 30 insertions(+), 46 deletions(-) diff --git a/kernel/kexec_fil

  1   2   >