summaryrefslogtreecommitdiff
path: root/Documentation
AgeCommit message (Collapse)Author
2013-11-05mm-dynamically-allocate-page-ptl-if-it-cannot-be-embedded-to-struct-page-fix-fixAndrew Morton
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05mm: try to detect that page->ptl is in useKirill A. Shutemov
prep_new_page() initialize page->private (and therefore page->ptl) with 0. Make sure nobody took it in use in between allocation of the page and page table constructor. It can happen if arch try to use slab for page table allocation: slab code uses page->slab_cache and page->first_page (for tail pages), which share storage with page->ptl. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05mm: dynamically allocate page->ptl if it cannot be embedded to struct pageKirill A. Shutemov
If split page table lock is in use, we embed the lock into struct page of table's page. We have to disable split lock, if spinlock_t is too big be to be embedded, like when DEBUG_SPINLOCK or DEBUG_LOCK_ALLOC enabled. This patch add support for dynamic allocation of split page table lock if we can't embed it to struct page. page->ptl is unsigned long now and we use it as spinlock_t if sizeof(spinlock_t) <= sizeof(long), otherwise it's pointer to spinlock_t. The spinlock_t allocated in pgtable_page_ctor() for PTE table and in pgtable_pmd_page_ctor() for PMD table. All other helpers converted to support dynamically allocated page->ptl. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Christoph Lameter <cl@linux.com> Reviewed-by: Peter Zijlstra <peterz@infradead.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Chris Zankel <chris@zankel.net> Cc: David Howells <dhowells@redhat.com> Cc: David S. Miller <davem@davemloft.net> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Mikael Starvik <starvik@axis.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Richard Weinberger <richard@nod.at> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05Merge branch 'akpm-current/current'Stephen Rothwell
Conflicts: arch/x86/mm/init.c drivers/net/wireless/rt2x00/rt2800pci.c fs/bio-integrity.c mm/bounce.c
2013-11-05gcov: compile specific gcov implementation based on gcc versionFrantisek Hrbata
Compile the correct gcov implementation file for the specific gcc version. Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com> Cc: Jan Stancek <jstancek@redhat.com> Cc: Kees Cook <keescook@chromium.org> Acked-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andy Gospodarek <agospoda@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05Documentation/ABI: document the non-ABI status of Kconfig and symbolsJosh Triplett
Discussion at Kernel Summit made it clear that the presence or absence of specific Kconfig symbols are not considered ABI, and that no userspace (or bootloader, etc) should rely on them. In addition, kernel-internal symbols are well established as non-ABI, per Documentation/stable_api_nonsense.txt. Document both of these in Documentation/ABI/README, in a new section for notable bits of non-ABI. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Cc: Rob Landley <rob@landley.net> Cc: Tao Ma <boyu.mt@taobao.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: Richard Weinberger <richard.weinberger@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05Documentation/trace/tracepoints.txt: add links to TRACE_EVENT documentationStefan Raspl
Existing tracepoint documentation doesn't mention the popular TRACE_EVENT macro. Since an excellent series of articles on proper usage already exists, respective links are added to the existing documentation. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Cc: Rob Landley <rob@landley.net> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Zoltan Kiss <zoltan.kiss@citrix.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05Documentation/filesystems/vfat.txt: fix directory entry exampleLuis Ortega Perez de Villar
Slots can store up to 13 characters for the file name but one of the examples has one character too many. Signed-off-by: Luis Ortega Perez de Villar <luiorpe1@upv.es> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05backlight: lp855x_bl: support new LP8555 deviceMilo Kim
LP8555 is one of the LP855x family devices. This device needs pre_init_device() and post_init_device() driver structure. It's same as LP8557, so the device configuration code is shared with LP8557. Backlight outputs are generated from dual DC-DC boost converters. It's configurable EPROM settings which are defined in the platform data. Driver documentation and device tree bindings are updated. Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05vsprintf: check real user/group id for %pKRyan Mallon
Some setuid binaries will allow reading of files which have read permission by the real user id. This is problematic with files which use %pK because the file access permission is checked at open() time, but the kptr_restrict setting is checked at read() time. If a setuid binary opens a %pK file as an unprivileged user, and then elevates permissions before reading the file, then kernel pointer values may be leaked. This happens for example with the setuid pppd application on Ubuntu 12.04: $ head -1 /proc/kallsyms 00000000 T startup_32 $ pppd file /proc/kallsyms pppd: In file /proc/kallsyms: unrecognized option 'c1000000' This will only leak the pointer value from the first line, but other setuid binaries may leak more information. Fix this by adding a check that in addition to the current process having CAP_SYSLOG, that effective user and group ids are equal to the real ids. If a setuid binary reads the contents of a file which uses %pK then the pointer values will be printed as NULL if the real user is unprivileged. Update the sysctl documentation to reflect the changes, and also correct the documentation to state the kptr_restrict=0 is the default. This is a only temporary solution to the issue. The correct solution is to do the permission check at open() time on files, and to replace %pK with a function which checks the open() time permission. %pK uses in printk should be removed since no sane permission check can be done, and instead protected by using dmesg_restrict. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Cc: Kees Cook <keescook@chromium.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Joe Perches <joe@perches.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05drivers/char/hpet.c: allow user controlled mmap for user processesPrarit Bhargava
The CONFIG_HPET_MMAP Kconfig option exposes the memory map of the HPET registers to userspace. The Kconfig help points out that in some cases this can be a security risk as some systems may erroneously configure the map such that additional data is exposed to userspace. This is a problem for distributions -- some users want the MMAP functionality but it comes with a significant security risk. In an effort to mitigate this risk, and due to the low number of users of the MMAP functionality, I've introduced a kernel parameter, hpet_mmap_enable, that is required in order to actually have the HPET MMAP exposed. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Acked-by: Matt Wilson <msw@amazon.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05mm: improve the description for dirty_background_ratio/dirty_ratio sysctlZheng Liu
Now dirty_background_ratio/dirty_ratio contains a percentage of total avaiable memory, which contains free pages and reclaimable pages. The number of these pages is not equal to the number of total system memory. But they are described as a percentage of total system memory in Documentation/sysctl/vm.txt. So we need to fix them to avoid misunderstanding. Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Cc: Rob Landley <rob@landley.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05mem-hotplug: introduce movable_node boot optionTang Chen
The hot-Pluggable field in SRAT specifies which memory is hotpluggable. As we mentioned before, if hotpluggable memory is used by the kernel, it cannot be hot-removed. So memory hotplug users may want to set all hotpluggable memory in ZONE_MOVABLE so that the kernel won't use it. Memory hotplug users may also set a node as movable node, which has ZONE_MOVABLE only, so that the whole node can be hot-removed. But the kernel cannot use memory in ZONE_MOVABLE. By doing this, the kernel cannot use memory in movable nodes. This will cause NUMA performance down. And other users may be unhappy. So we need a way to allow users to enable and disable this functionality. In this patch, we introduce movable_node boot option to allow users to choose to not to consume hotpluggable memory at early boot time and later we can set it as ZONE_MOVABLE. To achieve this, the movable_node boot option will control the memblock allocation direction. That said, after memblock is ready, before SRAT is parsed, we should allocate memory near the kernel image as we explained in the previous patches. So if movable_node boot option is set, the kernel does the following: 1. After memblock is ready, make memblock allocate memory bottom up. 2. After SRAT is parsed, make memblock behave as default, allocate memory top down. Users can specify "movable_node" in kernel commandline to enable this functionality. For those who don't use memory hotplug or who don't want to lose their NUMA performance, just don't specify anything. The kernel will work as before. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Suggested-by: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Suggested-by: Ingo Molnar <mingo@kernel.org> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Toshi Kani <toshi.kani@hp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Jiang Liu <jiang.liu@huawei.com> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Taku Izumi <izumi.taku@jp.fujitsu.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05smaps-show-vm_softdirty-flag-in-vmflags-line-fixNaoya Horiguchi
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05memcg: support hierarchical memory.numa_statsYing Han
The memory.numa_stat file was not hierarchical. Memory charged to the children was not shown in parent's numa_stat. This change adds the "hierarchical_" stats to the existing stats. The new hierarchical stats include the sum of all children's values in addition to the value of the memcg. Tested: Create cgroup a, a/b and run workload under b. The values of b are included in the "hierarchical_*" under a. $ cd /sys/fs/cgroup $ echo 1 > memory.use_hierarchy $ mkdir a a/b Run workload in a/b: $ (echo $BASHPID >> a/b/cgroup.procs && cat /some/file && bash) & The hierarchical_ fields in parent (a) show use of workload in a/b: $ cat a/memory.numa_stat total=0 N0=0 N1=0 N2=0 N3=0 file=0 N0=0 N1=0 N2=0 N3=0 anon=0 N0=0 N1=0 N2=0 N3=0 unevictable=0 N0=0 N1=0 N2=0 N3=0 hierarchical_total=908 N0=552 N1=317 N2=39 N3=0 hierarchical_file=850 N0=549 N1=301 N2=0 N3=0 hierarchical_anon=58 N0=3 N1=16 N2=39 N3=0 hierarchical_unevictable=0 N0=0 N1=0 N2=0 N3=0 $ cat a/b/memory.numa_stat total=908 N0=552 N1=317 N2=39 N3=0 file=850 N0=549 N1=301 N2=0 N3=0 anon=58 N0=3 N1=16 N2=39 N3=0 unevictable=0 N0=0 N1=0 N2=0 N3=0 hierarchical_total=908 N0=552 N1=317 N2=39 N3=0 hierarchical_file=850 N0=549 N1=301 N2=0 N3=0 hierarchical_anon=58 N0=3 N1=16 N2=39 N3=0 hierarchical_unevictable=0 N0=0 N1=0 N2=0 N3=0 Signed-off-by: Ying Han <yinghan@google.com> Signed-off-by: Greg Thelen <gthelen@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05Documentation/vm/zswap.txt: fix typosChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de> Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05input: route kbd LEDs through the generic LEDs layerSamuel Thibault
This permits to reassign keyboard LEDs to something else than keyboard "leds" state, by adding keyboard led and modifier triggers connected to a series of VT input LEDs, themselves connected to VT input triggers, which per-input device LEDs use by default. Userland can thus easily change the LED behavior of (a priori) all input devices, or of particular input devices. This also permits to fix #7063 from userland by using a modifier to implement proper CapsLock behavior and have the keyboard caps lock led show that modifier state. [ebroder@mokafive.com: Rebased to 3.2-rc1 or so, cleaned up some includes, and fixed some constants] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Evan Broder <evan@ebroder.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Tested-by: Pavel Machek <pavel@ucw.cz> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Cc: Pavel Machek <pavel@ucw.cz> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Bryan Wu <cooloney@gmail.com> Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Matt Sealey <matt@genesi-usa.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Niels de Vos <devos@fedoraproject.org> Cc: Steev Klimaszewski <steev@genesi-usa.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2013-11-05Merge remote-tracking branch 'clk/clk-next'Stephen Rothwell
Conflicts: drivers/clk/Makefile
2013-11-05Merge remote-tracking branch 'pwm/for-next'Stephen Rothwell
Conflicts: arch/arm/mach-omap2/board-zoom-peripherals.c
2013-11-05Merge remote-tracking branch 'gpio/for-next'Stephen Rothwell
Conflicts: arch/arm/Kconfig
2013-11-05Merge remote-tracking branch 'pinctrl/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'target-updates/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'char-misc/char-misc-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'staging/staging-next'Stephen Rothwell
Conflicts: drivers/staging/lustre/lustre/llite/lloop.c
2013-11-05Merge remote-tracking branch 'usb/usb-next'Stephen Rothwell
Conflicts: arch/arm/boot/dts/omap3-evm.dts drivers/Kconfig drivers/usb/musb/davinci.c
2013-11-05Merge remote-tracking branch 'tty/tty-next'Stephen Rothwell
Conflicts: drivers/tty/serial/atmel_serial.c drivers/tty/serial/imx.c
2013-11-05Merge remote-tracking branch 'driver-core/driver-core-next'Stephen Rothwell
Conflicts: drivers/mmc/host/mvsdio.c drivers/pci/pci-driver.c drivers/pci/pci-sysfs.c include/linux/netdevice.h
2013-11-05Merge remote-tracking branch 'leds/for-next'Stephen Rothwell
Conflicts: arch/arm/mach-ux500/board-mop500.c include/linux/of.h
2013-11-05Merge remote-tracking branch 'oprofile/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'Stephen Rothwell
Conflicts: arch/powerpc/include/asm/processor.h arch/powerpc/kernel/ptrace.c arch/powerpc/kernel/traps.c
2013-11-05Merge remote-tracking branch 'kvm/linux-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'tip/auto-latest'Stephen Rothwell
Conflicts: arch/h8300/include/asm/Kbuild include/linux/acpi.h include/linux/wait.h tools/perf/config/Makefile tools/perf/config/feature-tests.mak
2013-11-05Merge remote-tracking branch 'spi/for-next'Stephen Rothwell
Conflicts: drivers/spi/spi.c
2013-11-05Merge remote-tracking branch 'dt-rh/for-next'Stephen Rothwell
Conflicts: Documentation/devicetree/bindings/vendor-prefixes.txt arch/powerpc/include/asm/prom.h
2013-11-05Merge remote-tracking branch 'devicetree/devicetree/next'Stephen Rothwell
Conflicts: arch/arm/mach-integrator/pci_v3.c drivers/crypto/caam/jr.c drivers/pci/host/pci-mvebu.c
2013-11-05Merge remote-tracking branch 'trivial/for-next'Stephen Rothwell
Conflicts: net/netfilter/xt_set.c
2013-11-05Merge remote-tracking branch 'watchdog/master'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'security/next'Stephen Rothwell
Conflicts: crypto/Makefile
2013-11-05Merge remote-tracking branch 'regulator/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'fbdev/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'battery/master'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'mfd/master'Stephen Rothwell
Conflicts: sound/soc/codecs/mc13783.c
2013-11-05Merge remote-tracking branch 'mmc/mmc-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'device-mapper/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'aio-direct/for-next'Stephen Rothwell
Conflicts: drivers/block/loop.c fs/nfs/direct.c fs/nfs/file.c include/linux/blk_types.h
2013-11-05Merge remote-tracking branch 'block/for-next'Stephen Rothwell
Conflicts: drivers/md/raid5.c fs/f2fs/segment.c
2013-11-05Merge remote-tracking branch 'input/next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'sound/for-next'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'crypto/master'Stephen Rothwell
2013-11-05Merge remote-tracking branch 'l2-mtd/master'Stephen Rothwell