Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1182715

[PATCH 0/5] Make vma_is_anonymous() reliable

From "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH 0/5] Make vma_is_anonymous() reliable
Date 2015-07-13 13:00 +0200
Message-ID <pLJCN-40p-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


We rely on ->vm_ops == NULL to detect anonymous VMA but this check is not
always reliable:

 - MPX sets ->vm_ops on anonymous VMA;

 - many drivers don't set ->vm_ops. See for instance hpet_mmap().

This patchset makes vma_is_anonymous() more reliable and makes few
cleanups around the code.

Kirill A. Shutemov (5):
  mm: mark most vm_operations_struct const
  x86, mpx: do not set ->vm_ops on mpx VMAs
  mm: make sure all file VMAs have ->vm_ops set
  mm, madvise: use vma_is_anonymous() to check for anon VMA
  mm, memcontrol: use vma_is_anonymous() to check for anon VMA

 arch/x86/kernel/vsyscall_64.c                  |  2 +-
 arch/x86/mm/mmap.c                             |  7 +++++++
 arch/x86/mm/mpx.c                              | 20 +-------------------
 drivers/android/binder.c                       |  2 +-
 drivers/gpu/drm/vgem/vgem_drv.c                |  2 +-
 drivers/hsi/clients/cmt_speech.c               |  2 +-
 drivers/infiniband/hw/qib/qib_file_ops.c       |  2 +-
 drivers/infiniband/hw/qib/qib_mmap.c           |  2 +-
 drivers/media/platform/omap/omap_vout.c        |  2 +-
 drivers/misc/genwqe/card_dev.c                 |  2 +-
 drivers/staging/android/ion/ion.c              |  2 +-
 drivers/staging/comedi/comedi_fops.c           |  2 +-
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c |  2 +-
 drivers/xen/gntalloc.c                         |  2 +-
 drivers/xen/gntdev.c                           |  2 +-
 drivers/xen/privcmd.c                          |  4 ++--
 fs/ceph/addr.c                                 |  2 +-
 fs/cifs/file.c                                 |  2 +-
 mm/madvise.c                                   |  2 +-
 mm/memcontrol.c                                |  2 +-
 mm/mmap.c                                      |  8 ++++++++
 security/selinux/selinuxfs.c                   |  2 +-
 22 files changed, 36 insertions(+), 39 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] Make vma_is_anonymous() reliable "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 13:00 +0200
  [PATCH 4/5] mm, madvise: use vma_is_anonymous() to check for anon VMA "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 13:00 +0200
  [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 13:00 +0200
    Re: [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs Leon Romanovsky <leon@leon.nu> - 2015-07-13 14:10 +0200
      Re: [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 14:40 +0200
        Re: [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs Leon Romanovsky <leon@leon.nu> - 2015-07-13 14:50 +0200
    Re: [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-16 13:10 +0200
      Re: [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs Dave Hansen <dave.hansen@linux.intel.com> - 2015-07-16 18:00 +0200
        Re: [PATCH 2/5] x86, mpx: do not set ->vm_ops on mpx VMAs "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-07-16 18:10 +0200
          [PATCH 0/1] mm, mpx: add "vm_flags_t vm_flags" arg to  do_mmap_pgoff() Oleg Nesterov <oleg@redhat.com> - 2015-07-17 00:30 +0200
            [PATCH 1/1] mm, mpx: add "vm_flags_t vm_flags" arg to  do_mmap_pgoff() Oleg Nesterov <oleg@redhat.com> - 2015-07-17 00:30 +0200
  [PATCH 3/5] mm: make sure all file VMAs have ->vm_ops set "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 13:00 +0200
  [PATCH 1/5] mm: mark most vm_operations_struct const "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 13:00 +0200
  [PATCH 5/5] mm, memcontrol: use vma_is_anonymous() to check for anon VMA "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-07-13 13:00 +0200
    Re: [PATCH 5/5] mm, memcontrol: use vma_is_anonymous() to check for  anon VMA Johannes Weiner <hannes@cmpxchg.org> - 2015-07-13 15:10 +0200

csiph-web