05 Oct, 2016

2 commits

  • Pull s390 updates from Martin Schwidefsky:
    "The new features and main improvements in this merge for v4.9

    - Support for the UBSAN sanitizer

    - Set HAVE_EFFICIENT_UNALIGNED_ACCESS, it improves the code in some
    places

    - Improvements for the in-kernel fpu code, in particular the overhead
    for multiple consecutive in kernel fpu users is recuded

    - Add a SIMD implementation for the RAID6 gen and xor operations

    - Add RAID6 recovery based on the XC instruction

    - The PCI DMA flush logic has been improved to increase the speed of
    the map / unmap operations

    - The time synchronization code has seen some updates

    And bug fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits)
    s390/con3270: fix insufficient space padding
    s390/con3270: fix use of uninitialised data
    MAINTAINERS: update DASD maintainer
    s390/cio: fix accidental interrupt enabling during resume
    s390/dasd: add missing \n to end of dev_err messages
    s390/config: Enable config options for Docker
    s390/dasd: make query host access interruptible
    s390/dasd: fix panic during offline processing
    s390/dasd: fix hanging offline processing
    s390/pci_dma: improve lazy flush for unmap
    s390/pci_dma: split dma_update_trans
    s390/pci_dma: improve map_sg
    s390/pci_dma: simplify dma address calculation
    s390/pci_dma: remove dma address range check
    iommu/s390: simplify registration of I/O address translation parameters
    s390: migrate exception table users off module.h and onto extable.h
    s390: export header for CLP ioctl
    s390/vmur: fix irq pointer dereference in int handler
    s390/dasd: add missing KOBJ_CHANGE event for unformatted devices
    s390: enable UBSAN
    ...

    Linus Torvalds
     
  • Pull documentation updates from Jonathan Corbet:
    "This is the documentation update pull for the 4.9 merge window.

    The Sphinx transition is still creating a fair amount of work. Here we
    have a number of fixes and, importantly, a proper PDF output solution,
    thanks to Jani Nikula, Mauro Carvalho Chehab and Markus Heiser.

    I've started a couple of new books: a driver API book (based on the
    old device-drivers.tmpl) and a development tools book. Both are meant
    to show how we can integrate together our existing documentation into
    a more coherent and accessible whole. It involves moving some stuff
    around and formatting changes, but, I think, the results are worth it.
    The good news is that most of our existing Documentation/*.txt files
    are *almost* in RST format already; the amount of messing around
    required is minimal.

    And, of course, there's the usual set of updates, typo fixes, and
    more"

    * tag 'docs-4.9' of git://git.lwn.net/linux: (120 commits)
    URL changed for Linux Foundation TAB
    dax : Fix documentation with respect to struct pages
    iio: Documentation: Correct the path used to create triggers.
    docs: Remove space-before-label guidance from CodingStyle
    docs-rst: add inter-document cross references
    Documentation/email-clients.txt: convert it to ReST markup
    Documentation/kernel-docs.txt: reorder based on timestamp
    Documentation/kernel-docs.txt: Add dates for online docs
    Documentation/kernel-docs.txt: get rid of broken docs
    Documentation/kernel-docs.txt: move in-kernel docs
    Documentation/kernel-docs.txt: remove more legacy references
    Documentation/kernel-docs.txt: add two published books
    Documentation/kernel-docs.txt: sort books per publication date
    Documentation/kernel-docs.txt: adjust LDD references
    Documentation/kernel-docs.txt: some improvements on the ReST output
    Documentation/kernel-docs.txt: Consistent indenting: 4 spaces
    Documentation/kernel-docs.txt: Add 4 paper/book references
    Documentation/kernel-docs.txt: Improve layouting of book list
    Documentation/kernel-docs.txt: Remove offline or outdated entries
    docs: Clean up bare :: lines
    ...

    Linus Torvalds
     

04 Oct, 2016

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the "big" char and misc driver update for 4.9-rc1.

    Lots of little things here, all over the driver tree for subsystems
    that flow through me. Nothing major that I can discern, full details
    are in the shortlog.

    All have been in the linux-next tree with no reported issues"

    * tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (144 commits)
    drivers/misc/hpilo: Changes to support new security states in iLO5 FW
    at25: fix debug and error messaging
    misc/genwqe: ensure zero initialization
    vme: fake: remove unexpected unlock in fake_master_set()
    vme: fake: mark symbols static where possible
    spmi: pmic-arb: Return an error code if sanity check fails
    Drivers: hv: get rid of id in struct vmbus_channel
    Drivers: hv: make VMBus bus ids persistent
    mcb: Add a dma_device to mcb_device
    mcb: Enable PCI bus mastering by default
    mei: stop the stall timer worker if not needed
    clk: probe common clock drivers earlier
    vme: fake: fix build for 64-bit dma_addr_t
    ttyprintk: Neaten and simplify printing
    mei: me: add kaby point device ids
    coresight: tmc: mark symbols static where possible
    coresight: perf: deal with error condition properly
    Drivers: hv: hv_util: Avoid dynamic allocation in time synch
    fpga manager: Add hardware dependency to Zynq driver
    Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.
    ...

    Linus Torvalds
     

29 Sep, 2016

1 commit

  • 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/1474902626-73468-1-git-send-email-dvyukov@google.com
    Signed-off-by: Dmitry Vyukov
    Acked-by: Steve Rostedt
    Cc: [4.6+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Vyukov
     

20 Sep, 2016

3 commits

  • 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
    Acked-by: Andrey Ryabinin
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • 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
    Cc: Rabin Vincent
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • 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
    Signed-off-by: Linus Torvalds

    Josh Poimboeuf
     

06 Sep, 2016

3 commits


05 Sep, 2016

1 commit


02 Sep, 2016

1 commit


01 Sep, 2016

2 commits

  • 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
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • 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
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

31 Aug, 2016

3 commits

  • ver_linux.awk renamed to ver_linux.

    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     
  • The shell implementation removed. To be replaced with an all-awk implementation via consecutive patch.

    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     
  • 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
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     

28 Aug, 2016

5 commits


27 Aug, 2016

2 commits

  • Use subprocess and set shell to False to avoid potential shell
    injections.

    Reported-by: Bernd Dietzel
    Signed-off-by: Valentin Rothberg
    Signed-off-by: Greg Kroah-Hartman

    Valentin Rothberg
     
  • 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
    Reported-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

25 Aug, 2016

1 commit

  • 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
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

23 Aug, 2016

1 commit

  • 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
    Signed-off-by: Jonathan Corbet

    Markus Heiser
     

19 Aug, 2016

1 commit


16 Aug, 2016

1 commit

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

    Kees Cook
     

11 Aug, 2016

1 commit

  • 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
    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

09 Aug, 2016

5 commits

  • 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
    Signed-off-by: Emese Revfy
    [kees: clarified commit message]
    Signed-off-by: Kees Cook

    Emese Revfy
     
  • 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
    Signed-off-by: Emese Revfy
    [kees: clarified commit message]
    Signed-off-by: Kees Cook

    Emese Revfy
     
  • The latent_entropy plugin needs to pass arguments, so this adds the
    support.

    Signed-off-by: Emese Revfy
    Signed-off-by: Kees Cook

    Emese Revfy
     
  • 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

    Kees Cook
     
  • 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
    Signed-off-by: Emese Revfy
    [kees: renamed variable, clarified commit message]
    Signed-off-by: Kees Cook

    Emese Revfy
     

04 Aug, 2016

1 commit

  • 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

    Linus Torvalds
     

03 Aug, 2016

5 commits

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

    Linus Torvalds
     
  • 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/1464008380-11405-1-git-send-email-vegard.nossum@oracle.com
    Signed-off-by: Vegard Nossum
    Cc: Dmitry Vyukov
    Cc: Quentin Casasnovas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vegard Nossum
     
  • 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
    Acked-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Allen Hubbe
     
  • 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
    Acked-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Allen Hubbe
     
  • 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
    Reported-by: Alan Douglas
    Acked-by: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches