From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF546C433FE for ; Thu, 29 Sep 2022 12:43:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235072AbiI2Mno (ORCPT ); Thu, 29 Sep 2022 08:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235159AbiI2Mni (ORCPT ); Thu, 29 Sep 2022 08:43:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9C7215E4E2 for ; Thu, 29 Sep 2022 05:43:37 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 7B3711F8AC; Thu, 29 Sep 2022 12:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664455416; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mOcEESQnsA0kpIRBFTMbSdazV3q2H0MHo5CJze4RNjk=; b=ozZaI6K/BR4HmSPVh4Pyp8Oh1lguXzH0nxgSqqeEOo2217P1+JPLktAqKivCBmvo0ZvnPq FoXw2WRfGkhhsEi2+1n65FLX7IKy70r1Gur/RX5smABvAQxEueYBWWFrpvC9d5BmdOsmYu wMEYpFV93zURjW56O8Byjac/NZrDKgY= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id EC0BD2C14F; Thu, 29 Sep 2022 12:43:35 +0000 (UTC) Date: Thu, 29 Sep 2022 14:43:33 +0200 From: Petr Mladek To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Theodore Ts'o , Andy Shevchenko , "Jason A . Donenfeld " , John Ogness , Mike Galbraith , Peter Zijlstra , Rasmus Villemoes , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner Subject: Re: [PATCH 0/2 v4] Init the hashed pointer from a worker. Message-ID: References: <20220927104912.622645-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220927104912.622645-1-bigeasy@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2022-09-27 12:49:10, Sebastian Andrzej Siewior wrote: > This is a mini series to initialize the random value, needed for the %p > format argument, upfront during boot instead on demand. The latter is > problematic on PREEMPT_RT if the first user happens to be in an atomic > region. > > v3…v4: > - Added a __read_mostly. > - Added Jason's Acked-by for 2/2 after talking to him at Plumbers. > While we were discussion several ways of tackling this differently > and the possible problems/ side effects that this may cause we > happen to notice that the current way of doing things is also a > problem if the first printk("%p\n") user happens to be in NMI > context. > Therefore I leave it to the vsprintf/ printk maintainer to decide > if this is -stable material or not. I'm not aware of any NMI code > path using %p but then it is not officially forbidden. > Assuming unknown_nmi_error() contains %p format the string, then > the backtrace at the end of the email will be printed. JFYI, both patches are committed into printk/linux.git, branch for-6.1-hash-pointer-init I have just added a note into the 2nd patch about that it also prevents deadlock when printk("%p", ptr) is called under the lock used by get_random_bytes(), see https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?h=for-6.1-hash-pointer-init&id=6f0ac3b52a9075b7291a72fb338d08491c1f0a64 I did not modify the code. The system_unbound_wq can and should be fixed separately. Best Regards, Petr