summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2013-08-01shrinker-convert-remaining-shrinkers-to-count-scan-api-fixAndrew Morton
fix warnings Cc: Dave Chinner <dchinner@redhat.com> Cc: Glauber Costa <glommer@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01shrinker: convert remaining shrinkers to count/scan APIDave Chinner
Convert the remaining couple of random shrinkers in the tree to the new API. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Glauber Costa <glommer@openvz.org> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: Chuck Lever <chuck.lever@oracle.com> Cc: J. Bruce Fields <bfields@redhat.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: Carlos Maiolino <cmaiolino@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Chuck Lever <chuck.lever@oracle.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Rientjes <rientjes@google.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: Greg Thelen <gthelen@google.com> Cc: J. Bruce Fields <bfields@redhat.com> Cc: Jan Kara <jack@suse.cz> Cc: Jerome Glisse <jglisse@redhat.com> Cc: John Stultz <john.stultz@linaro.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Kent Overstreet <koverstreet@google.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01Merge branch 'akpm-current/current'Stephen Rothwell
Conflicts: fs/binfmt_elf.c
2013-08-01s390/vmcore: use vmcore for zfcpdumpMichael Holzheu
Modify the s390 copy_oldmem_page() and remap_oldmem_pfn_range() function for zfcpdump to read from the HSA memory if memory below HSA_SIZE bytes is requested. Otherwise real memory is used. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> Cc: Jan Willeke <willeke@de.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01s390/vmcore: implement remap_oldmem_pfn_range for s390Jan Willeke
Introduce the s390 specific way to map pages from oldmem. The memory area below OLDMEM_SIZE is mapped with offset OLDMEM_BASE. The other old memory is mapped directly. Signed-off-by: Jan Willeke <willeke@de.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01s390/vmcore: use ELF header in new memory featureMichael Holzheu
Exchange the old relocate mechanism with the new arch function call override mechanism that allows to create the ELF core header in the 2nd kernel. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> Cc: Jan Willeke <willeke@de.ibm.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user()Mathieu Desnoyers
I found the following pattern that leads in to interesting findings: grep -r "ret.*|=.*__put_user" * grep -r "ret.*|=.*__get_user" * grep -r "ret.*|=.*__copy" * The __put_user() calls in compat_ioctl.c, ptrace compat, signal compat, since those appear in compat code, we could probably expect the kernel addresses not to be reachable in the lower 32-bit range, so I think they might not be exploitable. For the "__get_user" cases, I don't think those are exploitable: the worse that can happen is that the kernel will copy kernel memory into in-kernel buffers, and will fail immediately afterward. The alpha csum_partial_copy_from_user() seems to be missing the access_ok() check entirely. The fix is inspired from x86. This could lead to information leak on alpha. I also noticed that many architectures map csum_partial_copy_from_user() to csum_partial_copy_generic(), but I wonder if the latter is performing the access checks on every architectures. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Oleg Nesterov <oleg@redhat.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01mm-vmstats-track-tlb-flush-stats-on-up-too-fixAndrew Morton
Cc: Dave Hansen <dave@sr71.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01mm: vmstats: track TLB flush stats on UP tooDave Hansen
The previous patch doing vmstats for TLB flushes ("mm: vmstats: tlb flush counters") effectively missed UP since arch/x86/mm/tlb.c is only compiled for SMP. UP systems do not do remote TLB flushes, so compile those counters out on UP. arch/x86/kernel/cpu/mtrr/generic.c calls __flush_tlb() directly. This is probably an optimization since both the mtrr code and __flush_tlb() write cr4. It would probably be safe to make that a flush_tlb_all() (and then get these statistics), but the mtrr code is ancient and I'm hesitant to touch it other than to just stick in the counters. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01mm: vmstats: tlb flush countersDave Hansen
I was investigating some TLB flush scaling issues and realized that we do not have any good methods for figuring out how many TLB flushes we are doing. It would be nice to be able to do these in generic code, but the arch-independent calls don't explicitly specify whether we actually need to do remote flushes or not. In the end, we really need to know if we actually _did_ global vs. local invalidations, so that leaves us with few options other than to muck with the counters from arch-specific code. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01x86: make 'mem=' option to work for efi platformWen Congyang
Current mem boot option only can work for non efi environment. If the user specifies add_efi_memmap, it cannot work for efi environment. In the efi environment, we call e820_add_region() to add the memory map. So we can modify __e820_add_region() and the mem boot option can work for efi environment. Note: Only E820_RAM is limited, and BOOT_SERVICES_{CODE,DATA} are always mapped(If its address >= mem_limit, the memory won't be freed in efi_free_boot_services()). Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Cc: Matt Fleming <matt.fleming@intel.com> Cc: Rob Landley <rob@landley.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01sh64: kernel: remove useless variable 'regs'Chen Gang
Remove useless variable 'regs' to avoid the related warnings (warning is treated as error). Signed-off-by: Chen Gang <gang.chen@asianux.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01sh64: kernel: use 'usp' instead of 'fn'Chen Gang
'fn' is not defined, according to the implementation copy_thread() in 'sh32', need use 'usp' instead of. Signed-off-by: Chen Gang <gang.chen@asianux.com> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01arch: *: Kconfig: add "kernel/Kconfig.freezer" to "arch/*/Kconfig"Chen Gang
All architectures include "kernel/Kconfig.freezer" except three left, so let them include it too, or 'allmodconfig' will report error. The related errors: (with allmodconfig for openrisc): CC kernel/cgroup_freezer.o kernel/cgroup_freezer.c: In function 'freezer_css_online': kernel/cgroup_freezer.c:133:15: error: 'system_freezing_cnt' undeclared (first use in this function) kernel/cgroup_freezer.c:133:15: note: each undeclared identifier is reported only once for each function it appears in kernel/cgroup_freezer.c: In function 'freezer_css_offline': kernel/cgroup_freezer.c:157:15: error: 'system_freezing_cnt' undeclared (first use in this function) kernel/cgroup_freezer.c: In function 'freezer_attach': kernel/cgroup_freezer.c:200:4: error: implicit declaration of function 'freeze_task' kernel/cgroup_freezer.c: In function 'freezer_apply_state': kernel/cgroup_freezer.c:371:16: error: 'system_freezing_cnt' undeclared (first use in this function) Signed-off-by: Chen Gang <gang.chen@asianux.com> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Jonas Bonn <jonas@southpole.se> Cc: Chen Liqin <liqin.chen@sunplusct.com> Cc: Lennox Wu <lennox.wu@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01x86 get_unmapped_area(): use proper mmap base for bottom-up directionRadu Caragea
When the stack is set to unlimited, the bottomup direction is used for mmap-ings but the mmap_base is not used and thus effectively renders ASLR for mmap-ings along with PIE useless. This was caused by f99024729e689 ("mm: use vm_unmapped_area() on x86_64 architecture"). Cc: Michel Lespinasse <walken@google.com> Cc: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Rik van Riel <riel@redhat.com> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Sendroiu <molecula2788@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01arch/x86/platform/ce4100/ce4100.c: include reboot.hAndrew Morton
arch/x86/platform/ce4100/ce4100.c: In function 'x86_ce4100_early_setup': arch/x86/platform/ce4100/ce4100.c:165:2: error: 'reboot_type' undeclared (first use in this function) Reported-by: Wu Fengguang <fengguang.wu@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-08-01Merge remote-tracking branch 'ptr-ret/PTR_RET'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'pwm/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'tegra/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'samsung/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'renesas/next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'mvebu/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'msm/for-next'Stephen Rothwell
Conflicts: arch/arm/Kconfig.debug
2013-08-01Merge remote-tracking branch 'imx-mxs/for-next'Stephen Rothwell
Conflicts: arch/arm/Kconfig.debug
2013-08-01Merge remote-tracking branch 'ep93xx/ep93xx-for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'arm-soc/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'usb-gadget/next'Stephen Rothwell
Conflicts: drivers/usb/gadget/udc-core.c drivers/usb/musb/omap2430.c drivers/usb/musb/tusb6010.c
2013-08-01Merge remote-tracking branch 'driver-core/driver-core-next'Stephen Rothwell
Conflicts: net/core/net-sysfs.c
2013-08-01Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'Stephen Rothwell
Conflicts: mm/Kconfig
2013-08-01Merge remote-tracking branch 'kvm/linux-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'tip/auto-latest'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'devicetree/devicetree/next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'fbdev/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'virtio/virtio-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'l2-mtd/master'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'pm/linux-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'vfs/for-next'Stephen Rothwell
Conflicts: fs/ext4/namei.c
2013-08-01Merge remote-tracking branch 'tile/master'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'sh/sh-latest'Stephen Rothwell
Conflicts: arch/sh/kernel/cpu/sh2a/Makefile include/linux/serial_sci.h
2013-08-01Merge remote-tracking branch 's390/features'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'mips/mips-for-linux-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'microblaze/next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'metag/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'm68knommu/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'ia64/next'Stephen Rothwell
Conflicts: arch/ia64/configs/generic_defconfig arch/ia64/configs/gensparse_defconfig arch/ia64/configs/tiger_defconfig arch/ia64/configs/xen_domu_defconfig
2013-08-01Merge remote-tracking branch 'cris/for-next'Stephen Rothwell
Conflicts: arch/cris/arch-v32/drivers/Kconfig
2013-08-01Merge remote-tracking branch 'arm/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'arc/for-next'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'pci-current/for-linus'Stephen Rothwell
2013-08-01Merge remote-tracking branch 'arm-current/fixes'Stephen Rothwell