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, 09 May 2014 10:02:58 -0700
From:	Joe Perches <joe@...ches.com>
To:	Borislav Petkov <bp@...e.de>
Cc:	Andres Freund <andres@...razel.de>, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH 2/2] x86: Fix typo in MSR_IA32_MISC_ENABLE_LIMIT_CPUID
 macro

On Fri, 2014-05-09 at 12:33 +0200, Borislav Petkov wrote:
> On Fri, May 09, 2014 at 09:57:30AM +0200, Borislav Petkov wrote:
> > > diff --git a/arch/x86/include/uapi/asm/msr-index.h b/arch/x86/include/uapi/asm/msr-index.h
[]
> > > -#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID		(1ULL << MSR_IA32_MISC_ENABLE_LIMIT_CPUID_BIT);
> > > +#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID		(1ULL << MSR_IA32_MISC_ENABLE_LIMIT_CPUID_BIT)
> 
> Btw, we should probably be catching typos like that with checkpatch.
> Here's an initial version for single-line macros:
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3313,6 +3313,11 @@ sub process {
>  			}
>  		}
>  
> +		if ($line =~ /^\+\s*#\s*define\s.*;\s*$/) {
> +			WARN("TRAILING_SEMICOLON",
> +			     "Trailing semicolon at macro definition\n" . $herecurr);
> +		}
> +

Seems sensible.

I suggest moving the test next to the other macro
definition tests for things like unnecessary semicolon
around "do {... while (0)" around line 3800.

Extending the test to find multiline forms like

#define	foo	\
	bar;

would also be trivially done there.

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