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: <20070529174556.20c551a0.akpm@linux-foundation.org>
Date:	Tue, 29 May 2007 17:45:56 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-m68k@...r.kernel.org,
	Roman Zippel <zippel@...ux-m68k.org>
Subject: Re: [patch 2/2] m68k: Discontinuous memory support

On Mon, 28 May 2007 21:16:32 +0200
Geert Uytterhoeven <geert@...ux-m68k.org> wrote:

> -#define __page_address(page)	(PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT))
> -#define page_to_phys(page)	virt_to_phys((void *)__page_address(page))
> +#ifdef CONFIG_SINGLE_MEMORY_CHUNK
> +#define page_to_phys(page) \
> +	__pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) << PAGE_SHIFT))
> +#else
> +#define page_to_phys(page) ({						\
> +	struct pglist_data *pgdat;					\
> +	pgdat = pg_data_table[page_to_nid(page)];			\
> +	page_to_pfn(page) << PAGE_SHIFT;				\
> +})
> +#endif

macros which evaluate their args more than once are dangerous.
-
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