lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ARM: mmu: fix access to illegal address when using earlycon & memblock=debug
On Fri, Jun 17, 2022 at 3:31 PM Victor Hassan <victor@allwinnertech.com> wrote:
> On 4/18/2022 11:08 PM, Victor Hassan wrote:
> > On 18/04/2022 07:21, Linus Walleij wrote:
> >> On Wed, Mar 16, 2022 at 3:33 AM Victor Hassan
> >> <victor@allwinnertech.com> wrote:
> >>
> >>> earlycon uses fixmap to create a memory map,
> >>> So we need to close earlycon before closing fixmap,
> >>> otherwise printk will access illegal addresses.
> >>> After creating a new memory map, we open earlycon again.
> >>>
> >>> Signed-off-by: Victor Hassan <victor@allwinnertech.com>
> >>
> >> I think noone really noticed this because everyone on Arm systems
> >> use CONFIG_DEBUG_LL, and that makes printascii hammer out
> >> stuff on the console very early, it even accounts for whether we have
> >> MMU on or not.
> >>
> > Hi Linus,
> > Thank you for the reply. I used earlycon, in early_fixmap_shutdown, the
> > base address of earlycon is in the critical stage of release and
> > reassignment, so early_fixmap_shutdown -> create_mapping should not call
> > earlycon in this process, and create_mapping has a lot of conditions
> > that trigger print, memblock=debug just makes it easier to expose problems.
> >
> >> How are you using this on Arm even? What system and what serial
> >> driver?
> > I'm using serial driver 8250 on arm32, with cmdline: memblock=debug.
> > CONFIG_SERIAL_8250=y
> > CONFIG_SERIAL_8520_CONSOLE=y
> >>
> >> That said, it looks correct.
> >> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Hi Linus,
> Sorry to disturb. Is there any question about this issue? Thank you :)

No, I understand the problem, I provided my ACK.

Maybe you wanna add the patch to Russell's patch tracker so
he can apply it?
https://www.arm.linux.org.uk/developer/patches/

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2022-06-28 10:36    [W:0.074 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site