aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2016-10-01Coccinelle: limit memdup_user transformation to GFP_KERNEL caseJulia Lawall1-4/+4
Memdup_user encapsulates a memory allocation with the flag GFP_KERNEL, so only allow this flag in the original code. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-09-28scripts/recordmcount.c: account for .softirqentry.textDmitry Vyukov2-0/+2
be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections") added .softirqentry.text section, but it was not added to recordmcount. So functions in the section are untracable. Add the section to scripts/recordmcount.c and scripts/recordmcount.pl. Fixes: be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Dmitry Vyukov <[email protected]> Acked-by: Steve Rostedt <[email protected]> Cc: <[email protected]> [4.6+] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-09-23initramfs: Escape colons in depfileMichal Marek1-1/+4
Special characters are problematic in depfiles, but we can fix colons easily. Reported-by: Florian Fainelli <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-09-21ftrace/scripts: Add helper script to bisect function tracing problem functionsSteven Rostedt (Red Hat)1-0/+115
Every so often, with a special config or a architecture change, running function or function_graph tracing can cause the machien to hard reboot, crash, or simply hard lockup. There's some functions in the function graph tracer that can not be traced otherwise it causes the function tracer to recurse before the recursion protection mechanisms are in place. When this occurs, using the dynamic ftrace featuer that allows limiting what actually gets traced can be used to bisect down to the problem function. This adds a script that helps with this process in the scripts/tracing directory, called ftrace-bisect.sh The set up is to read all the functions that can be traced from available_filter_functions into a file (full_file). Then run this script passing it the full_file and a "test_file" and "non_test_file", where the test_file will be add to set_ftrace_filter. What ftarce_bisect.sh does, is to copy half of the functions in full_file into the test_file and the other half into the non_test_file. This way, one can cat the test_file into the set_ftrace_filter functions and only test the functions that are in that file. If it works, then we run the process again after copying non_test_file to full_file and repeating the process. If the system crashed, then the bad function is in the test_file and after a reboot, the test_file becomes the new full_file in the next iteration. When we get down to a single function in the full_file, then ftrace_bisect.sh will report that as the bad function. Full documentation of how to use this simple script is within the script file itself. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Steven Rostedt <[email protected]>
2016-09-20ubsan: allow to disable the null sanitizerChristian Borntraeger1-1/+4
Some architectures use a hardware defined structure at address zero. Checking for a null pointer will result in many ubsan reports. Allow users to disable the null sanitizer. Signed-off-by: Christian Borntraeger <[email protected]> Acked-by: Andrey Ryabinin <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2016-09-19scripts/faddr2line: improve on base path filtering a bitLinus Torvalds1-1/+1
Due to our compiler include directives, the build pathnames for header files often end up being of the form "$srcdir/./include/linux/xyz.h", which ends up having that extra "." path component after the build base in it. Teach faddr2line to skip that too, to make code generated in inline functions in header files match the filename for the regular C files. Rabin Vincent pointed out that I can't make a stricter regexp match by using the " at " prefix for the pathname, because that ends up being locale-dependent. But this does require that the path match be preceded by a space, to make it a bit more strict (that matters mainly if we didn't find any base_dir at all, and we only end up with the "./" part of the match) Acked-by: Josh Poimboeuf <[email protected]> Cc: Rabin Vincent <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-09-19scripts: add script for translating stack dump function offsetsJosh Poimboeuf1-0/+177
addr2line doesn't work with KASLR addresses. Add a basic addr2line wrapper script which takes the 'func+offset/size' format as input. Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-09-09kbuild: add arch specific post-link MakefileNicholas Piggin1-5/+9
Allow architectures to create arch/xxx/Makefile.postlink with targets for vmlinux, modules.ko, and clean, which will be invoked after final linking of vmlinux and modules. powerpc will use this to check vmlinux linker relocations for sanity, and may use it to fix up alternate instruction patch branch addresses. Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-09-09kbuild: allow architectures to use thin archives instead of ld -rStephen Rothwell2-15/+79
ld -r is an incremental link used to create built-in.o files in build subdirectories. It produces relocatable object files containing all its input files, and these are are then pulled together and relocated in the final link. Aside from the bloat, this constrains the final link relocations, which has bitten large powerpc builds with unresolvable relocations in the final link. Alan Modra has recommended the kernel use thin archives for linking. This is an alternative and means that the linker has more information available to it when it links the kernel. This patch enables a config option architectures can select, which causes all built-in.o files to be built as thin archives. built-in.o files in subdirectories do not get symbol table or index attached, which improves speed and size. The final link pass creates a built-in.o archive in the root output directory which includes the symbol table and index. The linker then uses takes this file to link. The --whole-archive linker option is required, because the linker now has visibility to every individual object file, and it will otherwise just completely avoid including those without external references (consider a file with EXPORT_SYMBOL or initcall or hardware exceptions as its only entry points). The traditional built works "by luck" as built-in.o files are large enough that they're going to get external references. However this optimisation is unpredictable for the kernel (due to above external references), ineffective at culling unused, and costly because the .o files have to be searched for references. Superior alternatives for link-time culling should be used instead. Build characteristics for inclink vs thinarc, on a small powerpc64le pseries VM with a modest .config: inclink thinarc sizes vmlinux 15 618 680 15 625 028 sum of all built-in.o 56 091 808 1 054 334 sum excluding root built-in.o 151 430 find -name built-in.o | xargs rm ; time make vmlinux real 22.772s 21.143s user 13.280s 13.430s sys 4.310s 2.750s - Final kernel pulled in only about 6K more, which shows how ineffective the object file culling is. - Build performance looks improved due to less pagecache activity. On IO constrained systems it could be a bigger win. - Build size saving is significant. Side note, the toochain understands archives, so there's some tricks, $ ar t built-in.o # list all files you linked with $ size built-in.o # and their sizes $ objdump -d built-in.o # disassembly (unrelocated) with filenames Implementation by sfr, minor tweaks by npiggin. Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-09-06docs: Special-case function-pointer parameters in kernel-docJonathan Corbet1-0/+2
Add yet another regex to kernel-doc to trap @param() references separately and not produce corrupt RST markup. Signed-off-by: Jonathan Corbet <[email protected]>
2016-09-06docs: make kernel-doc handle varargs properlyJonathan Corbet1-1/+2
As far as I can tell, the handling of "..." arguments has never worked right, so any documentation provided was ignored in favor of "variable arguments." This makes kernel-doc handle "@...:" as documented. It does *not* fix spots in kerneldoc comments that don't follow that convention, but they are no more broken than before. Signed-off-by: Jonathan Corbet <[email protected]>
2016-09-05Merge branch 'rc-fixes' of ↵Linus Torvalds1-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild fix from Michal Marek: "Fix for 'make deb-pkg'. The bug got introduced in v4.8-rc1" * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: builddeb: Skip gcc-plugins when not configured
2016-09-05Merge 4.8-rc5 into char-misc-nextGreg Kroah-Hartman3-11/+3
We want the fixes in here for merging and testing. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-01treewide: remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLEJoe Perches2-10/+0
It's been eliminated from the sources, remove it from everywhere else. Link: http://lkml.kernel.org/r/076eff466fd7edb550c25c8b25d76924ca0eba62.1472660229.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Jonathan Corbet <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-09-01docs-rst: kernel-doc: fix typedef output in RST formatMauro Carvalho Chehab1-10/+24
When using a typedef function like this one: typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle); The Sphinx C domain expects it to create a c:type: reference, as that's the way it creates the type references when parsing a c:function:: declaration. So, a declaration like: .. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle) Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`. So, when outputting such typedefs in RST format, we need to handle this special case, as otherwise it will produce those warnings: ./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc ./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc ./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc So, change the kernel-doc script to produce a RST output for the above typedef as: .. c:type:: v4l2_check_dv_timings_fnc **Typedef**: timings check callback **Syntax** ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);`` Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
2016-09-01docs-rst: improve typedef parserMauro Carvalho Chehab1-1/+3
Improve the parser to handle typedefs like: typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle); Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
2016-08-31ver_linux: rename ver_linux.awk to ver_linuxAlexander Kapshuk1-0/+0
ver_linux.awk renamed to ver_linux. Signed-off-by: Alexander Kapshuk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-31ver_linux: shell implementation removedAlexander Kapshuk1-193/+0
The shell implementation removed. To be replaced with an all-awk implementation via consecutive patch. Signed-off-by: Alexander Kapshuk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-31ver_linux: complete awk implementationAlexander Kapshuk1-0/+89
The algorithm that extracts the version number of the utility being queried, and prints the name of the utility and its version number is currently implemented in awk. The code is used throughout the script, making its use repetative. The proposed implementation confines the algorithm in question to a function, which makes the script easier to read overall, as well as considerably reduces the number of lines of code. Every attempt has been made to retain the look and the format generated by the current implementation. Signed-off-by: Alexander Kapshuk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-28checkkconfigsymbols: use arglist instead of cmd stringValentin Rothberg1-11/+16
Splitting a command string could lead to unintended arguments. Use an argument list in the execute() function instead. Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-28checkkconfigsymblos: consistent symbol terminologyValentin Rothberg1-67/+67
'symbol' and 'feature' are used synonymously to refer to Kconfig symbols (configs, menus, etc.). Use the term 'symbol' to have a consistent terminology and to make the code more comprehensible. Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-28checkkconfigsymbols.py: fix pylint and pep8 warningsValentin Rothberg1-10/+8
Fix pylint and pep8 warnings to have a consistent syntax and style. Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-28checkkconfigsymbols: use ArgumentParserValentin Rothberg1-73/+69
Replace the deprecated OptionParser with ArgumentParser, as recommended by pylint. Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-28checkkconfigsymbols.py: port to Python 3Valentin Rothberg1-16/+17
Python 2 is slowly dying, so port the script to Python 3. Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-27checkkconfigsymbols.py: avoid shell injectionValentin Rothberg1-5/+7
Use subprocess and set shell to False to avoid potential shell injections. Reported-by: Bernd Dietzel <[email protected]> Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-26get_maintainer: quiet noisy implicit -f vcs_file_exists checkingJoe Perches1-1/+3
Checking command line filenames that are outside the git tree can emit a noisy and confusing message. Quiet that message by redirecting stderr. Verify that the command was executed successfully. Fixes: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f") Link: http://lkml.kernel.org/r/1970a1d2fecb258e384e2e4fdaacdc9ccf3e30a4.1470955439.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Reported-by: Wolfram Sang <[email protected]> Tested-by: Wolfram Sang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-25kbuild: Regenerate genksyms lexerMichal Marek1-18/+17
Update the lexer after 4fab91605a6b ("kbuild: genksyms fix for typeof handling"). Signed-off-by: Michal Marek <[email protected]>
2016-08-25kbuild: genksyms fix for typeof handlingNicholas Piggin1-18/+17
The tokenizer misses counting an open-parenthesis when parsing a non-trivial typeof beginning with an open-parenthesis. This function in include/linux/ceph/libceph.h static type *lookup_##name(struct rb_root *root, typeof(((type *)0)->keyfld) key) When instantiated in net/ceph/mon_client.c, causes subsequent symbols including an EXPORT_SYMBOL in that file to be lost. Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-08-24docs-rst: kernel-doc: better output struct membersMauro Carvalho Chehab1-1/+1
Right now, for a struct, kernel-doc produces the following output: .. c:type:: struct v4l2_prio_state stores the priority states **Definition** :: struct v4l2_prio_state { atomic_t prios[4]; }; **Members** ``atomic_t prios[4]`` array with elements to store the array priorities Putting a member name in verbatim and adding a continuation line causes the LaTeX output to generate something like: item[atomic_t prios\[4\]] array with elements to store the array priorities Everything inside "item" is non-breakable, with may produce lines bigger than the column width. Also, for function members, like: int (* rx_read) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num); It puts the name of the member at the end, like: int (*) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num) read With is very confusing. The best is to highlight what really matters: the member name. is a secondary information. So, change kernel-doc, for it to produce the output on a different way: **Members** ``prios[4]`` array with elements to store the array priorities Also, as the type is not part of LaTeX "item[]", LaTeX will split it into multiple lines, if needed. So, both LaTeX/PDF and HTML outputs will look good. It should be noticed, however, that the way Sphinx LaTeX output handles things like: Foo bar is different than the HTML output. On HTML, it will produce something like: **Foo** bar While, on LaTeX, it puts both foo and bar at the same line, like: **Foo** bar Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
2016-08-24fixdep: faster CONFIG_ searchAlexey Dobriyan1-58/+28
Do you think kernel build is 100% dominated by gcc? You are wrong! One small utility called "fixdep" consistently manages to sneak into profile's first page (unless you have small monitor of course). The choke point is this clever code: for (; m < end; m++) { if (*m == INT_CONF) { p = (char *) m ; goto conf; } if (*m == INT_ONFI) { p = (char *) m-1; goto conf; } if (*m == INT_NFIG) { p = (char *) m-2; goto conf; } if (*m == INT_FIG_) { p = (char *) m-3; goto conf; } 4 branches per 4 characters is not fast. Use strstr(3), so that SSE2 etc can be used. With this patch, fixdep is so deep at the bottom, it is hard to find it. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-08-22doc-rst: Revert "kernel-doc: fix handling of address_space tags"Markus Heiser1-3/+0
This reverts commit a88b1672d4ddf9895eb53e6980926d5e960dea8e. From the origin comit log:: The RST cpp:function handler is very pedantic: it doesn't allow any macros like __user on it Since the kernel-doc parser does NOT make use of the cpp:domain, there is no need to change the kernel-doc parser eleminating the address_space tags. Signed-off-by: Markus Heiser <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
2016-08-18checkkconfigsymbols.py: add --no-color option, don't print color to non-TTYAndrew Donnellan1-2/+10
Only print the ANSI colour escape codes if stdout is a TTY. Useful if redirecting output to a file or piping to another script. Also add a new option, --no-color, if the user wants to disable colour output for whatever reason. Signed-off-by: Andrew Donnellan <[email protected]> Acked-by: Valentin Rothberg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-16builddeb: Skip gcc-plugins when not configuredKees Cook1-1/+3
When attempting to build a Debian kernel package, the "scripts/gcc-plugins" directory does not exist in the output tree unless CONFIG_GCC_PLUGINS=y. To avoid errors when not defined, this wraps the failing "find" in a config test. Reported-by: Frank Paulsen <[email protected]> Tested-by: Christian Kujau <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-08-10get_maintainer: Don't check if STDIN exists in a VCS repositoryJoe Perches1-1/+1
If get_maintainer is not given any filename arguments on the command line, the standard input is read for a patch. But checking if a VCS has a file named &STDIN is not a good idea and fails. Verify the nominal input file is not &STDIN before checking the VCS. Fixes: 4cad35a7ca69 ("get_maintainer.pl: reduce need for command-line option -f") Reported-by: Christopher Covington <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-08gcc-plugins: Add support for plugin subdirectoriesEmese Revfy2-4/+8
This adds support for building more complex gcc plugins that live in a subdirectory instead of just in a single source file. Reported-by: PaX Team <[email protected]> Signed-off-by: Emese Revfy <[email protected]> [kees: clarified commit message] Signed-off-by: Kees Cook <[email protected]>
2016-08-08gcc-plugins: Automate make rule generationEmese Revfy1-2/+1
There's no reason to repeat the same names in the Makefile when the .so files have already been listed. The .o list can be generated from them. Reported-by: PaX Team <[email protected]> Signed-off-by: Emese Revfy <[email protected]> [kees: clarified commit message] Signed-off-by: Kees Cook <[email protected]>
2016-08-08gcc-plugins: Add support for passing plugin argumentsEmese Revfy1-1/+1
The latent_entropy plugin needs to pass arguments, so this adds the support. Signed-off-by: Emese Revfy <[email protected]> Signed-off-by: Kees Cook <[email protected]>
2016-08-08gcc-plugins: abort builds cleanly when not supportedKees Cook2-9/+39
When the compiler doesn't support gcc plugins (either due to missing headers or too old a version), report the problem and abort the build instead of emitting a warning and letting the build founder with arcane compiler errors. Signed-off-by: Kees Cook <[email protected]>
2016-08-08kbuild: no gcc-plugins during cc-option testsEmese Revfy1-3/+7
The gcc-plugins arguments should not be included when performing cc-option tests. Steps to reproduce: 1) make mrproper 2) make defconfig 3) enable GCC_PLUGINS, GCC_PLUGIN_CYC_COMPLEXITY 4) enable FUNCTION_TRACER (it will select other options as well) 5) make && make modules Build errors: MODPOST 18 modules ERROR: "__fentry__" [net/netfilter/xt_nat.ko] undefined! ERROR: "__fentry__" [net/netfilter/xt_mark.ko] undefined! ERROR: "__fentry__" [net/netfilter/xt_addrtype.ko] undefined! ERROR: "__fentry__" [net/netfilter/xt_LOG.ko] undefined! ERROR: "__fentry__" [net/netfilter/nf_nat_sip.ko] undefined! ERROR: "__fentry__" [net/netfilter/nf_nat_irc.ko] undefined! ERROR: "__fentry__" [net/netfilter/nf_nat_ftp.ko] undefined! ERROR: "__fentry__" [net/netfilter/nf_nat.ko] undefined! Reported-by: Laura Abbott <[email protected]> Signed-off-by: Emese Revfy <[email protected]> [kees: renamed variable, clarified commit message] Signed-off-by: Kees Cook <[email protected]>
2016-08-07[kbuild] handle exports in lib-y objects reliablyAl Viro1-0/+20
Collect the symbols exported by anything that goes into lib.a and add an empty object (lib-exports.o) with explicit undefs for each of those to obj-y. That allows to relax the rules regarding the use of exports in lib-* objects - right now an object with export can be in lib-* only if we are guaranteed that there always will be users in built-in parts of the tree, otherwise it needs to be in obj-*. As the result, we have an unholy mix of lib- and obj- in lib/Makefile and (especially) in arch/*/lib/Makefile. Moreover, a change in generic part of the kernel can lead to mysteriously missing exports on some configs. With this change we don't have to worry about that anymore. One side effect is that built-in.o now pulls everything with exports from the corresponding lib.a (if such exists). That's exactly what we want for linking vmlinux and fortunately it's almost the only thing built-in.o is used in. arch/ia64/hp/sim/boot/bootloader is the only exception and it's easy to get rid of now - just turn everything in arch/ia64/lib into lib-* and don't bother with arch/ia64/lib/built-in.o anymore. [AV: stylistic fix from Michal folded in] Acked-by: Michal Marek <[email protected]> Signed-off-by: Al Viro <[email protected]>
2016-08-03Merge tag 'trace-v4.8-1' of ↵Linus Torvalds1-1/+8
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "A few updates and fixes: - move the suppressing of the __builtin_return_address >0 warning to the tracing directory only. - metag recordmcount fix for newer glibc's - two tracing histogram fixes that were reported by KASAN" * tag 'trace-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix use-after-free in hist_register_trigger() tracing: Fix use-after-free in hist_unreg_all/hist_enable_unreg_all Makefile: Mute warning for __builtin_return_address(>0) for tracing only ftrace/recordmcount: Work around for addition of metag magic but not relocations
2016-08-02Merge branch 'akpm' (patches from Andrew)Linus Torvalds3-10/+41
Merge yet more updates from Andrew Morton: - the rest of ocfs2 - various hotfixes, mainly MM - quite a bit of misc stuff - drivers, fork, exec, signals, etc. - printk updates - firmware - checkpatch - nilfs2 - more kexec stuff than usual - rapidio updates - w1 things * emailed patches from Andrew Morton <[email protected]>: (111 commits) ipc: delete "nr_ipc_ns" kcov: allow more fine-grained coverage instrumentation init/Kconfig: add clarification for out-of-tree modules config: add android config fragments init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig relay: add global mode support for buffer-only channels init: allow blacklisting of module_init functions w1:omap_hdq: fix regression w1: add helper macro module_w1_family w1: remove need for ida and use PLATFORM_DEVID_AUTO rapidio/switches: add driver for IDT gen3 switches powerpc/fsl_rio: apply changes for RIO spec rev 3 rapidio: modify for rev.3 specification changes rapidio: change inbound window size type to u64 rapidio/idt_gen2: fix locking warning rapidio: fix error handling in mbox request/release functions rapidio/tsi721_dma: advance queue processing from transfer submit call rapidio/tsi721: add messaging mbox selector parameter rapidio/tsi721: add PCIe MRRS override parameter rapidio/tsi721_dma: add channel mask and queue size parameters ...
2016-08-02kcov: allow more fine-grained coverage instrumentationVegard Nossum1-1/+1
For more targeted fuzzing, it's better to disable kernel-wide instrumentation and instead enable it on a per-subsystem basis. This follows the pattern of UBSAN and allows you to compile in the kcov driver without instrumenting the whole kernel. To instrument a part of the kernel, you can use either # for a single file in the current directory KCOV_INSTRUMENT_filename.o := y or # for all the files in the current directory (excluding subdirectories) KCOV_INSTRUMENT := y or # (same as above) ccflags-y += $(CFLAGS_KCOV) or # for all the files in the current directory (including subdirectories) subdir-ccflags-y += $(CFLAGS_KCOV) Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Vegard Nossum <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Quentin Casasnovas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: if no filenames then read stdinAllen Hubbe1-2/+2
If no filenames are given, then read the patch from stdin. Link: http://lkml.kernel.org/r/a8784f291ccb5067361992bf5d41ff6cfb0ce5cb.1469830917.git.allenbh@gmail.com Signed-off-by: Allen Hubbe <[email protected]> Acked-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: check signoff when reading stdinAllen Hubbe1-1/+3
Signoff was not checked if the filename is '-', indicating reading the patch from stdin. Commands such as the below would not warn about a missing signoff, because the patch filename is '-'. This change allows checkpatch to warn about a missing signoff, even if the input filename is '-', but only if the patch has a commit message. git show --pretty=email | scripts/checkpatch.pl - A more common use of checkpatch with stdin is for piping git diff through checkpatch. The diff output would not contain a commit message, and therefore it would not contain a signoff line. For this common use case, a warning should not be printed about the missing signoff. With this change we will only warn about a missing signoff if the input contains a commit message. git diff | scripts/checkpatch.pl - Before this patch, a workaround for the first command was to refer to stdin by a name other than '-'. The workaround is not an elegant solution, because elsewhere checkpatch uses the fact that filename equals '-', such as in setting '$vname' to 'Your patch' for stdin. The command below would report "/dev/stdin has style problems" instead of "Your patch has style problems." git show --pretty=email | scripts/checkpatch.pl /dev/stdin Link: http://lkml.kernel.org/r/48be31e414bddc65bccfa6b1322359be9ba032eb.1469670589.git.allenbh@gmail.com Signed-off-by: Allen Hubbe <[email protected]> Acked-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: improve 'bare use of' signed/unsigned types warningJoe Perches1-1/+1
Fix false positive warning of identifiers ending in signed with an = assignment of WARNING: Prefer 'signed int' to bare use of 'signed'. Link: http://lkml.kernel.org/r/6a0e24c3e9102337528ecfcbbe91a0eb5b4820ed.1469529497.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Reported-by: Alan Douglas <[email protected]> Acked-by: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: don't complain about BIT macro in uapiTomas Winkler1-2/+3
BIT macro cannot be exported to UAPI, don't complain about it. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Tomas Winkler <[email protected]> Acked-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: yet another commit id improvementJoe Perches1-2/+2
Using \b isn't good enough to isolate what appears to be a commit id in a commit message. Make sure there is a space or a quote like character after a continuous run of hexadecimal characters that could be a commit id. Link: http://lkml.kernel.org/r/fdd22b47463a21c21132edbb8aa35e372950a1e6.1468869915.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Cc: "Zhuo, Qiuxu" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: allow c99 style // commentsJoe Perches1-0/+6
Sanitise the lines that contain c99 comments so that the error doesn't get emitted. Link: http://lkml.kernel.org/r/d4d22c34ad7bcc1bceb52f0742f76b7a6d585235.1468368420.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-08-02checkpatch: skip long lines that use an EFI_GUID macroJoe Perches1-0/+4
These are also possible single line uses that exceed the generic maximum line length (typically 80 columns) Link: http://lkml.kernel.org/r/32a6a85fbd6161f1bb55ce176a464e44591afc5b.1468368420.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>