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:   Thu, 8 Nov 2018 15:47:32 +0000 (UTC)
From:   Michael Matz <matz@...e.de>
To:     Borislav Petkov <bp@...en8.de>
cc:     Yi Wang <wang.yi59@....com.cn>, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com, x86@...nel.org,
        suravee.suthikulpanit@....com, puwen@...on.cn,
        davidwang@...oxin.com, linux-kernel@...r.kernel.org,
        zhong.weidong@....com.cn
Subject: Re: [PATCH v2] x86/cpu: fix prototype warning

Hi,

On Thu, 8 Nov 2018, Borislav Petkov wrote:

> And frankly, I don't see why we should be fixing all those. So what if a 
> global function does't have a previous prototype declaration?!
> 
> Micha, is there anything "useful" that warning bitches about or should 
> we disable it?

What tglx said.  If you don't intend such functions to be called 
from other units make them static, if you do intend them to be callable 
declare the properly.

[There's also one subtle issue with argument promotions.  prototypeless 
functions are called as if they are declared "int name()" that is 
default argument promotions take place (float->double, {char,short}->int), 
which won't happen with prototypes, and argument type conversions won't 
take place (as no parameter types are known).  This might lead to 
different values between calling a prototyped and a prototype-less 
function arriving at the function even though the call expression looked 
the same]


Ciao,
Michael.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ