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: <1298299008.19814.20.camel@e102144-lin.cambridge.arm.com>
Date:	Mon, 21 Feb 2011 14:36:47 +0000
From:	Will Deacon <will.deacon@....com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Catalin Marinas <Catalin.Marinas@....com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 15/19] ARM: LPAE: use phys_addr_t instead of
 unsigned long for physical addresses

Hi Russell,

On Sat, 2011-02-19 at 18:26 +0000, Russell King - ARM Linux wrote:
> On Mon, Jan 24, 2011 at 05:55:57PM +0000, Catalin Marinas wrote:
> > From: Will Deacon <will.deacon@....com>
> >
> > The unsigned long datatype is not sufficient for mapping physical addresses
> > >= 4GB.
> >
> > This patch ensures that the phys_addr_t datatype is used to represent
> > physical addresses which may be beyond the range of an unsigned long.
> > The virt <-> phys macros are updated accordingly to ensure that virtual
> > addresses can remain as they are.
> >
> > Signed-off-by: Will Deacon <will.deacon@....com>
> > Signed-off-by: Catalin Marinas <catalin.marinas@....com>
> 
> This patch needs some more things fixed to prevent warnings:

Ah yes, this is for the non-HIGHMEM case which I hadn't considered for
LPAE. It's a perfectly reasonable configuration I suppose so this needs
fixing.

> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index a81355d..6cf76b3 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -809,9 +809,10 @@ static void __init sanity_check_meminfo(void)
>                  */
>                 if (__va(bank->start) >= vmalloc_min ||
>                     __va(bank->start) < (void *)PAGE_OFFSET) {
> -                       printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx "
> +                       printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx "
>                                "(vmalloc region overlap).\n",
> -                              bank->start, bank->start + bank->size - 1);
> +                              (unsigned long long)bank->start,
> +                              (unsigned long long)bank->start + bank->size - 1);
>                         continue;
>                 }
> 
> @@ -822,10 +823,11 @@ static void __init sanity_check_meminfo(void)
>                 if (__va(bank->start + bank->size) > vmalloc_min ||
>                     __va(bank->start + bank->size) < __va(bank->start)) {
>                         unsigned long newsize = vmalloc_min - __va(bank->start);
> -                       printk(KERN_NOTICE "Truncating RAM at %.8lx-%.8lx "
> -                              "to -%.8lx (vmalloc region overlap).\n",
> -                              bank->start, bank->start + bank->size - 1,
> -                              bank->start + newsize - 1);
> +                       printk(KERN_NOTICE "Truncating RAM at %.8llx-%.8llx "
> +                              "to -%.8llx (vmalloc region overlap).\n",
> +                              (unsigned long long)bank->start,
> +                              (unsigned long long)bank->start + bank->size - 1,
> +                              (unsigned long long)bank->start + newsize - 1);
>                         bank->size = newsize;
>                 }
>  #endif


Would you like me to submit an additional patch or are you happy merging
this diff in with my ack?

Cheers,

Will


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