[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1409292211560.22082@ionos.tec.linutronix.de>
Date: Mon, 29 Sep 2014 22:15:28 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Frantisek Hrbata <fhrbata@...hat.com>
cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, oleg@...hat.com,
kamaleshb@...ibm.com, hechjie@...ibm.com,
akpm@...ux-foundation.org, dave.hansen@...el.com,
dvlasenk@...hat.com, prarit@...hat.com, lwoodman@...hat.com,
hannsj_uhl@...ibm.com, torvalds@...ux-foundation.org
Subject: Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem
mmap
On Mon, 29 Sep 2014, Frantisek Hrbata wrote:
> V2: fix pfn check in valid_mmap_phys_addr_range, thanks to Dave Hansen
AFAICT, Dave also asked you to change size_t count into something more
intuitive, i.e. nr_bytes or such.
> +int valid_mmap_phys_addr_range(unsigned long pfn, size_t count)
And right he is. I really had to look twice to see that count is
actually number of bytes and not number of pages, which is what you
expect after pfn.
> +{
> + return arch_pfn_possible(pfn + (count >> PAGE_SHIFT));
> +}
Thanks,
tglx
--
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