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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 7FABFC433DF for ; Fri, 22 May 2020 16:51:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A2C420727 for ; Fri, 22 May 2020 16:51:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730747AbgEVQvY (ORCPT ); Fri, 22 May 2020 12:51:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:51736 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730487AbgEVQvY (ORCPT ); Fri, 22 May 2020 12:51:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9E6B6ABE3; Fri, 22 May 2020 16:51:24 +0000 (UTC) Date: Fri, 22 May 2020 18:51:20 +0200 From: Petr Mladek To: Kees Cook Cc: Pavel Tatashin , Anton Vorontsov , Colin Cross , Tony Luck , Jonathan Corbet , Benson Leung , Rob Herring , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Enric Balletbo i Serra , Sergey Senozhatsky , Steven Rostedt , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v4 2/6] printk: honor the max_reason field in kmsg_dumper Message-ID: <20200522165120.GL3464@linux-b0ei> References: <20200515184434.8470-1-keescook@chromium.org> <20200515184434.8470-3-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200515184434.8470-3-keescook@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2020-05-15 11:44:30, Kees Cook wrote: > From: Pavel Tatashin > > kmsg_dump() allows to dump kmesg buffer for various system events: oops, > panic, reboot, etc. It provides an interface to register a callback call > for clients, and in that callback interface there is a field "max_reason" > which gets ignored unless always_kmsg_dump is passed as kernel parameter. Strictly speaking, this is not fully true. "max_reason" field is not ignored when set to KMSG_DUMP_PANIC even when always_kmsg_dump was not set. It should be something like: "which gets ignored for reason higher than KMSG_DUMP_OOPS unless always_kmsg_dump is passed as kernel parameter". Heh, I wonder if anyone will be able to parse this ;-) Otherwise, it looks good to me. With the updated commit message: Reviewed-by: Petr Mladek Best Regards, Petr 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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 758EDC433E0 for ; Fri, 22 May 2020 16:53:26 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F92A206D5 for ; Fri, 22 May 2020 16:53:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F92A206D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49TCH75DwgzDr0B for ; Sat, 23 May 2020 02:53:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.com (client-ip=195.135.220.15; helo=mx2.suse.de; envelope-from=pmladek@suse.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.com Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49TCDt4WFwzDqxb for ; Sat, 23 May 2020 02:51:26 +1000 (AEST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9E6B6ABE3; Fri, 22 May 2020 16:51:24 +0000 (UTC) Date: Fri, 22 May 2020 18:51:20 +0200 From: Petr Mladek To: Kees Cook Subject: Re: [PATCH v4 2/6] printk: honor the max_reason field in kmsg_dumper Message-ID: <20200522165120.GL3464@linux-b0ei> References: <20200515184434.8470-1-keescook@chromium.org> <20200515184434.8470-3-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200515184434.8470-3-keescook@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Tony Luck , Pavel Tatashin , Jonathan Corbet , Anton Vorontsov , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky , Rob Herring , Paul Mackerras , Colin Cross , Enric Balletbo i Serra , linuxppc-dev@lists.ozlabs.org, Benson Leung Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri 2020-05-15 11:44:30, Kees Cook wrote: > From: Pavel Tatashin > > kmsg_dump() allows to dump kmesg buffer for various system events: oops, > panic, reboot, etc. It provides an interface to register a callback call > for clients, and in that callback interface there is a field "max_reason" > which gets ignored unless always_kmsg_dump is passed as kernel parameter. Strictly speaking, this is not fully true. "max_reason" field is not ignored when set to KMSG_DUMP_PANIC even when always_kmsg_dump was not set. It should be something like: "which gets ignored for reason higher than KMSG_DUMP_OOPS unless always_kmsg_dump is passed as kernel parameter". Heh, I wonder if anyone will be able to parse this ;-) Otherwise, it looks good to me. With the updated commit message: Reviewed-by: Petr Mladek Best Regards, Petr