linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Greg KH <greg@kroah.com>, Joe Perches <joe@perches.com>
Cc: linux-integrity@vger.kernel.org, Mimi Zohar <zohar@linux.ibm.com>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	linux-api@vger.kernel.org
Subject: Re: [PATCH v5 1/2] tpm: add sysfs exports for all banks of PCR registers
Date: Fri, 15 Jan 2021 10:07:51 -0800	[thread overview]
Message-ID: <7a245c854925c8619eeb02aab6ff32bbccc92ed9.camel@HansenPartnership.com> (raw)
In-Reply-To: <eb2acffef1368c48b3ca2d85105ef73b31797fe7.camel@HansenPartnership.com>

On Fri, 2021-01-15 at 09:26 -0800, James Bottomley wrote:
> On Fri, 2021-01-15 at 14:54 +0100, Greg KH wrote:
> > On Thu, Jan 14, 2021 at 04:21:08PM -0800, James Bottomley wrote:
> [...]
> > > It looks like we already have a couple of bugs in the kernel
> > > introduced by this confusion ...  return sysfs_emit() vs return
> > > sysfs_emit_at() being the most tricky ...
> > 
> > Hm, Joe, you did the conversion to these functions (and wrote the
> > api), care to review this?
> 
> A cursory glance tells me that summary_show in 
> drivers/infiniband/hw/usnic/usnic_ib_sysfs.c has a problem, I think
> the last = should be +=

The use in drivers/base/node.c:node_read_meminfo() is highly
questionable.  While currently not emitting wrong code, it depends on
len being 0 when passed in to sysfs_emit_at().  That argues it should
either be using sysfs_emit() or it should have a len += just in case
something gets prepended that makes len non zero.

James



  reply	other threads:[~2021-01-15 18:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 23:26 [PATCH v5 0/2] add sysfs exports for TPM 2 PCR registers James Bottomley
2021-01-13 23:26 ` [PATCH v5 1/2] tpm: add sysfs exports for all banks of " James Bottomley
2021-01-14  7:59   ` Greg KH
2021-01-15  0:21     ` James Bottomley
2021-01-15  6:55       ` Jarkko Sakkinen
2021-01-15 17:10         ` James Bottomley
2021-01-15 13:54       ` Greg KH
2021-01-15 17:26         ` James Bottomley
2021-01-15 18:07           ` James Bottomley [this message]
2021-01-15 20:48             ` Joe Perches
2021-01-15 21:06               ` James Bottomley
2021-01-15 21:14                 ` Joe Perches
2021-01-15 20:32         ` Joe Perches
2021-01-15  6:48   ` Jarkko Sakkinen
2021-01-13 23:26 ` [PATCH v5 2/2] ABI: add sysfs description for tpm exports " James Bottomley
2021-01-15  6:40   ` Jarkko Sakkinen

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=7a245c854925c8619eeb02aab6ff32bbccc92ed9.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=greg@kroah.com \
    --cc=jarkko@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=zohar@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).