24 Jan, 2018

2 commits

  • commit 883d50f56d263f70fd73c0d96b09eb36c34e9305 upstream.

    Since kernel 4.9, the thread_info has been moved into task_struct, no
    longer locates at the bottom of kernel stack.

    See commits c65eacbe290b ("sched/core: Allow putting thread_info into
    task_struct") and 15f4eae70d36 ("x86: Move thread_info into
    task_struct").

    Before fix:
    (gdb) set $current = $lx_current()
    (gdb) p $lx_thread_info($current)
    $1 = {flags = 1470918301}
    (gdb) p $current.thread_info
    $2 = {flags = 2147483648}

    After fix:
    (gdb) p $lx_thread_info($current)
    $1 = {flags = 2147483648}
    (gdb) p $current.thread_info
    $2 = {flags = 2147483648}

    Link: http://lkml.kernel.org/r/20180118210159.17223-1-imxikangjie@gmail.com
    Fixes: 15f4eae70d36 ("x86: Move thread_info into task_struct")
    Signed-off-by: Xi Kangjie
    Acked-by: Jan Kiszka
    Acked-by: Kieran Bingham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Xi Kangjie
     
  • commit 2a0098d70640dda192a79966c14d449e7a34d675 upstream.

    Objtool segfaults when the gold linker is used with
    CONFIG_MODVERSIONS=y and CONFIG_UNWINDER_ORC=y.

    With CONFIG_MODVERSIONS=y, the .o file gets passed to the linker before
    being passed to objtool. The gold linker seems to strip unused ELF
    symbols by default, which confuses objtool and causes the seg fault when
    it's trying to generate ORC metadata.

    Objtool should really be running immediately after GCC anyway, without a
    linker call in between. Change the makefile ordering so that objtool is
    called before the linker.

    Reported-and-tested-by: Markus
    Signed-off-by: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder")
    Link: http://lkml.kernel.org/r/355f04da33581f4a3bf82e5b512973624a1e23a2.1516025651.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar
    Cc: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Josh Poimboeuf
     

25 Dec, 2017

2 commits

  • commit d15155824c5014803d91b829736d249c500bdda6 upstream.

    linux/compiler.h is included indirectly by linux/types.h via
    uapi/linux/types.h -> uapi/linux/posix_types.h -> linux/stddef.h
    -> uapi/linux/stddef.h and is needed to provide a proper definition of
    offsetof.

    Unfortunately, compiler.h requires a definition of
    smp_read_barrier_depends() for defining lockless_dereference() and soon
    for defining READ_ONCE(), which means that all
    users of READ_ONCE() will need to include asm/barrier.h to avoid splats
    such as:

    In file included from include/uapi/linux/stddef.h:1:0,
    from include/linux/stddef.h:4,
    from arch/h8300/kernel/asm-offsets.c:11:
    include/linux/list.h: In function 'list_empty':
    >> include/linux/compiler.h:343:2: error: implicit declaration of function 'smp_read_barrier_depends' [-Werror=implicit-function-declaration]
    smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \
    ^

    A better alternative is to include asm/barrier.h in linux/compiler.h,
    but this requires a type definition for "bool" on some architectures
    (e.g. x86), which is defined later by linux/types.h. Type "bool" is also
    used directly in linux/compiler.h, so the whole thing is pretty fragile.

    This patch splits compiler.h in two: compiler_types.h contains type
    annotations, definitions and the compiler-specific parts, whereas
    compiler.h #includes compiler-types.h and additionally defines macros
    such as {READ,WRITE.ACCESS}_ONCE().

    uapi/linux/stddef.h and linux/linkage.h are then moved over to include
    linux/compiler_types.h, which fixes the build for h8 and blackfin.

    Signed-off-by: Will Deacon
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1508840570-22169-2-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Will Deacon
     
  • commit 11af847446ed0d131cf24d16a7ef3d5ea7a49554 upstream.

    Rename the unwinder config options from:

    CONFIG_ORC_UNWINDER
    CONFIG_FRAME_POINTER_UNWINDER
    CONFIG_GUESS_UNWINDER

    to:

    CONFIG_UNWINDER_ORC
    CONFIG_UNWINDER_FRAME_POINTER
    CONFIG_UNWINDER_GUESS

    ... in order to give them a more logical config namespace.

    Suggested-by: Ingo Molnar
    Signed-off-by: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/73972fc7e2762e91912c6b9584582703d6f1b8cc.1507924831.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Josh Poimboeuf
     

14 Dec, 2017

3 commits

  • [ Upstream commit 606625be47bc87b6fab0af10cd57aaa675cb9e42 ]

    If "make rpm-pkg" or "make binrpm-pkg" is run with -j[jobs] option,
    the following warning message is displayed.

    warning: jobserver unavailable: using -j1. Add '+' to parent make rule.

    Follow the suggestion.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     
  • [ Upstream commit d7059ca0147adcd495f3c5b41f260e1ac55bb679 ]

    The command "make -j8 C=1 CHECK=scripts/coccicheck" produces
    lots of "coccicheck failed" error messages.

    Julia Lawall explained the Coccinelle behavior as follows:
    "The problem on the Coccinelle side is that it uses a subdirectory
    with the name of the semantic patch to store standard output and
    standard error for the different threads. I didn't want to use a
    name with the pid, so that one could easily find this information
    while Coccinelle is running. Normally the subdirectory is cleaned
    up when Coccinelle completes, so there is only one of them at a time.
    Maybe it is best to just add the pid. There is the risk that these
    subdirectories will accumulate if Coccinelle crashes in a way such
    that they don't get cleaned up, but Coccinelle could print a warning
    if it detects this case, rather than failing."

    When scripts/coccicheck is used as CHECK tool and -j option is given
    to Make, the whole of build process runs in parallel. So, multiple
    processes try to get access to the same subdirectory.

    I notice spatch creates the subdirectory only when it runs in parallel
    (i.e. --jobs is given and is greater than 1).

    Setting NPROC=1 is a reasonable solution; spatch does not create the
    subdirectory. Besides, ONLINE=1 mode takes a single file input for
    each spatch invocation, so there is no reason to parallelize it in
    the first place.

    Signed-off-by: Masahiro Yamada
    Acked-by: Julia Lawall
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     
  • [ Upstream commit 2dbc644ac62bbcb9ee78e84719953f611be0413d ]

    For rpm-pkg and deb-pkg, a source tar file is created. All paths in
    the archive must be prefixed with the base name of the tar so that
    everything is contained in the directory when you extract it.

    Currently, scripts/package/Makefile uses a symlink for that, and
    removes it after the tar is created.

    If you terminate the build during the tar creation, the symlink is
    left over. Then, at the next package build, you will see a warning
    like follows:

    ln: '.' and 'kernel-4.14.0+/.' are the same file

    It is possible to fix it by adding -n (--no-dereference) option to
    the "ln" command, but a cleaner way is to use --transform option
    of "tar" command. This option is GNU extension, but it should not
    hurt to use it in the Linux build system.

    The 'S' flag is needed to exclude symlinks from the path fixup.
    Without it, symlinks in the kernel are broken.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     

07 Nov, 2017

1 commit

  • Currently we are leaking addresses from the kernel to user space. This
    script is an attempt to find some of those leakages. Script parses
    `dmesg` output and /proc and /sys files for hex strings that look like
    kernel addresses.

    Only works for 64 bit kernels, the reason being that kernel addresses on
    64 bit kernels have 'ffff' as the leading bit pattern making greping
    possible. On 32 kernels we don't have this luxury.

    Scripts is _slightly_ smarter than a straight grep, we check for false
    positives (all 0's or all 1's, and vsyscall start/finish addresses).

    [ I think there is a lot of room for improvement here, but it's already
    useful, so I'm merging it as-is. The whole "hash %p format" series is
    expected to go into 4.15, but will not fix %x users, and will not
    incentivize people to look at what they are leaking. - Linus ]

    Signed-off-by: Tobin C. Harding
    Signed-off-by: Linus Torvalds

    Tobin C. Harding
     

03 Nov, 2017

2 commits

  • For some odd historical reason, we preprocessed the linker scripts with
    "-C", which keeps comments around. That makes no sense, since the
    comments are not meaningful for the build anyway.

    And it actually breaks things, since linker scripts can't have C++ style
    "//" comments in them, so keeping comments after preprocessing now
    limits us in odd and surprising ways in our header files for no good
    reason.

    The -C option goes back to pre-git and pre-bitkeeper times, but seems to
    have been historically used (along with "-traditional") for some
    odd-ball architectures (ia64, MIPS and SH). It probably didn't matter
    back then either, but might possibly have been used to minimize the
    difference between the original file and the pre-processed result.

    The reason for this may be lost in time, but let's not perpetuate it
    only because we can't remember why we did this crazy thing.

    This was triggered by the recent addition of SPDX lines to the source
    tree, where people apparently were confused about why header files
    couldn't use the C++ comment format.

    Cc: Thomas Gleixner
    Cc: Greg KH
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • …el/git/gregkh/driver-core

    Pull initial SPDX identifiers from Greg KH:
    "License cleanup: add SPDX license identifiers to some files

    Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the
    'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally
    binding shorthand, which can be used instead of the full boiler plate
    text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart
    and Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset
    of the use cases:

    - file had no licensing information it it.

    - file was a */uapi/* one with no licensing information in it,

    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to
    license had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied
    to a file was done in a spreadsheet of side by side results from of
    the output of two independent scanners (ScanCode & Windriver)
    producing SPDX tag:value files created by Philippe Ombredanne.
    Philippe prepared the base worksheet, and did an initial spot review
    of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537
    files assessed. Kate Stewart did a file by file comparison of the
    scanner results in the spreadsheet to determine which SPDX license
    identifier(s) to be applied to the file. She confirmed any
    determination that was not immediately clear with lawyers working with
    the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:

    - Files considered eligible had to be source code files.

    - Make and config files were included as candidates if they contained
    >5 lines of source

    - File already had some variant of a license header in it (even if <5
    lines).

    All documentation files were explicitly excluded.

    The following heuristics were used to determine which SPDX license
    identifiers to apply.

    - when both scanners couldn't find any license traces, file was
    considered to have no license information in it, and the top level
    COPYING file license applied.

    For non */uapi/* files that summary was:

    SPDX license identifier # files
    ---------------------------------------------------|-------
    GPL-2.0 11139

    and resulted in the first patch in this series.

    If that file was a */uapi/* path one, it was "GPL-2.0 WITH
    Linux-syscall-note" otherwise it was "GPL-2.0". Results of that
    was:

    SPDX license identifier # files
    ---------------------------------------------------|-------
    GPL-2.0 WITH Linux-syscall-note 930

    and resulted in the second patch in this series.

    - if a file had some form of licensing information in it, and was one
    of the */uapi/* ones, it was denoted with the Linux-syscall-note if
    any GPL family license was found in the file or had no licensing in
    it (per prior point). Results summary:

    SPDX license identifier # files
    ---------------------------------------------------|------
    GPL-2.0 WITH Linux-syscall-note 270
    GPL-2.0+ WITH Linux-syscall-note 169
    ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
    ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
    LGPL-2.1+ WITH Linux-syscall-note 15
    GPL-1.0+ WITH Linux-syscall-note 14
    ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
    LGPL-2.0+ WITH Linux-syscall-note 4
    LGPL-2.1 WITH Linux-syscall-note 3
    ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
    ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

    and that resulted in the third patch in this series.

    - when the two scanners agreed on the detected license(s), that
    became the concluded license(s).

    - when there was disagreement between the two scanners (one detected
    a license but the other didn't, or they both detected different
    licenses) a manual inspection of the file occurred.

    - In most cases a manual inspection of the information in the file
    resulted in a clear resolution of the license that should apply
    (and which scanner probably needed to revisit its heuristics).

    - When it was not immediately clear, the license identifier was
    confirmed with lawyers working with the Linux Foundation.

    - If there was any question as to the appropriate license identifier,
    the file was flagged for further research and to be revisited later
    in time.

    In total, over 70 hours of logged manual review was done on the
    spreadsheet to determine the SPDX license identifiers to apply to the
    source files by Kate, Philippe, Thomas and, in some cases,
    confirmation by lawyers working with the Linux Foundation.

    Kate also obtained a third independent scan of the 4.13 code base from
    FOSSology, and compared selected files where the other two scanners
    disagreed against that SPDX file, to see if there was new insights.
    The Windriver scanner is based on an older version of FOSSology in
    part, so they are related.

    Thomas did random spot checks in about 500 files from the spreadsheets
    for the uapi headers and agreed with SPDX license identifier in the
    files he inspected. For the non-uapi files Thomas did random spot
    checks in about 15000 files.

    In initial set of patches against 4.14-rc6, 3 files were found to have
    copy/paste license identifier errors, and have been fixed to reflect
    the correct identifier.

    Additionally Philippe spent 10 hours this week doing a detailed manual
    inspection and review of the 12,461 patched files from the initial
    patch version early this week with:

    - a full scancode scan run, collecting the matched texts, detected
    license ids and scores

    - reviewing anything where there was a license detected (about 500+
    files) to ensure that the applied SPDX license was correct

    - reviewing anything where there was no detection but the patch
    license was not GPL-2.0 WITH Linux-syscall-note to ensure that the
    applied SPDX license was correct

    This produced a worksheet with 20 files needing minor correction. This
    worksheet was then exported into 3 different .csv files for the
    different types of files to be modified.

    These .csv files were then reviewed by Greg. Thomas wrote a script to
    parse the csv files and add the proper SPDX tag to the file, in the
    format that the file expected. This script was further refined by Greg
    based on the output to detect more types of files automatically and to
    distinguish between header and source .c files (which need different
    comment types.) Finally Greg ran the script using the .csv files to
    generate the patches.

    Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
    Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

    * tag 'spdx_identifiers-4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    License cleanup: add SPDX license identifier to uapi header files with a license
    License cleanup: add SPDX license identifier to uapi header files with no license
    License cleanup: add SPDX GPL-2.0 license identifier to files with no license

    Linus Torvalds
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Oct, 2017

1 commit

  • …t/masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - fix O= building on dash

    - remove unused dependency in Makefile

    - fix default of a choice in Kconfig

    - fix typos and documentation style

    - fix command options unrecognized by sparse

    * tag 'kbuild-fixes-v4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: clang: fix build failures with sparse check
    kbuild doc: a bundle of fixes on makefiles.txt
    Makefile: kselftest: fix grammar typo
    kbuild: Fix optimization level choice default
    kbuild: drop unused symverfile in Makefile.modpost
    kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd)

    Linus Torvalds
     

23 Oct, 2017

2 commits

  • Pull input fix from Dmitry Torokhov:
    "A fix for a broken commit in the previous pull breaking automatic
    module loading of input handlers, such ad evdev"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: do not use property bits when generating module alias

    Linus Torvalds
     
  • The commit 8724ecb07229 ("Input: allow matching device IDs on property
    bits") started using property bits when generating module aliases for input
    handlers, but did not adjust the generation of MODALIAS attribute on input
    device uevents, breaking automatic module loading. Given that no handler
    currently uses property bits in their module tables, let's revert this part
    of the commit for now.

    Reported-by: Damien Wyart
    Tested-by: Damien Wyart
    Fixes: 8724ecb07229 ("Input: allow matching device IDs on property bits")
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

22 Oct, 2017

1 commit

  • Pull input fixes from Dmitry Torokhov:

    - joydev now implements a blacklist to avoid creating joystick nodes
    for accelerometers found in composite devices such as PlaStation
    controllers

    - assorted driver fixes

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ims-psu - check if CDC union descriptor is sane
    Input: joydev - blacklist ds3/ds4/udraw motion sensors
    Input: allow matching device IDs on property bits
    Input: factor out and export input_device_id matching code
    Input: goodix - poll the 'buffer status' bit before reading data
    Input: axp20x-pek - fix module not auto-loading for axp221 pek
    Input: tca8418 - enable interrupt after it has been requested
    Input: stmfts - fix setting ABS_MT_POSITION_* maximum size
    Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen
    Input: synaptics - disable kernel tracking on SMBus devices

    Linus Torvalds
     

20 Oct, 2017

1 commit


14 Oct, 2017

1 commit

  • gcc on aarch64 may emit synbols of type 'n' if the kernel is built with
    '-frecord-gcc-switches'. In most cases, those symbols are reported with
    nm as

    000000000000000e n $d

    and with objdump as

    0000000000000000 l d .GCC.command.line 0000000000000000 .GCC.command.line
    000000000000000e l .GCC.command.line 0000000000000000 $d

    Those symbols are detected in is_arm_mapping_symbol() and ignored.
    However, if "--prefix-symbols=" is configured as well, the
    situation is different. For example, in efi/libstub, arm64 images are
    built with

    '--prefix-alloc-sections=.init --prefix-symbols=__efistub_'.

    In combination with '-frecord-gcc-switches', the symbols are now reported
    by nm as:

    000000000000000e n __efistub_$d
    and by objdump as:
    0000000000000000 l d .GCC.command.line 0000000000000000 .GCC.command.line
    000000000000000e l .GCC.command.line 0000000000000000 __efistub_$d

    Those symbols are no longer ignored and included in the base address
    calculation. This results in a base address of 000000000000000e, which
    in turn causes kallsyms to abort with

    kallsyms failure:
    relative symbol value 0xffffff900800a000 out of range in relative mode

    The problem is seen in little endian arm64 builds with CONFIG_EFI
    enabled and with '-frecord-gcc-switches' set in KCFLAGS.

    Explicitly ignore symbols of type 'n' since those are clearly debug
    symbols.

    Link: http://lkml.kernel.org/r/1507136063-3139-1-git-send-email-linux@roeck-us.net
    Signed-off-by: Guenter Roeck
    Acked-by: Ard Biesheuvel
    Cc: Josh Poimboeuf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Guenter Roeck
     

13 Oct, 2017

1 commit

  • If faddr2line is given a function name which is the last one listed by
    "nm -n", it will fail because it never finds the next symbol.

    So teach the awk script to catch that possibility, and use 'size' to
    provide the end point of the last function.

    Signed-off-by: NeilBrown
    Signed-off-by: Linus Torvalds

    NeilBrown
     

07 Oct, 2017

1 commit


04 Oct, 2017

2 commits

  • Currently running checkpatch on a directory with a cover-letter.patch
    file reports the following error:

    -----------------------------------------
    patches/smp-v2/v2-0000-cover-letter.patch
    -----------------------------------------

    ERROR: Does not appear to be a unified-diff format patch

    The logic to suppress the unified-diff check for cover letters is there
    but is checking $file instead of $filename. Fix the variable to use the
    correct one.

    Link: http://lkml.kernel.org/r/20170909090406.31523-1-shorne@gmail.com
    Signed-off-by: Stafford Horne
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stafford Horne
     
  • Here are some of the more spelling mistakes and typos that I've found
    while fixing up spelling mistakes in kernel error message text over the
    past eight weeks.

    [akpm@linux-foundation.org: s/|/||/, per Joe]
    Link: http://lkml.kernel.org/r/20170919090818.5989-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King
    Acked-by: Kees Cook
    Cc: Masahiro Yamada
    Cc: Stephen Boyd
    Cc: Joe Perches
    Cc: Ross Zwisler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Colin Ian King
     

28 Sep, 2017

1 commit

  • The kbuild bot occasionally reports warnings like:

    drivers/scsi/pcmcia/aha152x_core.o: warning: objtool: seldo_run()+0x130: unreachable instruction

    These warnings are always with GCC 4.4. That version of GCC sometimes
    places unreachable instructions after calls to noreturn functions.

    The unreachable warnings aren't very important anyway. Just ignore them
    for old versions of GCC.

    Reported-by: kbuild test robot
    Signed-off-by: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/bc89b807d965b98ec18a0bb94f96a594bd58f2f2.1506551639.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar

    Josh Poimboeuf
     

25 Sep, 2017

1 commit

  • Pull DeviceTree fixes from Rob Herring:

    - fix build for !OF providing empty of_find_device_by_node

    - fix Abracon vendor prefix

    - sync dtx_diff include paths (again)

    - a stm32h7 clock binding doc fix

    * tag 'devicetree-fixes-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    dt-bindings: clk: stm32h7: fix clock-cell size
    scripts/dtc: dtx_diff - 2nd update of include dts paths to match build
    dt-bindings: fix vendor prefix for Abracon
    of: provide inline helper for of_find_device_by_node

    Linus Torvalds
     

20 Sep, 2017

4 commits

  • Update dtx_diff include paths in the same manner as:
    commit b12869a8d519 ("of: remove drivers/of/testcase-data from
    include search path for CPP"), commit 5ffa2aed389c ("of: remove
    arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
    commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
    for both CPP and DTC").

    Remove proposed include path kernel/dts/, which was never implemented
    for the dtb build.

    For the diff case, each source file is compiled separately. For
    each of those compiles, provide the location of the source file
    as an include path, not the location of both source files.

    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Frank Rowand
     
  • The "Release:" field of the spec file is determined based on the
    .version file.

    However, the .version file is not copied to the source tar file.
    So, when we build the kernel from the source package, the UTS_VERSION
    always indicates #1. This does not match with "rpm -q".

    The kernel UTS_VERSION and "rpm -q" do not agree for binrpm-pkg, either.
    Please note the kernel has already been built before the spec file is
    created. Currently, mkspec invokes mkversion. This script returns an
    incremented version. So, the "Release:" field of the spec file is
    greater than the version in the kernel by one.

    For the source package build (where .version file is missing), we can
    give KBUILD_BUILD_VERSION=%{release} to the build command.

    For the binary package build, we can simply read out the .version file
    because it contains the version number that was used for building the
    kernel image.

    We can remove scripts/mkversion because scripts/package/Makefile need
    not touch the .version file.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Commit 5620a0d1aacd ("firmware: delete in-kernel firmware") deleted
    in-kernel firmware support, including the firmware install command.

    So, the firmware package does not make sense any more. Remove it.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Riku Voipio
    Acked-by: Greg Kroah-Hartman

    Masahiro Yamada
     
  • Commit 5620a0d1aacd ("firmware: delete in-kernel firmware") deleted
    in-kernel firmware support, including "make firmware_install".

    Since then, "make rpm-pkg" / "make binrpm-pkg" fails to build with
    the error:

    make[2]: *** No rule to make target `firmware_install'. Stop.

    Commit df85b2d767aa ("firmware: Restore support for built-in firmware")
    restored the build infrastructure for CONFIG_EXTRA_FIRMWARE, but this
    is out of the scope of "make firmware_install". So, the right thing to
    do is to kill the use of "make firmware_install".

    Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware")
    Signed-off-by: Masahiro Yamada
    Acked-by: Greg Kroah-Hartman

    Masahiro Yamada
     

16 Sep, 2017

1 commit

  • …el/git/gregkh/driver-core

    Pull firmware removal from Greg KH:
    "Many many years ago (at the kernel summit in Boston), we all came to
    the agreement that the firmware/ tree should be dropped from the
    kernel, and everyone use the linux-firmware package instead. For some
    minor reason, David Woodhouse didn't send the pull request at that
    point in time, and everyone forgot about this.

    The topic came up in the hallway track at the Plumbers conference this
    week, so here's a single patch that drops the whole firmware tree. The
    last firmware update was back in 2013, and all distros have been using
    linux-firmware instead since at least that year, if not before. The
    only commits to that directory since 2013 was some kbuild fixups for
    various build tool issues.

    So lets finally drop this, we don't need to lug them around in the
    kernel source tree anymore, especially as no one wants or uses them.

    This has passed build testing with 0-day, I don't think it made it
    into linux-next this week, but I figured it was good to get in before
    4.14-rc1 was out"

    * tag 'firmware_removal-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    firmware: delete in-kernel firmware

    Linus Torvalds
     

15 Sep, 2017

2 commits

  • The last firmware change for the in-kernel firmware source code was back
    in 2013. Everyone has been relying on the out-of-tree linux-firmware
    package for a long long time.

    So let's drop it, it's baggage we don't need to keep dragging around
    (and having to fix random kbuild issues over time...)

    Cc: Kyle McMartin
    Cc: Andrew Morton
    Cc: Michal Marek
    Cc: Masahiro Yamada
    Acked-by: David Woodhouse
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Pull Kbuild updates from Masahiro Yamada:

    - Use Make-builtin $(abspath ...) helper to get absolute path

    - Add W=2 extra warning option to detect unused macros

    - Use more KCONFIG_CONFIG instead hard-coded .config

    - Fix bugs of tar*-pkg targets

    * tag 'kbuild-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: buildtar: do not print successful message if tar returns error
    kbuild: buildtar: fix tar error when CONFIG_MODULES is disabled
    kbuild: Use KCONFIG_CONFIG in buildtar
    Kbuild: enable -Wunused-macros warning for "make W=2"
    kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)

    Linus Torvalds
     

14 Sep, 2017

2 commits

  • Pull modules updates from Jessica Yu:
    "Summary of modules changes for the 4.14 merge window:

    - minor code cleanups and fixes

    - modpost: avoid building modules that have names that exceed the
    size of the name field in struct module"

    * tag 'modules-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
    module: Remove const attribute from alias for MODULE_DEVICE_TABLE
    module: fix ddebug_remove_module()
    modpost: abort if module name is too long

    Linus Torvalds
     
  • Pull documentation fixes from Jonathan Corbet:
    "A cleanup from Mauro that needed to wait for the media pull, plus a
    handful of other fixes that wandered in"

    * tag 'docs-4.14' of git://git.lwn.net/linux:
    kokr/memory-barriers.txt: Apply atomic_t.txt change
    kokr/doc: Update memory-barriers.txt for read-to-write dependencies
    docs-rst: don't require adjustbox anymore
    docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6
    docs-rst: conf.py: remove lscape from LaTeX preamble

    Linus Torvalds
     

13 Sep, 2017

1 commit

  • Pull selinux updates from Paul Moore:
    "A relatively quiet period for SELinux, 11 patches with only two/three
    having any substantive changes.

    These noteworthy changes include another tweak to the NNP/nosuid
    handling, per-file labeling for cgroups, and an object class fix for
    AF_UNIX/SOCK_RAW sockets; the rest of the changes are minor tweaks or
    administrative updates (Stephen's email update explains the file
    explosion in the diffstat).

    Everything passes the selinux-testsuite"

    [ Also a couple of small patches from the security tree from Tetsuo
    Handa for Tomoyo and LSM cleanup. The separation of security policy
    updates wasn't all that clean - Linus ]

    * tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
    selinux: constify nf_hook_ops
    selinux: allow per-file labeling for cgroupfs
    lsm_audit: update my email address
    selinux: update my email address
    MAINTAINERS: update the NetLabel and Labeled Networking information
    selinux: use GFP_NOWAIT in the AVC kmem_caches
    selinux: Generalize support for NNP/nosuid SELinux domain transitions
    selinux: genheaders should fail if too many permissions are defined
    selinux: update the selinux info in MAINTAINERS
    credits: update Paul Moore's info
    selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets
    tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst
    LSM: Remove security_task_create() hook.

    Linus Torvalds
     

12 Sep, 2017

2 commits

  • The previous commit spotted that "Tarball successfully created ..."
    is displayed even if the "tar" command returns error code because
    it is followed by "| ${compress}".

    Let the build fail instead of printing the successful message since
    if the "tar" command fails, the output may not be what users expect.

    Avoid the use of the pipe. While we are here, refactor the script
    removing the use of sub-shell, ${compress}, ${file_ext}.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • $tmpdir/lib is created by "make modules_install". It does not exist
    if CONFIG_MODULES is disabled, then tar reports the following messages:

    tar: lib: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

10 Sep, 2017

2 commits

  • Merge more updates from Andrew Morton:

    - most of the rest of MM

    - a small number of misc things

    - lib/ updates

    - checkpatch

    - autofs updates

    - ipc/ updates

    * emailed patches from Andrew Morton : (126 commits)
    ipc: optimize semget/shmget/msgget for lots of keys
    ipc/sem: play nicer with large nsops allocations
    ipc/sem: drop sem_checkid helper
    ipc: convert kern_ipc_perm.refcount from atomic_t to refcount_t
    ipc: convert sem_undo_list.refcnt from atomic_t to refcount_t
    ipc: convert ipc_namespace.count from atomic_t to refcount_t
    kcov: support compat processes
    sh: defconfig: cleanup from old Kconfig options
    mn10300: defconfig: cleanup from old Kconfig options
    m32r: defconfig: cleanup from old Kconfig options
    drivers/pps: use surrounding "if PPS" to remove numerous dependency checks
    drivers/pps: aesthetic tweaks to PPS-related content
    cpumask: make cpumask_next() out-of-line
    kmod: move #ifdef CONFIG_MODULES wrapper to Makefile
    kmod: split off umh headers into its own file
    MAINTAINERS: clarify kmod is just a kernel module loader
    kmod: split out umh code into its own file
    test_kmod: flip INT checks to be consistent
    test_kmod: remove paranoid UINT_MAX check on uint range processing
    vfat: deduplicate hex2bin()
    ...

    Linus Torvalds
     
  • I removed all the gperf use, but not the Makefile rules. Sam Ravnborg
    says I get bonus points for cleaning this up. I'll hold him to it.

    Requested-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

09 Sep, 2017

3 commits

  • Unlike all other types, LONG_LINE, LONG_LINE_COMMENT and LONG_LINE_STRING
    are passed to WARN() through a variable. This causes the parser in
    list_types() to miss them and consequently they are not present in the
    output of --list-types.

    Additionally, types TYPO_SPELLING, FSF_MAILING_ADDRESS and AVOID_BUG are
    passed with a variable level, causing the parser to miss them too.

    So modify the regex to also catch these special cases.

    Link: http://lkml.kernel.org/r/20170902175610.7e4a7c9d@endymion
    Fixes: 3beb42eced39 ("checkpatch: add --list-types to show message types to show or ignore")
    Signed-off-by: Jean Delvare
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • The variable name "$msg_type" is sometimes used to set the message type,
    and sometimes used to set the message level. This works but is kind of
    confusing. Use "$msg_level" in the latter case instead, to make the code
    clearer.

    Link: http://lkml.kernel.org/r/20170902175345.175db33a@endymion
    Signed-off-by: Jean Delvare
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Link: http://lkml.kernel.org/r/20170902175249.15bb77f2@endymion
    Signed-off-by: Jean Delvare
    Acked-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare