Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-16 Thread Naoya Horiguchi
On Sat, Apr 15, 2017 at 03:58:59PM -0700, Mike Kravetz wrote: > On 04/13/2017 08:32 PM, Naoya Horiguchi wrote: > > On Tue, Apr 11, 2017 at 03:51:58PM -0700, Mike Kravetz wrote: > > ... > >> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > >> index 7163fe0..dde8613 100644 > >> ---

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-16 Thread Naoya Horiguchi
On Sat, Apr 15, 2017 at 03:58:59PM -0700, Mike Kravetz wrote: > On 04/13/2017 08:32 PM, Naoya Horiguchi wrote: > > On Tue, Apr 11, 2017 at 03:51:58PM -0700, Mike Kravetz wrote: > > ... > >> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > >> index 7163fe0..dde8613 100644 > >> ---

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-15 Thread Mike Kravetz
On 04/13/2017 08:32 PM, Naoya Horiguchi wrote: > On Tue, Apr 11, 2017 at 03:51:58PM -0700, Mike Kravetz wrote: > ... >> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c >> index 7163fe0..dde8613 100644 >> --- a/fs/hugetlbfs/inode.c >> +++ b/fs/hugetlbfs/inode.c >> @@ -136,17 +136,26 @@

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-15 Thread Mike Kravetz
On 04/13/2017 08:32 PM, Naoya Horiguchi wrote: > On Tue, Apr 11, 2017 at 03:51:58PM -0700, Mike Kravetz wrote: > ... >> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c >> index 7163fe0..dde8613 100644 >> --- a/fs/hugetlbfs/inode.c >> +++ b/fs/hugetlbfs/inode.c >> @@ -136,17 +136,26 @@

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-13 Thread Naoya Horiguchi
On Tue, Apr 11, 2017 at 03:51:58PM -0700, Mike Kravetz wrote: ... > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > index 7163fe0..dde8613 100644 > --- a/fs/hugetlbfs/inode.c > +++ b/fs/hugetlbfs/inode.c > @@ -136,17 +136,26 @@ static int hugetlbfs_file_mmap(struct file *file, > struct

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-13 Thread Naoya Horiguchi
On Tue, Apr 11, 2017 at 03:51:58PM -0700, Mike Kravetz wrote: ... > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > index 7163fe0..dde8613 100644 > --- a/fs/hugetlbfs/inode.c > +++ b/fs/hugetlbfs/inode.c > @@ -136,17 +136,26 @@ static int hugetlbfs_file_mmap(struct file *file, > struct

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-12 Thread Mike Kravetz
On 04/12/2017 01:58 AM, Vegard Nossum wrote: > On 12 April 2017 at 00:51, Mike Kravetz wrote: >> If mmap() maps a file, it can be passed an offset into the file at >> which the mapping is to start. Offset could be a negative value when >> represented as a loff_t. The

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-12 Thread Mike Kravetz
On 04/12/2017 01:58 AM, Vegard Nossum wrote: > On 12 April 2017 at 00:51, Mike Kravetz wrote: >> If mmap() maps a file, it can be passed an offset into the file at >> which the mapping is to start. Offset could be a negative value when >> represented as a loff_t. The offset plus length will be

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-12 Thread Vegard Nossum
On 12 April 2017 at 00:51, Mike Kravetz wrote: > If mmap() maps a file, it can be passed an offset into the file at > which the mapping is to start. Offset could be a negative value when > represented as a loff_t. The offset plus length will be used to > update the file

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-12 Thread Vegard Nossum
On 12 April 2017 at 00:51, Mike Kravetz wrote: > If mmap() maps a file, it can be passed an offset into the file at > which the mapping is to start. Offset could be a negative value when > represented as a loff_t. The offset plus length will be used to > update the file size (i_size) which is

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-11 Thread Hillf Danton
On April 12, 2017 6:52 AM Mike Kravetz wrote: > > If mmap() maps a file, it can be passed an offset into the file at > which the mapping is to start. Offset could be a negative value when > represented as a loff_t. The offset plus length will be used to > update the file size (i_size) which is

Re: [PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-11 Thread Hillf Danton
On April 12, 2017 6:52 AM Mike Kravetz wrote: > > If mmap() maps a file, it can be passed an offset into the file at > which the mapping is to start. Offset could be a negative value when > represented as a loff_t. The offset plus length will be used to > update the file size (i_size) which is

[PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-11 Thread Mike Kravetz
If mmap() maps a file, it can be passed an offset into the file at which the mapping is to start. Offset could be a negative value when represented as a loff_t. The offset plus length will be used to update the file size (i_size) which is also a loff_t. Validate the value of offset and offset +

[PATCH] hugetlbfs: fix offset overflow in huegtlbfs mmap

2017-04-11 Thread Mike Kravetz
If mmap() maps a file, it can be passed an offset into the file at which the mapping is to start. Offset could be a negative value when represented as a loff_t. The offset plus length will be used to update the file size (i_size) which is also a loff_t. Validate the value of offset and offset +