)]}'
{
  "commit": "e83e8ba4ea2e906f4532f44af22c9bd89d90893b",
  "tree": "3cb0b5ab18d4e55422b9a9a554803def4d672fef",
  "parents": [
    "de68f63ff8e76a9dbb00678bb971af4df7789afe"
  ],
  "author": {
    "name": "Alice Ryhl",
    "email": "aliceryhl@google.com",
    "time": "Wed Nov 18 13:09:18 2026 +0000"
  },
  "committer": {
    "name": "android-test-infra-autosubmit@system.gserviceaccount.com",
    "email": "android-test-infra-autosubmit@system.gserviceaccount.com",
    "time": "Sat Nov 21 04:34:53 2026 -0800"
  },
  "message": "FROMGIT: kbuild: rust: disable function merging unconditionally\n\nFunction merging causes various different issues:\n\n* For CONFIG_CFI there\u0027s an LLVM bug causing functions with different\n  CFI hashes to get merged. This can lead to crashes at runtime.\n* For gendwarfksyms it causes functions with different CRCs to get\n  merged. This leads to broken MODVERSIONS information if the function\n  changes in the future so that it can no longer be merged.\n* Wrong backtraces when a crash occurs in a merged function.\n* Possibly also issues with pahole/BTF as the merged function\u0027s debug\n  info is lost.\n\nThese issues are new to Rust because in clang, function merging is off\nby default, so these things have never come up before. Because of this,\nturn this option off for all configurations.\n\n[ The LLVM bug is tracked at [1]. Nick asked what function merging\n  refers to here, and Alice writes [2]:\n\n    No, this isn\u0027t linker ICF. rustc doesn\u0027t pass --icf, and in any case\n    kbuild invokes rustc with --emit\u003dobj and does the final link itself, so\n    rustc\u0027s linker arguments never come into play.\n\n    What I\u0027m referring to is LLVM\u0027s MergeFunctions IR pass\n    (llvm/lib/Transforms/IPO/MergeFunctions.cpp). It runs as part of the\n    optimization pipeline, within a single codegen unit, before any object\n    file is emitted. Clang only enables it with the cc1-only flag\n    -fmerge-functions, which the kernel never passes, so C code in the\n    kernel never sees it.\n\n    rustc, however, enables it by default whenever optimizing for speed or\n    size (opt-level 2, 3, s or z), which covers both kernel configurations.\n    It uses the \"aliases\" mode: when two functions have identical bodies,\n    one is deleted and its symbol becomes a GlobalAlias to the other. You\n    can turn it off with -Zmerge-functions\u003ddisabled.\n\n      - Miguel ]\n\nLink: https://lore.kernel.org/all/avy_9SPRaPSKD8b4@google.com/\nFixes: ac61506bf2d1 (\"rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS\")\nSigned-off-by: Alice Ryhl \u003caliceryhl@google.com\u003e\nCc: stable@vger.kernel.org\nReviewed-by: Gary Guo \u003cgary@garyguo.net\u003e\nReviewed-by: Sami Tolvanen \u003csamitolvanen@google.com\u003e\nLink: https://github.com/llvm/llvm-project/issues/217629 [1]\nLink: https://lore.kernel.org/rust-for-linux/CAH5fLgidhnPbP\u003dxXQ3162w6q0U6rWHPZ9Mu6-E5va4_CXyanOg@mail.gmail.com/ [2]\nLink: https://patch.msgid.link/20261118-rust-merge-functions-v1-1-fe86126522b9@google.com\nSigned-off-by: Miguel Ojeda \u003cojeda@kernel.org\u003e\n\nBug: 584195065\n(cherry picked from commit 73bdf8773de4af2c2b7f49370191ae6d5aeddea5\n https://github.com/Rust-for-Linux/linux.git rust-fixes)\nChange-Id: I1f162e1b07446d3f09ee0a25c1a4879d89905c2d\nSigned-off-by: Alice Ryhl \u003caliceryhl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "04a4993b6fadf86fa932202a1d8f356a7d322327",
      "old_mode": 33188,
      "old_path": "Makefile",
      "new_id": "7d7c850acc65ba3d5bf436f024dbed3bb17dfcdf",
      "new_mode": 33188,
      "new_path": "Makefile"
    }
  ]
}
