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: <20090702082654.GA14804@linux-mips.org>
Date:	Thu, 2 Jul 2009 09:26:54 +0100
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Kevin Cernekee <cernekee@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix virt_to_phys() warnings

On Thu, Jul 02, 2009 at 09:07:46AM +0200, Andi Kleen wrote:
> From: Andi Kleen <andi@...stfloor.org>
> Date: Thu, 02 Jul 2009 09:07:46 +0200
> To: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Kevin Cernekee <cernekee@...il.com>, linux-kernel@...r.kernel.org,
> 	Ralf Baechle <ralf@...ux-mips.org>
> Subject: Re: [PATCH] Fix virt_to_phys() warnings
> Content-Type: text/plain; charset=us-ascii
> 
> Andrew Morton <akpm@...ux-foundation.org> writes:
> >
> > #define virt_to_page(kaddr)        pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
> >
> > thereby passing an `unsigned long' where a void* was expected.
> >
> >
> > So perhaps something along these lines:
> 
> I'm not quite sure it's the case on MIPS, but I remember on x86 one of
> the reasons this was done as a macro was to avoid a include dependency
> loop with struct page.

The MIPS <asm/page.h> uses a forward declaration for the same reason since
a very long time.  These days struct page is defined in <linux/mm_types.h>
but that file needs pgprot_t (which is defined in <asm/page.h> ...) to be
defined first so can't be included from the to of page.h.

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