linux_dsm_epyc7002/arch/arm
Jason Baron 909af768e8 coredump: remove VM_ALWAYSDUMP flag
The motivation for this patchset was that I was looking at a way for a
qemu-kvm process, to exclude the guest memory from its core dump, which
can be quite large.  There are already a number of filter flags in
/proc/<pid>/coredump_filter, however, these allow one to specify 'types'
of kernel memory, not specific address ranges (which is needed in this
case).

Since there are no more vma flags available, the first patch eliminates
the need for the 'VM_ALWAYSDUMP' flag.  The flag is used internally by
the kernel to mark vdso and vsyscall pages.  However, it is simple
enough to check if a vma covers a vdso or vsyscall page without the need
for this flag.

The second patch then replaces the 'VM_ALWAYSDUMP' flag with a new
'VM_NODUMP' flag, which can be set by userspace using new madvise flags:
'MADV_DONTDUMP', and unset via 'MADV_DODUMP'.  The core dump filters
continue to work the same as before unless 'MADV_DONTDUMP' is set on the
region.

The qemu code which implements this features is at:

  http://people.redhat.com/~jbaron/qemu-dump/qemu-dump.patch

In my testing the qemu core dump shrunk from 383MB -> 13MB with this
patch.

I also believe that the 'MADV_DONTDUMP' flag might be useful for
security sensitive apps, which might want to select which areas are
dumped.

This patch:

The VM_ALWAYSDUMP flag is currently used by the coredump code to
indicate that a vma is part of a vsyscall or vdso section.  However, we
can determine if a vma is in one these sections by checking it against
the gate_vma and checking for a non-NULL return value from
arch_vma_name().  Thus, freeing a valuable vma bit.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-23 16:58:42 -07:00
..
boot Core device tree changes for Linux v3.4 2012-03-21 10:30:03 -07:00
common Generialize powerpc's irq_host as irq_domain 2012-03-21 10:27:19 -07:00
configs Consolidate i.MX 5 platforms to be under the new shared i.MX 3/5/6 tree. 2012-01-23 14:50:30 -08:00
include/asm Remove remaining bits of io_remap_page_range() 2012-03-23 16:58:31 -07:00
kernel coredump: remove VM_ALWAYSDUMP flag 2012-03-23 16:58:42 -07:00
lib ARM: 7301/1: Rename the T() macro to TUSER() to avoid namespace conflicts 2012-01-25 11:07:40 +00:00
mach-at91 ARM: at91/dma: DMA controller registering with DT support 2012-02-29 18:20:39 +01:00
mach-bcmring Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
mach-clps711x Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-cns3xxx Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-davinci ARM: davinci: update mdio bus name 2012-01-27 22:29:09 +05:30
mach-dove ARM: orion: Fix USB phy for orion5x. 2012-02-09 16:16:35 -08:00
mach-ebsa110 Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-ep93xx Updates of sound stuff for 3.4-rc1 2012-03-22 13:00:13 -07:00
mach-exynos Generialize powerpc's irq_host as irq_domain 2012-03-21 10:27:19 -07:00
mach-footbridge Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-gemini ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-h720x Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-highbank ARM: 7293/1: logical_cpu_map: decouple CPU mapping from SMP 2012-01-23 10:20:05 +00:00
mach-imx Updates of sound stuff for 3.4-rc1 2012-03-22 13:00:13 -07:00
mach-integrator Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-iop13xx Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-iop32x Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-iop33x Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-ixp4xx Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-ixp23xx Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-ixp2000 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
mach-kirkwood Linux 3.3-rc4 2012-02-19 18:35:12 -08:00
mach-ks8695 ARM, KS8695: Only include linux/gpio.h once in arch/arm/mach-ks8695/leds.c 2012-02-10 09:52:18 +01:00
mach-l7200/include/mach
mach-lpc32xx ARM: LPC32xx: serial.c: Fixed loop limit 2012-02-27 17:28:03 +01:00
mach-mmp arch/arm/mach-mmp/: some files include some headers twice 2012-02-16 23:24:30 +08:00
mach-msm irq_domain: Remove irq_domain_add_simple() 2012-02-16 06:11:23 -07:00
mach-mv78xx0 ARM: orion: Fix USB phy for orion5x. 2012-02-09 16:16:35 -08:00
mach-mxs clock management changes for i.MX 2012-01-09 14:44:15 -08:00
mach-netx Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-nomadik Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-omap1 fbdev updates for 3.4 2012-03-22 20:43:40 -07:00
mach-omap2 fbdev updates for 3.4 2012-03-22 20:43:40 -07:00
mach-orion5x Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
mach-picoxcell Merge branch 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji into fixes 2012-01-16 22:45:42 -08:00
mach-pnx4008 Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-prima2 irq_domain: Remove irq_domain_add_simple() 2012-02-16 06:11:23 -07:00
mach-pxa Merge 3.3-rc7 into usb-next 2012-03-12 09:13:31 -07:00
mach-realview ARM: 7298/1: realview: fix mapping of MPCore private memory region 2012-01-25 09:24:36 +00:00
mach-rpc Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-s3c64xx Linux 3.3-rc4 2012-02-19 18:35:12 -08:00
mach-s3c2410 ARM: SAMSUNG: Fix missing api-change from subsys_interface change 2012-01-27 15:35:47 +09:00
mach-s3c2412 ARM: SAMSUNG: Fix missing api-change from subsys_interface change 2012-01-27 15:35:47 +09:00
mach-s3c2416 ARM: SAMSUNG: Fix missing api-change from subsys_interface change 2012-01-27 15:35:47 +09:00
mach-s3c2440 ARM: S3C2440: Fixed build error for s3c244x 2012-03-08 08:57:29 -08:00
mach-s3c2443 ARM: SAMSUNG: Fix missing api-change from subsys_interface change 2012-01-27 15:35:47 +09:00
mach-s5p64x0 ARM: SAMSUNG: Fix missing api-change from subsys_interface change 2012-01-27 15:35:47 +09:00
mach-s5pc100 Cleanups for the Samsung platforms 2012-01-09 14:30:28 -08:00
mach-s5pv210 ARM: SAMSUNG: Fix missing api-change from subsys_interface change 2012-01-27 15:35:47 +09:00
mach-sa1100 Merge branch 'sa11x0-mcp-fixes' into fixes 2012-01-26 21:06:54 +00:00
mach-shark Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-shmobile fbdev updates for 3.4 2012-03-22 20:43:40 -07:00
mach-spear3xx arm: Fix typo in spear3[012]0.c 2012-02-21 11:44:45 +01:00
mach-spear6xx Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mach-tegra Pinctrl updates for v3.4: 2012-03-22 20:25:50 -07:00
mach-u300 Pinctrl updates for v3.4: 2012-03-22 20:25:50 -07:00
mach-ux500 ARM: 7346/1: errata: fix PL310 erratum #753970 workaround selection 2012-02-27 11:22:38 +00:00
mach-versatile irq_domain: Remove 'new' irq_domain in favour of the ppc one 2012-02-16 06:11:23 -07:00
mach-vexpress ARM: 7346/1: errata: fix PL310 erratum #753970 workaround selection 2012-02-27 11:22:38 +00:00
mach-vt8500 ARM: big removal of now unused vmalloc.h files 2011-11-26 19:21:29 -05:00
mach-w90x900 Merge branch 'master' into fixes 2012-01-13 15:00:22 +00:00
mach-zynq Merge branch 'depends/rmk/restart' into next/cleanup 2012-01-07 11:51:28 +00:00
mm Merge branch 'kmap_atomic' of git://github.com/congwang/linux 2012-03-21 09:40:26 -07:00
nwfpe ARM: 7207/1: Use generic ARM instruction set condition code checks for nwfpe. 2011-12-13 08:52:02 +00:00
oprofile oprofile, arm/sh: Fix oprofile_arch_exit() linkage issue 2011-12-23 11:58:34 +01:00
plat-iop Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
plat-mxc Updates of sound stuff for 3.4-rc1 2012-03-22 13:00:13 -07:00
plat-nomadik Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-01-17 18:40:24 -08:00
plat-omap fbdev updates for 3.4 2012-03-22 20:43:40 -07:00
plat-orion ARM: orion: Fix USB phy for orion5x. 2012-02-09 16:16:35 -08:00
plat-pxa Merge branches 'drivers/macb-gem' and 'drivers/pxa-gpio' into next/drivers 2011-11-23 20:47:41 +00:00
plat-s3c24xx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
plat-s5p Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
plat-samsung Merge commit 'v3.3' into fbdev-next 2012-03-20 18:59:50 +00:00
plat-spear Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-03-22 20:20:18 -07:00
plat-versatile ARM: 7293/1: logical_cpu_map: decouple CPU mapping from SMP 2012-01-23 10:20:05 +00:00
tools ARM: Update mach-types 2011-12-23 22:58:10 +00:00
vfp arm: remove several unnecessary module.h include instances 2011-10-31 19:30:48 -04:00
Kconfig ARM: 7345/1: errata: update workaround for A9 erratum #743622 2012-02-27 11:22:08 +00:00
Kconfig-nommu
Kconfig.debug Merge branches 'at91/gpio', 'at91/ioremap', 'drivers/macb-gem-cleanup' and 'msm/misc' into next/cleanup 2011-12-01 12:34:21 +00:00
Makefile Consolidate i.MX 5 platforms to be under the new shared i.MX 3/5/6 tree. 2012-01-23 14:50:30 -08:00