Re: [PATCH] hugetlbfs: check for pgoff value overflow

2018-03-08 Thread Mike Kravetz
On 03/07/2018 08:25 PM, Mike Kravetz wrote: > On 03/07/2018 05:35 PM, Yisheng Xie wrote: >> However, region_chg makes me a litter puzzle that when its return value < 0, >> sometime >> adds_in_progress is added like this case, while sometime it is not. so why >> not just >> change at the

Re: [PATCH] hugetlbfs: check for pgoff value overflow

2018-03-08 Thread Mike Kravetz
On 03/07/2018 08:25 PM, Mike Kravetz wrote: > On 03/07/2018 05:35 PM, Yisheng Xie wrote: >> However, region_chg makes me a litter puzzle that when its return value < 0, >> sometime >> adds_in_progress is added like this case, while sometime it is not. so why >> not just >> change at the

Re: [PATCH] hugetlbfs: check for pgoff value overflow

2018-03-07 Thread Mike Kravetz
On 03/07/2018 05:35 PM, Yisheng Xie wrote: > Hi Mike, > > On 2018/3/8 7:59, Mike Kravetz wrote: >> A vma with vm_pgoff large enough to overflow a loff_t type when >> converted to a byte offset can be passed via the remap_file_pages >> system call. The hugetlbfs mmap routine uses the byte offset

Re: [PATCH] hugetlbfs: check for pgoff value overflow

2018-03-07 Thread Mike Kravetz
On 03/07/2018 05:35 PM, Yisheng Xie wrote: > Hi Mike, > > On 2018/3/8 7:59, Mike Kravetz wrote: >> A vma with vm_pgoff large enough to overflow a loff_t type when >> converted to a byte offset can be passed via the remap_file_pages >> system call. The hugetlbfs mmap routine uses the byte offset

Re: [PATCH] hugetlbfs: check for pgoff value overflow

2018-03-07 Thread Yisheng Xie
Hi Mike, On 2018/3/8 7:59, Mike Kravetz wrote: > A vma with vm_pgoff large enough to overflow a loff_t type when > converted to a byte offset can be passed via the remap_file_pages > system call. The hugetlbfs mmap routine uses the byte offset to > calculate reservations and file size. > > A

Re: [PATCH] hugetlbfs: check for pgoff value overflow

2018-03-07 Thread Yisheng Xie
Hi Mike, On 2018/3/8 7:59, Mike Kravetz wrote: > A vma with vm_pgoff large enough to overflow a loff_t type when > converted to a byte offset can be passed via the remap_file_pages > system call. The hugetlbfs mmap routine uses the byte offset to > calculate reservations and file size. > > A

[PATCH] hugetlbfs: check for pgoff value overflow

2018-03-07 Thread Mike Kravetz
A vma with vm_pgoff large enough to overflow a loff_t type when converted to a byte offset can be passed via the remap_file_pages system call. The hugetlbfs mmap routine uses the byte offset to calculate reservations and file size. A sequence such as: mmap(0x20a0, 0x60, 0, 0x66033, -1,

[PATCH] hugetlbfs: check for pgoff value overflow

2018-03-07 Thread Mike Kravetz
A vma with vm_pgoff large enough to overflow a loff_t type when converted to a byte offset can be passed via the remap_file_pages system call. The hugetlbfs mmap routine uses the byte offset to calculate reservations and file size. A sequence such as: mmap(0x20a0, 0x60, 0, 0x66033, -1,