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]
Message-Id: <4CD836D40200007800020F4E@vpn.id2.novell.com>
Date:	Mon, 08 Nov 2010 16:43:48 +0000
From:	"Jan Beulich" <JBeulich@...ell.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	<mingo@...e.hu>, "Yinghai Lu" <yinghai@...nel.org>,
	<tglx@...utronix.de>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86-64: more fixes and cleanup to AMD Fam10 MMCONF
	 enabling

>>> On 08.11.10 at 17:13, "H. Peter Anvin" <hpa@...or.com> wrote:
> On 11/05/2010 03:59 AM, Jan Beulich wrote:
>>  
>> --- 2.6.37-rc1-x86_64-mmconf-fam10h.orig/arch/x86/kernel/mmconf-fam10h_64.c
>> +++ 2.6.37-rc1-x86_64-mmconf-fam10h/arch/x86/kernel/mmconf-fam10h_64.c
>> @@ -43,7 +43,7 @@ static int __cpuinit cmp_range(const voi
>>  	return start1 - start2;
>>  }
>>  
>> -#define UNIT (1ULL << (5 + 3 + 12))
>> +#define UNIT (1ULL << FAM10H_MMIO_CONF_BASE_SHIFT)
>>  #define MASK (~(UNIT - 1))
>>  #define SIZE (UNIT << 8)
> 
> Could we avoid macros named UNIT, MASK, and SIZE at all?  I realize
> they're already in the code, but still...

I could understand if these were definition in a header, but why
do you think we need to have unnecessarily long identifiers (e.g.
by prefixing all of the defines here with FAM10H_MMIO_CONF_BASE_)
in places like this? After all, one of the two goals of using a macro
here at all is to keep things small and simple...

But sure, if just the names hinder acceptance, I can fold this and
the original patches together and use less ambiguous names.

Jan

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