Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

2014-09-30 Thread Thomas Gleixner
On Tue, 30 Sep 2014, Frantisek Hrbata wrote: > On Tue, Sep 30, 2014 at 07:27:51AM -0700, Dave Hansen wrote: > > On 09/30/2014 05:41 AM, Frantisek Hrbata wrote: > > > Does it make sense to replace "count" with "size" so it's consistent with > > > the > > > rest or do you prefer "nr_bytes" or as Dav

Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

2014-09-30 Thread Frantisek Hrbata
On Tue, Sep 30, 2014 at 07:27:51AM -0700, Dave Hansen wrote: > On 09/30/2014 05:41 AM, Frantisek Hrbata wrote: > > Does it make sense to replace "count" with "size" so it's consistent with > > the > > rest or do you prefer "nr_bytes" or as Dave proposed "len_bytes"? > > I don't care what it is as

Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

2014-09-30 Thread Dave Hansen
On 09/30/2014 05:41 AM, Frantisek Hrbata wrote: > Does it make sense to replace "count" with "size" so it's consistent with the > rest or do you prefer "nr_bytes" or as Dave proposed "len_bytes"? I don't care what it is as long as it has a unit in it. -- To unsubscribe from this list: send the lin

Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

2014-09-30 Thread Frantisek Hrbata
On Mon, Sep 29, 2014 at 10:15:28PM +0200, Thomas Gleixner wrote: > 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.

Re: [RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

2014-09-29 Thread Thomas Gleixner
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 ri

[RESEND PATCH 2/4] x86: add phys addr validity check for /dev/mem mmap

2014-09-29 Thread Frantisek Hrbata
Prevent possible PTE corruption while calling mmap on /dev/mem with large offset. oops info, please note the PTE value 80080225. -8<-- [85739.124496] rep: Corrupted page table at address 7f63852f8000 [85739.130242] PGD ba2