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:	Tue, 10 Jul 2007 11:36:57 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
CC:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	andi@...stfloor.org, akpm@...ux-foundation.org
Subject: Re: [x86 setup 17/33] A20 handling code

Jan Engelhardt wrote:
>> +
>> +#define A20_TEST_ADDR	(4*0x80)
>> +#define A20_TEST_SHORT  32
>> +#define A20_TEST_LONG	2097152	/* 2^21 */
> 
> Maybe...?
> #define A20_TEST_LONG (1 << 21)

That makes it look like it's a magic value or bitmask, it's not.  The
value 2^21 is largely arbitrary, it's just what happened to be in the
previous code.

>> +/* Quick test to see if A20 is already enabled */
>> +static int a20_test_short(void)
>> +{
>> +	return a20_test(A20_TEST_SHORT);
>> +}
>> +
>> +/* Longer test that actually waits for A20 to come on line; this
>> +   is useful when dealing with the KBC or other slow external circuitry. */
>> +static int a20_test_long(void)
>> +{
>> +	return a20_test(A20_TEST_LONG);
>> +}
> 
> To me looks like some of these (or other functions) could return bool.

Does it matter?  It will generate worse code.

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