Re: [PATCH V3] panic: Move panic_print before kmsg dumpers

2022-01-20 Thread Baoquan He
On 01/20/22 at 06:36pm, Guilherme G. Piccoli wrote: > Hi Baoquan, some comments inline below: > > > On 20/01/2022 05:51, Baoquan He wrote: > > [...] > >> From my POV, the function of panic notifiers is not well defined. They > >> do various things, for example: > >> [...] > >> The do more that ju

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

2022-01-20 Thread Pingfan Liu
On Fri, Jan 21, 2022 at 2:09 AM Philipp Rudo wrote: > > Hi Pingfan, > > On Tue, 18 Jan 2022 15:48:09 +0800 > Pingfan Liu wrote: > > > After kernel commit 7bc1a0f9e176 ("arm64: mm: use single quantity to > > represent the PA to VA translation"), phys_offset can be negative if > > running 52-bits k

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

2022-01-20 Thread Pingfan Liu
On Fri, Jan 21, 2022 at 2:09 AM Philipp Rudo wrote: > > Hi Pingfan, > > On Tue, 18 Jan 2022 15:48:12 +0800 > Pingfan Liu wrote: > > > From: Kairui Song > > > > Since kernel commit 14c127c957c1 ('arm64: mm: Flip kernel VA space'), > > the memory layout on arm64 have changed, and kexec-tools can n

Re: [PATCH V3] panic: Move panic_print before kmsg dumpers

2022-01-20 Thread Guilherme G. Piccoli
Hi Baoquan, some comments inline below: On 20/01/2022 05:51, Baoquan He wrote: > [...] >> From my POV, the function of panic notifiers is not well defined. They >> do various things, for example: >> [...] >> The do more that just providing information. Some are risky. It is not >> easy to disable

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

2022-01-20 Thread Philipp Rudo
Hi Pingfan, On Tue, 18 Jan 2022 15:48:09 +0800 Pingfan Liu wrote: > After kernel commit 7bc1a0f9e176 ("arm64: mm: use single quantity to > represent the PA to VA translation"), phys_offset can be negative if > running 52-bits kernel on 48-bits hardware. > > So changing phys_offset from unsigned

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

2022-01-20 Thread Philipp Rudo
Hi Pingfan, On Tue, 18 Jan 2022 15:48:10 +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 ker

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

2022-01-20 Thread Philipp Rudo
Hi Pingfan, On Tue, 18 Jan 2022 15:48:11 +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 > Cc: Kairui Song >

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

2022-01-20 Thread Philipp Rudo
Hi Pingfan, On Tue, 18 Jan 2022 15:48:12 +0800 Pingfan Liu wrote: > From: Kairui Song > > Since kernel commit 14c127c957c1 ('arm64: mm: Flip kernel VA space'), > the memory layout on arm64 have changed, and kexec-tools can no longer > get the the right PAGE_OFFSET based on _text symbol. > > P

Re: [PATCH V3] panic: Move panic_print before kmsg dumpers

2022-01-20 Thread Guilherme G. Piccoli
On 20/01/2022 06:39, Petr Mladek wrote: > [...] > It makes perfect sense to disable the watchdogs during panic(). > For example, rcu_panic() just sets a variable: > > static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr) > { > rcu_cpu_stall_suppress = 1; > retu

Re: [PATCH V4] notifier/panic: Introduce panic_notifier_filter

2022-01-20 Thread Petr Mladek
Adding some more people into Cc. Some modified the logic in the past. Some are familiar with some interesting areas where the panic notfiers are used. On Sat 2022-01-08 12:34:51, Guilherme G. Piccoli wrote: > The kernel notifier infrastructure allows function callbacks to be > added in multiple li

Re: [PATCH v2 0/5] kexec: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef

2022-01-20 Thread Baoquan He
On 12/07/21 at 12:05am, Jisheng Zhang wrote: > Replace the conditional compilation using "#ifdef CONFIG_KEXEC_CORE" > by a check for "IS_ENABLED(CONFIG_KEXEC_CORE)", to simplify the code > and increase compile coverage. Only checked the x86 patch, but the whole patchset looks good to me, thanks, J

Re: [PATCH v2 0/5] kexec: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef

2022-01-20 Thread Baoquan He
On 01/19/22 at 07:44pm, Jisheng Zhang wrote: > On Wed, Jan 19, 2022 at 05:33:22PM +0800, Baoquan He wrote: > > On 01/19/22 at 09:52am, Alexandre Ghiti wrote: > > > Hi Baoquan, > > > > > > On Wed, Jan 19, 2022 at 9:11 AM Baoquan He wrote: > > > > > > > > On 01/18/22 at 10:13pm, Jisheng Zhang wrote

Re: [PATCH V3] panic: Move panic_print before kmsg dumpers

2022-01-20 Thread Petr Mladek
On Wed 2022-01-19 13:03:15, Guilherme G. Piccoli wrote: > Thanks again Petr, for the deep analysis! Much appreciated. > Some comments inline below: > > > On 19/01/2022 12:48, Petr Mladek wrote: > >[...] > > From my POV, the function of panic notifiers is not well defined. They > > do various thin

Re: [PATCH V3] panic: Move panic_print before kmsg dumpers

2022-01-20 Thread Baoquan He
On 01/19/22 at 04:48pm, Petr Mladek wrote: > On Wed 2022-01-19 15:13:18, Baoquan He wrote: > > On 01/14/22 at 03:30pm, Guilherme G. Piccoli wrote: > > > The panic_print setting allows users to collect more information in a > > > panic event, like memory stats, tasks, CPUs backtraces, etc. > > > Thi