Received: by 2002:a17:90a:bc8d:0:0:0:0 with SMTP id x13csp1536310pjr; Mon, 18 May 2020 15:47:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8h1B8hXWEN8eKAZaKMzjLnFtXauGpIL/u6Xv431uBGUEzi0F/yhDqCgxmcY8t2gDbgoi7 X-Received: by 2002:a50:fc0c:: with SMTP id i12mr16380583edr.174.1589842059332; Mon, 18 May 2020 15:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589842059; cv=none; d=google.com; s=arc-20160816; b=ABK2AEXn22Yr9uO3d7OZL/ss5QCjQNGNGpHVRYTz71uQpCfTDMmKHENLb+BOt9ZTps A6haQRPs9QC13DfxQCMJGuJcg8uBq9Kkae3Ps7QPaN12NxZieme8828cGFkkgRPzIbJq eps93p/31QGdF5q822AYbzXsZwLTZztWaJFR7LNVwCp+20R8VVR6MRNFk0MM1fKrx+/w 6k2nAGbQkSeoW0BP5cpK+1Krvhr+R3+Ejpsi09OTihBhD9Oub57x0kCar+VZIC2tR9LF +pWyRq2PzxLqlhAnSOfECd7Q6Un6aiKkTj8KoWNXlWMxwXTWjcycn9TEJw7wYHiGkEFA ToIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ogUy3Oh23VXp7sMOIFJc256aKI1YiBasZRRdP3HFKQk=; b=cEj7/yD8pP8rN82mynW6yiCPvmGYd/mkHJ0vZyxsdZ53WITGXkz1uVX6RJXMZOVoo9 gLXU6fJ76kuFYjJ6T87O1/wfYMN/dsjknAKPkAmI6V9dzXtu1sdOEGM+DL4yh8ToaLgC saYE/ZchNiE8CEDinKR2W6fU2mFIDJ3BBH6bVjSMAdAPVPCv7Dztb7OS1Pgxyo0VtpLp ITeoeGWQpd200FxaS0sTymftcAzx1L5xLvFFSVws1pUOsuyZd0VvF9skFqIx42sAxNbz f/MMiKTDplDR+1iF0sT1Rn8vh7hl2vSIGMQT4ri3gNS8Nd+MvtzBeaudBufg0cfJUNcH DQDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MuYRIVnE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co4si6946751edb.269.2020.05.18.15.47.16; Mon, 18 May 2020 15:47:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MuYRIVnE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbgERWpp (ORCPT + 99 others); Mon, 18 May 2020 18:45:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:42448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726500AbgERWpp (ORCPT ); Mon, 18 May 2020 18:45:45 -0400 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BC0E20835; Mon, 18 May 2020 22:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589841944; bh=XfKXHLG5c8FT5TY6LG4xidXysQtjuuuDl5PLygVDD40=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MuYRIVnE2DSWmPBGMnbamr3O+0hGKf/Bl6uaT3DP33KA6mX7erCmwuZM4SPErtMHb zxDpCdpHA8MmBa7P7rwgae7w0JDs+Zut5EtNqu98rbtaXInvttquwHfTbTkclcI+mh XxaazHbyWsRzaLIcqOiaMU7j9d7Q9GhTa1pOkjDM= Received: by mail-ot1-f42.google.com with SMTP id d7so3236313ote.6; Mon, 18 May 2020 15:45:44 -0700 (PDT) X-Gm-Message-State: AOAM532jQF/55AgeFF7OH6BvyCnBTr7VDqQxqk07synKI88jPcuD20zU kSmaWwGFe5GIsoTyXdSLuQgXlB2+G+e9oaombQ== X-Received: by 2002:a9d:5c8a:: with SMTP id a10mr9915859oti.129.1589841943759; Mon, 18 May 2020 15:45:43 -0700 (PDT) MIME-Version: 1.0 References: <20200515184434.8470-1-keescook@chromium.org> <20200515184434.8470-7-keescook@chromium.org> In-Reply-To: <20200515184434.8470-7-keescook@chromium.org> From: Rob Herring Date: Mon, 18 May 2020 16:45:32 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 6/6] ramoops: Add max_reason optional field to ramoops DT node To: Kees Cook Cc: Pavel Tatashin , Petr Mladek , Anton Vorontsov , Colin Cross , Tony Luck , Jonathan Corbet , Benson Leung , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Enric Balletbo i Serra , Sergey Senozhatsky , Steven Rostedt , Linux Doc Mailing List , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, linuxppc-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 12:44 PM Kees Cook wrote: > > From: Pavel Tatashin Subject still has 'max_reason'. > > Currently, it is possible to dump kmsges for panic, or oops. > With max_reason it is possible to dump messages for other And here. > kmesg_dump events, for example reboot, halt, shutdown, kexec. > > Signed-off-by: Pavel Tatashin > Link: https://lore.kernel.org/lkml/20200506211523.15077-6-keescook@chromium.org/ > Signed-off-by: Kees Cook > --- > .../devicetree/bindings/reserved-memory/ramoops.txt | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > index 0eba562fe5c6..b7886fea368c 100644 > --- a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > +++ b/Documentation/devicetree/bindings/reserved-memory/ramoops.txt > @@ -30,7 +30,7 @@ Optional properties: > - ecc-size: enables ECC support and specifies ECC buffer size in bytes > (defaults to 0: no ECC) > > -- record-size: maximum size in bytes of each dump done on oops/panic > +- record-size: maximum size in bytes of each kmsg dump. > (defaults to 0: disabled) > > - console-size: size in bytes of log buffer reserved for kernel messages > @@ -45,7 +45,16 @@ Optional properties: > - unbuffered: if present, use unbuffered mappings to map the reserved region > (defaults to buffered mappings) > > -- no-dump-oops: if present, only dump panics (defaults to panics and oops) > +- max-reason: if present, sets maximum type of kmsg dump reasons to store > + (defaults to 2: log Oopses and Panics). This can be set to INT_MAX to > + store all kmsg dumps. See include/linux/kmsg_dump.h KMSG_DUMP_* for other > + kmsg dump reason values. Setting this to 0 (KMSG_DUMP_UNDEF), means the > + reason filtering will be controlled by the printk.always_kmsg_dump boot > + param: if unset, it will be KMSG_DUMP_OOPS, otherwise KMSG_DUMP_MAX. > + > +- no-dump-oops: deprecated, use max_reason instead. If present, and > + max_reason is not specified, it is equivalent to max_reason = 1 And here (3 times). > + (KMSG_DUMP_PANIC). > > - flags: if present, pass ramoops behavioral flags (defaults to 0, > see include/linux/pstore_ram.h RAMOOPS_FLAG_* for flag values). > -- > 2.20.1 >