Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-21 Thread Borislav Petkov
On Fri, Dec 17, 2021 at 10:51:04AM +0800, Leizhen (ThunderTown) wrote: > [KNL, X86-64], This doc is for X86-64, not for X86-32 reserve_crashkernel() runs on both. > If there is no such restriction, we can make CRASH_ADDR_LOW_MAX equal > to (1ULL << 32) minus 1 on X86_32. Again, the 4G limit chec

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Leizhen (ThunderTown)
On 2021/12/16 22:48, Borislav Petkov wrote: > On Thu, Dec 16, 2021 at 08:08:30PM +0800, Leizhen (ThunderTown) wrote: >> If the memory of 'crash_base' is successfully allocated at (1), because the >> last >> parameter CRASH_ADDR_LOW_MAX is the upper bound, so we can sure that >> "crash_base < CR

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Borislav Petkov
On Thu, Dec 16, 2021 at 10:11:15PM +0800, Baoquan He wrote: > As for the code refactoring, it can be done in another patchset. Well, I said "future work" before having seen where this patchset is going. So no, in that case, the usual kernel development process is: cleanups/fixes first - new featu

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Borislav Petkov
On Thu, Dec 16, 2021 at 08:08:30PM +0800, Leizhen (ThunderTown) wrote: > If the memory of 'crash_base' is successfully allocated at (1), because the > last > parameter CRASH_ADDR_LOW_MAX is the upper bound, so we can sure that > "crash_base < CRASH_ADDR_LOW_MAX". So that, reserve_crashkernel_low()

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Baoquan He
On 12/16/21 at 11:55am, Borislav Petkov wrote: > On Thu, Dec 16, 2021 at 09:10:40AM +0800, Baoquan He wrote: > > reserve_crashkernel_low() always return 0 on x86_32, so the not equivalent > > transformation for x86_32 doesn't matter, I think. > > That is, of course, very obvious... not! > > Why i

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Leizhen (ThunderTown)
On 2021/12/16 20:08, Leizhen (ThunderTown) wrote: > > > On 2021/12/16 19:07, Borislav Petkov wrote: >> On Thu, Dec 16, 2021 at 10:46:12AM +0800, Leizhen (ThunderTown) wrote: >>> The original value (1ULL << 32) is inaccurate >> >> I keep asking *why*? >> >>> and it enlarged the CRASH_ADDR_LOW u

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Leizhen (ThunderTown)
On 2021/12/16 19:07, Borislav Petkov wrote: > On Thu, Dec 16, 2021 at 10:46:12AM +0800, Leizhen (ThunderTown) wrote: >> The original value (1ULL << 32) is inaccurate > > I keep asking *why*? > >> and it enlarged the CRASH_ADDR_LOW upper limit. > > $ git grep -E "CRASH_ADDR_LOW\W" > $ > > I h

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Borislav Petkov
On Thu, Dec 16, 2021 at 10:46:12AM +0800, Leizhen (ThunderTown) wrote: > The original value (1ULL << 32) is inaccurate I keep asking *why*? > and it enlarged the CRASH_ADDR_LOW upper limit. $ git grep -E "CRASH_ADDR_LOW\W" $ I have no clue what you mean here. > This is because when the memory

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-16 Thread Borislav Petkov
On Thu, Dec 16, 2021 at 09:10:40AM +0800, Baoquan He wrote: > reserve_crashkernel_low() always return 0 on x86_32, so the not equivalent > transformation for x86_32 doesn't matter, I think. That is, of course, very obvious... not! Why is that function parsing crashkernel=XM, and crashkernel=X,hig

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-15 Thread Leizhen (ThunderTown)
On 2021/12/16 9:10, Baoquan He wrote: > On 12/15/21 at 02:28pm, Borislav Petkov wrote: >> On Fri, Dec 10, 2021 at 02:55:26PM +0800, Zhen Lei wrote: >>> @@ -518,7 +519,7 @@ static void __init reserve_crashkernel(void) >>> } >>> } >>> >>> - if (crash_base >= (1ULL << 32) && res

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-15 Thread Baoquan He
On 12/15/21 at 02:28pm, Borislav Petkov wrote: > On Fri, Dec 10, 2021 at 02:55:26PM +0800, Zhen Lei wrote: > > @@ -518,7 +519,7 @@ static void __init reserve_crashkernel(void) > > } > > } > > > > - if (crash_base >= (1ULL << 32) && reserve_crashkernel_low()) { > > + if (crash_

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-15 Thread Borislav Petkov
On Fri, Dec 10, 2021 at 02:55:26PM +0800, Zhen Lei wrote: > @@ -518,7 +519,7 @@ static void __init reserve_crashkernel(void) > } > } > > - if (crash_base >= (1ULL << 32) && reserve_crashkernel_low()) { > + if (crash_base >= CRASH_ADDR_LOW_MAX && reserve_crashkernel_low

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-14 Thread Baoquan He
On 12/14/21 at 03:24pm, Borislav Petkov wrote: > On Tue, Dec 14, 2021 at 05:56:57PM +0800, Baoquan He wrote: > > Ah, OK, I see the new paragraph from you added in below commit. > > That is supposed to make it absolutely clear and explicit. There are > other hints as to what a subsequent SOB means

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-14 Thread Borislav Petkov
On Tue, Dec 14, 2021 at 05:56:57PM +0800, Baoquan He wrote: > Ah, OK, I see the new paragraph from you added in below commit. That is supposed to make it absolutely clear and explicit. There are other hints as to what a subsequent SOB means in that document already. Just the next section says: "

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-14 Thread Baoquan He
On 12/14/21 at 10:38am, Borislav Petkov wrote: > On Tue, Dec 14, 2021 at 04:54:40PM +0800, Baoquan He wrote: > > If you didn't contribute change, Signed-off-by should be taken off. > > The second SOB is correct here. I'll let you figure it out what it > means. > > Hint: Documentation/process/subm

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-14 Thread Borislav Petkov
On Tue, Dec 14, 2021 at 04:54:40PM +0800, Baoquan He wrote: > If you didn't contribute change, Signed-off-by should be taken off. The second SOB is correct here. I'll let you figure it out what it means. Hint: Documentation/process/submitting-patches.rst -- Regards/Gruss, Boris. https://pe

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-14 Thread Baoquan He
On 12/10/21 at 02:55pm, Zhen Lei wrote: > From: Chen Zhou > > To make the functions reserve_crashkernel() as generic, > replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. > > Signed-off-by: Chen Zhou > Signed-off-by: Zhen Lei If you made change to this patch, please remove the old

Re: [PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-13 Thread john . p . donnelly
On 12/10/21 12:55 AM, Zhen Lei wrote: From: Chen Zhou To make the functions reserve_crashkernel() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou Signed-off-by: Zhen Lei Tested-by: John Donnelly Tested-by: Dave Kleikamp Acked-by: Baoquan

[PATCH v17 03/10] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel()

2021-12-09 Thread Zhen Lei
From: Chen Zhou To make the functions reserve_crashkernel() as generic, replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. Signed-off-by: Chen Zhou Signed-off-by: Zhen Lei Tested-by: John Donnelly Tested-by: Dave Kleikamp Acked-by: Baoquan He --- arch/x86/kernel/setup.c | 7 +++