Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp57446pxm; Tue, 22 Feb 2022 06:19:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLBaE2diXFHj0GN+wOlr795zgNKBDFsL4vQoAwMYPcG5avucK+RKSC5TUCiT7F2EPeScAK X-Received: by 2002:a05:6a00:807:b0:4f1:1458:87e5 with SMTP id m7-20020a056a00080700b004f1145887e5mr13575700pfk.73.1645539575735; Tue, 22 Feb 2022 06:19:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645539575; cv=none; d=google.com; s=arc-20160816; b=Q3xn4YFOPfF3cdGWUL+RPDZ9rSBvYHwxlYcYLvOp37I+AoIo/a9nE0yYj025vGp0rA CD4EAxyVQ51TNfeatNYd7/LLH1/njopfLlUuUpjYvMp/QaVjLov2HJNSFI7oaG7y22mH XtyfHdKcqrYLjLud6WV/FKS9DaSPS+VBJSEOswrVSHWaX+2tdSCXQ0ZbzCZ7tYHj6p9C 5jxdbepvXHocS+luOGi2FWXjoFmejCZ5yemw9JB0lQUbialBLROSyJYDUzpxvifAO+m4 xz/70wDi22usxneNc/RJM3vT9MBZGkVLs5ZEQyMDkjJpxcVuHCCmG+CpQx7Oyr88AOGe cEAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Gft2vksxvg2p7hlkEZC2wTxmWAXTizdIoqfd+83pKUA=; b=IJNGpiFDwRT7MzfJaXDBv6k+9pelkaUI5oIgSkamp+qbrQqzyrMfCZHWxjc3LkvxUu 21fE8/bGampJ2JxoZN2Qfee8EYn0Awa0DWUkWq55ZbQiCJ/x4lZ58JlXR8O7k7QO0P3F n1CTux3iG0HfhnsNaUz6vys+Fbr5F5ipJTBx2f9Gh9a5YOXxhqla0nZ9Dv7NmcRxrkob c2Va+7nulB16EVAqbM3iUPhSI7afjugvMYbGQ0kksVnXyU4ihZj+JH3myJaWdZOyh8Qb ESqRADcK/RIJQkAHqC4UL0xh6cYJQyjpbeYSJmcKh18WAXTRhpYvkTvPQwvEYws9xS7M 4E5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=CkILlN47; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4si11630164pfm.108.2022.02.22.06.19.18; Tue, 22 Feb 2022 06:19:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=CkILlN47; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232733AbiBVOJZ (ORCPT + 99 others); Tue, 22 Feb 2022 09:09:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232712AbiBVOJU (ORCPT ); Tue, 22 Feb 2022 09:09:20 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FE4215F377 for ; Tue, 22 Feb 2022 06:08:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Gft2vksxvg2p7hlkEZC2wTxmWAXTizdIoqfd+83pKUA=; b=CkILlN47FdZ0e1Eg5VfGrMMbyY M9kCxxlSC5GNSBy/hdl1vhI6vtZGxpwaC5eCSiu2rIZ0DEesCAZlsZ4QKbQPU93q3s466Ak0JVyO3 icK1Vjbr8gHCpE6SVWJkymogGsQnoAY76tdHQ4XeIJ8c9lShy/3ZQLdV3brtYbOKUOD4RjT39NzYL qB0vK8Hds/5cgA10EXUmSdJQXGWBlJipPTqMcK10VXWgJmezbxUFSD9ox6Uj9VM7MNllTXFJQRTRm iSXL65nDF+s6QNkhfNQD602+pTMK10nyZnquU5y69c4721yAvwujRLT+x5DlI0igPtbPX9HM3lYK9 z0LLNdHg==; Received: from [189.79.213.38] (helo=[192.168.1.60]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1nMVqJ-000A22-5x; Tue, 22 Feb 2022 15:08:40 +0100 Message-ID: <7702bdc2-78ce-00f5-d5a4-c06527c3ae72@igalia.com> Date: Tue, 22 Feb 2022 11:08:22 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH V6] panic: Move panic_print before kmsg dumpers Content-Language: en-US To: Sergey Senozhatsky , bhe@redhat.com, pmladek@suse.com Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, anton@enomsg.org, ccross@android.com, dyoung@redhat.com, feng.tang@intel.com, john.ogness@linutronix.de, keescook@chromium.org, kernel@gpiccoli.net, kexec@lists.infradead.org, rostedt@goodmis.org, tony.luck@intel.com, vgoyal@redhat.com References: <20220214141308.841525-1-gpiccoli@igalia.com> From: "Guilherme G. Piccoli" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/02/2022 22:45, Sergey Senozhatsky wrote: > [...] > Yeah, if Petr is fine with that then I'm OK. But at the same time, > we have `panic_print' which is a bit mask of what panic_print_sys_info() > should do. And now we also have a boolean `console_flush` flag that tells > panic_print_sys_info() to ignore some (one as of now) bits of `panic_print'. > > So _maybe_ panic_print_sys_info() can just accept panic_print as > its parameter and then we can do something like this (as an example) > > panic_print_sys_info(panic_print & ~PANIC_PRINT_ALL_PRINTK_MSG); > > >> if (panic_print & PANIC_PRINT_ALL_CPU_BT) >> trigger_all_cpu_backtrace(); >> @@ -286,6 +289,8 @@ void panic(const char *fmt, ...) >> */ >> atomic_notifier_call_chain(&panic_notifier_list, 0, buf); > > [..] > >> + panic_print_sys_info(false); > > Merely because `panic_print_sys_info(false);` doesn't tell much to a reader. > Like what is print sys info false? > > Or did you already discuss this? Hi Sergey, thanks for your feedback. So, personally I prefer having the flag - for me it's clear, it's just a matter of reading the prototype - either we print the info _or_ we console_flush. But let's see if others have a preference - if the preference is to use the bitmask as you suggest, we can do it in a next version. Cheers, Guilherme