Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-08 Thread Roman Gushchin
On Sat, Mar 06, 2021 at 09:29:09AM +0100, Thomas Bogendoerfer wrote: > BMIPS is one of the few platforms that do change the exception base. > After commit 2dcb39645441 ("memblock: do not start bottom-up allocations > with kernel_end") we started seeing BMIPS boards fail to boot with the > built-in

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-07 Thread Maciej W. Rozycki
On Mon, 8 Mar 2021, Serge Semin wrote: > > some of them are not R2 (SB1), others are. So best bet would be to > > simply reserve the first 0x1000 bytes for every CPU and special handling > > for the BMIPS case. Does this cover all cases ? > > I can't say for sure whether it will cover all the

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-07 Thread Serge Semin
On Sun, Mar 07, 2021 at 10:20:01PM +0100, Thomas Bogendoerfer wrote: > On Sun, Mar 07, 2021 at 11:06:12PM +0300, Serge Semin wrote: > > > + > > > + if (cpu_has_mips_r2_r6) > > > + reserve_exception_space(0, 0x400); > > > > Are you sure it shouldn't be (!cpu_has_mips_r2_r6)?. What I see

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-07 Thread Maciej W. Rozycki
On Sun, 7 Mar 2021, Thomas Bogendoerfer wrote: > > Are you sure all of them have "cpu_has_mips_r2_r6" macro returning > > true (false) in order to safely use the lowest region in accordance > > with the conditional statement you've added? > > some of them are not R2 (SB1), others are. For the

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-07 Thread Thomas Bogendoerfer
On Sun, Mar 07, 2021 at 11:06:12PM +0300, Serge Semin wrote: > > + > > + if (cpu_has_mips_r2_r6) > > + reserve_exception_space(0, 0x400); > > Are you sure it shouldn't be (!cpu_has_mips_r2_r6)?. What I see here > contradicts to what is said in Changelog v2. d'oh, of course it has to

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-07 Thread Serge Semin
Hi Thomas. I thought we'd discuss it in v1, but since you've sent v2 please see my comment below. On Sat, Mar 06, 2021 at 09:29:09AM +0100, Thomas Bogendoerfer wrote: > BMIPS is one of the few platforms that do change the exception base. > After commit 2dcb39645441 ("memblock: do not start

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-06 Thread Mike Rapoport
On Sat, Mar 06, 2021 at 09:29:09AM +0100, Thomas Bogendoerfer wrote: > BMIPS is one of the few platforms that do change the exception base. > After commit 2dcb39645441 ("memblock: do not start bottom-up allocations > with kernel_end") we started seeing BMIPS boards fail to boot with the > built-in

Re: [PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-06 Thread Florian Fainelli
On 3/6/2021 12:29 AM, Thomas Bogendoerfer wrote: > BMIPS is one of the few platforms that do change the exception base. > After commit 2dcb39645441 ("memblock: do not start bottom-up allocations > with kernel_end") we started seeing BMIPS boards fail to boot with the > built-in FDT being

[PATCH v2] MIPS: kernel: Reserve exception base early to prevent corruption

2021-03-06 Thread Thomas Bogendoerfer
BMIPS is one of the few platforms that do change the exception base. After commit 2dcb39645441 ("memblock: do not start bottom-up allocations with kernel_end") we started seeing BMIPS boards fail to boot with the built-in FDT being corrupted. Before the cited commit, early allocations would be in