[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53ECEFF5.1040800@zytor.com>
Date: Thu, 14 Aug 2014 10:20:53 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Dave Hansen <dave.hansen@...el.com>,
Frantisek Hrbata <fhrbata@...hat.com>,
linux-kernel@...r.kernel.org
CC: linux-mm@...ck.org, tglx@...utronix.de, mingo@...hat.com,
x86@...nel.org, oleg@...hat.com, kamaleshb@...ibm.com,
hechjie@...ibm.com, akpm@...ux-foundation.org, dvlasenk@...hat.com,
prarit@...hat.com, lwoodman@...hat.com, hannsj_uhl@...ibm.com
Subject: Re: [PATCH 1/1] x86: add phys addr validity check for /dev/mem mmap
On 08/14/2014 09:36 AM, Dave Hansen wrote:
> Thanks for dredging this back up!
>
> On 08/14/2014 07:18 AM, Frantisek Hrbata wrote:
>> +int valid_phys_addr_range(phys_addr_t addr, size_t count)
>> +{
>> + return addr + count <= __pa(high_memory);
>> +}
>
> Is this correct on 32-bit? It would limit /dev/mem to memory below 896MB.
>
Last I checked, /dev/mem was already broken for highmem... which is
actually a problem. I would prefer to see it fixed.
-hpa
--
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