From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD61C3CF05F for ; Mon, 4 May 2026 13:02:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777899746; cv=none; b=hM3tlCjW6/7ZwY0itX5siq2Jr6E8/wcyoqW6HpFVm8NNcbIK1wDwHDufwndzutqN6KLbx1TMTSYzKvPFN5pR5LX5AS98Lr0ao3CDuvqkqoBFXRI5FLSNqMWtk/MPjtBgvV8tH3tac0LQlc2wlrPuEXzE5/ULmUflitQjW1BfZEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777899746; c=relaxed/simple; bh=vXfa9b49aNfOSx+xd87n50+mFdnZ7fTcwEZmIwRHSp4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KHk77DqsxUEghXtzrHiO6xVh2DUqOyJJtJd7+Aw9xOPZJNraKcB00bODOvNTMfgrI5lHrcfDMfJj8tVQLeRUWQyimMCF+zWxaY3kbCT9UQrMAyz9f+ishp8UwmhINSHifuZpMsnImpaFD5yt6mtoLnDP23jl7eUnGSs7DYkQuPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=spNXDWCa; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0pwwhgfb; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="spNXDWCa"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0pwwhgfb" Date: Mon, 4 May 2026 15:02:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777899744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Moq1AIiOY6+orwYxMHjvFbcg9N4LBlAImmAeoGhrj5U=; b=spNXDWCa/87xl6MVwQ+Dr4qbInoxlOSNcGpCd6wYVejRuWHJmjCCuiDI8u8/0TTEc3ytin ZBIJbSp+1K71moeIcbze+owvnsblycgmlXWFwbmbpJaTKYFgsfIcn/1rRgjGomqfIpB+SS S/q2ZEGl29/GfDY+9dxzk+AeLHPBGrD7tKSq0ZhporDq6dYU7/aL8JJjGjMHlvGUdcIV/K 4S7kzS+4SV9VNr6qotx20jLff3UQiQdS56zmIwWul9/CVIiBbm9RX3vyQkMamf+4NyqWIG SjlKpCeFGIkdLyaqZzzx+Dzr4xa3/ySf2GkH4vYLL+YNsi2jGIuAyWK18deIMw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777899744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Moq1AIiOY6+orwYxMHjvFbcg9N4LBlAImmAeoGhrj5U=; b=0pwwhgfbSbZsc8jITdy2fydwmEAIUl7Ux0lFx4JCdrp84CyqqJA1ltrHZ9jm9cppJs3rcd S/to1I709Y4n+OCQ== From: Sebastian Andrzej Siewior To: Peter Zijlstra Cc: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Andrew Morton , Petr Mladek , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , Clark Williams , Kees Cook , linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev Subject: Re: [PATCH v2 4/4] lib/vsprintf: Always check interrupt context restrictions Message-ID: <20260504130222.5BAuYwxV@linutronix.de> References: <20260504-restricted-pointers-final-v2-0-4934933503e5@linutronix.de> <20260504-restricted-pointers-final-v2-4-4934933503e5@linutronix.de> <20260504130044.GU3126523@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260504130044.GU3126523@noisy.programming.kicks-ass.net> On 2026-05-04 15:00:44 [+0200], Peter Zijlstra wrote: > > --- a/lib/vsprintf.c > > +++ b/lib/vsprintf.c > > @@ -871,6 +871,10 @@ char *restricted_pointer(char *buf, char *end, const void *ptr, > > > > guard(lock_map_acquire)(&vsprintf_restricted_pointer_map); > > > > + lockdep_assert(!in_hardirq()); > > + lockdep_assert(!in_serving_softirq()); > > + lockdep_assert(!in_nmi()); > > + > > did that want to be: > > lockdep_assert(in_task()); > > ? I remember halfway suggesting that. But I also wanted to poke networking folks to get rid of this which I haven't done so far :/ Sebastian