lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdmL0kkZs7m+F5eXutVNqs0tjpKcKy-O4N8+-F2FOkL9gQ@mail.gmail.com>
Date:   Fri, 12 Oct 2018 11:39:47 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     denkenz@...il.com
Cc:     jejb@...ux.ibm.com, dhowells@...hat.com,
        Nathan Chancellor <natechancellor@...il.com>,
        Eric Biggers <ebiggers@...gle.com>, zohar@...ux.vnet.ibm.com,
        jmorris@...ei.org, serge@...lyn.com,
        linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] KEYS: trusted: fix -Wvarags warning

On Fri, Oct 12, 2018 at 10:27 AM Denis Kenzior <denkenz@...il.com> 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 behavior in C.  In C, integral
> > types are NEVER promoted to pointer to integer types, only to larger
> > integral types through rules more complicated than the correct flags
> > to pass to `tar`.
> > https://xkcd.com/1168/
> >
>
> Ah right.  Thanks for the correction.  So looks like bool won't work for
> the same reasons.  But unsigned int should work right?  But then again
> this is a boolean value and if we want to be paranoid we can simply
> tweak the 'c = h3' assignment to be something like:
>
> c = !!h3;
>
> So in the end, I'm happy with int or unsigned int.

Thanks for the feedback.  I'll wait wait to see if James is also cool
with that approach, and if so, send a v2 based on the next-keys branch
in the security tree as per Nathan, with yours and his Suggested-by
tags.

-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ