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:	Tue, 12 Jan 2010 17:02:26 +1000
From:	Greg Ungerer <gerg@...pgear.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	gerg@...inux.org, linux-m68k@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68knommu: change definitions of __pa() and __va()


Hi Linus,

Linus Torvalds wrote:
> On Tue, 12 Jan 2010, Greg Ungerer wrote:
>> +#else
>> +#define page_to_phys(page)	((page - mem_map) << PAGE_SHIFT)
>> +#define page_to_bus(page)	((page - mem_map) << PAGE_SHIFT)
>> +#endif
> 
> Ok, so the old ones were total crap too, but when moving things around, 
> don't just copy the crap like this.
> 
> Look at those two #define's for five seconds, and ask yourself what is 
> wrong with them. Those macros are not good.

Ok. Easily fixed.

page_to_bus() doesn't even look like it is used anywhere (and m68k
itself doesn't define it). So I'll remove it.

I propose changing page_to_phys() to be:

#define page_to_phys(page)      (page_to_pfn(page) << PAGE_SHIFT)

Which seems consistent with many other arches. (And it works on
m68knommu too :-)

I'll generate a new patch with that changed.

A quick grep shows page_to_phys() defined this way in a couple of
other places too:

   h8300/include/asm/io.h
   sparc/include/asm/io_32.h

Regards
Greg



------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@...pgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
--
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