All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: WeiXiong Liao <liaoweixiong@allwinnertech.com>
Cc: Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Rob Herring <robh@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2 05/11] pstore/blk: blkoops: support ftrace recorder
Date: Sun, 22 Mar 2020 08:16:01 -0700	[thread overview]
Message-ID: <202003220814.713B5DF7AA@keescook> (raw)
In-Reply-To: <42205dc0-f001-bbf0-00b6-85aca0cdb1f8@allwinnertech.com>

On Sun, Mar 22, 2020 at 07:42:07PM +0800, WeiXiong Liao wrote:
> On 2020/3/19 AM 2:19, Kees Cook wrote:
> > On Fri, Feb 07, 2020 at 08:25:49PM +0800, WeiXiong Liao wrote:
> >> +static int blkz_recover_zones(struct blkz_context *cxt,
> >> +		struct blkz_zone **zones, unsigned int cnt)
> >> +{
> >> +	int ret;
> >> +	unsigned int i;
> >> +	struct blkz_zone *zone;
> >> +
> >> +	if (!zones)
> >> +		return 0;
> >> +
> >> +	for (i = 0; i < cnt; i++) {
> >> +		zone = zones[i];
> >> +		if (unlikely(!zone))
> >> +			continue;
> >> +		ret = blkz_recover_zone(cxt, zone);
> >> +		if (ret)
> >> +			goto recover_fail;
> >> +	}
> >> +
> >> +	return 0;
> >> +recover_fail:
> >> +	pr_debug("recover %s[%u] failed\n", zone->name, i);
> >> +	return ret;
> >> +}
> > 
> > Why is this introduced here? Shouldn't this be earlier in the series?
> 
> blkz_recover_zones() is used to recover a array of zones. Only ftrace
> recorder need it, so it's introduced here.

Okay, that's fine. I thought maybe the dmesg front-end could use it too?
Anyway, I can look at it again in v3. :)

-- 
Kees Cook

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: WeiXiong Liao <liaoweixiong@allwinnertech.com>
Cc: Rob Herring <robh@kernel.org>, Tony Luck <tony.luck@intel.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Richard Weinberger <richard@nod.at>,
	Anton Vorontsov <anton@enomsg.org>,
	linux-doc@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Colin Cross <ccross@android.com>,
	linux-mtd@lists.infradead.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2 05/11] pstore/blk: blkoops: support ftrace recorder
Date: Sun, 22 Mar 2020 08:16:01 -0700	[thread overview]
Message-ID: <202003220814.713B5DF7AA@keescook> (raw)
In-Reply-To: <42205dc0-f001-bbf0-00b6-85aca0cdb1f8@allwinnertech.com>

On Sun, Mar 22, 2020 at 07:42:07PM +0800, WeiXiong Liao wrote:
> On 2020/3/19 AM 2:19, Kees Cook wrote:
> > On Fri, Feb 07, 2020 at 08:25:49PM +0800, WeiXiong Liao wrote:
> >> +static int blkz_recover_zones(struct blkz_context *cxt,
> >> +		struct blkz_zone **zones, unsigned int cnt)
> >> +{
> >> +	int ret;
> >> +	unsigned int i;
> >> +	struct blkz_zone *zone;
> >> +
> >> +	if (!zones)
> >> +		return 0;
> >> +
> >> +	for (i = 0; i < cnt; i++) {
> >> +		zone = zones[i];
> >> +		if (unlikely(!zone))
> >> +			continue;
> >> +		ret = blkz_recover_zone(cxt, zone);
> >> +		if (ret)
> >> +			goto recover_fail;
> >> +	}
> >> +
> >> +	return 0;
> >> +recover_fail:
> >> +	pr_debug("recover %s[%u] failed\n", zone->name, i);
> >> +	return ret;
> >> +}
> > 
> > Why is this introduced here? Shouldn't this be earlier in the series?
> 
> blkz_recover_zones() is used to recover a array of zones. Only ftrace
> recorder need it, so it's introduced here.

Okay, that's fine. I thought maybe the dmesg front-end could use it too?
Anyway, I can look at it again in v3. :)

-- 
Kees Cook

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2020-03-22 15:16 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 12:25 [PATCH v2 00/11] pstore: mtd: support crash log to block and mtd device WeiXiong Liao
2020-02-07 12:25 ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 01/11] pstore/blk: new support logger for block devices WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-02-26  0:52   ` Kees Cook
2020-02-26  0:52     ` Kees Cook
2020-02-27  8:21     ` liaoweixiong
2020-02-27  8:21       ` liaoweixiong
2020-03-18 17:23       ` Kees Cook
2020-03-18 17:23         ` Kees Cook
2020-03-20  1:50         ` WeiXiong Liao
2020-03-20  1:50           ` WeiXiong Liao
2020-03-20 18:20           ` Kees Cook
2020-03-20 18:20             ` Kees Cook
2020-03-22 10:28             ` WeiXiong Liao
2020-03-22 10:28               ` WeiXiong Liao
2020-03-09  0:52     ` WeiXiong Liao
2020-03-09  0:52       ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 02/11] blkoops: add blkoops, a warpper for pstore/blk WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:06   ` Kees Cook
2020-03-18 18:06     ` Kees Cook
2020-03-22 10:00     ` WeiXiong Liao
2020-03-22 10:00       ` WeiXiong Liao
2020-03-22 15:44       ` Kees Cook
2020-03-22 15:44         ` Kees Cook
2020-02-07 12:25 ` [PATCH v2 03/11] pstore/blk: blkoops: support pmsg recorder WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:13   ` Kees Cook
2020-03-18 18:13     ` Kees Cook
2020-03-22 11:14     ` WeiXiong Liao
2020-03-22 11:14       ` WeiXiong Liao
2020-03-22 15:59       ` Kees Cook
2020-03-22 15:59         ` Kees Cook
2020-02-07 12:25 ` [PATCH v2 04/11] pstore/blk: blkoops: support console recorder WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:16   ` Kees Cook
2020-03-18 18:16     ` Kees Cook
2020-03-22 11:35     ` WeiXiong Liao
2020-03-22 11:35       ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 05/11] pstore/blk: blkoops: support ftrace recorder WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:19   ` Kees Cook
2020-03-18 18:19     ` Kees Cook
2020-03-22 11:42     ` WeiXiong Liao
2020-03-22 11:42       ` WeiXiong Liao
2020-03-22 15:16       ` Kees Cook [this message]
2020-03-22 15:16         ` Kees Cook
2020-02-07 12:25 ` [PATCH v2 06/11] Documentation: pstore/blk: blkoops: create document for pstore_blk WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:31   ` Kees Cook
2020-03-18 18:31     ` Kees Cook
2020-03-22 12:20     ` WeiXiong Liao
2020-03-22 12:20       ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 07/11] pstore/blk: skip broken zone for mtd device WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:35   ` Kees Cook
2020-03-18 18:35     ` Kees Cook
2020-03-22 12:27     ` WeiXiong Liao
2020-03-22 12:27       ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 08/11] blkoops: respect for device to pick recorders WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:42   ` Kees Cook
2020-03-18 18:42     ` Kees Cook
2020-03-22 13:06     ` WeiXiong Liao
2020-03-22 13:06       ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 09/11] pstore/blk: blkoops: support special removing jobs for dmesg WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-03-18 18:47   ` Kees Cook
2020-03-18 18:47     ` Kees Cook
2020-03-22 13:03     ` WeiXiong Liao
2020-03-22 13:03       ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 10/11] blkoops: add interface for dirver to get information of blkoops WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-02-07 12:25 ` [PATCH v2 11/11] mtd: new support oops logger based on pstore/blk WeiXiong Liao
2020-02-07 12:25   ` WeiXiong Liao
2020-02-18 10:34   ` Miquel Raynal
2020-02-18 10:34     ` Miquel Raynal
2020-02-19  1:13     ` liaoweixiong
2020-02-19  1:13       ` liaoweixiong
2020-03-18 18:57   ` Kees Cook
2020-03-18 18:57     ` Kees Cook
2020-03-22 13:51     ` WeiXiong Liao
2020-03-22 13:51       ` WeiXiong Liao
2020-03-22 15:13       ` Kees Cook
2020-03-22 15:13         ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202003220814.713B5DF7AA@keescook \
    --to=keescook@chromium.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=liaoweixiong@allwinnertech.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.