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]
Date:   Fri, 12 Oct 2018 09:01:15 -0700
From:   James Bottomley <jejb@...ux.ibm.com>
To:     Denis Kenzior <denkenz@...il.com>, ndesaulniers@...gle.com,
        dhowells@...hat.com
Cc:     natechancellor@...il.com, ebiggers@...gle.com,
        Mimi Zohar <zohar@...ux.vnet.ibm.com>,
        James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>,
        linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KEYS: trusted: fix -Wvarags warning

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 clang, yes.  However, if we're fixing
> > this for good a char * pointer is the only guaranteed thing because
> > it mirrors current use in printf.
> > 
> 
> All right.  I guess I wasn't aware that non-printf like variadic 
> functions are now considered harmful or of the impending crusade
> against them :)

It's not, it's just a maintainer issue: The original problem is because
we coded for gcc specifically; it doesn't complain and does the right
thing, so everyone was happy.  Now Clang comes along and is unhappy
with this, so the question a good maintainer should ask is "how do I
fix this so it never comes back again?", not "what's the easiest
bandaid to get both Clang and gcc to work?" because the latter is how
we got here in the first place.

James

> But in the context of this patch, can we please use something less 
> invasive than changing all the arguments around?  Promoting h3 to a
> bool (if possible) or int/unsigned int would get my vote.
> 
> Regards,
> -Denis
> 

Powered by blists - more mailing lists