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, 7 Oct 2011 00:50:20 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Alex Ben <aleben358@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <Mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Removed superfluous parentheses in macro defs

On Fri, Oct 07, 2011 at 09:22:04AM +1100, Alex Ben wrote:
> 1) make it consistent with other constant macro deinitions, which
> don't have parentheses, as they are really superfluous.
> 
> 2) the extra parentheses on the 5th line of #define GDT_ENTRY is
> superfluous, as there is no bit shifting on that line.
> ---
>  arch/x86/include/asm/segment.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
> index 5e64171..92621c1 100644
> --- a/arch/x86/include/asm/segment.h
> +++ b/arch/x86/include/asm/segment.h
> @@ -10,7 +10,7 @@
> 	 (((flags) & _AC(0x0000f0ff,ULL)) << 40) |	\
> 	 (((limit) & _AC(0x000f0000,ULL)) << (48-16)) |	\
> 	 (((base)  & _AC(0x00ffffff,ULL)) << 16) |	\
> -	 (((limit) & _AC(0x0000ffff,ULL))))
> +	 ((limit)  & _AC(0x0000ffff,ULL)))
> 
>  /* Simple and small GDT entries for booting only */
> 
> @@ -75,7 +75,7 @@
> 
>  #define GDT_ENTRY_DEFAULT_USER_DS	15
> 
> -#define GDT_ENTRY_KERNEL_BASE		(12)
> +#define GDT_ENTRY_KERNEL_BASE		12

Please do a git annotate on the file you're patching and look at the
commit id which is listed for the GDT_ENTRY_KERNEL_BASE line to find out
why is the 12 parenthesized. Hint: 3234282f33b29

:-)

-- 
Regards/Gruss,
    Boris.
--
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