lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1349776921.21172.4091.camel@edumazet-glaptop>
Date:	Tue, 09 Oct 2012 12:02:01 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>,
	Alex Williamson <alex.williamson@...hat.com>
Cc:	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Hugh Dickins <hughd@...gle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Nick Piggin <npiggin@...nel.dk>
Subject: Re: [PATCH v3 10/10] mm: kill vma flag VM_RESERVED and
 mm->reserved_vm counter

On Tue, 2012-07-31 at 14:42 +0400, Konstantin Khlebnikov wrote:
> A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
> currently it lost original meaning but still has some effects:
> 
>  | effect                 | alternative flags
> -+------------------------+---------------------------------------------
> 1| account as reserved_vm | VM_IO
> 2| skip in core dump      | VM_IO, VM_DONTDUMP
> 3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
> 4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
> 
> This patch removes reserved_vm counter from mm_struct.
> Seems like nobody cares about it, it does not exported into userspace directly,
> it only reduces total_vm showed in proc.
> 
> Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.
> 
> remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
> remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.
> 
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
> Cc: Nick Piggin <npiggin@...nel.dk>
> Cc: Hugh Dickins <hughd@...gle.com>
> ---
>  Documentation/vm/unevictable-lru.txt             |    4 ++--
>  arch/alpha/kernel/pci-sysfs.c                    |    2 +-
>  arch/ia64/kernel/perfmon.c                       |    2 +-
>  arch/ia64/mm/init.c                              |    3 ++-
>  arch/powerpc/kvm/book3s_hv.c                     |    2 +-
>  arch/sparc/kernel/pci.c                          |    2 +-
>  arch/unicore32/kernel/process.c                  |    2 +-
>  arch/x86/xen/mmu.c                               |    3 +--
>  drivers/char/mbcs.c                              |    2 +-
>  drivers/char/mem.c                               |    2 +-
>  drivers/char/mspec.c                             |    2 +-
>  drivers/gpu/drm/drm_gem.c                        |    2 +-
>  drivers/gpu/drm/drm_vm.c                         |   10 ++--------
>  drivers/gpu/drm/exynos/exynos_drm_gem.c          |    2 +-
>  drivers/gpu/drm/gma500/framebuffer.c             |    3 +--
>  drivers/gpu/drm/ttm/ttm_bo_vm.c                  |    4 ++--
>  drivers/gpu/drm/udl/udl_fb.c                     |    2 +-
>  drivers/infiniband/hw/ehca/ehca_uverbs.c         |    4 ++--
>  drivers/infiniband/hw/ipath/ipath_file_ops.c     |    2 +-
>  drivers/infiniband/hw/qib/qib_file_ops.c         |    2 +-
>  drivers/media/video/meye.c                       |    2 +-
>  drivers/media/video/omap/omap_vout.c             |    2 +-
>  drivers/media/video/sn9c102/sn9c102_core.c       |    3 +--
>  drivers/media/video/usbvision/usbvision-video.c  |    3 +--
>  drivers/media/video/videobuf-dma-sg.c            |    2 +-
>  drivers/media/video/videobuf-vmalloc.c           |    2 +-
>  drivers/media/video/videobuf2-memops.c           |    2 +-
>  drivers/media/video/vino.c                       |    2 +-
>  drivers/misc/carma/carma-fpga.c                  |    2 --
>  drivers/misc/sgi-gru/grufile.c                   |    5 ++---
>  drivers/mtd/mtdchar.c                            |    2 +-
>  drivers/scsi/sg.c                                |    2 +-
>  drivers/staging/media/easycap/easycap_main.c     |    2 +-
>  drivers/staging/omapdrm/omap_gem_dmabuf.c        |    2 +-
>  drivers/staging/tidspbridge/rmgr/drv_interface.c |    2 +-
>  drivers/uio/uio.c                                |    4 +---
>  drivers/usb/mon/mon_bin.c                        |    2 +-
>  drivers/video/68328fb.c                          |    2 +-
>  drivers/video/aty/atyfb_base.c                   |    3 +--
>  drivers/video/fb-puv3.c                          |    3 +--
>  drivers/video/fb_defio.c                         |    2 +-
>  drivers/video/fbmem.c                            |    3 +--
>  drivers/video/gbefb.c                            |    2 +-
>  drivers/video/omap2/omapfb/omapfb-main.c         |    2 +-
>  drivers/video/sbuslib.c                          |    5 ++---
>  drivers/video/smscufx.c                          |    1 -
>  drivers/video/udlfb.c                            |    1 -
>  drivers/video/vermilion/vermilion.c              |    1 -
>  drivers/video/vfb.c                              |    1 -
>  drivers/xen/gntalloc.c                           |    2 +-
>  drivers/xen/gntdev.c                             |    2 +-
>  drivers/xen/privcmd.c                            |    3 ++-
>  fs/binfmt_elf.c                                  |    2 +-
>  fs/binfmt_elf_fdpic.c                            |    2 +-
>  fs/hugetlbfs/inode.c                             |    2 +-
>  fs/proc/task_mmu.c                               |    2 +-
>  include/linux/mempolicy.h                        |    2 +-
>  include/linux/mm.h                               |    3 +--
>  include/linux/mm_types.h                         |    1 -
>  kernel/events/core.c                             |    2 +-
>  mm/ksm.c                                         |    3 +--
>  mm/memory.c                                      |   11 +++++------
>  mm/mlock.c                                       |    2 +-
>  mm/mmap.c                                        |    2 --
>  mm/nommu.c                                       |    2 +-
>  mm/vmalloc.c                                     |    3 +--
>  security/selinux/selinuxfs.c                     |    2 +-
>  sound/core/pcm_native.c                          |    6 +++---
>  sound/usb/usx2y/us122l.c                         |    2 +-
>  sound/usb/usx2y/usX2Yhwdep.c                     |    2 +-
>  sound/usb/usx2y/usx2yhwdeppcm.c                  |    2 +-
>  71 files changed, 78 insertions(+), 106 deletions(-)


It seems drivers/vfio/pci/vfio_pci.c uses VM_RESERVED

  CC [M]  drivers/watchdog/advantechwdt.o
drivers/vfio/pci/vfio_pci.c: In function ‘vfio_pci_mmap’:
drivers/vfio/pci/vfio_pci.c:464:28: erreur: ‘VM_RESERVED’ undeclared (first use in this function)
drivers/vfio/pci/vfio_pci.c:464:28: note: each undeclared identifier is reported only once for each function it appears in



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ