Re: [PATCH v2 04/10] s390/runtime-const: Serialize text patching with text_mutex
From: Ilya Leoshkevich
Date: Wed Oct 28 2026 - 08:24:21 EST
On 10/28/26 12:09, Heiko Carstens wrote:
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()).
Ah, I see, it's stated right in the first line of the cover letter.
Did you consider using it though?