aboutsummaryrefslogtreecommitdiffstats
path: root/scripts (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-06-15fs: fix do_mount_root() false positive kmemcheck warningVegard Nossum1-1/+2
This false positive is due to the fact that do_mount_root() fakes a mount option (which is normally read from userspace), and the kernel unconditionally reads a whole page for the mount option. Hide the false positive by using the new __getname_gfp() with the __GFP_NOTRACK_FALSE_POSITIVE flag. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15fs: introduce __getname_gfp()Vegard Nossum1-2/+3
The purpose of this change is to allow __getname() users to pass a custom GFP mask to kmem_cache_alloc(). This is needed for annotating a certain kmemcheck false positive. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15trace: annotate bitfields in struct ring_buffer_eventVegard Nossum2-0/+7
This gets rid of a heap of false-positive warnings from the tracer code due to the use of bitfields. [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15net: annotate struct sock bitfieldVegard Nossum2-0/+4
2009/2/24 Ingo Molnar <mingo@elte.hu>: > ok, this is the last warning i have from today's overnight -tip > testruns - a 32-bit system warning in sock_init_data(): > > [ 2.610389] NET: Registered protocol family 16 > [ 2.616138] initcall netlink_proto_init+0x0/0x170 returned 0 after 7812 usecs > [ 2.620010] WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (f642c184) > [ 2.624002] 010000000200000000000000604990c000000000000000000000000000000000 > [ 2.634076] i i i i i i u u i i i i i i i i i i i i i i i i i i i i i i i i > [ 2.641038] ^ > [ 2.643376] > [ 2.644004] Pid: 1, comm: swapper Not tainted (2.6.29-rc6-tip-01751-g4d1c22c-dirty #885) > [ 2.648003] EIP: 0060:[<c07141a1>] EFLAGS: 00010282 CPU: 0 > [ 2.652008] EIP is at sock_init_data+0xa1/0x190 > [ 2.656003] EAX: 0001a800 EBX: f6836c00 ECX: 00463000 EDX: c0e46fe0 > [ 2.660003] ESI: f642c180 EDI: c0b83088 EBP: f6863ed8 ESP: c0c412ec > [ 2.664003] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 > [ 2.668003] CR0: 8005003b CR2: f682c400 CR3: 00b91000 CR4: 000006f0 > [ 2.672003] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 > [ 2.676003] DR6: ffff4ff0 DR7: 00000400 > [ 2.680002] [<c07423e5>] __netlink_create+0x35/0xa0 > [ 2.684002] [<c07443cc>] netlink_kernel_create+0x4c/0x140 > [ 2.688002] [<c072755e>] rtnetlink_net_init+0x1e/0x40 > [ 2.696002] [<c071b601>] register_pernet_operations+0x11/0x30 > [ 2.700002] [<c071b72c>] register_pernet_subsys+0x1c/0x30 > [ 2.704002] [<c0bf3c8c>] rtnetlink_init+0x4c/0x100 > [ 2.708002] [<c0bf4669>] netlink_proto_init+0x159/0x170 > [ 2.712002] [<c0101124>] do_one_initcall+0x24/0x150 > [ 2.716002] [<c0bbf3c7>] do_initcalls+0x27/0x40 > [ 2.723201] [<c0bbf3fc>] do_basic_setup+0x1c/0x20 > [ 2.728002] [<c0bbfb8a>] kernel_init+0x5a/0xa0 > [ 2.732002] [<c0103e47>] kernel_thread_helper+0x7/0x10 > [ 2.736002] [<ffffffff>] 0xffffffff We fix this false positive by annotating the bitfield in struct sock. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15c2port: annotate bitfield for kmemcheckVegard Nossum2-0/+5
This silences a false positive warning with kmemcheck. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15net: annotate inet_timewait_sock bitfieldsVegard Nossum2-1/+7
The use of bitfields here would lead to false positive warnings with kmemcheck. Silence them. (Additionally, one erroneous comment related to the bitfield was also fixed.) Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15ieee1394/csr1212: fix false positive kmemcheck reportVegard Nossum1-0/+2
kmemcheck reports a use of uninitialized memory here, but it's not a real error. The structure in question has just been allocated, and the whole field is initialized, but it happens in two steps. We fix the false positive by inserting a kmemcheck annotation. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15ieee1394: annotate bitfieldVegard Nossum1-0/+5
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15net: annotate bitfields in struct inet_sockVegard Nossum1-4/+10
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15net: use kmemcheck bitfields API for skbuffVegard Nossum2-0/+15
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: introduce bitfield APIVegard Nossum1-0/+50
Add the bitfield API which can be used to annotate bitfields in structs and get rid of false positive reports. According to Al Viro, the syntax we were using (putting #ifdef inside macro arguments) was not valid C. He also suggested using begin/end markers instead, which is what we do now. [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: add opcode self-testing at bootVegard Nossum4-17/+85
We've had some troubles in the past with weird instructions. This patch adds a self-test framework which can be used to verify that a certain set of opcodes are decoded correctly. Of course, the opcodes which are not tested can still give the wrong results. In short, this is just a safeguard to catch unintentional changes in the opcode decoder. It does not mean that errors can't still occur! [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15x86: unify pte_hiddenJeremy Fitzhardinge1-6/+2
Unify and demacro pte_hidden. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15x86: make _PAGE_HIDDEN conditionalJeremy Fitzhardinge1-1/+6
Only _PAGE_HIDDEN when CONFIG_KMEMCHECK is defined, otherwise set it to 0. Allows later cleanups. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: make kconfig accessible for other architecturesPekka Enberg4-88/+94
The Kconfig options of kmemcheck are hidden under arch/x86 which makes porting to other architectures harder. To fix that, move the Kconfig bits to lib/Kconfig.kmemcheck and introduce a CONFIG_HAVE_ARCH_KMEMCHECK config option that architectures can define. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: enable in the x86 KconfigVegard Nossum3-2/+91
let it rip! Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
2009-06-15kmemcheck: add hooks for the page allocatorVegard Nossum8-31/+122
This adds support for tracking the initializedness of memory that was allocated with the page allocator. Highmem requests are not tracked. Cc: Dave Hansen <dave@linux.vnet.ibm.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> [build fix for !CONFIG_KMEMCHECK] Signed-off-by: Ingo Molnar <mingo@elte.hu> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: add hooks for page- and sg-dma-mappingsVegard Nossum1-0/+5
This is needed for page allocator support to prevent false positives when accessing pages which are dma-mapped. [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: don't track page tablesVegard Nossum3-8/+10
As these are allocated using the page allocator, we need to pass __GFP_NOTRACK before we add page allocator support to kmemcheck. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15crypto: don't track xor test pages with kmemcheckVegard Nossum1-1/+6
The xor tests are run on uninitialized data, because it is doesn't really matter what the underlying data is. Annotate this false- positive warning. Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15slab: add hooks for kmemcheckPekka Enberg1-2/+18
We now have SLAB support for kmemcheck! This means that it doesn't matter whether one chooses SLAB or SLUB, or indeed whether Linus chooses to chuck SLAB or SLUB.. ;-) Cc: Ingo Molnar <mingo@elte.hu> Cc: Christoph Lameter <clameter@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15slub: add hooks for kmemcheckVegard Nossum1-2/+19
Parts of this patch were contributed by Pekka Enberg but merged for atomicity. Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
2009-06-15kmemcheck: add DMA hooksVegard Nossum2-0/+18
This patch hooks into the DMA API to prevent the reporting of the false positives that would otherwise be reported when memory is accessed that is also used directly by devices. [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: add mm functionsVegard Nossum7-9/+174
With kmemcheck enabled, the slab allocator needs to do this: 1. Tell kmemcheck to allocate the shadow memory which stores the status of each byte in the allocation proper, e.g. whether it is initialized or uninitialized. 2. Tell kmemcheck which parts of memory that should be marked uninitialized. There are actually a few more states, such as "not yet allocated" and "recently freed". If a slab cache is set up using the SLAB_NOTRACK flag, it will never return memory that can take page faults because of kmemcheck. If a slab cache is NOT set up using the SLAB_NOTRACK flag, callers can still request memory with the __GFP_NOTRACK flag. This does not prevent the page faults from occuring, however, but marks the object in question as being initialized so that no warnings will ever be produced for this object. In addition to (and in contrast to) __GFP_NOTRACK, the __GFP_NOTRACK_FALSE_POSITIVE flag indicates that the allocation should not be tracked _because_ it would produce a false positive. Their values are identical, but need not be so in the future (for example, we could now enable/disable false positives with a config option). Parts of this patch were contributed by Pekka Enberg but merged for atomicity. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15x86: add hooks for kmemcheckVegard Nossum8-5/+66
The hooks that we modify are: - Page fault handler (to handle kmemcheck faults) - Debug exception handler (to hide pages after single-stepping the instruction that caused the page fault) Also redefine memset() to use the optimized version if kmemcheck is enabled. (Thanks to Pekka Enberg for minimizing the impact on the page fault handler.) As kmemcheck doesn't handle MMX/SSE instructions (yet), we also disable the optimized xor code, and rely instead on the generic C implementation in order to avoid false-positive warnings. Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no> [whitespace fixlet] Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> [rebased for mainline inclusion] Signed-off-by: Vegard Nossum <vegardno@ifi.uio.no>
2009-06-15kmemcheck: use kmemcheck_pte_lookup() instead of open-coding itPekka Enberg1-6/+1
Lets use kmemcheck_pte_lookup() in kmemcheck_fault() instead of open-coding it there. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: move 64-bit ifdef out of kmemcheck_opcode_decode()Pekka Enberg1-2/+7
This patch moves the CONFIG_X86_64 ifdef out of kmemcheck_opcode_decode() by introducing a version of the function that always returns false for CONFIG_X86_32. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: remove multiple ifdef'd definitions of the same global variablePekka Enberg1-3/+5
Multiple ifdef'd definitions of the same global variable is ugly and error-prone. Fix that up. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: make initialization message less confusingPekka Enberg1-1/+1
The "Bugs, beware!" printout during is cute but confuses users that something bad happened so change the text to the more boring "Initialized" message. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-15kmemcheck: remove forward declarations from error.cPekka Enberg1-69/+68
This patch reorders code in error.c so that we can get rid of the forward declarations. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
2009-06-14.gitignore: ignore *.lzma filesArne Janbu1-0/+1
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14fusion: fix recent kernel-doc problemsRandy Dunlap2-4/+3
Fix recent fusion driver kernel-doc fatal error and warnings. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Eric.Moore@lsi.com Cc: support@lsi.com Cc: DL-MPTFusionLinux@lsi.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-14keyboard: advertise KT_DEAD2 extended diacriticalsSamuel Thibault1-0/+1
In addition to KT_DEAD which has limited support for diacriticals, there is KT_DEAD2 that can support 256 criticals, so let's advertise it in <linux/keyboard.h>. This lets userland know abut the drivers/char/keyboard.c function k_dead2, which supports more than the few trivial ones that k_dead supports. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-14kbuild: add generic --set-str option to scripts/configMichal Marek1-2/+9
Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kbuild: simplify argument loop in scripts/configMichal Marek1-28/+16
Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kbuild: handle non-existing options in scripts/configMichal Marek1-18/+18
If an option does not exist in .config, set it at the end of the file. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kallsyms: generalize text region handlingMike Frysinger1-26/+61
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kallsyms: support kernel symbols in Blackfin on-chip memoryRobin Getz1-1/+12
The Blackfin arch has a discontiguous .text layout due to having on-chip instruction memory and no virtual memory support. As such, we need to add explicit checks for these additional .text regions. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14documentation: make version fixAdam Lackorzynski1-2/+2
The Makefiles in the build directories use the internal make variable MAKEFILE_LIST which is available from make 3.80 only. (The patch would be valid back to 2.6.25) Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kbuild: fix a compile warningAmerigo Wang1-2/+3
gcc-4.4.1: HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c: In function 'traps': scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer will break strict-aliasing rules scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer will break strict-aliasing rules (Apparently -fno-strict-aliasing will fix this too) Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14mlx4_core: Don't double-free IRQs when falling back from MSI-X to INTxRoland Dreier1-1/+3
When both MSI-X and legacy INTx fail to generate an interrupt, the driver frees the MSI-X interrupts twice. Fix this by clearing the have_irq flag for the MSI-X interrupts when they are freed the first time. This is the same bug that was reported in ib_mthca by Yinghai Lu <yhlu.kernel@gmail.com>. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-06-14gitignore: Add GNU GLOBAL files to top .gitignoreJani Nikula1-0/+6
Ignore GPATH, GRTAGS, GSYMS, and GTAGS generated by GNU GLOBAL. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kbuild: fix delay in setlocalversion on readonly sourceNico Schottelius1-2/+4
Do not update index on read only media. Idea published by Christian Kujau <lists@nerdbynature.de>. Cc: Nico Schottelius <nico@ikn.schottelius.org> Cc: Christian Kujau <lists@nerdbynature.de>
2009-06-14README: fix misleading pointer to the defconf directoryPatrick Ringl1-1/+9
Signed-off-by: Patrick Ringl <patrick_@freenet.de> Cc: Arnd Bergmann <arnd@arndb.de>
2009-06-14vmlinux.lds.h updateSam Ravnborg3-16/+11
Updated after review by Tim Abbott. - Use HEAD_TEXT_SECTION - Drop use of section-names.h and delete file - Introduce EXIT_CALL Deleting section-names.h required a few simple updates of init.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Tim Abbott <tabbott@ksplice.com>
2009-06-14[ARM] 5545/2: add flush_kernel_dcache_page() for ARMNicolas Pitre1-0/+8
Without this, the default implementation is a no op which is completely wrong with a VIVT cache, and usage of sg_copy_buffer() produces unpredictable results. Tested-by: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc> CC: stable@kernel.org Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-14MAINTAINERS: EB110ATX is not ebsa110Russell King1-1/+0
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-06-14headers_check fix: mn10300, setup.hJaswinder Singh Rajput1-1/+2
fix the following 'make headers_check' warnings: usr/include/asm-mn10300/setup.h:14: extern's make no sense in userspace usr/include/asm-mn10300/setup.h:15: extern's make no sense in userspace Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-06-14headers_check fix: mn10300, ptrace.hJaswinder Singh Rajput1-3/+2
fix the following 'make headers_check' warning: usr/include/asm-mn10300/ptrace.h:80: extern's make no sense in userspace Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-06-13IB/mthca: Don't double-free IRQs when falling back from MSI-X to INTxRoland Dreier1-1/+3
When both MSI-X and legacy INTx fail to generate an interrupt, the driver frees the MSI-X interrupts twice. Fix this by clearing the have_irq flag for the MSI-X interrupts when they are freed the first time. Reported-by: Yinghai Lu <yhlu.kernel@gmail.com> Tested-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>