public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] Introduce generic TPM support in u-boot
Date: Mon, 17 Oct 2011 13:01:56 +0200	[thread overview]
Message-ID: <201110171301.57145.marek.vasut@gmail.com> (raw)
In-Reply-To: <CAC3GErF2PDnxKZittvDtsDThd3-DEqcoYxuvn6vbrBbB5WYC+A@mail.gmail.com>

On Sunday, October 16, 2011 09:49:19 PM Vadim Bendebury wrote:
> On Sun, Oct 16, 2011 at 5:28 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > On Sunday, October 16, 2011 05:45:40 AM Vadim Bendebury wrote:
> >> On Sat, Oct 15, 2011 at 8:31 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> >> > On Sunday, October 16, 2011 03:04:33 AM Vadim Bendebury wrote:
> >> >> On Sat, Oct 15, 2011 at 2:09 PM, Marek Vasut <marek.vasut@gmail.com> 
wrote:
> >> >> > On Saturday, October 15, 2011 08:47:39 PM Vadim Bendebury wrote:
> >> >> >> Dear Marek Vasut,
> >> >> >> 
> >> >> >> thank you for your comments, please see below:
> >> >> >> 
> >> >> >> On Sat, Oct 15, 2011 at 11:08 AM, Marek Vasut
> >> >> >> <marek.vasut@gmail.com>
> >> > 
> >> > wrote:
> >> >> >> > On Saturday, October 15, 2011 05:38:50 AM Vadim Bendebury wrote:
> >> >> >> >> TPM (Trusted Platform Module) is an integrated circuit and
> >> >> >> >> software platform that provides computer manufacturers with the
> >> >> >> >> core components of a subsystem used to assure authenticity,
> >> >> >> >> integrity and confidentiality.
> >> >> >> > 
> >> >> >> > [...]
> >> >> >> > 
> >> >> >> > Quick points:
> >> >> >> > * The license
> >> >> >> 
> >> >> >> Please suggest the appropriate file header text.
> >> >> > 
> >> >> > Uh ... you should know the license !!!
> >> >> 
> >> >> removed the BSD part
> >> > 
> >> > Are you sure you're not relicensing code you don't own ? I'm just
> >> > curious, what's the origin of the code ? I'd prefer to avoid legal
> >> > crap.
> >> 
> >> I am sure.
> > 
> > Would you mind answering my second question please ?
> 
> I wrote this from scratch.

Thanks!

[...]

> >> >> __v is needed to avoid side effects when invoking the macro.
> >> > 
> >> > Side effects ? What side effects ?
> >> 
> >> https://www.securecoding.cert.org/confluence/display/seccode/PRE31-C.+Av
> >> oid +side-effects+in+arguments+to+unsafe+macros
> > 
> > I still don't see it. You use the variable in printf() and writeX(),
> > neither of which change the variable ... so where's the sideeffect ?
> 
> The side effect comes from the calling site.
> 
> When data[count++] is used as a macro argument, if there is no
> intermediate variable defined in the macro declaration, macro
> expansion inserts data[count++] in the code several times (as many
> times as the parameter is used in the macro declaration), and in this
> particular case gets executed twice, resulting in `count' advancing by
> 2 and wrong `data' values used.

Thanks for clearing this
> 
> > Cheers
> 
> cheers,
> /vb

  reply	other threads:[~2011-10-17 11:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-15  3:38 [U-Boot] [PATCH v2 1/2] Introduce generic TPM support in u-boot Vadim Bendebury
2011-10-15 18:08 ` Marek Vasut
2011-10-15 18:47   ` Vadim Bendebury
2011-10-15 21:09     ` Marek Vasut
2011-10-16  1:04       ` Vadim Bendebury
2011-10-16  3:31         ` Marek Vasut
2011-10-16  3:45           ` Vadim Bendebury
2011-10-16  7:35             ` Wolfgang Denk
2011-10-16 14:57               ` Vadim Bendebury
2011-10-16 20:04                 ` Wolfgang Denk
2011-10-16 20:24                   ` Vadim Bendebury
2011-10-16 20:31                     ` Wolfgang Denk
2011-10-16 20:42                       ` Vadim Bendebury
2011-10-16 20:53                         ` Wolfgang Denk
2011-10-16 21:53                           ` Vadim Bendebury
2011-10-16 12:28             ` Marek Vasut
2011-10-16 19:49               ` Vadim Bendebury
2011-10-17 11:01                 ` Marek Vasut [this message]
2011-10-16  6:15         ` Wolfgang Denk
2011-10-16 15:31       ` Mike Frysinger
2011-10-15 19:25 ` Wolfgang Denk
2011-10-16  1:05   ` Vadim Bendebury
2011-10-15 19:42 ` Mike Frysinger
2011-10-15 20:23   ` Vadim Bendebury
2011-10-16  1:06   ` Vadim Bendebury

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=201110171301.57145.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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