[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260113193919.GA810197@noisy.programming.kicks-ass.net>
Date: Tue, 13 Jan 2026 20:39:19 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: kernel test robot <lkp@...el.com>, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: kernel/futex/core.c:505:38: sparse: sparse: cast removes address
space '__user' of expression
On Tue, Jan 13, 2026 at 06:37:08PM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-01-13 13:10:40 [+0100], Peter Zijlstra wrote:
> > Its here and a few lines down with the same thing I think. The cast is
> > to get byte pointer math, instead of u32 sized pointer math. Both the
> > original uaddr and naddr have the __user thing on, but that intermediate
> > cast trips it up.
> >
> > Does this work?
>
> Yes. It removes the __user thing warning which leaves us with
> | kernel/futex/requeue.c:692:9: warning: context imbalance in 'futex_requeue' - different lock contexts for basic block
> | kernel/futex/requeue.c:841:25: warning: context imbalance in 'futex_wait_requeue_pi' - unexpected unlock
> | kernel/futex/pi.c:663:9: warning: context imbalance in 'wake_futex_pi' - unexpected unlock
> | kernel/futex/pi.c:791:9: warning: context imbalance in '__fixup_pi_state_owner' - unexpected unlock
> | kernel/futex/pi.c:1093:17: warning: context imbalance in 'futex_lock_pi' - unexpected unlock
> | kernel/futex/pi.c:1132:5: warning: context imbalance in 'futex_unlock_pi' - different lock contexts for basic block
> | kernel/futex/waitwake.c:275:41: warning: context imbalance in 'futex_wake_op' - different lock contexts for basic block
> | kernel/futex/waitwake.c:460:44: warning: context imbalance in 'futex_wait_multiple_setup' - unexpected unlock
> | kernel/futex/waitwake.c:660:28: warning: context imbalance in 'futex_wait_setup' - unexpected unlock
> | kernel/futex/core.c:979:9: warning: context imbalance in 'futex_q_lockptr_lock' - wrong count at exit
>
tip/locking/core removes all the sparse lock annotations in favour of
clang-22 tcsan.
Powered by blists - more mailing lists