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] [day] [month] [year] [list]
Date:	Wed, 4 Mar 2015 19:54:46 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Darshana Padmadas <darshanapadmadas@...il.com>,
	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, x86@...nel.org, josh@...htriplett.org
Subject: Re: [PATCH 05/16] arch: x86: kernel: Make internal functions static
 in cpu/intel_cacheinfo.c


* Borislav Petkov <bp@...en8.de> wrote:

> On Wed, Mar 04, 2015 at 07:02:07PM +0530, Darshana Padmadas wrote:
> > cpu/intel_cacheinfo.c defines two functions amd_get_l3_disable_slot
> > and amd_set_l3_disable_slot. No other file uses these functions.
> > So make these static.
> > 
> > This eliminates the following warnings:
> > 
> > arch/x86/kernel/cpu/intel_cacheinfo.c:349:5: warning: no previous prototype for ‘amd_get_l3_disable_slot’ [-Wmissing-prototypes]
> > arch/x86/kernel/cpu/intel_cacheinfo.c:427:5: warning: no previous prototype for ‘amd_set_l3_disable_slot’ [-Wmissing-prototypes]
> 
> Please correct your commit message - this patch is making functions 
> static and not fixing -Wmissing-prototypes warnings. Also, go 
> through the rest of the patchset as I see other cases of this too.

So mentioning the warning is OK as long as it's characterised as a 
tool that helped find these kernel inefficiencies. So a better commit 
message would be something like:

   cpu/intel_cacheinfo.c defines two functions amd_get_l3_disable_slot()
   and amd_set_l3_disable_slot(). No other file uses these functions.
   So make these static to reduce the kernel's size.

   This was found via -Wmissing-prototypes warnings:
 
     arch/x86/kernel/cpu/intel_cacheinfo.c:349:5: warning: no previous prototype for ‘amd_get_l3_disable_slot’ [-Wmissing-prototypes]
     arch/x86/kernel/cpu/intel_cacheinfo.c:427:5: warning: no previous prototype for ‘amd_set_l3_disable_slot’ [-Wmissing-prototypes]

also note how we refer to function names in changelogs: 
'amd_get_l3_disable_slot()', not 'amd_get_l3_disable_slot'.

This style should be used for the other patches in this series as 
well, plus the feedback I gave for the extra prototype lines should be 
followed as well.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ