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-next>] [day] [month] [year] [list]
Date:	Thu, 21 Apr 2011 15:21:18 -0400
From:	Dave Jones <davej@...hat.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: annoying new gcc 4.6.0 warnings.

gcc 4.6.0 enables a new warning by default, which spews ~3000 lines
of extra warnings to my build. The warning looks like ..

arch/x86/kernel/cpu/cpufreq/powernow-k8.c: In function ‘pending_bit_stuck’:
arch/x86/kernel/cpu/cpufreq/powernow-k8.c:108:10: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable]
arch/x86/kernel/cpu/cpufreq/powernow-k8.c: In function ‘core_voltage_pre_transition’:
arch/x86/kernel/cpu/cpufreq/powernow-k8.c:340:14: warning: variable ‘lo’ set but not used [-Wunused-but-set-variable]

In those cases, there's no bug there, the code just doesn't use all the arguments
that get passed to rdmsr...   For eg,

static int pending_bit_stuck(void)
{
        u32 lo, hi;

        if (cpu_family == CPU_HW_PSTATE)
                return 0;

        rdmsr(MSR_FIDVID_STATUS, lo, hi); 
        return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0; 
}


gcc's manpage says to dismiss this warning with attribute(unused), but sprinkling thousands
of those through the source seems pretty ugly.  As does rewriting functions
like rdmsr to handle NULL as an argument.

There might be some valid bugs found (I think DaveM found a few already) from this new
warning, but it seems like everything I've looked at so far is just noise.

Any thoughts ?

	Dave

--
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