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:   Wed, 31 May 2017 14:45:31 -0700 (PDT)
From:   David Rientjes <rientjes@...gle.com>
To:     Doug Anderson <dianders@...omium.org>
cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Matthias Kaehlcke <mka@...omium.org>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>, linux-mm@...ck.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        David Miller <davem@...emloft.net>
Subject: Re: [patch] compiler, clang: suppress warning for unused static
 inline functions

On Wed, 31 May 2017, Doug Anderson wrote:

> > Again, I defer to maintainers like Andrew and Ingo who have to deal with
> > an enormous amount of patches on how they would like to handle it; I don't
> > think myself or anybody else who doesn't deal with a large number of
> > patches should be mandating how it's handled.
> >
> > For reference, the patchset that this patch originated from added 8 lines
> > and removed 1, so I disagree that this cleans anything up; in reality, it
> > obfuscates the code and makes the #ifdef nesting more complex.
> 
> As Matthias said, let's not argue about ifdeffs and instead talk about
> adding "maybe unused".  100% of these cases _can_ be solved by adding
> "maybe unused".  Then, if a maintainer thinks that an ifdef is cleaner
> / better in a particular case, we can use an ifdef in that case.
> 
> Do you believe that adding "maybe unused" tags significantly uglifies
> the code?  I personally find them documenting.
> 

But then you've eliminated the possibility of finding dead code again, 
which is the only point to the warning :)  So now we have patches going to 
swamped maintainers to add #ifdef's, more LOC, and now patches to sprinkle 
__maybe_unused throughout the code to not increase LOC in select areas but 
then we can't find dead code again.

My suggestion is to match gcc behavior and if anybody is in the business 
of cleaning up truly dead code, send patches.  Tools exist to do this 
outside of relying on a minority compiler during compilation.  Otherwise, 
this is simply adding more burden to already swamped maintainers to 
annotate every single static inline function that clang complains about.  
I'd prefer to let them decide and this will be the extent of my 
participation in this thread.

Powered by blists - more mailing lists