From: Nick Desaulniers
> Sent: 15 October 2018 22:54
> On Mon, Oct 15, 2018 at 2:26 AM David Laight wrote:
> >
> > From: ndesaulni...@google.com
> > > Sent: 11 October 2018 21:31
> > ...
> > > by swapping h2 and h3.
> > >
> > > security/keys/trusted.c:146:17: warning: passing an object that
> > >
On Mon, Oct 15, 2018 at 2:26 AM David Laight wrote:
>
> From: ndesaulni...@google.com
> > Sent: 11 October 2018 21:31
> ...
> > by swapping h2 and h3.
> >
> > security/keys/trusted.c:146:17: warning: passing an object that
> > undergoes default
> > argument promotion to 'va_start' has undefi
From: ndesaulni...@google.com
> Sent: 11 October 2018 21:31
...
> by swapping h2 and h3.
>
> security/keys/trusted.c:146:17: warning: passing an object that
> undergoes default
> argument promotion to 'va_start' has undefined behavior [-Wvarargs]
> va_start(argp, h3);
>
On Fri, Oct 12, 2018 at 10:27 AM Denis Kenzior wrote:
>
> Hi Nick,
>
> >> So maybe I'm misunderstanding something, but the issue seems to be that
> >> unsigned char is promoted to 'unsigned char *' by Clang and probably
> >> unsigned int or int by gcc.
> >
> > No. This is extremely well defined be
Hi Nick,
So maybe I'm misunderstanding something, but the issue seems to be that
unsigned char is promoted to 'unsigned char *' by Clang and probably
unsigned int or int by gcc.
No. This is extremely well defined behavior in C. In C, integral
types are NEVER promoted to pointer to integer typ
On Fri, Oct 12, 2018 at 10:05 AM Nick Desaulniers
wrote:
>
> On Fri, Oct 12, 2018 at 8:14 AM Denis Kenzior wrote:
> >
> > Hi James,
> >
> > >> So can't we simply use 'bool' or uint32 as the type for h3 instead
> > >> of re-ordering everything
> > >
> > > The problem is the standard is ambiguious.
Hi Nick,
Refer to
https://trustedcomputinggroup.org/wp-content/uploads/TPM-Main-Part-3-Commands_v1.2_rev116_01032011.pdf
for details.
Can you cite the relevant section?
Just pick any section that describes a TPM command. I randomly used
Section 10.3 for TPM Unbind. See the 'Incoming op
On Fri, Oct 12, 2018 at 9:01 AM James Bottomley wrote:
>
> On Fri, 2018-10-12 at 10:53 -0500, Denis Kenzior wrote:
> > Hi James,
> >
> > > > From the links provided in the patch it seems that one cannot
> > > > pass char/float/short to va_start(). Fair enough. So if we make
> > > > h3 an unsig
On Fri, Oct 12, 2018 at 8:14 AM Denis Kenzior wrote:
>
> Hi James,
>
> >> So can't we simply use 'bool' or uint32 as the type for h3 instead
> >> of re-ordering everything
> >
> > The problem is the standard is ambiguious. The only thing that's
> > guaranteed to work for all time is a char *. If
On Fri, Oct 12, 2018 at 09:55:55AM -0700, Nick Desaulniers wrote:
> On Thu, Oct 11, 2018 at 6:50 PM Nathan Chancellor
> wrote:
> >
> > On Thu, Oct 11, 2018 at 01:31:26PM -0700, ndesaulni...@google.com wrote:
> > > by swapping h2 and h3.
> > >
> > > security/keys/trusted.c:146:17: warning: passing
On Fri, Oct 12, 2018 at 5:29 AM Denis Kenzior wrote:
>
> Hi Nick,
>
> > @@ -123,7 +123,7 @@ static int TSS_rawhmac(unsigned char *digest, const
> > unsigned char *key,
> >*/
> > static int TSS_authhmac(unsigned char *digest, const unsigned char *key,
> > unsigned int k
On Thu, Oct 11, 2018 at 6:50 PM Nathan Chancellor
wrote:
>
> On Thu, Oct 11, 2018 at 01:31:26PM -0700, ndesaulni...@google.com wrote:
> > by swapping h2 and h3.
> >
> > security/keys/trusted.c:146:17: warning: passing an object that
> > undergoes default
> > argument promotion to 'va_start'
On Fri, 2018-10-12 at 10:53 -0500, Denis Kenzior wrote:
> Hi James,
>
> > > From the links provided in the patch it seems that one cannot
> > > pass char/float/short to va_start(). Fair enough. So if we make
> > > h3 an unsigned int, the issue goes away, no?
> >
> > For the current version of
Hi James,
From the links provided in the patch it seems that one cannot pass
char/float/short to va_start(). Fair enough. So if we make h3 an
unsigned int, the issue goes away, no?
For the current version of clang, yes. However, if we're fixing this
for good a char * pointer is the only g
On Fri, 2018-10-12 at 10:44 -0500, Denis Kenzior wrote:
> Hi James,
>
> > > So instead of having unsigned char h3, can't we simply have bool
> > > h3 or unsigned int h3?
> >
> > Given the ambiguity in the standards, the safe thing that will work
> > for all time and all potential compilers is a c
Hi James,
So instead of having unsigned char h3, can't we simply have bool h3
or unsigned int h3?
Given the ambiguity in the standards, the safe thing that will work for
all time and all potential compilers is a char *
All right. You state this with certainty, but I'd still like you to
ed
On Fri, 2018-10-12 at 10:13 -0500, Denis Kenzior wrote:
> Hi James,
>
> > > So can't we simply use 'bool' or uint32 as the type for h3
> > > instead
> > > of re-ordering everything
> >
> > The problem is the standard is ambiguious. The only thing that's
> > guaranteed to work for all time is a c
On Fri, 2018-10-12 at 10:13 -0500, Denis Kenzior wrote:
> Hi James,
>
> > > So can't we simply use 'bool' or uint32 as the type for h3
> > > instead of re-ordering everything
> >
> > The problem is the standard is ambiguious. The only thing that's
> > guaranteed to work for all time is a char *.
Hi James,
So can't we simply use 'bool' or uint32 as the type for h3 instead
of re-ordering everything
The problem is the standard is ambiguious. The only thing that's
guaranteed to work for all time is a char *. If you want to keep the
order, what I'd suggest is inserting a dummy pointer ar
On Fri, 2018-10-12 at 07:29 -0500, Denis Kenzior wrote:
> Hi Nick,
>
> > @@ -123,7 +123,7 @@ static int TSS_rawhmac(unsigned char *digest,
> > const unsigned char *key,
> >*/
> > static int TSS_authhmac(unsigned char *digest, const unsigned
> > char *key,
> > unsigned int
Hi Nick,
@@ -123,7 +123,7 @@ static int TSS_rawhmac(unsigned char *digest, const
unsigned char *key,
*/
static int TSS_authhmac(unsigned char *digest, const unsigned char *key,
unsigned int keylen, unsigned char *h1,
- unsigned char *h2, unsign
On Thu, Oct 11, 2018 at 01:31:26PM -0700, ndesaulni...@google.com wrote:
> by swapping h2 and h3.
>
> security/keys/trusted.c:146:17: warning: passing an object that
> undergoes default
> argument promotion to 'va_start' has undefined behavior [-Wvarargs]
> va_start(argp, h3);
>
22 matches
Mail list logo