17 Nov, 2013

1 commit

  • 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

    Linus Torvalds
     

16 Nov, 2013

3 commits

  • 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

    Linus Torvalds
     
  • 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

    Linus Torvalds
     
  • 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

    Linus Torvalds
     

15 Nov, 2013

1 commit

  • 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.

    Linus Torvalds
     

13 Nov, 2013

16 commits

  • 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
    Cc: Andi Kleen
    Cc: Joe Mario
    Signed-off-by: Michal Marek

    Michal Marek
     
  • 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
    Cc: Rob Landley
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Berg
     
  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    P J P
     
  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe 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
    Cc: "Dixit, Ashutosh"
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe 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
    Tested-by: David Cohen
    Acked-by: David Cohen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • 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
    Acked-by: Greg Kroah-Hartman
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • 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
    Suggested-by: Peter Zijlstra
    Acked-by: Peter Zijlstra
    Acked-by: Paul E. McKenney
    Cc: Oliver Neukum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe 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
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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
    Suggested-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Checkpatch doesn't currently find CamelCase definitions of structs, unions
    or enums.

    Add that ability.

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe 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
    Suggested-by: Sarah Sharp
    Suggested-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe 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
    Reviewed-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • 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
    Cc: Al Viro
    Cc: Geert Uytterhoeven
    Cc: Tetsuo Handa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • 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
    Cc: Rusty Russell
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jamie Iles
     

08 Nov, 2013

2 commits


07 Nov, 2013

8 commits

  • When building perf out of tree:

    $ make perf-tar-src-pkg
    $ tar -xf perf-.tar -C /tmp
    $ cd /tmp/perf
    $ 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
    Suggested-by: Ingo Molnar
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/1383753335-25782-1-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Josh 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Josh Triplett
     
  • 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
    Tested-by: The Awesome Power Of linux-next
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • 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
    Signed-off-by: Michal Marek

    Kees Cook
     
  • 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
    Signed-off-by: Michal Marek

    Andi Kleen
     
  • Also warn for too long symbols

    v2: Add missing newline. Use 255 max (Joe Perches)
    Signed-off-by: Andi Kleen
    Signed-off-by: Michal Marek

    Andi Kleen
     
  • 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
    Cc: Mark Brown
    Signed-off-by: Michal Marek

    Randy Dunlap
     

06 Nov, 2013

1 commit

  • 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
    Signed-off-by: Steven Rostedt

    Jamie Iles
     

02 Nov, 2013

1 commit

  • 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
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Michal Marek
    Signed-off-by: Ming Lei
    Signed-off-by: Rusty Russell
    Cc: stable@vger.kernel.org

    Ming Lei
     

31 Oct, 2013

1 commit


29 Oct, 2013

1 commit


23 Oct, 2013

3 commits


09 Oct, 2013

2 commits

  • 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
    Reviewed-by: "Yann E. MORIN"
    Tested-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Ben Hutchings
     
  • 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
    Acked-by: Wang YanQing
    Acked-by: Benjamin Poirier
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Martin Walch