aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2011-05-02kbuild: move scripts/basic/docproc.c to scripts/docproc.cPeter Foley
Move docproc from scripts/basic to scripts so it is only built for *doc targets instead of every time the kernel is built.
2011-05-02kbuild: Fix Makefile.asm-generic for umMichal Marek
Do nothing if arch/$(SRCARCH)/include/asm/Kbuild does not exist, which is the case of um. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-05-02kbuild: Allow to combine multiple W= levelsMichal Marek
Add support for make W=12, make W=123 and so on, to enable warnings from multiple W= levels. Normally, make W=<level> does not include warnings from the previous level. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-By: Valdis Kletnieks <valdis.kletnieks@vt.edu>
2011-04-29kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0Dave Jones
Disable the new -Wunused-but-set-variable that was added in gcc 4.6.0 It produces more false positives than useful warnings. This can still be enabled using W=1 Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29Fix handling of backlash character in LINUX_COMPILE_BY nameMarcin Nowakowski
When using a domain login, `whoami` returns the login in user\domain format. This leads to either warnings on unrecognised escape sequences or escaped characters being generated for the user. This patch ensures that any backslash is escaped to a double-backslash to make sure the name is preserved correctly. This patch does not enforce escaping on the KBUILD_BUILD_USER variable, as this is something the user has control of and can escape if required. Signed-off-by: Marcin Nowakowski <marcin.nowakowski.000@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-28kbuild: asm-generic supportSam Ravnborg
There is an increasing amount of header files shared between individual architectures in asm-generic. To avoid a lot of dummy wrapper files that just include the corresponding file in asm-generic provide some basic support in kbuild for this. With the following patch an architecture can maintain a list of files in the file arch/$(ARCH)/include/asm/Kbuild To use a generic file just add: generic-y += <name-of-header-file.h> For each file listed kbuild will generate the necessary wrapper in arch/$(ARCH)/include/generated/asm. When installing userspace headers a wrapper is likewise created. The original inspiration for this came from the unicore32 patchset - although a different method is used. The patch includes several improvements from Arnd Bergmann. Michael Marek contributed Makefile.asm-generic. Remis Baima did an intial implementation along to achive the same - see https://patchwork.kernel.org/patch/13352/ Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn> Tested-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Remis Lima Baima <remis.developer@googlemail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-28kbuild: implement several W= levelsSam Ravnborg
Building a kernel with "make W=1" produces far too much noise to be useful. Divide the warning options in three groups: W=1 - warnings that may be relevant and does not occur too often W=2 - warnings that occur quite often but may still be relevant W=3 - the more obscure warnings, can most likely be ignored When building the whole kernel, those levels produce: W=1 - 4859 warnings W=2 - 1394 warnings W=3 - 86666 warnings respectively. Warnings have been counted with Geert's script at http://www.kernel.org/pub/linux/kernel/people/geert/linux-log/linux-log-summary.pl Many warnings occur from .h files so fixing one file may have a nice effect on the total number of warnings. With these changes I am actually tempted to try W=1 now and then. Previously there was just too much noise. Borislav: - make the W= levels exclusive - move very noisy and making little sense for the kernel warnings to W=3 - drop -Woverlength-strings due to useless warning message - copy explanatory text for the different warning levels to 'make help' - recount warnings per level Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Borislav Petkov <bp@alien8.de> Cc: Dave Jones <davej@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-20kbuild: Fix build with binutils <= 2.19Michal Marek
The D option of ar is only available in newer versions. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entriesMichal Marek
gen_init_cpio gets the current time and uses it for each symlink, special file, and directory. Grab the current time once and make it possible to override it with the KBUILD_BUILD_TIMESTAMP variable for reproducible builds. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18kbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macrosMichal Marek
Make it possible to override the user@host string displayed during boot and in /proc/version by the environment variables KBUILD_BUILD_USER and KBUILD_BUILD_HOST. Several distributions patch scripts/mkcompile_h to achieve this, so let's provide an official way. Also, document the KBUILD_BUILD_TIMESTAMP variable while at it. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18kbuild: Drop unused LINUX_COMPILE_TIME and LINUX_COMPILE_DOMAIN macrosMichal Marek
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18kbuild: Use the deterministic mode of arMichal Marek
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18kbuild: Call gzip with -nMichal Marek
The timestamps recorded in the .gz files add no value. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-22bloat-o-meter: include read-only data section in reportJean Delvare
I'm not sure why the read-only data section is excluded from the report, it seems as relevant as the other data sections (b and d). I've stripped the symbols starting with __mod_ as they can have their names dynamically generated and thus comparison between binaries is not possible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andi Kleen <andi@firstfloor.org> Acked-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22checkpatch: warn about memset with swapped argumentsDave Jones
Because the second and third arguments of memset have the same type, it turns out to be really easy to mix them up. This bug comes up time after time, so checkpatch should really be checking for it at patch submission time. Signed-off-by: Dave Jones <davej@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22scripts/checkpatch.pl: reset rpt_cleaners warningsMike Frysinger
If you run checkpatch against multiple patches, and one of them has a whitespace issue which can be helped via a script (rpt_cleaners), you will see the same NOTE over and over for all subsequent patches. It makes it seem like those patches also have whitespace problems when in reality, there's only one or two bad apples. So reset rpt_cleaners back to 0 after we've issued the note so that it only shows up near the patch with the actual problems. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22kstrto*: converting strings to integers done (hopefully) rightAlexey Dobriyan
1. simple_strto*() do not contain overflow checks and crufty, libc way to indicate failure. 2. strict_strto*() also do not have overflow checks but the name and comments pretend they do. 3. Both families have only "long long" and "long" variants, but users want strtou8() 4. Both "simple" and "strict" prefixes are wrong: Simple doesn't exactly say what's so simple, strict should not exist because conversion should be strict by default. The solution is to use "k" prefix and add convertors for more types. Enter kstrtoull() kstrtoll() kstrtoul() kstrtol() kstrtouint() kstrtoint() kstrtou64() kstrtos64() kstrtou32() kstrtos32() kstrtou16() kstrtos16() kstrtou8() kstrtos8() Include runtime testsuite (somewhat incomplete) as well. strict_strto*() become deprecated, stubbed to kstrto*() and eventually will be removed altogether. Use kstrto*() in code today! Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if they'll be unused at runtime. This is temporarily solution, because I don't want to hardcode list of archs where these functions aren't needed. Current solution with sizeof() and __alignof__ at least always works. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-22get_maintainer.pl: allow "K:" pattern tests to match non-patch textJoe Perches
Extend the usage of the K section in the MAINTAINERS file to support matching regular expressions to any arbitrary text that may precede the patch itself. For example, the commit message or mail headers generated by git-format-patch. Signed-off-by: Joe Perches <joe@perches.com> Original-patch-by: L. Alberto Giménez <agimenez@sysvalve.es> Acked-by: L. Alberto Giménez <agimenez@sysvalve.es> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-21Merge branch 'kbuild' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default genksyms: Regenerate lexer and parser genksyms: Track changes to enum constants genksyms: simplify usage of find_symbol() genksyms: Add helpers for building string lists genksyms: Simplify printing of symbol types genksyms: Simplify lexer genksyms: Do not paste the bison header file to lex.c modpost: fix trailing comma KBuild: silence "'scripts/unifdef' is up to date." kbuild: Add extra gcc checks kbuild: reenable section mismatch analysis unifdef: update to upstream version 2.5
2011-03-20Merge branch 'misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: scripts/extract-ikconfig: add xz compression support kbuild: add GNU GLOBAL tags generation setlocalversion: update mercurial tag parsing
2011-03-20Merge branch 'packaging' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: Add make tarxz-pkg build option
2011-03-17Merge branch 'genksyms-enum' into kbuild/kbuildMichal Marek
2011-03-17genksyms: Regenerate lexer and parserMichal Marek
Regenerated the parser after "genksyms: Track changes to enum constants". Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17genksyms: Track changes to enum constantsMichal Marek
Enum constants can be used as array sizes; if the enum itself does not appear in the symbol expansion, a change in the enum constant will go unnoticed. Example patch that changes the ABI but does not change the checksum with current genksyms: | enum e { | E1, | E2, |+ E3, | E_MAX | }; | | struct s { | int a[E_MAX]; | } | | int f(struct s *s) { ... } | EXPORT_SYMBOL(f) Therefore, remember the value of each enum constant and expand each occurence to <constant> <value>. The value is not actually computed, but instead an expression in the form (last explicitly assigned value) + N is used. This avoids having to parse and semantically understand whole of C. Note: The changes won't take effect until the lexer and parser are rebuilt by the next patch. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17genksyms: simplify usage of find_symbol()Michal Marek
Allow searching for symbols of an exact type. The lexer does this and a subsequent patch will add one more usage. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17genksyms: Add helpers for building string listsMichal Marek
Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17genksyms: Simplify printing of symbol typesMichal Marek
Instead of special-casing SYM_NORMAL, do not map any name to it. Also explicitly set the single-letter name of the symbol type, which will be needed by a further patch. The only user-visible change is one debug printf. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17genksyms: Simplify lexerMichal Marek
The V2_TOKENS state is active all the time. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17genksyms: Do not paste the bison header file to lex.cMichal Marek
The header is already #included, no need to include it a second time. lex.c_shipped was regenerated using flex-2.5.35. Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-03-17modpost: fix trailing commaRandy Dunlap
Consolidate locations that print a section whitelist into calls to print_section_list(). Fix print_section_list() so that it does not print a trailing comma & space: If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, becomes: If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-17KBuild: silence "'scripts/unifdef' is up to date."Mike Waychison
While changing our build system over to use the headers_install target as part of our klibc build, the following message started showing up in our logs: make[2]: `scripts/unifdef' is up to date. It turns out that the build blindly invokes a recursive make on this target, which causes make to emit this message when the target is already up to date. This isn't seen for most targets as the rest of the build relies primarily on the default target and on PHONY targets when invoking make recursively. Silence the above message when building unifdef as part of headers_install by hiding it behind a new PHONY target called "build_unifdef" that has an empty recipe. Signed-off-by: Mike Waychison <mikew@google.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-16Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (33 commits) AppArmor: kill unused macros in lsm.c AppArmor: cleanup generated files correctly KEYS: Add an iovec version of KEYCTL_INSTANTIATE KEYS: Add a new keyctl op to reject a key with a specified error code KEYS: Add a key type op to permit the key description to be vetted KEYS: Add an RCU payload dereference macro AppArmor: Cleanup make file to remove cruft and make it easier to read SELinux: implement the new sb_remount LSM hook LSM: Pass -o remount options to the LSM SELinux: Compute SID for the newly created socket SELinux: Socket retains creator role and MLS attribute SELinux: Auto-generate security_is_socket_class TOMOYO: Fix memory leak upon file open. Revert "selinux: simplify ioctl checking" selinux: drop unused packet flow permissions selinux: Fix packet forwarding checks on postrouting selinux: Fix wrong checks for selinux_policycap_netpeer selinux: Fix check for xfrm selinux context algorithm ima: remove unnecessary call to ima_must_measure IMA: remove IMA imbalance checking ...
2011-03-15Merge branch 'perf-core-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (184 commits) perf probe: Clean up probe_point_lazy_walker() return value tracing: Fix irqoff selftest expanding max buffer tracing: Align 4 byte ints together in struct tracer tracing: Export trace_set_clr_event() tracing: Explain about unstable clock on resume with ring buffer warning ftrace/graph: Trace function entry before updating index ftrace: Add .ref.text as one of the safe areas to trace tracing: Adjust conditional expression latency formatting. tracing: Fix event alignment: skb:kfree_skb tracing: Fix event alignment: mce:mce_record tracing: Fix event alignment: kvm:kvm_hv_hypercall tracing: Fix event alignment: module:module_request tracing: Fix event alignment: ftrace:context_switch and ftrace:wakeup tracing: Remove lock_depth from event entry perf header: Stop using 'self' perf session: Use evlist/evsel for managing perf.data attributes perf top: Don't let events to eat up whole header line perf top: Fix events overflow in top command ring-buffer: Remove unused #include <linux/trace_irq.h> tracing: Add an 'overwrite' trace_option. ...
2011-03-15Merge branch 'core-locking-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rtmutex: tester: Remove the remaining BKL leftovers lockdep/timers: Explain in detail the locking problems del_timer_sync() may cause rtmutex: Simplify PI algorithm and make highest prio task get lock rwsem: Remove redundant asmregparm annotation rwsem: Move duplicate function prototypes to linux/rwsem.h rwsem: Unify the duplicate rwsem_is_locked() inlines rwsem: Move duplicate init macros and functions to linux/rwsem.h rwsem: Move duplicate struct rwsem declaration to linux/rwsem.h x86: Cleanup rwsem_count_t typedef rwsem: Cleanup includes locking: Remove deprecated lock initializers cred: Replace deprecated spinlock initialization kthread: Replace deprecated spinlock initialization xtensa: Replace deprecated spinlock initialization um: Replace deprecated spinlock initialization sparc: Replace deprecated spinlock initialization mips: Replace deprecated spinlock initialization cris: Replace deprecated spinlock initialization alpha: Replace deprecated spinlock initialization rtmutex-tester: Remove BKL tests
2011-03-16Merge branch 'next' into for-linusJames Morris
2011-03-13kbuild: Fix computing srcversion for modulesMichal Marek
Recent change to fixdep: commit b7bd182176960fdd139486cadb9962b39f8a2b50 Author: Michal Marek <mmarek@suse.cz> Date: Thu Feb 17 15:13:54 2011 +0100 fixdep: Do not record dependency on the source file itself changed the format of the *.cmd files without realizing that it is also used by modpost. Put the path to the source file to the file back, in a special variable, so that modpost sees all source files when calculating srcversion for modules. Reported-and-tested-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-10ftrace: Add .ref.text as one of the safe areas to traceSteven Rostedt
The section .ref.text will not go away unexpectedly and is safe to trace. Add it to the safe list of sections to allow tracing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-03-09kbuild: Add make tarxz-pkg build optionZdenek Kaspar
Signed-off-by: Zdenek Kaspar <zkaspar82@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-09Merge commit 'v2.6.38-rc1' into kbuild/packagingMichal Marek
2011-03-09kbuild: Add extra gcc checksBorislav Petkov
Add a 'W=1' Makefile switch which adds additional checking per build object. The idea behind this option is targeted at developers who, in the process of writing their code, want to do the occasional make W=1 [target.o] and let gcc do more extensive code checking for them. Then, they could eyeball the output for valid gcc warnings about various bugs/discrepancies which are not reported during the normal build process. For more background information and a use case, read through this thread: http://marc.info/?l=kernel-janitors&m=129802065918147&w=2 Cc: Michal Marek <mmarek@suse.cz> Cc: linux-kbuild@vger.kernel.org Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-08Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into nextJames Morris
2011-03-04Merge branch 'perf/urgent' into perf/coreIngo Molnar
Merge reason: Pick up updates before queueing up dependent patches. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-03-03SELinux: Auto-generate security_is_socket_classHarry Ciao
The security_is_socket_class() is auto-generated by genheaders based on classmap.h to reduce maintenance effort when a new class is defined in SELinux kernel. The name for any socket class should be suffixed by "socket" and doesn't contain more than one substr of "socket". Signed-off-by: Harry Ciao <qingtao.cao@windriver.com> Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
2011-02-22rtmutex: tester: Remove the remaining BKL leftoversThomas Gleixner
We just leave the numbers assinged as commemoration and in case that someone was crazy enough to reimplement the test stuff out of tree. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-02-21fixdep: Do not record dependency on the source file itselfMichal Marek
The dependency is already expressed by the Makefiles, storing it in the .cmd file breaks build if a .c file is replaced by .S or vice versa, because the .cmd file contains foo/bar.o: foo/bar.c ... foo/bar.c ... : so the foo/bar.c -> foo/bar.o rule triggers even if there is no foo/bar.c anymore. Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-02-17Merge branch 'tip/perf/core' of ↵Ingo Molnar
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
2011-02-16Merge commit 'v2.6.38-rc5' into core/lockingIngo Molnar
Merge reason: pick up upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-02-10scripts/extract-ikconfig: add xz compression supportDick Streefland
Add support for kernels compressed with xz to the extract-ikconfig script. Signed-off-by: Dick Streefland <dick@streefland.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-02-08trivial: Fix Steven's Copyright typosUwe Kleine-König
OK, the copyright allows you to write a copy, still I think the lawyers prefer the correct spelling. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> LKML-Reference: <1295899921-11333-1-git-send-email-u.kleine-koenig@pengutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-02-04Merge branch 'kbuild/packaging' into kbuild/rc-fixesMichal Marek