RPi5: Kernel fails to boot with CONFIG_INIT_STACK_NONE=y (works with INIT_STACK_ALL_ZERO)

Open
#7,336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
c, linux

Research direction

Start by reproducing the failure on Raspberry Pi 5 with rpi-6.12.y, a bcm2712_defconfig-based configuration, clang, and CONFIG_INIT_STACK_NONE=y. Compare the early-boot and networking behavior against CONFIG_INIT_STACK_ALL_ZERO=y; done means the kernel boots and networking works with stack initialization disabled.

Written by the indexing model from the issue text.

Description

Describe the bug

I encountered a configuration-dependent issue on Raspberry Pi 5 related to stack initialization.

When using:

CONFIG_INIT_STACK_NONE=y

the system exhibits failures, while switching to:

CONFIG_INIT_STACK_ALL_ZERO=y

resolves the issue completely.

Tested on:

  • Raspberry Pi 5
  • Kernel: rpi-6.12.y (tested on 6.12.79 and 6.12.83)
  • Toolchain: clang (LLVM)
  • Custom config derived from bcm2712_defconfig

Behavior:

Kernel 6.12.79:

  • System does not reach kernel output
  • No visible logs
  • Fan remains at high speed (system appears stuck very early in boot)

Kernel 6.12.83:

  • System boots
  • Networking does not come up

Switching back to:

CONFIG_INIT_STACK_ALL_ZERO=y

restores full functionality, including networking.

The issue is reproducible by changing only:

CONFIG_INIT_STACK_ALL_ZERO y -> n
CONFIG_INIT_STACK_NONE n -> y

This suggests a possible dependency on implicitly zero-initialized stack data in early boot or platform/network initialization code.

Steps to reproduce the behaviour
  1. Build kernel for Raspberry Pi 5 using rpi-6.12.y

  2. Use a config based on bcm2712_defconfig

  3. Set:

    CONFIG_INIT_STACK_NONE=y

  4. Boot system

Result:

  • Kernel 6.12.79: system hangs very early
  • Kernel 6.12.83: system boots but networking is not working
  1. Change config to:

    CONFIG_INIT_STACK_ALL_ZERO=y

  2. Rebuild and reboot

Result:

  • System boots correctly
  • Networking works
Device (s)

Raspberry Pi 5

System

OS: Gentoo-based custom system
Kernel: rpi-6.12.y (6.12.79 and 6.12.83)
Toolchain: clang (LLVM)
Firmware: 2026/02/23 10:01:39
Copyright (c) 2012 Broadcom
version 85353ce4 (release) (embedded)

Logs

No response

Additional context

No response

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.