All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Maxime Bizon <mbizon@freebox.fr>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Fail to boot 5.15 on mpc8347 with either debug_pagealloc or nobats
Date: Mon, 6 Dec 2021 07:03:39 +0000	[thread overview]
Message-ID: <cea77e1e-9972-33cf-3ef8-e0be5ff26b63@csgroup.eu> (raw)
In-Reply-To: <20211205214408.GC29658@sakura>



Le 05/12/2021 à 22:44, Maxime Bizon a écrit :
> 
> 
> On Sunday 05 Dec 2021 à 18:11:59 (+0000), Christophe Leroy wrote:
> 
>>> Is BAT5 needed here ?
>>
>> Sure it is, because that's were kernel expects lowmem to be mapped.
>> Allthough the kernel will unlikely access the 128M reserved for KASAN
>> directly, the other 128M are still needed.
>>
> 
> Yes that was my point
> 
> I'm wondering if for specific PAGE_OFFSET values, __mmu_mapin_ram()
> ends using a BAT to map exactly the KASAN area, thus wasting it
> because the kernel would never/rarely access it.

Is it worth it ? I have the feeling that's more a corner case.


> 
> Or worse, it could consume the latest BAT available, and there would
> be none left for the actual KASAN vm area

Even more.

> 
> Maybe mmu_mapin_ram() could clamp top to KASAN phys start.
> 


An alternative could be to try and use for KASAN some memory which is 
not available in the linear mapping.
For instance, in your case, you have move than 2G bytes mem I guess and 
you are mapping 0x00000000 to 0x5fffffff. Maybe could use 0x6000000 up 
for KASAN.

But I don't know how to proceed to do it that way. Today we use 
memblock_alloc() which is the only memory allocator available at the 
time we allocate KASAN shadow area. But memblock_alloc() allocates 
memory from the directly accessible area.

Christophe

  reply	other threads:[~2021-12-06  7:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f23763d551e65d4a225ba13c7898f83853c2aeaf.camel@freebox.fr>
2021-12-03 12:49 ` Fail to boot 5.15 on mpc8347 with either debug_pagealloc or nobats Christophe Leroy
2021-12-03 18:43   ` Maxime Bizon
2021-12-04 10:01     ` Christophe Leroy
2021-12-04 14:10       ` Maxime Bizon
2021-12-04 17:42         ` Christophe Leroy
2021-12-05 16:42           ` Maxime Bizon
2021-12-05 18:11             ` Christophe Leroy
2021-12-05 21:44               ` Maxime Bizon
2021-12-06  7:03                 ` Christophe Leroy [this message]
2021-12-06  8:47                   ` Maxime Bizon
2021-12-06  9:07                     ` Christophe Leroy
2021-12-06 10:32                       ` Maxime Bizon
2021-12-06 14:22                         ` Christophe Leroy
2021-12-06 15:48                           ` Maxime Bizon
2021-12-07  5:50                             ` Christophe Leroy
2021-12-07  6:11                               ` Christophe Leroy
2021-12-12 11:21                                 ` Maxime Bizon
2021-12-07  5:54             ` Christophe Leroy
2021-12-07  9:04               ` Maxime Bizon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cea77e1e-9972-33cf-3ef8-e0be5ff26b63@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mbizon@freebox.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.