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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BABFC433B4 for ; Fri, 2 Apr 2021 02:14:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C19A610A5 for ; Fri, 2 Apr 2021 02:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233994AbhDBCOb (ORCPT ); Thu, 1 Apr 2021 22:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231836AbhDBCO3 (ORCPT ); Thu, 1 Apr 2021 22:14:29 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B590C0613E6 for ; Thu, 1 Apr 2021 19:14:28 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id i6so2762842pgs.1 for ; Thu, 01 Apr 2021 19:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JB5UehlmQzvZFx81WrZqpYM4CZPIjgwCICp/Q33dgPY=; b=CiQCdaLNqItRdaQBOeJkErTv3n7PjSNnp+YvdQJ1ecNwMtUhwCi8shAehVOT7sxQpo nP61ASpB1NgGt9ANL4exn/Z9n7DKxzMjicech11ff/+fm4VxApqGY66Vw5/l8MC+kRoI zt+/uQlTX7cj6PZaFPDSywCRWFA6eFe3lXxPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JB5UehlmQzvZFx81WrZqpYM4CZPIjgwCICp/Q33dgPY=; b=bA90f9+++RFCV09LLOkl68oBR3wBzmogP5Sise+YYYkOpQgwBw8ZZRg9EFgAgplRJC 0Jr6HzwhpNMkwtx54iO2c2P3IJpqD0cwslciZ6Lb1OnMcAIZr7kzx6stA4o1QOubh7rR fHNU4jizBu7h8BfVOry/EsODXzmJ3WLskkEthSpOkWpf8jTzHYo2HGgEy3+JFLMqkCZJ oHJMuB6l/4sXRG/jS4aH5MfZTlYdQhKb9/YBJX5K91cFxuOl349Zs5bhSMxexL1YVK0g Lf8kqojhZ4zizIys5BI5UROJSCJLpUYGempqJaVKcHUaEi3+gQaC/BLgd0yhJozls/eS FzRQ== X-Gm-Message-State: AOAM533UPnM3kywzut2U/V5bsCy6D0ORuPGAhjJLyy0antAdKxQ2Yy7W gkGiSorFTot6Eh/vuDybFKplWQ== X-Google-Smtp-Source: ABdhPJy0ejIbP6LV2LsRoOa1rVdM/WfylFauJ7ONnIZVqPdmEwYb/IrcKuqgQDFSQ2rNzG87UypcyQ== X-Received: by 2002:a65:6a0e:: with SMTP id m14mr10107450pgu.448.1617329667742; Thu, 01 Apr 2021 19:14:27 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:918a:96e1:2fd5:8e77]) by smtp.gmail.com with ESMTPSA id e65sm6959948pfe.9.2021.04.01.19.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 19:14:27 -0700 (PDT) Date: Fri, 2 Apr 2021 11:14:18 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: John Ogness , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Eric Biederman , Christophe Leroy , Nicholas Piggin , Alistair Popple , Jordan Niethe , Peter Zijlstra , "Aneesh Kumar K.V" , Andrew Morton , Kees Cook , Tiezhu Yang , Alexey Kardashevskiy , Yue Hu , Rafael Aquini , "Guilherme G. Piccoli" , "Paul E. McKenney" , linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org Subject: Re: [PATCH printk v2 2/5] printk: remove safe buffers Message-ID: References: <20210330153512.1182-1-john.ogness@linutronix.de> <20210330153512.1182-3-john.ogness@linutronix.de> <87a6qiqgzr.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/04/01 16:17), Petr Mladek wrote: > > For the long term, we should introduce a printk-context API that allows > > callers to perfectly pack their multi-line output into a single > > entry. We discussed [0][1] this back in August 2020. > > We need a "short" term solution. There are currently 3 solutions: > > 1. Keep nmi_safe() and all the hacks around. > > 2. Serialize nmi_cpu_backtrace() by a spin lock and later by > the special lock used also by atomic consoles. > > 3. Tell complaining people how to sort the messed logs. Are we talking about nmi_cpu_backtrace()->dump_stack() or some other path? dump_stack() seems to be already serialized by `dump_lock`. Hmm, show_regs() is not serialized, seems like it should be under the same `dump_lock` as dump_stack().