)]}'
{
  "commit": "180bbad698641873120a48857bb3b9f3166bf684",
  "tree": "7a95f487b58a6a05b5986cb4fb1583550ca912b1",
  "parents": [
    "9cdc6423acb49055efb444ecd895d853a70ef931"
  ],
  "author": {
    "name": "Marc Zyngier",
    "email": "maz@kernel.org",
    "time": "Sun Dec 01 09:27:02 2024 +0000"
  },
  "committer": {
    "name": "Mike Rapoport (Microsoft)",
    "email": "rppt@kernel.org",
    "time": "Sun Dec 01 22:04:52 2024 +0200"
  },
  "message": "arch_numa: Restore nid checks before registering a memblock with a node\n\nCommit 767507654c22 (\"arch_numa: switch over to numa_memblks\")\nsignificantly cleaned up the NUMA registration code, but also\ndropped a significant check that was refusing to accept to\nconfigure a memblock with an invalid nid.\n\nOn \"quality hardware\" such as my ThunderX machine, this results\nin a kernel that dies immediately:\n\n[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x431f0a10]\n[    0.000000] Linux version 6.12.0-00013-g8920d74cf8db (maz@valley-girl) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #3872 SMP PREEMPT Wed Nov 27 15:25:49 GMT 2024\n[    0.000000] KASLR disabled due to lack of seed\n[    0.000000] Machine model: Cavium ThunderX CN88XX board\n[    0.000000] efi: EFI v2.4 by American Megatrends\n[    0.000000] efi: ESRT\u003d0xffce0ff18 SMBIOS 3.0\u003d0xfffb0000 ACPI 2.0\u003d0xffec60000 MEMRESERVE\u003d0xffc905d98\n[    0.000000] esrt: Reserving ESRT space from 0x0000000ffce0ff18 to 0x0000000ffce0ff50.\n[    0.000000] earlycon: pl11 at MMIO 0x000087e024000000 (options \u0027115200n8\u0027)\n[    0.000000] printk: legacy bootconsole [pl11] enabled\n[    0.000000] NODE_DATA(0) allocated [mem 0xff6754580-0xff67566bf]\n[    0.000000] Unable to handle kernel paging request at virtual address 0000000000001d40\n[    0.000000] Mem abort info:\n[    0.000000]   ESR \u003d 0x0000000096000004\n[    0.000000]   EC \u003d 0x25: DABT (current EL), IL \u003d 32 bits\n[    0.000000]   SET \u003d 0, FnV \u003d 0\n[    0.000000]   EA \u003d 0, S1PTW \u003d 0\n[    0.000000]   FSC \u003d 0x04: level 0 translation fault\n[    0.000000] Data abort info:\n[    0.000000]   ISV \u003d 0, ISS \u003d 0x00000004, ISS2 \u003d 0x00000000\n[    0.000000]   CM \u003d 0, WnR \u003d 0, TnD \u003d 0, TagAccess \u003d 0\n[    0.000000]   GCS \u003d 0, Overlay \u003d 0, DirtyBit \u003d 0, Xs \u003d 0\n[    0.000000] [0000000000001d40] user address but active_mm is swapper\n[    0.000000] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP\n[    0.000000] Modules linked in:\n[    0.000000] CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.12.0-00013-g8920d74cf8db #3872\n[    0.000000] Hardware name: Cavium ThunderX CN88XX board (DT)\n[    0.000000] pstate: a00000c5 (NzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE\u003d--)\n[    0.000000] pc : sparse_init_nid+0x54/0x428\n[    0.000000] lr : sparse_init+0x118/0x240\n[    0.000000] sp : ffff800081da3cb0\n[    0.000000] x29: ffff800081da3cb0 x28: 0000000fedbab10c x27: 0000000000000001\n[    0.000000] x26: 0000000ffee250f8 x25: 0000000000000001 x24: ffff800082102cd0\n[    0.000000] x23: 0000000000000001 x22: 0000000000000000 x21: 00000000001fffff\n[    0.000000] x20: 0000000000000001 x19: 0000000000000000 x18: ffffffffffffffff\n[    0.000000] x17: 0000000001b00000 x16: 0000000ffd130000 x15: 0000000000000000\n[    0.000000] x14: 00000000003e0000 x13: 00000000000001c8 x12: 0000000000000014\n[    0.000000] x11: ffff800081e82860 x10: ffff8000820fb2c8 x9 : ffff8000820fb490\n[    0.000000] x8 : 0000000000ffed20 x7 : 0000000000000014 x6 : 00000000001fffff\n[    0.000000] x5 : 00000000ffffffff x4 : 0000000000000000 x3 : 0000000000000000\n[    0.000000] x2 : 0000000000000000 x1 : 0000000000000040 x0 : 0000000000000007\n[    0.000000] Call trace:\n[    0.000000]  sparse_init_nid+0x54/0x428\n[    0.000000]  sparse_init+0x118/0x240\n[    0.000000]  bootmem_init+0x70/0x1c8\n[    0.000000]  setup_arch+0x184/0x270\n[    0.000000]  start_kernel+0x74/0x670\n[    0.000000]  __primary_switched+0x80/0x90\n[    0.000000] Code: f865d804 d37df060 cb030000 d2800003 (b95d4084)\n[    0.000000] ---[ end trace 0000000000000000 ]---\n[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!\n[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---\n\nwhile previous kernel versions were able to recognise how brain-damaged\nthe machine is, and only build a fake node.\n\nUse the memblock_validate_numa_coverage() helper to restore some sanity\nand a \"working\" system.\n\nFixes: 767507654c22 (\"arch_numa: switch over to numa_memblks\")\nSuggested-by: Mike Rapoport \u003crppt@kernel.org\u003e\nSigned-off-by: Marc Zyngier \u003cmaz@kernel.org\u003e\nCc: Catalin Marinas \u003ccatalin.marinas@arm.com\u003e\nCc: Will Deacon \u003cwill@kernel.org\u003e\nCc: Zi Yan \u003cziy@nvidia.com\u003e\nCc: Dan Williams \u003cdan.j.williams@intel.com\u003e\nCc: David Hildenbrand \u003cdavid@redhat.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nCc: stable@vger.kernel.org\nLink: https://lore.kernel.org/r/20241201092702.3792845-1-maz@kernel.org\nSigned-off-by: Mike Rapoport (Microsoft) \u003crppt@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e187016764265873e8fadb4703f67a4ac457a2ae",
      "old_mode": 33188,
      "old_path": "drivers/base/arch_numa.c",
      "new_id": "c99f2ab105e5b7107412e03a01ef319e8694c676",
      "new_mode": 33188,
      "new_path": "drivers/base/arch_numa.c"
    }
  ]
}
