Re: [PATCH v2 04/10] s390/runtime-const: Serialize text patching with text_mutex

From: Heiko Carstens

Date: Wed Oct 28 2026 - 07:10:42 EST


On Wed, Oct 28, 2026 at 11:58:27AM +0100, Ilya Leoshkevich wrote:
> > @@ -88,6 +89,7 @@ static inline void __runtime_fixup_mask(void *where, unsigned long val)
> > static inline void runtime_const_fixup(void (*fn)(void *, unsigned long),
> > unsigned long val, s32 *start, s32 *end)
> > {
> > + guard(mutex)(&text_mutex);
> > while (start < end) {
> > fn(*start + (void *)start, val);
> > start++;
>
> Interesting, so clang is able to propagate context even through indirect
> calls without explicit annotations?

There is no clang context analysis involved here - this is purely lockdep
based (with the last patch of this series, which adds lockdep_assert_held()
to s390_kernel_write()).