public inbox for linux-mips@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] MIPS: mm: kmalloc tlb_vpn array to avoid stack overflow
Date: Sat, 29 Nov 2025 13:42:30 +0100	[thread overview]
Message-ID: <aSrqNv5xupUXLo6d@alpha.franken.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2511281647170.36486@angie.orcam.me.uk>

On Fri, Nov 28, 2025 at 04:53:46PM +0000, Maciej W. Rozycki wrote:
> From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> 
> Owing to Config4.MMUSizeExt and VTLB/FTLB MMU features later MIPSr2+ 
> cores can have more than 64 TLB entries.  Therefore allocate an array 
> for uniquification instead of placing too small an array on the stack.
> 
> Fixes: 35ad7e181541 ("MIPS: mm: tlb-r4k: Uniquify TLB entries on init")
> Co-developed-by: Maciej W. Rozycki <macro@orcam.me.uk>
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: stable@vger.kernel.org # v6.17+: 9f048fa48740: MIPS: mm: Prevent a TLB shutdown on initial uniquification
> Cc: stable@vger.kernel.org # v6.17+
> ---
>  Verified with Malta/74Kf and Malta/interAptiv for initial and secondary 
> CPU bootstrap.  The PM path hasn't been covered, but is expected to be 
> the same as secondary CPU bootstrap.
> 
>  NB Malta/interAptiv has issues later on in SMP boot (boots fine UP) and 
> hangs with repeated:
> 
> irq 23: nobody cared (try booting with the "irqpoll" option)
> CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.18.0-rc1-dirty #2 NONE
> 
> messages (for the CP0 timer interrupt AFAICT; GIC timer is supposed to 
> be used instead).  This will have to be bisected.
> 
> Changes from v4:
> 
> - Mark `r4k_tlb_uniquify' `__ref' so as to silence `modpost'.
> 
> Changes from v3:
> 
> - Rearrange tags including stable backport ones so as to pick the original 
>   change together with this fix only.
> 
> Changes from v2:
> 
> - Use the bootmem allocator for early calls (CPU #0 bootstrap).
> 
> - Update the change description; mark for stable backporting.
> ---
>  arch/mips/mm/tlb-r4k.c |   18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)

applied to mips-fixes.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2025-11-29 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 16:53 [PATCH v5] MIPS: mm: kmalloc tlb_vpn array to avoid stack overflow Maciej W. Rozycki
2025-11-29 12:42 ` Thomas Bogendoerfer [this message]

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=aSrqNv5xupUXLo6d@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=gregory.clement@bootlin.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox