Re: [PATCH] rust: cfi: disable function merging if CFI is enabled
Sami Tolvanen <[email protected]>
| Newsgroups | org.kernel.vger.linux-kbuild,dev.linux.lists.llvm,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <CABCJKueCgEZ9XePNnJhbxbOP=v5X6-PvFg4poRfo=j6htovJFw@mail.gmail.com> |
On Thu, Aug 20, 2026 at 9:06 AM Gary Guo <[email protected]> wrote: > > On Thu Aug 20, 2026 at 2:57 PM BST, Gary Guo wrote: > > From: Gary Guo <[email protected]> > > > > In Rust doc tests, there is a dummy `__module_firmware_test_init` function > > generated by the example in `module_firmware!`'s documentation, which just > > returns zero. Many other documentation generates function that produces > > zero. LKP test robot reports a `Flags::zeroed` instance; my local > > reproduction has a `Bounded::new::<0>`. > > > > LLVM's MergeFunctionsPass incorrectly merge functions with the same KCFI > > This should read "with different KCFI type" (obviously). Also the comment in the Makefile. With both instances fixed: Reviewed-by: Sami Tolvanen <[email protected]> The LLVM fix itself is trivial, and it looks like a pull request for it already exists. I assume we'll want to drop this flag for fixed LLVM versions when they're available. Sami