Re: [PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Mike Kravetz
On 03/21/2018 01:56 PM, Andrew Morton wrote: > On Wed, 21 Mar 2018 09:13:14 -0700 Mike Kravetz > wrote: >> >> +static int shm_split(struct vm_area_struct *vma, unsigned long addr) >> +{ >> +struct file *file = vma->vm_file; >> +struct shm_file_data *sfd =

Re: [PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Mike Kravetz
On 03/21/2018 01:56 PM, Andrew Morton wrote: > On Wed, 21 Mar 2018 09:13:14 -0700 Mike Kravetz > wrote: >> >> +static int shm_split(struct vm_area_struct *vma, unsigned long addr) >> +{ >> +struct file *file = vma->vm_file; >> +struct shm_file_data *sfd = shm_file_data(file); >> + >> +

Re: [PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Andrew Morton
On Wed, 21 Mar 2018 09:13:14 -0700 Mike Kravetz wrote: > If System V shmget/shmat operations are used to create a hugetlbfs > backed mapping, it is possible to munmap part of the mapping and > split the underlying vma such that it is not huge page aligned. > This will

Re: [PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Andrew Morton
On Wed, 21 Mar 2018 09:13:14 -0700 Mike Kravetz wrote: > If System V shmget/shmat operations are used to create a hugetlbfs > backed mapping, it is possible to munmap part of the mapping and > split the underlying vma such that it is not huge page aligned. > This will untimately result in the

Re: [PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Dan Williams
On Wed, Mar 21, 2018 at 9:13 AM, Mike Kravetz wrote: > > If System V shmget/shmat operations are used to create a hugetlbfs > backed mapping, it is possible to munmap part of the mapping and > split the underlying vma such that it is not huge page aligned. > This will

Re: [PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Dan Williams
On Wed, Mar 21, 2018 at 9:13 AM, Mike Kravetz wrote: > > If System V shmget/shmat operations are used to create a hugetlbfs > backed mapping, it is possible to munmap part of the mapping and > split the underlying vma such that it is not huge page aligned. > This will untimately result in the

[PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Mike Kravetz
If System V shmget/shmat operations are used to create a hugetlbfs backed mapping, it is possible to munmap part of the mapping and split the underlying vma such that it is not huge page aligned. This will untimately result in the following BUG: kernel BUG at

[PATCH v2] shm: add split function to shm_vm_ops

2018-03-21 Thread Mike Kravetz
If System V shmget/shmat operations are used to create a hugetlbfs backed mapping, it is possible to munmap part of the mapping and split the underlying vma such that it is not huge page aligned. This will untimately result in the following BUG: kernel BUG at