summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2013-12-13Merge tag 'arc-fixes-for-3.13' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: "These are couple of weeks old already, but I just couldn't get them to you earlier. - couple of fixes for recently added perf code - build time extable sort" * tag 'arc-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [perf] Fix a few thinkos ARC: Add guard macro to uapi/asm/unistd.h ARC: extable: Enable sorting at build time
2013-12-05ftrace: default to tilegx if ARCH=tile is specifiedTony Lu
This matches the existing behavior in arch/tile/Makefile for defconfig. Reported-by: fengguang.wu@intel.com Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Tony Lu <zlu@tilera.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-11-25ARC: extable: Enable sorting at build timeVineet Gupta
Avoids wasting cycles at boot specially on slower simulators Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Francois Bedard <fbedard@synopsys.com> Cc: linux-kernel@vger.kernel.org Acked-by: David Daney <david.daney@cavium.com>
2013-11-21Merge branch 'akpm' (fixes from Andrew)Linus Torvalds
Merge patches from Andrew Morton: "13 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: place page->pmd_huge_pte to right union MAINTAINERS: add keyboard driver to Hyper-V file list x86, mm: do not leak page->ptl for pmd page tables ipc,shm: correct error return value in shmctl (SHM_UNLOCK) mm, mempolicy: silence gcc warning block/partitions/efi.c: fix bound check ARM: drivers/rtc/rtc-at91rm9200.c: disable interrupts at shutdown mm: hugetlbfs: fix hugetlbfs optimization kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS cleanly ipc,shm: fix shm_file deletion races mm: thp: give transparent hugepage code a separate copy_page checkpatch: fix "Use of uninitialized value" warnings configfs: fix race between dentry put and lookup
2013-11-21Merge branch 'for-linus2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: "In this patchset, we finally get an SELinux update, with Paul Moore taking over as maintainer of that code. Also a significant update for the Keys subsystem, as well as maintenance updates to Smack, IMA, TPM, and Apparmor" and since I wanted to know more about the updates to key handling, here's the explanation from David Howells on that: "Okay. There are a number of separate bits. I'll go over the big bits and the odd important other bit, most of the smaller bits are just fixes and cleanups. If you want the small bits accounting for, I can do that too. (1) Keyring capacity expansion. KEYS: Consolidate the concept of an 'index key' for key access KEYS: Introduce a search context structure KEYS: Search for auth-key by name rather than target key ID Add a generic associative array implementation. KEYS: Expand the capacity of a keyring Several of the patches are providing an expansion of the capacity of a keyring. Currently, the maximum size of a keyring payload is one page. Subtract a small header and then divide up into pointers, that only gives you ~500 pointers on an x86_64 box. However, since the NFS idmapper uses a keyring to store ID mapping data, that has proven to be insufficient to the cause. Whatever data structure I use to handle the keyring payload, it can only store pointers to keys, not the keys themselves because several keyrings may point to a single key. This precludes inserting, say, and rb_node struct into the key struct for this purpose. I could make an rbtree of records such that each record has an rb_node and a key pointer, but that would use four words of space per key stored in the keyring. It would, however, be able to use much existing code. I selected instead a non-rebalancing radix-tree type approach as that could have a better space-used/key-pointer ratio. I could have used the radix tree implementation that we already have and insert keys into it by their serial numbers, but that means any sort of search must iterate over the whole radix tree. Further, its nodes are a bit on the capacious side for what I want - especially given that key serial numbers are randomly allocated, thus leaving a lot of empty space in the tree. So what I have is an associative array that internally is a radix-tree with 16 pointers per node where the index key is constructed from the key type pointer and the key description. This means that an exact lookup by type+description is very fast as this tells us how to navigate directly to the target key. I made the data structure general in lib/assoc_array.c as far as it is concerned, its index key is just a sequence of bits that leads to a pointer. It's possible that someone else will be able to make use of it also. FS-Cache might, for example. (2) Mark keys as 'trusted' and keyrings as 'trusted only'. KEYS: verify a certificate is signed by a 'trusted' key KEYS: Make the system 'trusted' keyring viewable by userspace KEYS: Add a 'trusted' flag and a 'trusted only' flag KEYS: Separate the kernel signature checking keyring from module signing These patches allow keys carrying asymmetric public keys to be marked as being 'trusted' and allow keyrings to be marked as only permitting the addition or linkage of trusted keys. Keys loaded from hardware during kernel boot or compiled into the kernel during build are marked as being trusted automatically. New keys can be loaded at runtime with add_key(). They are checked against the system keyring contents and if their signatures can be validated with keys that are already marked trusted, then they are marked trusted also and can thus be added into the master keyring. Patches from Mimi Zohar make this usable with the IMA keyrings also. (3) Remove the date checks on the key used to validate a module signature. X.509: Remove certificate date checks It's not reasonable to reject a signature just because the key that it was generated with is no longer valid datewise - especially if the kernel hasn't yet managed to set the system clock when the first module is loaded - so just remove those checks. (4) Make it simpler to deal with additional X.509 being loaded into the kernel. KEYS: Load *.x509 files into kernel keyring KEYS: Have make canonicalise the paths of the X.509 certs better to deduplicate The builder of the kernel now just places files with the extension ".x509" into the kernel source or build trees and they're concatenated by the kernel build and stuffed into the appropriate section. (5) Add support for userspace kerberos to use keyrings. KEYS: Add per-user_namespace registers for persistent per-UID kerberos caches KEYS: Implement a big key type that can save to tmpfs Fedora went to, by default, storing kerberos tickets and tokens in tmpfs. We looked at storing it in keyrings instead as that confers certain advantages such as tickets being automatically deleted after a certain amount of time and the ability for the kernel to get at these tokens more easily. To make this work, two things were needed: (a) A way for the tickets to persist beyond the lifetime of all a user's sessions so that cron-driven processes can still use them. The problem is that a user's session keyrings are deleted when the session that spawned them logs out and the user's user keyring is deleted when the UID is deleted (typically when the last log out happens), so neither of these places is suitable. I've added a system keyring into which a 'persistent' keyring is created for each UID on request. Each time a user requests their persistent keyring, the expiry time on it is set anew. If the user doesn't ask for it for, say, three days, the keyring is automatically expired and garbage collected using the existing gc. All the kerberos tokens it held are then also gc'd. (b) A key type that can hold really big tickets (up to 1MB in size). The problem is that Active Directory can return huge tickets with lots of auxiliary data attached. We don't, however, want to eat up huge tracts of unswappable kernel space for this, so if the ticket is greater than a certain size, we create a swappable shmem file and dump the contents in there and just live with the fact we then have an inode and a dentry overhead. If the ticket is smaller than that, we slap it in a kmalloc()'d buffer" * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (121 commits) KEYS: Fix keyring content gc scanner KEYS: Fix error handling in big_key instantiation KEYS: Fix UID check in keyctl_get_persistent() KEYS: The RSA public key algorithm needs to select MPILIB ima: define '_ima' as a builtin 'trusted' keyring ima: extend the measurement list to include the file signature kernel/system_certificate.S: use real contents instead of macro GLOBAL() KEYS: fix error return code in big_key_instantiate() KEYS: Fix keyring quota misaccounting on key replacement and unlink KEYS: Fix a race between negating a key and reading the error set KEYS: Make BIG_KEYS boolean apparmor: remove the "task" arg from may_change_ptraced_domain() apparmor: remove parent task info from audit logging apparmor: remove tsk field from the apparmor_audit_struct apparmor: fix capability to not use the current task, during reporting Smack: Ptrace access check mode ima: provide hash algo info in the xattr ima: enable support for larger default filedata hash algorithms ima: define kernel parameter 'ima_template=' to change configured default ima: add Kconfig default measurement list template ...
2013-11-21checkpatch: fix "Use of uninitialized value" warningsJoe Perches
checkpatch is currently confused about some complex macros and references undefined variables $stat and $cond. Make sure these are defined before using them. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Gerhard Sittig <gsi@denx.de> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-16Merge tag 'trace-3.13' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing update from Steven Rostedt: "This batch of changes is mostly clean ups and small bug fixes. The only real feature that was added this release is from Namhyung Kim, who introduced "set_graph_notrace" filter that lets you run the function graph tracer and not trace particular functions and their call chain. Tom Zanussi added some updates to the ftrace multibuffer tracing that made it more consistent with the top level tracing. One of the fixes for perf function tracing required an API change in RCU; the addition of "rcu_is_watching()". As Paul McKenney is pushing that change in this release too, he gave me a branch that included all the changes to get that working, and I pulled that into my tree in order to complete the perf function tracing fix" * tag 'trace-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Add rcu annotation for syscall trace descriptors tracing: Do not use signed enums with unsigned long long in fgragh output tracing: Remove unused function ftrace_off_permanent() tracing: Do not assign filp->private_data to freed memory tracing: Add helper function tracing_is_disabled() tracing: Open tracer when ftrace_dump_on_oops is used tracing: Add support for SOFT_DISABLE to syscall events tracing: Make register/unregister_ftrace_command __init tracing: Update event filters for multibuffer recordmcount.pl: Add support for __fentry__ ftrace: Have control op function callback only trace when RCU is watching rcu: Do not trace rcu_is_watching() functions ftrace/x86: skip over the breakpoint for ftrace caller trace/trace_stat: use rbtree postorder iteration helper instead of opencoding ftrace: Add set_graph_notrace filter ftrace: Narrow down the protected area of graph_lock ftrace: Introduce struct ftrace_graph_data ftrace: Get rid of ftrace_graph_filter_enabled tracing: Fix potential out-of-bounds in trace_get_user() tracing: Show more exact help information about snapshot
2013-11-15Merge branch 'misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild changes from Michal Marek: - make tags fixes again - scripts/show_delta fix for newer python - scripts/kernel-doc does not fail on unknown function prototype - one less coccinelle check this time * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/tags.sh: remove obsolete __devinit[const|data] scripts/kernel-doc: make unknown function prototype a Warning instead of an Error show_delta: Update script to support python versions 2.5 through 3.3 scripts/coccinelle/api: remove devm_request_and_ioremap.cocci scripts/tags.sh: Increase identifier list
2013-11-15Merge branch 'kconfig' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig changes from Michal Marek: - xconfig stores its setting in a meaningful path (~/.config/kernel.org/qconf.conf) - kconfig symbol search fix - documentation fixes - cleanup & comment update - fix warning when a kconfig symbol is defined with two different types - Yann is now officially listed as maintainer of kconfig, but he prefers me to send pull requests for now * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: MAINTAINERS: New kconfig maintainer xconfig: Fix the filename for GUI settings kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->len kconfig: remove unused definition from scanner kconfig: adjust warning message for conflicting types kconfig: fix trivial typos and update mconf documentation kconfig: add short explanation to SYMBOL_WRITE Documentation/kbuild/kconfig.txt: 'make listnewconfig' replaces: yes "" | make oldconfig
2013-11-15Merge branch 'kbuild' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild changes from Michal Marek: - LTO fixes, but the kallsyms part had to be reverted - Pass -Werror=implicit-int and -Werror=strict-prototypes to the compiler by default - snprintf fix in modpost - remove GREP_OPTIONS from the environment to be immune against exotic grep option settings * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kallsyms: Revert back to 128 max symbol length Kbuild: Ignore GREP_OPTIONS env variable scripts: kallsyms: Use %zu to print 'size_t' scripts/bloat-o-meter: use .startswith rather than fragile slicing scripts/bloat-o-meter: ignore changes in the size of linux_banner kbuild: replace unbounded sprintf call in modpost kbuild, bloat-o-meter: fix static detection Kbuild: Handle longer symbols in kallsyms.c kbuild: Increase kallsyms max symbol length Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default
2013-11-15Merge tag 'modules-next-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module updates from Rusty Russell: "Mainly boring here, too. rmmod --wait finally removed, though" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: modpost: fix bogus 'exported twice' warnings. init: fix in-place parameter modification regression asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible kernel: add support for init_array constructors modpost: Optionally ignore secondary errors seen if a single module build fails module: remove rmmod --wait option.
2013-11-13kallsyms: Revert back to 128 max symbol lengthMichal Marek
This reverts commits f3462aa (Kbuild: Handle longer symbols in kallsyms.c) and eea0e9c (kbuild: Increase kallsyms max symbol length) except for the added overflow check. The reason is a regression caused by increasing the buffer: http://marc.info/?l=linux-kernel&m=138387700415675. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Joe Mario <jmario@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-13kernel-doc: improve "no structured comments found" errorJohannes Berg
When using '!Ffile function' in a docbook template, and the function no longer exists, you get a "no structured comments found" error from the kernel-doc processing script. It's useful to know which functions it was looking for, so print them out in this case. Also do the same for '!Pfile doc-section' The same error also happens when using '!Efile' when some exported functions aren't documented (in the same file.) There's a very large number of such functions though, so don't print the message in this case -- right now it would give ~850 messages. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: Rob Landley <rob@landley.net> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13initramfs: read CONFIG_RD_ variables for initramfs compressionP J P
When expert configuration option(CONFIG_EXPERT) is enabled, menuconfig offers a choice of compression algorithm to compress initial ramfs image; This choice is stored into CONFIG_RD_* variables. But usr/Makefile uses earlier INITRAMFS_COMPRESSION_* macros to build initial ramfs file. Since none of them is defined, resulting 'initramfs_data.cpio' file remains un-compressed. This patch updates the Makefile to use CONFIG_RD_* variables and adds support for LZ4 compression algorithm. Also updates the 'gen_initramfs_list.sh' script to check whether a selected compression command is accessible or not. And fall-back to default gzip(1) compression when it is not. Signed-off-by: P J P <prasad@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: add check for sscanf without return useJoe Perches
Naked use sscanf can be troublesome because the pointed to variables may not have been set. Add a warning when the sscanf return value is not used. For now, do not add __must_check to the sscanf prototype because that will cause a couple of hundred new warnings when compiling a kernel. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: don't require kernel style __attribute__ shortcuts in uapi pathsJoe Perches
Avoid prescribing kernel styled shortcuts for gcc extensions of __attribute__((foo)) in the uapi include paths. Fix $realfile filename when using -f/--file to not remove first level directory as if the filename was used in a -P1 patch. Only strip the first level directory (typically a or b) for P1 patches. Signed-off-by: Joe Perches <joe@perches.com> Cc: "Dixit, Ashutosh" <ashutosh.dixit@intel.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: improve "return is not a function" testJoe Perches
Find a few more cases where parentheses are used around the value of a return statement. This now uses the "$balanced_parens" test and also makes the test depend on perl v5.10 and higher. This now finds return with parenthesis uses the old code did not find like: ERROR: return is not a function, parentheses are not required #211: FILE: arch/m68k/include/asm/sun3xflop.h:211: + return ((error == 0) ? 0 : -1); Signed-off-by: Joe Perches <joe@perches.com> Tested-by: David Cohen <david.a.cohen@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch.pl: check for the FSF mailing addressJosh Triplett
Kernel maintainers reject new instances of the GPL boilerplate paragraph directing people to write to the FSF for a copy of the GPL, since the FSF has moved in the past and may do so again. Make this an error for new code, but just a --strict CHK in --file mode; anyone interested in doing tree-wide cleanups of this form can enable this test explicitly. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: make the memory barrier test noisierJoe Perches
Peter Zijlstra prefers that comments be required near uses of memory barriers. Change the message level for memory barrier uses from a --strict test only to a normal WARN so it's always emitted. This might produce false positives around insertions of memory barriers when a comment is outside the patch context block. And checkpatch is still stupid, it only looks for existence of any comment, not at the comment content. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: add rules to check init attribute and const defectsJoe Perches
People get this regularly wrong and it breaks the LTO builds, as it causes a section attribute conflict. Add --fix capability too. Based on a patch from Andi Kleen. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: add test for #defines of ARCH_HAS_<foo>Joe Perches
Add a test for these #defines Additionally, moved string_find_replace sub as it screws up subsequent formatting when placed inside another sub. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: find CamelCase definitions of struct/union/enumJoe Perches
Checkpatch doesn't currently find CamelCase definitions of structs, unions or enums. Add that ability. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: update seq_<foo> testsJoe Perches
seq_vprintf, seq_printf and seq_puts are logging functions and should be allowed to exceed the maximium line length. Add maximum line length exceptions for these functions. Also, suggesting seq_printf conversions to seq_puts should be tested for arguments after the format. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: extend CamelCase types and ignore existing CamelCase uses in a patchJoe Perches
Extend the CamelCase words found to include structure members. In https://lkml.org/lkml/2013/9/3/318 Sarah Sharp (mostly) wrote: "In general, if checkpatch.pl complains about a variable a patch introduces that's CamelCase, you should pay attention to it. Otherwise, [] ignore it." So, if checking a patch, scan the original patched file if it's available and add any preexisting CamelCase types so reuses do not generate CamelCase messages. That also means Andrew's not so cruelly spurned anymore. https://lkml.org/lkml/2013/2/22/426 Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13checkpatch: report missing spaces around trigraphs with --strictJoe Perches
Spaces around trigraphs are specified by CodingStyle but checkpatch is currently silent about them because there are many current instances without them. Make missing spaces around trigraphs a --strict message. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13scripts/mod/modpost.c: handle non ABS crc symbolsAndi Kleen
For some reason I managed to trick gcc into create CRC symbols that are not absolute anymore, but weak. Make modpost handle this case. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-13scripts/sortextable: support objects with more than 64K sections.Jamie Iles
Building with a large config and -ffunction-sections results in a large number of sections and sortextable needs to be able to handle that. Implement support for > 64K sections as modpost does. Signed-off-by: Jamie Iles <jamie.iles@oracle.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-08scripts/tags.sh: remove obsolete __devinit[const|data]Michael Opdenacker
This removes the use of __devinitconst and __devinitdata in scripts/tags.sh, which were removed in 3.8. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-08scripts: kallsyms: Use %zu to print 'size_t'Fabio Estevam
Commit f3462aa95 (Kbuild: Handle longer symbols in kallsyms.c) introduced the following warning on ARM: scripts/kallsyms.c:121:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat] Use %zu to print 'size_t'. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-07perf tools: Fix version when building out of treeDavid Ahern
When building perf out of tree: $ make perf-tar-src-pkg $ tar -xf perf-<ver>.tar -C /tmp $ cd /tmp/perf<ver> $ make -C tools/perf you get this warning message: make[1]: *** No rule to make target `kernelversion'. Stop. Fix it by saving the perf version in the tar file and using that for the out of tree builds. v2: removed short form request and fixed up version string from usual output. Signed-off-by: David Ahern <dsahern@gmail.com> Suggested-by: Ingo Molnar <mingo@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1383753335-25782-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-11-07scripts/bloat-o-meter: use .startswith rather than fragile slicingJosh Triplett
str.startswith has existed since at least Python 2.0, in 2000; use it rather than a fragile comparison against an initial slice of a string, which requires hard-coding the length of the string to compare against. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-07scripts/bloat-o-meter: ignore changes in the size of linux_bannerJosh Triplett
linux_banner can change size due to changes in the compiler, build number, or the user@host the system was compiled on; ignore size changes in linux_banner entirely. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-07modpost: fix bogus 'exported twice' warnings.Rusty Russell
Andi's change in e0f244c63fc9 ("asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible") make the crc appear first in the symbol table. modpost creates an entry when it sees the CRC, then when it sees the actual symbol, it complains that it's seen it before. The preloaded flag already exists for the equivalent case where we loaded from Module.symvers, so use that. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Tested-by: The Awesome Power Of linux-next Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-11-06kbuild: replace unbounded sprintf call in modpostKees Cook
The modpost tool could overflow its stack buffer if someone was running with an insane shell environment. Regardless, it's technically a bug, so this fixes it to truncate the string instead of seg-faulting. Found by Coverity. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-06kbuild, bloat-o-meter: fix static detectionAndi Kleen
Disable static detection: the static currently drops a lot of useful information including clones generated by gcc. Drop this. The statics will appear now without static. prefix. But remove the LTO .NUMBER postfixes that look ugly Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-06Kbuild: Handle longer symbols in kallsyms.cAndi Kleen
Also warn for too long symbols v2: Add missing newline. Use 255 max (Joe Perches) Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-06scripts/kernel-doc: make unknown function prototype a Warning instead of an ↵Randy Dunlap
Error When scripts/kernel-doc cannot understand a function prototype, it had been generating a fatal error and stopping immediately. Make this a Warning instead of an Error and keep going. Note that this can happen if the kernel-doc notation that is being parsed is not actually a function prototype; maybe it's a struct or something else, so I added "function" to the warning message to try to make it clearer that scripts/kernel-doc is looking for a function prototype here. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-05recordmcount.pl: Add support for __fentry__Jamie Iles
With gcc 4.6.0 the -mfentry feature places the function profiling call at the start of the function. When this is used, the call is to __fentry__ and not mcount. This is required for Ksplice as the C version of recordmcount doesn't insert section symbols for the __mcount_loc section so we fall back to the perl version. Based on 48bb5dc6cd9d30fe0d594947563da1f8bd9abada (ftrace: Make recordmcount.c handle __fentry__). Link: http://lkml.kernel.org/r/1383648129-10724-1-git-send-email-jamie.iles@oracle.com Signed-off-by: Jamie Iles <jamie.iles@oracle.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-11-02scripts/kallsyms: filter symbols not in kernel address spaceMing Lei
This patch uses CONFIG_PAGE_OFFSET to filter symbols which are not in kernel address space because these symbols are generally for generating code purpose and can't be run at kernel mode, so we needn't keep them in /proc/kallsyms. For example, on ARM there are some symbols which may be linked in relocatable code section, then perf can't parse symbols any more from /proc/kallsyms, this patch fixes the problem (introduced b9b32bf70f2fb710b07c94e13afbc729afe221da) Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: stable@vger.kernel.org
2013-10-31Merge branch 'yem/kconfig-for-next' of ↵Michal Marek
git://gitorious.org/linux-kconfig/linux-kconfig into kbuild/kconfig
2013-10-29asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visibleAndi Kleen
Make the ksymtab symbols for EXPORT_SYMBOL visible. This prevents the LTO compiler from adding a .NUMBER prefix, which avoids various problems in later export processing. Cc: rusty@rustcorp.com.au Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-10-23show_delta: Update script to support python versions 2.5 through 3.3Mike Pagano
Support past and active versions of python while maintaining backward compatibility. Script has been tested on python versions from 2.5.x up to and including 3.3.x. Signed-off-by: Mike Pagano <mpagano@gentoo.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-10-23scripts/coccinelle/api: remove devm_request_and_ioremap.cocciWolfram Sang
Use of this function is discouraged in favour of devm_ioremap_resource(). Don't advertise it. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-10-23scripts/tags.sh: Increase identifier listKirill Tkhai
Add __maybe_unused __always_unused __cacheline_aligned __cacheline_aligned_in_smp ACPI_EXPORT_SYMBOL to the list. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-10-08xconfig: Fix the filename for GUI settingsBen Hutchings
Currently the qconf program invoked by 'make xconfig' stores GUI settings in the file ~/.config/Unknown\ Organization.conf. This name is apparently generated by the QSettings class when no organisation or application name are specified. This is obviously not a sensible filename (nor does it seem sensible that these QSettings parameters are optional!). Pass the names 'kernel.org' and 'qconf', resuling in the filename ~/.config/kernel.org/qconf.conf. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-10-08kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->lenMartin Walch
The struct gstr has a capacity that may differ from the actual string length. However, a string manipulation in the function search_conf made the assumption that it is the same, which led to messing up some search results, especially when the content of the gstr in use had not yet reached at least 63 chars. Signed-off-by: Martin Walch <walch.martin@web.de> Acked-by: Wang YanQing <udknight@gmail.com> Acked-by: Benjamin Poirier <bpoirier@suse.de> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-10-08kconfig: remove unused definition from scannerMartin Walch
The definition ws [ \n\t] is not used anywhere. Drop it to avoid confusion. As it is a dead definition, any changes in the resulting code generated by flex would be surprising (actually testing this showed that there are really no changes). So, there is no need to touch the existing zconf.lex.c_shipped. Signed-off-by: Martin Walch <walch.martin@web.de> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN: <yann.morin.1998@free.fr>
2013-10-08kconfig: adjust warning message for conflicting typesMartin Walch
Each symbol must have exactly one type assigned. However, if a symbol happens to have two different types assigned at runtime, a warning is printed and the first type is preserved while the second type is being ignored. The warning message says type of <symbol name> redefined from <first type> to <second type> which may be misleading as it may create the impression that the second type replaces the first type. This patch clarifies this by changing the warning to ignoring type redefinition of <symbol name> from <first type> to <second type> Signed-off-by: Martin Walch <walch.martin@web.de> Acked-by: Wang YanQing <udknight@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-10-08kconfig: fix trivial typos and update mconf documentationMartin Walch
This fixes lots of typos in comments and strings. It also updates the documentation strings in mconf to reflect the changes in the user interface from the two commits 6364fd0cb1e4c7f72b974613e0cf5744ae4d2cb2 menuconfig: Add Save/Load buttons 1bdbac478a858d2aa73a6784c7c2e09de0f6d06b menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate" And it updates the layout of the example search result, i. e. moves down the "Defined at" and "Depends on" lines and adds a symbol state ([=n]) to the symbol in the "Selected by" line. Furthermore, the help texts now should fit in 80 columns again when viewed in mconf. Signed-off-by: Martin Walch <walch.martin@web.de> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wang YanQing <udknight@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-10-08kconfig: add short explanation to SYMBOL_WRITEMartin Walch
replace the question mark in the comment after SYMBOL_WRITE with an explanation Signed-off-by: Martin Walch <walch.martin@web.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>