Re: [PATCH v1 1/9] ext2: fix ext2_xattr_delete_inode() context analysis warning

From: Marco Elver

Date: Wed Jul 15 2026 - 17:06:20 EST


On Wed, 15 Jul 2026 at 18:30, Timothy Day
<timday@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 15 Jul 2026 00:52:07 +0200, Marco Elver wrote:
> > My Clang PR was merged. Can you rebase and send your Clang fix and add
> > me as a reviewer? Please add a more elaborate commit description,
> > because it's a little more intrusive and the problem and your solution
> > is less obvious.
>
> I submitted https://github.com/llvm/llvm-project/pull/209796. I tagged
> you in a comment, since I can't add you as a reviewer myself.

Thanks.

> While I work on getting the LLVM change landed, I might try adding some
> annotations to other drivers. I have a series for infiniband/hw/efa/.
> And I've been working on Lustre as well, since I want it to enforce
> context analysis on it once it's accepted upstream.
>
> Is there a roadmap for future Clang static checks?

There are some ideas around Clang's lifetimebound (+cc Alex looking
into it) being used in the kernel.

> Other ideas for
> using context analysis? I'm really interested in using Clang to
> improve the correctness of kernel code and I'd like to help get this
> adopted more widely.

As for context analysis, there is still lots to do - mainly, enabling
more subsystems to use it (which is more incremental vs. the initial
infrastructure chunk). For context analysis infrastructure, one thing
on my list is to enable more context lock types, esp. adding support
for preempt locking (preempt_disable()/preempt_enable()), and IRQ
locking (disable/enable IRQ and all its variants). Preempt locking and
IRQ support is likely a relatively big chunk, and I just haven't had
time to get to it yet (I'm busy with heap partitioning in user space
and kernel right now). If you are interested in this, please email me
separately so we can try to coordinate.

Thanks,
-- Marco