12 Jun, 2017

1 commit


05 Jun, 2017

1 commit


29 May, 2017

1 commit


22 May, 2017

1 commit


18 May, 2017

1 commit

  • Since commit 61562f981e92 ("uapi: export all arch specifics
    directories"), "make INSTALL_HDR_PATH=$root/usr headers_install"
    deletes standard glibc headers and others in $(root)/usr/include.

    The cause of the issue is that headers_install now starts descending
    from arch/$(hdr-arch)/include/uapi with $(root)/usr/include for its
    destination when installing asm headers. So, headers already there
    are assumed to be unwanted.

    When headers_install starts descending from include/uapi with
    $(root)/usr/include for its destination, it works around the problem
    by creating an dummy destination $(root)/usr/include/uapi, but this
    is tricky.

    To fix the problem in a clean way is to skip headers install/check
    in include/uapi and arch/$(hdr-arch)/include/uapi because we know
    there are only sub-directories in uapi directories. A good side
    effect is the empty destination $(root)/usr/include/uapi will go
    away.

    I am also removing the trailing slash in the headers_check target to
    skip checking in arch/$(hdr-arch)/include/uapi.

    Fixes: 61562f981e92 ("uapi: export all arch specifics directories")
    Reported-by: Dan Williams
    Signed-off-by: Masahiro Yamada
    Tested-by: Dan Williams
    Acked-by: Nicolas Dichtel

    Masahiro Yamada
     

14 May, 2017

1 commit


11 May, 2017

2 commits

  • …asahiroy/linux-kbuild

    Pull Kbuild UAPI updates from Masahiro Yamada:
    "Improvement of headers_install by Nicolas Dichtel.

    It has been long since the introduction of uapi directories, but the
    de-coupling of exported headers has not been completed. Headers listed
    in header-y are exported whether they exist in uapi directories or
    not. His work fixes this inconsistency.

    All (and only) headers under uapi directories are now exported. The
    asm-generic wrappers are still exceptions, but this is a big step
    forward"

    * tag 'kbuild-uapi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    arch/include: remove empty Kbuild files
    uapi: export all arch specifics directories
    uapi: export all headers under uapi directories
    smc_diag.h: fix include from userland
    btrfs_tree.h: fix include from userland
    uapi: includes linux/types.h before exporting files
    Makefile.headersinst: remove destination-y option
    Makefile.headersinst: cleanup input files
    x86: stop exporting msr-index.h to userland
    nios2: put setup.h in uapi
    h8300: put bitsperlong.h in uapi

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - improve Clang support

    - clean up various Makefiles

    - improve build log visibility (objtool, alpha, ia64)

    - improve compiler flag evaluation for better build performance

    - fix GCC version-dependent warning

    - fix genksyms

    * tag 'kbuild-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (23 commits)
    kbuild: dtbinst: remove unnecessary __dtbs_install_prep target
    ia64: beatify build log for gate.so and gate-syms.o
    alpha: make short build log available for division routines
    alpha: merge build rules of division routines
    alpha: add $(src)/ rather than $(obj)/ to make source file path
    Makefile: evaluate LDFLAGS_BUILD_ID only once
    objtool: make it visible in make V=1 output
    kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
    kbuild: Add support to generate LLVM assembly files
    kbuild: Add better clang cross build support
    kbuild: drop -Wno-unknown-warning-option from clang options
    kbuild: fix asm-offset generation to work with clang
    kbuild: consolidate redundant sed script ASM offset generation
    frv: Use OFFSET macro in DEF_*REG()
    kbuild: avoid conflict between -ffunction-sections and -pg on gcc-4.7
    kbuild: Consolidate header generation from ASM offset information
    kbuild: use -Oz instead of -Os when using clang
    kbuild, LLVMLinux: Add -Werror to cc-option to support clang
    Kbuild: make designated_init attribute fatal
    kbuild: drop unneeded patterns '.*.orig' and '.*.rej' from distclean
    ...

    Linus Torvalds
     

10 May, 2017

1 commit

  • This patch removes the need of subdir-y. Now all files/directories under
    arch//include/uapi/ are exported.

    The only change for userland is the layout of the command 'make
    headers_install_all': directories asm- are replaced by arch-/.
    Those new directories contains all files/directories of the specified arch.

    Note that only cris and tile have more directories than only asm:
    - arch-v[10|32] for cris;
    - arch for tile.

    Signed-off-by: Nicolas Dichtel
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     

09 May, 2017

1 commit

  • Add a top-level Makefile help target for Userspace tools.

    Also make each help "heading" end with a colon ':'.

    Link: http://lkml.kernel.org/r/55c986ff-3966-3e47-2984-7349da2cce51@infradead.org
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

03 May, 2017

2 commits

  • Evaluate LDFLAGS_BUILD_ID (which involves invoking the compiler) only
    once instead of over and over.

    This provides a ~20% reduction in null build time with x86 allnoconfig:

    $ make allnoconfig && make -j8
    $ perf stat -r5 -e sched:sched_process_exec make -j8
    - 2 119 sched:sched_process_exec
    + 1 878 sched:sched_process_exec

    - 1,238817018 seconds time elapsed
    + 0,971020553 seconds time elapsed

    Signed-off-by: Rabin Vincent
    Signed-off-by: Masahiro Yamada

    Rabin Vincent
     
  • Pull documentation update from Jonathan Corbet:
    "A reasonably busy cycle for documentation this time around. There is a
    new guide for user-space API documents, rather sparsely populated at
    the moment, but it's a start. Markus improved the infrastructure for
    converting diagrams. Mauro has converted much of the USB documentation
    over to RST. Plus the usual set of fixes, improvements, and tweaks.

    There's a bit more than the usual amount of reaching out of
    Documentation/ to fix comments elsewhere in the tree; I have acks for
    those where I could get them"

    * tag 'docs-4.12' of git://git.lwn.net/linux: (74 commits)
    docs: Fix a couple typos
    docs: Fix a spelling error in vfio-mediated-device.txt
    docs: Fix a spelling error in ioctl-number.txt
    MAINTAINERS: update file entry for HSI subsystem
    Documentation: allow installing man pages to a user defined directory
    Doc/PM: Sync with intel_powerclamp code behavior
    zr364xx.rst: usb/devices is now at /sys/kernel/debug/
    usb.rst: move documentation from proc_usb_info.txt to USB ReST book
    convert philips.txt to ReST and add to media docs
    docs-rst: usb: update old usbfs-related documentation
    arm: Documentation: update a path name
    docs: process/4.Coding.rst: Fix a couple of document refs
    docs-rst: fix usb cross-references
    usb: gadget.h: be consistent at kernel doc macros
    usb: composite.h: fix two warnings when building docs
    usb: get rid of some ReST doc build errors
    usb.rst: get rid of some Sphinx errors
    usb/URB.txt: convert to ReST and update it
    usb/persist.txt: convert to ReST and add to driver-api book
    usb/hotplug.txt: convert to ReST and add to driver-api book
    ...

    Linus Torvalds
     

01 May, 2017

1 commit


28 Apr, 2017

1 commit

  • The Linux Kernel relies on GCC's acceptance of inline assembly as an
    opaque object which will not have any validation performed on the content.
    The current behaviour in LLVM is to perform validation of the contents by
    means of parsing the input if the MC layer can handle it.

    Disable clangs integrated assembler and use the GNU assembler instead.

    Wording-mostly-from: Saleem Abdulrasool
    Signed-off-by: Michael Davidson
    Signed-off-by: Matthias Kaehlcke
    Signed-off-by: Masahiro Yamada

    Michael Davidson
     

25 Apr, 2017

1 commit


24 Apr, 2017

1 commit


23 Apr, 2017

2 commits

  • Add cross target to CC if using clang. Also add custom gcc toolchain
    path for fallback gcc tools.

    Clang will fallback to using things like ld, as, and libgcc if
    (respectively) one of the llvm linkers isn't available, the integrated
    assembler is turned off, or an appropriately cross-compiled version of
    compiler-rt isn't available. To this end, you can specify the path to
    this fallback gcc toolchain with GCC_TOOLCHAIN.

    Signed-off-by: Behan Webster
    Reviewed-by: Jan-Simon Möller
    Reviewed-by: Mark Charlebois
    Signed-off-by: Greg Hackmann
    Signed-off-by: Matthias Kaehlcke
    Signed-off-by: Masahiro Yamada

    Behan Webster
     
  • Since commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to
    cc-option to support clang"), cc-option and friends work nicely
    for clang.

    However, -Wno-unknown-warning-option makes clang happy with any
    unknown warning options even if -Werror is specified.

    Once -Wno-unknown-warning-option is added, any succeeding call of
    cc-disable-warning is evaluated positive, then unknown warning
    options are accepted. This should be dropped.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

18 Apr, 2017

1 commit

  • Arnd Bergmann reported:
    "When ftrace is enabled and we build with gcc-4.7 or older, we
    get a warning for each file on architectures that select
    CONFIG_LD_DEAD_CODE_DATA_ELIMINATION:

    warning: -ffunction-sections disabled; it makes profiling impossible [enabled by default]
    "

    Since commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to
    cc-option to support clang"), warnings are treated as errors in
    cc-option checks. CC_FLAGS_FTRACE is blindly added to KBUILD_CFLAGS,
    so $(call cc-option,-ffunction-sections,) should be moved below it
    in order to detect the conflict between the two options.

    Reported-by: Arnd Bergmann
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

17 Apr, 2017

1 commit


13 Apr, 2017

1 commit


10 Apr, 2017

1 commit


05 Apr, 2017

1 commit

  • …masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - hand-off primary maintainership of Kbuild

    - fix build warnings

    - fix build error when GCOV is enabled with old compiler

    - fix HAVE_ASM_GOTO check when GCC plugin is enabled

    * tag 'kbuild-fixes-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    gconfig: remove misleading parentheses around a condition
    jump label: fix passing kbuild_cflags when checking for asm goto support
    Kbuild: use cc-disable-warning consistently for maybe-uninitialized
    kbuild: external module build warnings when KBUILD_OUTPUT set and W=1
    MAINTAINERS: add Masahiro Yamada as a Kbuild maintainer

    Linus Torvalds
     

03 Apr, 2017

1 commit


31 Mar, 2017

1 commit


27 Mar, 2017

1 commit


22 Mar, 2017

2 commits

  • If a structure is marked with __attribute__((designated_init)) from
    GCC or Sparse, it needs to have all static initializers using designated
    initialization. Fail the build for any missing cases. This attribute will
    be used by the randstruct plugin to make sure randomized structures are
    being correctly initialized.

    Signed-off-by: Kees Cook
    Signed-off-by: Masahiro Yamada

    Kees Cook
     
  • The latest change of asm goto support check added passing of KBUILD_CFLAGS
    to compiler. When these flags reference gcc plugins that are not built yet,
    the check fails.

    When one runs "make bzImage" followed by "make modules", the kernel is always
    built with HAVE_JUMP_LABEL disabled, while the modules are built depending on
    CONFIG_JUMP_LABEL. If HAVE_JUMP_LABEL macro happens to be different, modules
    are built with undefined references, e.g.:

    ERROR: "static_key_slow_inc" [net/netfilter/xt_TEE.ko] undefined!
    ERROR: "static_key_slow_dec" [net/netfilter/xt_TEE.ko] undefined!
    ERROR: "static_key_slow_dec" [net/netfilter/nft_meta.ko] undefined!
    ERROR: "static_key_slow_inc" [net/netfilter/nft_meta.ko] undefined!
    ERROR: "nf_hooks_needed" [net/netfilter/ipvs/ip_vs.ko] undefined!
    ERROR: "nf_hooks_needed" [net/ipv6/ipv6.ko] undefined!
    ERROR: "static_key_count" [net/ipv6/ipv6.ko] undefined!
    ERROR: "static_key_slow_inc" [net/ipv6/ipv6.ko] undefined!

    This change moves the check before all these references are added
    to KBUILD_CFLAGS. This is correct because subsequent KBUILD_CFLAGS
    modifications are not relevant to this check.

    Reported-by: Anton V. Boyarshinov
    Fixes: 35f860f9ba6a ("jump label: pass kbuild_cflags when checking for asm goto support")
    Cc: stable@vger.kernel.org # v4.10
    Signed-off-by: Gleb Fotengauer-Malinovskiy
    Signed-off-by: Dmitry V. Levin
    Acked-by: Steven Rostedt (VMware)
    Acked-by: David Lin
    Signed-off-by: Masahiro Yamada

    Gleb Fotengauer-Malinovskiy
     

20 Mar, 2017

1 commit


17 Mar, 2017

1 commit

  • In commit a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning
    for "make W=1""), I reverted another change that happened to fix a problem
    with old compilers, and now we get this report again with old compilers
    (prior to gcc-4.8) and GCOV enabled:

    cc1: warnings being treated as errors
    drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page':
    drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function
    At top level:
    >> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

    The problem is that we turn off the warning conditionally in a number
    of places as we should, but one of them does it unconditionally.
    Instead, change it to call cc-disable-warning as we do elsewhere.

    The original patch that caused it was merged into linux-4.7, then
    4.8 removed the change and 4.9 brought it back, so we probably want
    a backport to 4.9 once this is merged.

    Use a ':=' assignment instead of '=' to force the cc-disable-warning
    call to only be evaluated once instead of every time.

    Cc: stable@vger.kernel.org
    Fixes: a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"")
    Fixes: e72e2dfe7c16 ("gcov: disable -Wmaybe-uninitialized warning")
    Reported-by: kbuild test robot
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Masahiro Yamada

    Arnd Bergmann
     

15 Mar, 2017

1 commit


13 Mar, 2017

1 commit


11 Mar, 2017

1 commit


06 Mar, 2017

1 commit


01 Mar, 2017

1 commit

  • Pull objtool fixes from Ingo Molnar:
    "A handful of objtool fixes related to unreachable code, plus a build
    fix for out of tree modules"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    objtool: Enclose contents of unreachable() macro in a block
    objtool: Prevent GCC from merging annotate_unreachable()
    objtool: Improve detection of BUG() and other dead ends
    objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules

    Linus Torvalds
     

23 Feb, 2017

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "A slightly quieter cycle for documentation this time around.

    Three more DocBook template files have been converted to RST; only 21
    to go. There are various build improvements and the usual array of
    documentation improvements and fixes"

    * tag 'docs-4.11' of git://git.lwn.net/linux: (44 commits)
    docs / driver-api: Fix structure references in device_link.rst
    PM / docs: Fix structure references in device.rst
    Add a target to check broken external links in the Documentation
    Documentation: Fix linux-api list typo
    Documentation: DocBook/Makefile comment typo
    Improve sparse documentation
    Documentation: make Makefile.sphinx no-ops quieter
    Documentation: DMA-ISA-LPC.txt
    Documentation: input: fix path to input code definitions
    docs: Remove the copyright year from conf.py
    docs: Fix a warning in the Korean HOWTO.rst translation
    PM / sleep / docs: Convert PM notifiers document to reST
    PM / core / docs: Convert sleep states API document to reST
    PM / core: Update kerneldoc comments in pm.h
    doc-rst: Fix recursive make invocation from macros
    doc-rst: Delete output of failed dot-SVG conversion
    doc-rst: Break shell command sequences on failure
    Documentation/sphinx: make targets independent of Sphinx work for HAVE_SPHINX=0
    doc-rst: fixed cleandoc target when used with O=dir
    Documentation/sphinx: prevent generation of .pyc files in the source tree
    ...

    Linus Torvalds
     

21 Feb, 2017

1 commit

  • Pull perf updates from Ingo Molnar:
    "On the kernel side the main changes in this cycle were:

    - Add Intel Kaby Lake CPU support (Srinivas Pandruvada)

    - AMD uncore driver updates for fam17 (Janakarajan Natarajan)

    - Intel/PT updates and core events optimizations and cleanups
    (Alexander Shishkin)

    - cgroups events fixes (David Carrillo-Cisneros)

    - kprobes improvements (Masami Hiramatsu)

    - ... plus misc fixes and updates.

    On the tooling side the main changes were:

    - Support clang build in tools/{perf,lib/{bpf,traceevent,api}} with
    CC=clang, to, for instance, take advantage of better warnings
    (Arnaldo Carvalho de Melo):

    - Introduce the 'delta-abs' 'perf diff' compute method, that orders
    the histogram entries by the absolute value of the percentage delta
    for a function in two perf.data files, i.e. the functions that
    changed the most (increase or decrease in samples) comes first
    (Namhyung Kim)

    - Add support for parsing Intel uncore vendor event files and add
    uncore vendor events for the Intel server processors (Haswell,
    Broadwell, IvyBridge), Xeon Phi (Knights Landing) and Broadwell DE
    (Andi Kleen)

    - Introduce 'perf ftrace' a perf front end to the kernel's ftrace
    function and function_graph tracer, defaulting to the
    "function_graph" tracer, more work will be done in reviving this
    effort, forward porting it from its initial patch submission
    (Namhyung Kim)

    - Add 'e' and 'c' hotkeys to expand/collapse call chains for a single
    hist entry in the 'perf report' and 'perf top' TUI (Jiri Olsa)

    - Account thread wait time (off CPU time) separately: sleep, iowait
    and preempt, based on the prev_state of the last event, show the
    breakdown when using "perf sched timehist --state" (Namhyumg Kim)

    - Add more triggers to switch the output file (perf.data.TIMESTAMP).

    Now, in addition to switching to a different output file when
    receiving a SIGUSR2, one can also specify file size and time based
    triggers:

    perf record -a --switch-output=signal

    is equivalent to what we had before:

    perf record -a --switch-output

    While we can also ask for the file to be "sliced" by size, taking
    into account that that will happen only when we get woken up by the
    kernel, i.e. one has to take into account the --mmap-pages (the
    size of the perf mmap ring buffer):

    perf record -a --switch-output=2G

    will break the perf.data output into multiple files limited to 2GB
    of samples, right when generating the output.

    For time based samples, alert() will be used, so to have 1 minute
    limited perf.data output files:

    perf record -a --switch-output=1m

    (Jiri Olsa)

    - Improve 'perf trace' (Arnaldo Carvalho de Melo)

    - 'perf kallsyms' toy tool to look for extended symbol information on
    the running kernel and demonstrate the machine/thread/symbol APIs
    for use in other tools, such as 'perf probe' (Arnaldo Carvalho de
    Melo)

    - ... plus tons of other changes, see the shortlog and Git log for
    details"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (131 commits)
    perf tools: Add missing parse_events_error() prototype
    perf pmu: Fix check for unset alias->unit array
    perf tools: Be consistent on the type of map->symbols[] interator
    perf intel pt decoder: clang has no -Wno-override-init
    perf evsel: Do not put a variable sized type not at the end of a struct
    perf probe: Avoid accessing uninitialized 'map' variable
    perf tools: Do not put a variable sized type not at the end of a struct
    perf record: Do not put a variable sized type not at the end of a struct
    perf tests: Synthesize struct instead of using field after variable sized type
    perf bench numa: Make sure dprintf() is not defined
    Revert "perf bench futex: Sanitize numeric parameters"
    tools lib subcmd: Make it an error to pass a signed value to OPTION_UINTEGER
    tools: Set the maximum optimization level according to the compiler being used
    tools: Suppress request for warning options not existent in clang
    samples/bpf: Reset global variables
    samples/bpf: Ignore already processed ELF sections
    samples/bpf: Add missing header
    perf symbols: dso->name is an array, no need to check it against NULL
    perf tests record: No need to test an array against NULL
    perf symbols: No need to check if sym->name is NULL
    ...

    Linus Torvalds
     

20 Feb, 2017

2 commits

  • When building a CONFIG_STACK_VALIDATION enabled kernel without the
    libelf devel package installed, the Makefile prints a warning:

    "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel"

    But when building an out-of-tree module, the warning doesn't show.
    Instead it tries to use objtool, and the build fails with:

    /bin/sh: ./tools/objtool/objtool: No such file or directory

    Make sure the warning and the disabling of objtool occur in all cases,
    by moving the CONFIG_STACK_VALIDATION checks outside the 'ifeq
    ($(KBUILD_EXTMOD),)' block in the Makefile.

    Tested-By: Marc MERLIN
    Suggested-by: Jessica Yu
    Reported-by: Marc MERLIN
    Signed-off-by: Josh Poimboeuf
    Reviewed-by: Jessica Yu
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: 3b27a0c85d70 ("objtool: Detect and warn if libelf is missing and don't break the build")
    Link: http://lkml.kernel.org/r/b3088ae4a8698143d4851965793c61fec2135b1f.1487182864.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar

    Josh Poimboeuf
     
  • Linus Torvalds
     

16 Feb, 2017

1 commit

  • Documentation shouldn't have broken links.
    sphinx linkcheck builder scans all documents for external links, tries
    to open them with urllib2, and writes an overview which ones are broken
    and redirected to standard output and to output.txt in the output
    directory.

    Reviewed-by: Jani Nikula
    Tested-by: Jani Nikula
    Signed-off-by: Rémy Léone
    Signed-off-by: Jonathan Corbet

    Rémy Léone