[U-Boot] [PATCH v2 1/2] Introduce generic TPM support in u-boot
Marek Vasut
marek.vasut at gmail.com
Mon Oct 17 13:01:56 CEST 2011
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 at 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 at 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 at 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 at 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
More information about the U-Boot
mailing list