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:	Mon, 29 Oct 2007 09:28:28 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	David Howells <dhowells@...hat.com>
cc:	akpm@...ux-foundation.org, rpjday@...shcourse.ca,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] FRV: Permit the memory to be located elsewhere in NOMMU
 mode



On Mon, 29 Oct 2007, David Howells wrote:
>  
> -__page_offset = 0xc0000000;		/* start of area covered by struct pages */
> +/* start of area covered by struct pages */
> +#if defined(CONFIG_UCPAGE_OFFSET_20000000)
> +__page_offset = 0x20000000;
> +#elif defined(CONFIG_UCPAGE_OFFSET_40000000)
> +__page_offset = 0x40000000;
...

Please don't do these kinds of things in the source code.

Do them in the Kconfig language where it belongs, and where it makes much 
more sense.

See, for example, arch/x86/Kconfig.i386:

	config PAGE_OFFSET
	        hex
	        default 0xB0000000 if VMSPLIT_3G_OPT
	        default 0x80000000 if VMSPLIT_2G
	        default 0x78000000 if VMSPLIT_2G_OPT
	        default 0x40000000 if VMSPLIT_1G
	        default 0xC0000000

Notice? Even the syntax is much cleaner!

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