Re: shmctl(SHM_STAT) vs. /proc/sysvipc/shm permissions discrepancies

2018-02-12 Thread Davidlohr Bueso
On Thu, 21 Dec 2017, Michael Kerrisk (man-pages) wrote: Hi Michal, On 21 December 2017 at 09:02, Michal Hocko wrote: On Wed 20-12-17 17:17:46, Michael Kerrisk wrote: Hello Michal, On 20 December 2017 at 10:20, Michal Hocko wrote: > On Tue 19-12-17

Re: shmctl(SHM_STAT) vs. /proc/sysvipc/shm permissions discrepancies

2018-02-12 Thread Davidlohr Bueso
On Thu, 21 Dec 2017, Michael Kerrisk (man-pages) wrote: Hi Michal, On 21 December 2017 at 09:02, Michal Hocko wrote: On Wed 20-12-17 17:17:46, Michael Kerrisk wrote: Hello Michal, On 20 December 2017 at 10:20, Michal Hocko wrote: > On Tue 19-12-17 17:45:40, Michael Kerrisk wrote: >> But,

Re: [RFC PATCH 00/64] mm: towards parallel address space operations

2018-02-06 Thread Davidlohr Bueso
On Mon, 05 Feb 2018, Laurent Dufour wrote: On 05/02/2018 02:26, Davidlohr Bueso wrote: From: Davidlohr Bueso <d...@stgolabs.net> Hi, This patchset is a new version of both the range locking machinery as well as a full mmap_sem conversion that makes use of it -- as the worst case sc

Re: [RFC PATCH 00/64] mm: towards parallel address space operations

2018-02-06 Thread Davidlohr Bueso
On Mon, 05 Feb 2018, Laurent Dufour wrote: On 05/02/2018 02:26, Davidlohr Bueso wrote: From: Davidlohr Bueso Hi, This patchset is a new version of both the range locking machinery as well as a full mmap_sem conversion that makes use of it -- as the worst case scenario as all mmap_sem calls

Re: [PATCH 06/64] mm: teach pagefault paths about range locking

2018-02-06 Thread Davidlohr Bueso
On Mon, 05 Feb 2018, Laurent Dufour wrote: --- a/drivers/misc/sgi-gru/grufault.c +++ b/drivers/misc/sgi-gru/grufault.c @@ -189,7 +189,8 @@ static void get_clear_fault_map(struct gru_state *gru, */ static int non_atomic_pte_lookup(struct vm_area_struct *vma,

Re: [PATCH 06/64] mm: teach pagefault paths about range locking

2018-02-06 Thread Davidlohr Bueso
On Mon, 05 Feb 2018, Laurent Dufour wrote: --- a/drivers/misc/sgi-gru/grufault.c +++ b/drivers/misc/sgi-gru/grufault.c @@ -189,7 +189,8 @@ static void get_clear_fault_map(struct gru_state *gru, */ static int non_atomic_pte_lookup(struct vm_area_struct *vma,

[PATCH 10/64] kernel/exit: teach exit_mm() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> ... and use mm locking wrappers -- no change is semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- kernel/exit.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index

[PATCH 10/64] kernel/exit: teach exit_mm() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso ... and use mm locking wrappers -- no change is semantics. Signed-off-by: Davidlohr Bueso --- kernel/exit.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index 42ca71a44c9a..a9540f157eb2 100644 --- a/kernel

[PATCH 12/64] fs/userfaultfd: teach userfaultfd_must_wait() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> And make use of mm_is_locked() which is why we pass down the vmf->lockrange. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- fs/userfaultfd.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/f

[PATCH 12/64] fs/userfaultfd: teach userfaultfd_must_wait() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso And make use of mm_is_locked() which is why we pass down the vmf->lockrange. Signed-off-by: Davidlohr Bueso --- fs/userfaultfd.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c in

[PATCH 11/64] prctl: teach about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> And pass along pointers where needed. No changes in semantics by using mm locking helpers. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- kernel/sys.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-)

[PATCH 11/64] prctl: teach about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso And pass along pointers where needed. No changes in semantics by using mm locking helpers. Signed-off-by: Davidlohr Bueso --- kernel/sys.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index

[PATCH 17/64] kernel: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> Most of the users are already aware of mmrange, so conversion is straightforward. For those who don't, they all use mmap_sem in the same function context. No change in semantics. The dup_mmap() needs two ranges, one for the new and old mms. Sign

[PATCH 16/64] virt: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> No change in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- virt/kvm/arm/mmu.c | 17 ++--- virt/kvm/async_pf.c | 4 ++-- virt/kvm/kvm_main.c | 9 + 3 files changed, 17 insertions(+), 13 deletions(-)

[PATCH 16/64] virt: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso No change in semantics. Signed-off-by: Davidlohr Bueso --- virt/kvm/arm/mmu.c | 17 ++--- virt/kvm/async_pf.c | 4 ++-- virt/kvm/kvm_main.c | 9 + 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm

[PATCH 17/64] kernel: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso Most of the users are already aware of mmrange, so conversion is straightforward. For those who don't, they all use mmap_sem in the same function context. No change in semantics. The dup_mmap() needs two ranges, one for the new and old mms. Signed-off-by: Davidlohr Bueso

[PATCH 23/64] mm: huge pagecache: do not check mmap_sem state

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> *THIS IS A HACK* By dropping the rwsem_is_locked checks in zap_pmd_range() and zap_pud_range() we can avoid having to teach file_operations about mmrange. For example in xfs: iomap_dio_rw() is called by .read_iter file callbacks. No-Yet-Sign

[PATCH 23/64] mm: huge pagecache: do not check mmap_sem state

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso *THIS IS A HACK* By dropping the rwsem_is_locked checks in zap_pmd_range() and zap_pud_range() we can avoid having to teach file_operations about mmrange. For example in xfs: iomap_dio_rw() is called by .read_iter file callbacks. No-Yet-Signed-off-by: Davidlohr Bueso

[PATCH 26/64] fs: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> Also fixup some previous userfaultfd changes. No change in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- fs/aio.c | 4 ++-- fs/userfaultfd.c | 26 ++ i

[PATCH 19/64] mm/mlock: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> Conversion is straightforward, mmap_sem is used within the same function context. No changes in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- mm/mlock.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[PATCH 26/64] fs: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso Also fixup some previous userfaultfd changes. No change in semantics. Signed-off-by: Davidlohr Bueso --- fs/aio.c | 4 ++-- fs/userfaultfd.c | 26 ++ include/linux/userfaultfd_k.h | 5 +++-- mm/madvise.c

[PATCH 19/64] mm/mlock: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso Conversion is straightforward, mmap_sem is used within the same function context. No changes in semantics. Signed-off-by: Davidlohr Bueso --- mm/mlock.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c index

[PATCH 30/64] arch/tile: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/tile/kernel/stack.c | 5 +++-- arch/tile/mm/elf.c | 12 +++- arch/tile/mm/fault.c | 12 ++--

[PATCH 30/64] arch/tile: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/tile/kernel/stack.c | 5 +++-- arch/tile/mm/elf.c | 12 +++- arch/tile/mm/fault.c | 12 ++-- arch/tile/mm/pgtable.c | 6 -- 4 files

[PATCH 28/64] arch/x86: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/x86/entry/vdso/vma.c | 11 ++- arch/x86/kernel/vm86_32.c | 5 +++-- arch/x86/mm/debug_paget

[PATCH 20/64] mm/madvise: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> mmap_sem users are already aware of mmrange, thus a straightforward conversion. No changes in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- mm/madvise.c | 20 +++- 1 file changed, 11 insertions(+), 9 deleti

[PATCH 20/64] mm/madvise: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso mmap_sem users are already aware of mmrange, thus a straightforward conversion. No changes in semantics. Signed-off-by: Davidlohr Bueso --- mm/madvise.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c

[PATCH 28/64] arch/x86: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/x86/entry/vdso/vma.c | 11 ++- arch/x86/kernel/vm86_32.c | 5 +++-- arch/x86/mm/debug_pagetables.c | 13 + arch/x86/mm/mpx.c

[PATCH 21/64] mm: teach drop/take_all_locks() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> And use the mm locking helpers. No changes in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- include/linux/mm.h | 6 -- mm/mmap.c | 12 +++- mm/mmu_notifier.c | 9 + 3 files changed, 16 inser

[PATCH 21/64] mm: teach drop/take_all_locks() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso And use the mm locking helpers. No changes in semantics. Signed-off-by: Davidlohr Bueso --- include/linux/mm.h | 6 -- mm/mmap.c | 12 +++- mm/mmu_notifier.c | 9 + 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include

[PATCH 22/64] mm: avoid mmap_sem trylock in vm_insert_page()

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> The rules to this function state that mmap_sem must be acquired by the caller: - for write if used in f_op->mmap() (by far the most common case) - for read if used from vma_op->fault()(with VM_MIXEDMAP) The only exception is:

[PATCH 22/64] mm: avoid mmap_sem trylock in vm_insert_page()

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso The rules to this function state that mmap_sem must be acquired by the caller: - for write if used in f_op->mmap() (by far the most common case) - for read if used from vma_op->fault()(with VM_MIXEDMAP) The only exception is: mmap_vmcore() remap_vmalloc_range_p

[PATCH 14/64] fs/coredump: teach about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> coredump_wait() needs mmap_sem such that zap_threads() is stable. The conversion is trivial as the mmap_sem is only used in the same function context. No change in semantics. In addition, we need an mmrange in exec_mmap() as mmap_sem is

[PATCH 14/64] fs/coredump: teach about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso coredump_wait() needs mmap_sem such that zap_threads() is stable. The conversion is trivial as the mmap_sem is only used in the same function context. No change in semantics. In addition, we need an mmrange in exec_mmap() as mmap_sem is needed for de_thread() or coredump

[PATCH 34/64] arch/parisc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/parisc/kernel/traps.c | 7 --- arch/parisc/mm/fault.c | 8 2 files changed, 8 insertions(+), 7 deleti

[PATCH 34/64] arch/parisc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/parisc/kernel/traps.c | 7 --- arch/parisc/mm/fault.c | 8 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/parisc/kernel/traps.c b

[PATCH 38/64] arch/blackfin: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/blackfin/kernel/ptrace.c | 5 +++-- arch/blackfin/kernel/trace.c | 7 --- 2 files changed, 7 insertions(+), 5 deleti

[PATCH 38/64] arch/blackfin: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/blackfin/kernel/ptrace.c | 5 +++-- arch/blackfin/kernel/trace.c | 7 --- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/blackfin/kernel

[PATCH 31/64] arch/sparc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/sparc/mm/fault_32.c | 18 +- arch/sparc/mm/fault_64.c | 12 ++-- arch/sparc/vdso/vma.c| 5 ++

[PATCH 31/64] arch/sparc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/sparc/mm/fault_32.c | 18 +- arch/sparc/mm/fault_64.c | 12 ++-- arch/sparc/vdso/vma.c| 5 +++-- 3 files changed, 18 insertions(+), 17

[PATCH 25/64] mm: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> Most of the mmap_sem users are already aware of mmrange, making the conversion straightforward. Those who don't, simply use the mmap_sem within the same function context. No change in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de

[PATCH 39/64] arch/m68k: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/m68k/kernel/sys_m68k.c | 18 +++--- arch/m68k/mm/fault.c| 8 2 files changed, 15 inser

[PATCH 29/64] arch/alpha: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/alpha/kernel/traps.c | 6 -- arch/alpha/mm/fault.c | 10 +- 2 files changed, 9 insertions(+), 7 deleti

[PATCH 39/64] arch/m68k: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/m68k/kernel/sys_m68k.c | 18 +++--- arch/m68k/mm/fault.c| 8 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/arch/m68k

[PATCH 29/64] arch/alpha: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/alpha/kernel/traps.c | 6 -- arch/alpha/mm/fault.c | 10 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/alpha/kernel/traps.c b

[PATCH 25/64] mm: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso Most of the mmap_sem users are already aware of mmrange, making the conversion straightforward. Those who don't, simply use the mmap_sem within the same function context. No change in semantics. Signed-off-by: Davidlohr Bueso --- mm/filemap.c | 4 ++-- mm

[PATCH 27/64] arch/{x86,sh,ppc}: teach bad_area() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> Such architectures will drop the mmap_sem inside __bad_area(), which in turn calls bad_area_nosemaphore(). The rest of the archs will implement this logic within do_page_fault(), so they remain unchanged as we already have the mmrange. Sign

[PATCH 24/64] mm/thp: disable mmap_sem is_locked checks

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> * THIS IS A HACK * pud/pmd_trans_huge_lock() such that we don't have to teach file_operations about mmrange. No-Yet-Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- include/linux/huge_mm.h | 2 -- 1 file changed, 2 deletions(-) diff --g

[PATCH 27/64] arch/{x86,sh,ppc}: teach bad_area() about range locking

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso Such architectures will drop the mmap_sem inside __bad_area(), which in turn calls bad_area_nosemaphore(). The rest of the archs will implement this logic within do_page_fault(), so they remain unchanged as we already have the mmrange. Signed-off-by: Davidlohr Bueso

[PATCH 24/64] mm/thp: disable mmap_sem is_locked checks

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso * THIS IS A HACK * pud/pmd_trans_huge_lock() such that we don't have to teach file_operations about mmrange. No-Yet-Signed-off-by: Davidlohr Bueso --- include/linux/huge_mm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/huge_mm.h b/include/linux

[PATCH 47/64] arch/microblaze: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/microblaze/mm/fault.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/microblaze/

[PATCH 47/64] arch/microblaze: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/microblaze/mm/fault.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c index

[PATCH 40/64] arch/sh: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/sh/kernel/sys_sh.c| 7 --- arch/sh/kernel/vsyscall/vsyscall.c | 5 +++-- 2 files changed, 7 insertions(+),

[PATCH 40/64] arch/sh: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/sh/kernel/sys_sh.c| 7 --- arch/sh/kernel/vsyscall/vsyscall.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/sh/kernel

[PATCH 46/64] arch/metag: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/metag/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/metag/mm/fault.c b/a

[PATCH 33/64] arch/powerpc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. For those mmap_sem callers who don't, we add it within the same function context. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/powerpc/kernel/vdso.c

[PATCH 46/64] arch/metag: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/metag/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/metag/mm/fault.c b/arch/metag/mm/fault.c index e16ba0ea7ea1

[PATCH 33/64] arch/powerpc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. For those mmap_sem callers who don't, we add it within the same function context. Signed-off-by: Davidlohr Bueso --- arch/powerpc/kernel/vdso.c | 7 --- arch/powerpc/kvm/book3s_64_mmu_hv.c

[PATCH 44/64] arch/score: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/score/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/score/mm/fault.c b/a

[PATCH 43/64] arch/hexagon: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/hexagon/kernel/vdso.c | 5 +++-- arch/hexagon/mm/vm_fault.c | 8 2 files changed, 7 insertions(+), 6 deletions(-)

[PATCH 42/64] arch/frv: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/frv/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/frv/mm/fault.c b

[PATCH 44/64] arch/score: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/score/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/score/mm/fault.c b/arch/score/mm/fault.c index 07a8637ad142

[PATCH 43/64] arch/hexagon: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/hexagon/kernel/vdso.c | 5 +++-- arch/hexagon/mm/vm_fault.c | 8 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/hexagon/kernel/vdso.c b

[PATCH 42/64] arch/frv: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/frv/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c index 494d33b628fc..a5da0586e6cc

[PATCH 32/64] arch/s390: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/s390/kernel/vdso.c | 5 +++-- arch/s390/kvm/gaccess.c | 4 ++-- arch/s390/kvm/kvm-s390.c | 24 ++-

[PATCH 41/64] arch/cris: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/cris/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/cris/mm/fault.c b/

[PATCH 32/64] arch/s390: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/s390/kernel/vdso.c | 5 +++-- arch/s390/kvm/gaccess.c | 4 ++-- arch/s390/kvm/kvm-s390.c | 24 ++-- arch/s390/kvm/priv.c | 29

[PATCH 41/64] arch/cris: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/cris/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 16af16d77269

[PATCH 49/64] arch/xtensa: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/xtensa/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/mm/fault.c b

[PATCH 49/64] arch/xtensa: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/xtensa/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index 6f8e3e7cccb5

[PATCH 36/64] arch/mips: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/mips/kernel/traps.c | 5 +++-- arch/mips/kernel/vdso.c | 4 ++-- arch/mips/mm/c-octeon.c | 5 +++-- arch/mips/mm/c-r4

[PATCH 36/64] arch/mips: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/mips/kernel/traps.c | 5 +++-- arch/mips/kernel/vdso.c | 4 ++-- arch/mips/mm/c-octeon.c | 5 +++-- arch/mips/mm/c-r4k.c | 5 +++-- arch/mips/mm/fault.c

[PATCH 37/64] arch/arc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/arc/kernel/troubleshoot.c | 5 +++-- arch/arc/mm/fault.c| 12 ++-- 2 files changed, 9 insertions(+),

[PATCH 62/64] drivers: use mm locking wrappers (the rest)

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This converts the rest of the drivers' mmap_sem usage to mm locking wrappers. This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- drivers/media/v4l2-core/videobuf-core.c

[PATCH 51/64] arch/mn10300: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/mn10300/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mn10300/mm/fa

[PATCH 37/64] arch/arc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/arc/kernel/troubleshoot.c | 5 +++-- arch/arc/mm/fault.c| 12 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arc/kernel

[PATCH 62/64] drivers: use mm locking wrappers (the rest)

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This converts the rest of the drivers' mmap_sem usage to mm locking wrappers. This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- drivers/media/v4l2-core/videobuf-core.c| 5 ++- drivers/media/v4l2-core/videobuf

[PATCH 51/64] arch/mn10300: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/mn10300/mm/fault.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c index 71c38f0c8702

[PATCH 35/64] arch/ia64: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/ia64/kernel/perfmon.c | 10 +- arch/ia64/mm/fault.c | 8 arch/ia64/mm/init.c| 13

[PATCH 54/64] arch/arm: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. For those mmap_sem users that need mmrange, we simply add it to the function as the mmap_sem usage is in the same context. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arc

[PATCH 60/64] drivers/xen: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> All callers use mmap_sem within the same function context. No change in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- drivers/xen/gntdev.c | 5 +++-- drivers/xen/privcmd.c | 12 +++- 2 files changed, 10 inse

[PATCH 54/64] arch/arm: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. For those mmap_sem users that need mmrange, we simply add it to the function as the mmap_sem usage is in the same context. Signed-off-by: Davidlohr Bueso --- arch/arm/kernel/process.c | 5 +++-- arch

[PATCH 60/64] drivers/xen: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso All callers use mmap_sem within the same function context. No change in semantics. Signed-off-by: Davidlohr Bueso --- drivers/xen/gntdev.c | 5 +++-- drivers/xen/privcmd.c | 12 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/xen

[PATCH 35/64] arch/ia64: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/ia64/kernel/perfmon.c | 10 +- arch/ia64/mm/fault.c | 8 arch/ia64/mm/init.c| 13 +++-- 3 files changed, 16 insertions(+), 15

[PATCH 48/64] arch/tile: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> * THIS IS A HACK * Breaks arch/um/. See comment in fix_range_common(). Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/um/include/asm/mmu_context.h | 5 +++-- arch/um/kernel/tlb.c | 12 +++- arch/um/k

[PATCH 48/64] arch/tile: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso * THIS IS A HACK * Breaks arch/um/. See comment in fix_range_common(). Signed-off-by: Davidlohr Bueso --- arch/um/include/asm/mmu_context.h | 5 +++-- arch/um/kernel/tlb.c | 12 +++- arch/um/kernel/trap.c | 6 +++--- 3 files changed

[PATCH 53/64] arch/nios2: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/nios2/mm/fault.c | 12 ++-- arch/nios2/mm/init.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-)

[PATCH 45/64] arch/m32r: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/m32r/mm/fault.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/m32r/mm/fault.c b/

[PATCH 52/64] arch/openrisc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/openrisc/kernel/dma.c | 6 -- arch/openrisc/mm/fault.c | 10 +- 2 files changed, 9 insertions(+), 7 deleti

[PATCH 53/64] arch/nios2: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/nios2/mm/fault.c | 12 ++-- arch/nios2/mm/init.c | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/nios2/mm/fault.c b/arch/nios2

[PATCH 45/64] arch/m32r: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/m32r/mm/fault.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 0129aea46729

[PATCH 52/64] arch/openrisc: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/openrisc/kernel/dma.c | 6 -- arch/openrisc/mm/fault.c | 10 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/openrisc/kernel/dma.c

[PATCH 50/64] arch/unicore32: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- arch/unicore32/mm/fault.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/unicore32/mm/fa

[PATCH 59/64] drivers/iommu: use mm locking helpers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- drivers/iommu/amd_iommu_v2.c | 4 ++-- drivers/iommu/intel-svm.c| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 50/64] arch/unicore32: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- arch/unicore32/mm/fault.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/unicore32/mm/fault.c b/arch/unicore32/mm/fault.c index dd35b6191798

[PATCH 59/64] drivers/iommu: use mm locking helpers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This becomes quite straightforward with the mmrange in place. Signed-off-by: Davidlohr Bueso --- drivers/iommu/amd_iommu_v2.c | 4 ++-- drivers/iommu/intel-svm.c| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/amd_iommu_v2.c b

[PATCH 61/64] staging/lustre: use generic range lock

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> This replaces the in-house version. It also adds the mmrange and makes use of mm locking wrappers. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- drivers/staging/lustre/lustre/llite/Makefile | 2 +- drivers/staging/lustre/

[PATCH 56/64] drivers/android: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso <d...@stgolabs.net> The binder_alloc_free_page() shrinker callback can call zap_page_range(), which needs mmap_sem. Use mm locking wrappers, no change in semantics. Signed-off-by: Davidlohr Bueso <dbu...@suse.de> --- drivers/android/binder_alloc.c | 12 +++-

[PATCH 61/64] staging/lustre: use generic range lock

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso This replaces the in-house version. It also adds the mmrange and makes use of mm locking wrappers. Signed-off-by: Davidlohr Bueso --- drivers/staging/lustre/lustre/llite/Makefile | 2 +- drivers/staging/lustre/lustre/llite/file.c | 16 +- .../staging

[PATCH 56/64] drivers/android: use mm locking wrappers

2018-02-04 Thread Davidlohr Bueso
From: Davidlohr Bueso The binder_alloc_free_page() shrinker callback can call zap_page_range(), which needs mmap_sem. Use mm locking wrappers, no change in semantics. Signed-off-by: Davidlohr Bueso --- drivers/android/binder_alloc.c | 12 +++- 1 file changed, 7 insertions(+), 5

<    3   4   5   6   7   8   9   10   11   12   >