public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Piotr Maziarz <piotrx.maziarz@linux.intel.com>,
	linux-kernel@vger.kernel.org, mingo@redhat.com,
	cezary.rojewski@intel.com, gustaw.lewandowski@intel.com
Subject: Re: [PATCH 1/2] seq_buf: Add printing formatted hex dumps
Date: Wed, 6 Nov 2019 11:34:20 +0200	[thread overview]
Message-ID: <20191106093420.GZ32742@smile.fi.intel.com> (raw)
In-Reply-To: <20191106035317.7558e47e@grimm.local.home>

On Wed, Nov 06, 2019 at 03:53:17AM -0500, Steven Rostedt wrote:
> On Wed,  6 Nov 2019 07:27:39 +0100
> Piotr Maziarz <piotrx.maziarz@linux.intel.com> wrote:

> > +	for (i = 0; i < len; i += rowsize) {
> > +		linelen = min(remaining, rowsize);
> > +		remaining -= rowsize;
> 
> Probably should make the above:
> 
> 		remaining -= linelen;
> 
> Yeah, what you have works, but it makes a reviewer worry about using
> remaining later and having it negative.

OTOH, the original function and followers (like seq_hex_dump() one) are using
exactly above form. Maybe for the sake of consistency we may do the same and
then fix all at once. Or other way around, amend the rest first.

> > +		case DUMP_PREFIX_ADDRESS:
> 
> I'm curious to know what uses the above type? By default, today,
> pointers are pretty much obfuscated, and that will show up here too.

Good question. Current users are:

arch/microblaze/kernel/traps.c
arch/x86/kernel/mpparse.c
drivers/crypto/axis/artpec6_crypto.c
drivers/crypto/caam/...
drivers/crypto/ccree/cc_driver.c
drivers/crypto/qat/qat_common/adf_transport_debug.c
drivers/dma/xgene-dma.c
drivers/mailbox/mailbox-test.c
drivers/net/can/usb/ucan.c
drivers/net/ethernet/cadence/macb_main.c
drivers/net/ethernet/cavium/liquidio/octeon_droq.c
drivers/net/ethernet/intel/...
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/usb/gadget/function/f_ncm.c
fs/ext4/super.c
fs/jfs/...
mm/page_poison.c
mm/slub.c

Not many.

My understanding that it's still useful in conjunction with some other messages
where pointers are printed and developer, who is reading the logs, may match
them and do some conclusions.

> > +	}

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2019-11-06  9:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  6:27 [PATCH 1/2] seq_buf: Add printing formatted hex dumps Piotr Maziarz
2019-11-06  6:27 ` [PATCH 2/2] tracing: Use seq_buf_hex_dump() to dump buffers Piotr Maziarz
2019-11-06  8:55   ` Steven Rostedt
2019-11-07 12:18     ` Piotr Maziarz
2019-11-06  8:53 ` [PATCH 1/2] seq_buf: Add printing formatted hex dumps Steven Rostedt
2019-11-06  9:34   ` Andy Shevchenko [this message]

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=20191106093420.GZ32742@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=cezary.rojewski@intel.com \
    --cc=gustaw.lewandowski@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=piotrx.maziarz@linux.intel.com \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox