17 Mar, 2019

6 commits

  • When this .gitignore was added, lxdialog was an independent hostprogs-y.

    Now that all objects in lxdialog/ are directly linked to mconf, the
    lxdialog is no longer generated.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Currently, every arch/*/include/uapi/asm/Kbuild explicitly includes
    the common Kbuild.asm file. Factor out the duplicated include directives
    to scripts/Makefile.asm-generic so that no architecture would opt out
    of the mandatory-y mechanism.

    um is not forced to include mandatory-y since it is a very exceptional
    case which does not support UAPI.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The generic-y is redundant under the following condition:

    - arch has its own implementation

    - the same header is added to generated-y

    - the same header is added to mandatory-y

    If a redundant generic-y is found, the warning like follows is displayed:

    scripts/Makefile.asm-generic:20: redundant generic-y found in arch/arm/include/asm/Kbuild: timex.h

    I fixed up arch Kbuild files found by this.

    Suggested-by: Sam Ravnborg
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • This reverts commit caf6fe91ddf62a96401e21e9b7a07227440f4185.

    The commit was fine but is no longer needed as of commit 3a2429e1faf4
    ("kbuild: change if_changed_rule for multi-line recipe"). Let's go
    back to using ";" to be consistent.

    For some discussion, see:

    https://lkml.kernel.org/r/CAK7LNASde0Q9S5GKeQiWhArfER4S4wL1=R_FW8q0++_X3T5=hQ@mail.gmail.com

    Signed-off-by: Douglas Anderson
    Signed-off-by: Masahiro Yamada

    Douglas Anderson
     
  • * The man page for dpkg-source(1) notes:

    > -b, --build directory [format-specific-parameters]
    > Build a source package (--build since dpkg 1.17.14).
    >
    >
    > dpkg-source will build the source package with the first
    > format found in this ordered list: the format indicated
    > with the --format command line option, the format
    > indicated in debian/source/format, “1.0”. The fallback
    > to “1.0” is deprecated and will be removed at some point
    > in the future, you should always document the desired
    > source format in debian/source/format. See section
    > SOURCE PACKAGE FORMATS for an extensive description of
    > the various source package formats.

    Thus it would be more foolproof to explicitly use 1.0 (as we always
    did) than to rely on dpkg-source's defaults.

    * In a similar vein, debian/rules is not made executable by mkdebian,
    and dpkg-source warns about that but still silently fixes the file.
    Let's be explicit once again.

    Signed-off-by: Arseny Maslennikov
    Signed-off-by: Masahiro Yamada

    Arseny Maslennikov
     
  • The of_find_device_by_node() takes a reference to the underlying device
    structure, we should release that reference.
    The implementation of this semantic code search is:
    In a function, for a local variable returned by calling
    of_find_device_by_node(),
    a, if it is released by a function such as
    put_device()/of_dev_put()/platform_device_put() after the last use,
    it is considered that there is no reference leak;
    b, if it is passed back to the caller via
    dev_get_drvdata()/platform_get_drvdata()/get_device(), etc., the
    reference will be released in other functions, and the current function
    also considers that there is no reference leak;
    c, for the rest of the situation, the current function should release the
    reference by calling put_device, this code search will report the
    corresponding error message.

    By using this semantic code search, we have found some object reference leaks,
    such as:
    commit 11907e9d3533 ("ASoC: fsl-asoc-card: fix object reference leaks in
    fsl_asoc_card_probe")
    commit a12085d13997 ("mtd: rawnand: atmel: fix possible object reference leak")
    commit 11493f26856a ("mtd: rawnand: jz4780: fix possible object reference leak")

    There are still dozens of reference leaks in the current kernel code.

    Further, for the case of b, the object returned to other functions may also
    have a reference leak, we will continue to develop other cocci scripts to
    further check the reference leak.

    Signed-off-by: Wen Yang
    Reviewed-by: Julia Lawall
    Reviewed-by: Markus Elfring
    Signed-off-by: Masahiro Yamada

    Wen Yang
     

14 Mar, 2019

8 commits


12 Mar, 2019

1 commit

  • The 'Save As' menu of xconfig is not working; it always saves the
    kernel configuration into the default file irrespective of the file
    chosen in the dialog box.

    The 'Save' menu always writes into the default file, but it would
    make more sense to write into the file previously chosen by 'Load'
    or 'Save As'.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

11 Mar, 2019

3 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - do not generate unneeded top-level built-in.a

    - let git ignore O= directory entirely

    - optimize scripts/kallsyms slightly

    - exclude DWARF info from *.s regardless of config options

    - fix GCC toolchain search path for Clang to prepare ld.lld support

    - do not generate modules.order when CONFIG_MODULES is disabled

    - simplify single target rules and remove VPATH for external module
    build

    - allow to add optional flags to dpkg-buildpackage when building
    deb-pkg

    - move some compiler option tests from Makefile to Kconfig

    - various Makefile cleanups

    * tag 'kbuild-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (40 commits)
    kbuild: remove scripts/basic/% build target
    kbuild: use -Werror=implicit-... instead of -Werror-implicit-...
    kbuild: clean up scripts/gcc-version.sh
    kbuild: remove cc-version macro
    kbuild: update comment block of scripts/clang-version.sh
    kbuild: remove commented-out INITRD_COMPRESS
    kbuild: move -gsplit-dwarf, -gdwarf-4 option tests to Kconfig
    kbuild: [bin]deb-pkg: add DPKG_FLAGS variable
    kbuild: move ".config not found!" message from Kconfig to Makefile
    kbuild: invoke syncconfig if include/config/auto.conf.cmd is missing
    kbuild: simplify single target rules
    kbuild: remove empty rules for makefiles
    kbuild: make -r/-R effective in top Makefile for old Make versions
    kbuild: move tools_silent to a more relevant place
    kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig
    kbuild: refactor cc-cross-prefix implementation
    kbuild: hardcode genksyms path and remove GENKSYMS variable
    scripts/gdb: refactor rules for symlink creation
    kbuild: create symlink to vmlinux-gdb.py in scripts_gdb target
    scripts/gdb: do not descend into scripts/gdb from scripts
    ...

    Linus Torvalds
     
  • Pull x86 platform driver updates from Darren Hart:

    - use MODULE_DEVICE_TABLE across several wmi drivers, keeping
    wmi_device_id and MODULE_ALIAS() declarations in sync

    - add several Ideapad models to the no_hw_rfkill list

    - add support for new Mellanox platforms, including new fan and LED
    functionality

    - address Dell keyboard backlight change event and power button release
    issues

    - update dell_rbu to use appropriate memory allocation mechanisms

    - several small fixes and Ice Lake support for intel_pmc_core

    - fix a suspend regression for Cherry Trail based devices in
    intel_int0002_vgpio

    - a few other routine fixes

    * tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86: (50 commits)
    MAINTAINERS: Include mlxreg.h in Mellanox Platform Driver files
    platform/x86: ideapad-laptop: Add S130-14IGM to no_hw_rfkill list
    platform/x86: mlx-platform: Fix access mode for fan_dir attribute
    platform/x86: mlx-platform: Add UID LED for the next generation systems
    platform/x86: mlx-platform: Add extra CPLD for next generation systems
    platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
    platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
    platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
    modpost: file2alias: define size of alias
    platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Air tablet
    platform/x86: ideapad-laptop: Add Ideapad 530S-14ARR to no_hw_rfkill list
    platform/x86: ideapad-laptop: Add Yoga C930 to no_hw_rfkill_list
    platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown
    platform/x86: intel_pmc_core: Add Package cstates residency info
    platform/x86: intel_pmc_core: Add ICL platform support
    ...

    Linus Torvalds
     
  • Pull Devicetree updates from Rob Herring:

    - Fix a unittest failure on UML. Preparation for converting to kunit
    test framework.

    - Add annotations to dtx_diff output

    - Fix unittest reporting of expected error

    - Move DMA configuration for virtual devices into the driver that needs
    it (s5p-mfc)

    - Vendor prefixes for feiyang and techstar

    - Convert ARM GIC, GICv3, and L2x0 to DT schema

    - Add r8a7778/9 HSCIF serial bindings

    * tag 'devicetree-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of: unittest: unflatten device tree on UML when testing
    dt-bindings: Add vendor prefix for feiyang
    dt-bindings: Add vendor prefix for techstar
    dt-bindings: display: add missing semicolon in example
    of: mark early_init_dt_alloc_reserved_memory_arch static
    of: add dtc annotations functionality to dtx_diff
    of: unittest: add caution to function header comment
    of: unittest: remove report of expected error
    dt-bindings: interrupt-controller: Convert ARM GICv3 to json-schema
    dt-bindings: interrupt-controller: Convert ARM GIC to json-schema
    dt-bindings: arm: l2x0: Convert L2 cache to json-schema
    media: s5p-mfc: Fix memdev DMA configuration
    dt-bindings: serial: sh-sci: Document r8a7778/9 HSCIF bindings

    Linus Torvalds
     

10 Mar, 2019

3 commits

  • Pull leaking_addresses updates from Tobin Harding:
    "Here are two super trivial patches to the leaking addresses script.

    One fixes the debugging output which is currently broken in a bunch of
    places, the other removes the --version command line option.

    Both patches have been tested and sitting in linux-next tree for a
    month or so"

    * tag 'leaks-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks:
    leaking_addresses: Completely remove --version flag
    leaking_addresses: Fix calls to dprint

    Linus Torvalds
     
  • Pull documentation updates from Jonathan Corbet:
    "A fairly routine cycle for docs - lots of typo fixes, some new
    documents, and more translations. There's also some LICENSES
    adjustments from Thomas"

    * tag 'docs-5.1' of git://git.lwn.net/linux: (74 commits)
    docs: Bring some order to filesystem documentation
    Documentation/locking/lockdep: Drop last two chars of sample states
    doc: rcu: Suspicious RCU usage is a warning
    docs: driver-api: iio: fix errors in documentation
    Documentation/process/howto: Update for 4.x -> 5.x versioning
    docs: Explicitly state that the 'Fixes:' tag shouldn't split lines
    doc: security: Add kern-doc for lsm_hooks.h
    doc: sctp: Merge and clean up rst files
    Docs: Correct /proc/stat path
    scripts/spdxcheck.py: fix C++ comment style detection
    doc: fix typos in license-rules.rst
    Documentation: fix admin-guide/README.rst minimum gcc version requirement
    doc: process: complete removal of info about -git patches
    doc: translations: sync translations 'remove info about -git patches'
    perf-security: wrap paragraphs on 72 columns
    perf-security: elaborate on perf_events/Perf privileged users
    perf-security: document collected perf_events/Perf data categories
    perf-security: document perf_events/Perf resource control
    sysfs.txt: add note on available attribute macros
    docs: kernel-doc: typo "if ... if" -> "if ... is"
    ...

    Linus Torvalds
     
  • Pull gcc-plugins updates from Kees Cook:
    "This adds additional type coverage to the existing structleak plugin
    and adds a large set of selftests to help evaluate stack variable
    zero-initialization coverage.

    That can be used to test whatever instrumentation might be performing
    zero-initialization: either with the structleak plugin or with Clang's
    coming "-ftrivial-auto-var-init=zero" option.

    Summary:

    - Add scalar and array initialization coverage

    - Refactor Kconfig to make options more clear

    - Add self-test module for testing automatic initialization"

    * tag 'gcc-plugins-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    lib: Introduce test_stackinit module
    gcc-plugins: structleak: Generalize to all variable types

    Linus Torvalds
     

08 Mar, 2019

8 commits

  • Since commit 1751e8a6cb93 ("Rename superblock flags (MS_xyz ->
    SB_xyz)"), scripts/gdb should be updated to replace MS_xyz with SB_xyz.

    This change didn't directly affect the running operation of scripts/gdb
    until commit e262e32d6bde "vfs: Suppress MS_* flag defs within the
    kernel unless explicitly enabled" removed the definitions used by
    constants.py.

    Update constants.py.in to utilise the new internal flags, matching the
    implementation at fs/proc_namespace.c::show_sb_opts.

    Note to stable, e262e32d6bde landed in v5.0-rc1 (which was just
    released), so we'll want this picked back to 5.0 stable once this patch
    hits mainline (akpm just picked it up). Without this, debugging a
    kernel a kernel via GDB+QEMU is broken in the 5.0 release.

    [kieran.bingham@ideasonboard.com: add fixes tag, reword commit message]
    Link: http://lkml.kernel.org/r/20190305103014.25847-1-kieran.bingham@ideasonboard.com
    Fixes: e262e32d6bde "vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled"
    Signed-off-by: Jackie Liu
    Signed-off-by: Kieran Bingham
    Tested-by: Nick Desaulniers
    Tested-by: Kieran Bingham
    Cc: Felipe Balbi
    Cc: Dan Robertson
    Cc: Jan Kiszka
    Cc: David Howells
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jackie Liu
     
  • Warn when any SPDX-License-Identifier: tag is not created on the proper
    line number.

    Link: http://lkml.kernel.org/r/9b74ee87f8c1b8fd310e213fcb4994d58610fcb6.camel@perches.com
    Signed-off-by: Joe Perches
    Cc: Linus Walleij
    Cc: "Enrico Weigelt, metux IT consult"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Presently C99 style comments are removed unconditionally before actual
    patch validity check happens. This is a problem for some third party
    projects which use checkpatch.pl but do not allow C99 style comments.

    This patch adds yet another variable, named C99_COMMENT_TOLERANCE. If
    it is included in the --ignore command line or config file options list,
    C99 comments in the patch are reported as errors.

    Tested by processing a patch with a C99 style comment, it passes the
    check just fine unless '--ignore C99_COMMENT_TOLERANCE' is present in
    .checkpatch.conf.

    Link: http://lkml.kernel.org/r/20190110224957.25008-1-vbendeb@chromium.org
    Signed-off-by: Vadim Bendebury
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vadim Bendebury
     
  • Many new generic allocation functions like the kvmalloc family have been
    added recently to the kernel.

    The allocation functions test now includes:

    o kvmalloc and variants
    o kstrdup_const
    o kmemdup_nul
    o dma_alloc_coherent
    o alloc_skb and variants

    Add a separate $allocFunctions variable to help make the allocation
    functions test a bit more readable.

    Miscellanea:

    o Use $allocFunctions in the unnecessary OOM message test and
    add exclude uses with __GFP_NOWARN
    o Use $allocFunctions in the unnecessary cast test
    o Add the kvmalloc family to the preferred sizeof alloc style
    foo = kvmalloc(sizeof(*foo), ...)

    Link: http://lkml.kernel.org/r/a5e60a2b93e10baf84af063f6c8e56402273105d.camel@perches.com
    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Using SPDX commenting style // or /* is specified for various file types
    in Documentation/process/license-rules.rst so add an appropriate test for
    .[chsS] files because many proposed file additions and patches do not use
    the correct style.

    Link: http://lkml.kernel.org/r/8b02899853247a2c67669561761f354dd3bd110e.camel@perches.com
    Signed-off-by: Joe Perches
    Cc: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Here are some of the more common spelling mistakes and typos that I've
    found while fixing up spelling mistakes in the kernel over the past 4
    months.

    Link: http://lkml.kernel.org/r/20190114110215.1986-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Colin Ian King
     
  • The kernel provides the macro MODULE_DEVICE_TABLE() where driver authors
    can specify their device type and their array of device_ids and thereby
    trigger the generation of the appropriate MODULE_ALIAS() output. This is
    opposed to having to specify one MODULE_ALIAS() for each device. The WMI
    device type is currently not supported.

    While using MODULE_DEVICE_TABLE() does increase the complexity as well
    as spreading out the implementation across the kernel, it does come with
    some benefits too;
    * It makes different drivers look more similar; if you can specify the
    array of device_ids any device type specific input to MODULE_ALIAS()
    will automatically be generated for you.
    * It helps each driver avoid keeping multiple versions of the same
    information in sync. That is, both the array of device_ids and the
    potential multitude of MODULE_ALIAS()'s.

    Add WMI support to MODULE_DEVICE_TABLE() by adding info about struct
    wmi_device_id in devicetable-offsets.c and add a WMI entry point in
    file2alias.c.

    The type argument for MODULE_DEVICE_TABLE(type, name) is wmi.

    Suggested-by: Pali Rohár
    Signed-off-by: Mattias Jacobsson
    Acked-by: Masahiro Yamada
    Signed-off-by: Darren Hart (VMware)

    Mattias Jacobsson
     
  • In preparation for adding WMI support to MODULE_DEVICE_TABLE() move the
    definition of struct wmi_device_id to mod_devicetable.h and inline
    guid_string in the struct.

    Changing guid_string to an inline char array changes the loop conditions
    when looping over an array of struct wmi_device_id. Therefore update
    wmi_dev_match()'s loop to check for an empty guid_string instead of a
    NULL pointer.

    Signed-off-by: Mattias Jacobsson
    [dvhart: Move UUID_STRING_LEN define to this patch]
    Signed-off-by: Darren Hart (VMware)

    Mattias Jacobsson
     

07 Mar, 2019

6 commits

  • The size of the variable alias provided to do_entry functions are
    currently not readily available. Thus hindering do_entry functions to
    perform bounds checking.

    Define the macro ALIAS_SIZE containing the size of the variable alias.

    Signed-off-by: Mattias Jacobsson
    Acked-by: Masahiro Yamada
    Signed-off-by: Darren Hart (VMware)

    Mattias Jacobsson
     
  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver patch pull request for 5.1-rc1.

    The largest thing by far is the new habanalabs driver for their AI
    accelerator chip. For now it is in the drivers/misc directory but will
    probably move to a new directory soon along with other drivers of this
    type.

    Other than that, just the usual set of individual driver updates and
    fixes. There's an "odd" merge in here from the DRM tree that they
    asked me to do as the MEI driver is starting to interact with the i915
    driver, and it needed some coordination. All of those patches have
    been properly acked by the relevant subsystem maintainers.

    All of these have been in linux-next with no reported issues, most for
    quite some time"

    * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits)
    habanalabs: adjust Kconfig to fix build errors
    habanalabs: use %px instead of %p in error print
    habanalabs: use do_div for 64-bit divisions
    intel_th: gth: Fix an off-by-one in output unassigning
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: use NULL to initialize array of pointers
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: soft-reset device if context-switch fails
    habanalabs: print pointer using %p
    habanalabs: fix memory leak with CBs with unaligned size
    habanalabs: return correct error code on MMU mapping failure
    habanalabs: add comments in uapi/misc/habanalabs.h
    habanalabs: extend QMAN0 job timeout
    habanalabs: set DMA0 completion to SOB 1007
    habanalabs: fix validation of WREG32 to DMA completion
    habanalabs: fix mmu cache registers init
    habanalabs: disable CPU access on timeouts
    habanalabs: add MMU DRAM default page mapping
    habanalabs: Dissociate RAZWI info from event types
    misc/habanalabs: adjust Kconfig to fix build errors
    ...

    Linus Torvalds
     
  • Recently attempt to remove the '--version' flag was made, badly. We
    failed to remove mention of it from the help output. And we (me) failed
    to actually remove the flag from the options list.

    _Completely_ remove --version flag.

    Tobin C. Harding
     
  • Currently calls to function dprint() are non uniform and at times
    incorrect.

    Use uniform _correct_ call to function dprint().

    Signed-off-by: Tobin C. Harding

    Tobin C. Harding
     
  • Merge misc updates from Andrew Morton:

    - a few misc things

    - ocfs2 updates

    - most of MM

    * emailed patches from Andrew Morton : (159 commits)
    tools/testing/selftests/proc/proc-self-syscall.c: remove duplicate include
    proc: more robust bulk read test
    proc: test /proc/*/maps, smaps, smaps_rollup, statm
    proc: use seq_puts() everywhere
    proc: read kernel cpu stat pointer once
    proc: remove unused argument in proc_pid_lookup()
    fs/proc/thread_self.c: code cleanup for proc_setup_thread_self()
    fs/proc/self.c: code cleanup for proc_setup_self()
    proc: return exit code 4 for skipped tests
    mm,mremap: bail out earlier in mremap_to under map pressure
    mm/sparse: fix a bad comparison
    mm/memory.c: do_fault: avoid usage of stale vm_area_struct
    writeback: fix inode cgroup switching comment
    mm/huge_memory.c: fix "orig_pud" set but not used
    mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC
    mm/memcontrol.c: fix bad line in comment
    mm/cma.c: cma_declare_contiguous: correct err handling
    mm/page_ext.c: fix an imbalance with kmemleak
    mm/compaction: pass pgdat to too_many_isolated() instead of zone
    mm: remove zone_lru_lock() function, access ->lru_lock directly
    ...

    Linus Torvalds
     
  • Pull ARM SoC driver updates from Arnd Bergmann:
    "As usual, the drivers/tee and drivers/reset subsystems get merged
    here, with the expected set of smaller updates and some new hardware
    support. The tee subsystem now supports device drivers to be attached
    to a tee, the first example here is a random number driver with its
    implementation in the secure world.

    Three new power domain drivers get added for specific chip families:
    - Broadcom BCM283x chips (used in Raspberry Pi)
    - Qualcomm Snapdragon phone chips
    - Xilinx ZynqMP FPGA SoCs

    One new driver is added to talk to the BPMP firmware on NVIDIA
    Tegra210

    Existing drivers are extended for new SoC variants from NXP, NVIDIA,
    Amlogic and Qualcomm"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (113 commits)
    tee: optee: update optee_msg.h and optee_smc.h to dual license
    tee: add cancellation support to client interface
    dpaa2-eth: configure the cache stashing amount on a queue
    soc: fsl: dpio: configure cache stashing destination
    soc: fsl: dpio: enable frame data cache stashing per software portal
    soc: fsl: guts: make fsl_guts_get_svr() static
    hwrng: make symbol 'optee_rng_id_table' static
    tee: optee: Fix unsigned comparison with less than zero
    hwrng: Fix unsigned comparison with less than zero
    tee: fix possible error pointer ctx dereferencing
    hwrng: optee: Initialize some structs using memset instead of braces
    tee: optee: Initialize some structs using memset instead of braces
    soc: fsl: dpio: fix memory leak of a struct qbman on error exit path
    clk: tegra: dfll: Make symbol 'tegra210_cpu_cvb_tables' static
    soc: qcom: llcc-slice: Fix typos
    qcom: soc: llcc-slice: Consolidate some code
    qcom: soc: llcc-slice: Clear the global drv_data pointer on error
    drivers: soc: xilinx: Add ZynqMP power domain driver
    firmware: xilinx: Add APIs to control node status/power
    dt-bindings: power: Add ZynqMP power domain bindings
    ...

    Linus Torvalds
     

06 Mar, 2019

4 commits

  • Pull locking updates from Ingo Molnar:
    "The biggest part of this tree is the new auto-generated atomics API
    wrappers by Mark Rutland.

    The primary motivation was to allow instrumentation without uglifying
    the primary source code.

    The linecount increase comes from adding the auto-generated files to
    the Git space as well:

    include/asm-generic/atomic-instrumented.h | 1689 ++++++++++++++++--
    include/asm-generic/atomic-long.h | 1174 ++++++++++---
    include/linux/atomic-fallback.h | 2295 +++++++++++++++++++++++++
    include/linux/atomic.h | 1241 +------------

    I preferred this approach, so that the full call stack of the (already
    complex) locking APIs is still fully visible in 'git grep'.

    But if this is excessive we could certainly hide them.

    There's a separate build-time mechanism to determine whether the
    headers are out of date (they should never be stale if we do our job
    right).

    Anyway, nothing from this should be visible to regular kernel
    developers.

    Other changes:

    - Add support for dynamic keys, which removes a source of false
    positives in the workqueue code, among other things (Bart Van
    Assche)

    - Updates to tools/memory-model (Andrea Parri, Paul E. McKenney)

    - qspinlock, wake_q and lockdep micro-optimizations (Waiman Long)

    - misc other updates and enhancements"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (48 commits)
    locking/lockdep: Shrink struct lock_class_key
    locking/lockdep: Add module_param to enable consistency checks
    lockdep/lib/tests: Test dynamic key registration
    lockdep/lib/tests: Fix run_tests.sh
    kernel/workqueue: Use dynamic lockdep keys for workqueues
    locking/lockdep: Add support for dynamic keys
    locking/lockdep: Verify whether lock objects are small enough to be used as class keys
    locking/lockdep: Check data structure consistency
    locking/lockdep: Reuse lock chains that have been freed
    locking/lockdep: Fix a comment in add_chain_cache()
    locking/lockdep: Introduce lockdep_next_lockchain() and lock_chain_count()
    locking/lockdep: Reuse list entries that are no longer in use
    locking/lockdep: Free lock classes that are no longer in use
    locking/lockdep: Update two outdated comments
    locking/lockdep: Make it easy to detect whether or not inside a selftest
    locking/lockdep: Split lockdep_free_key_range() and lockdep_reset_lock()
    locking/lockdep: Initialize the locks_before and locks_after lists earlier
    locking/lockdep: Make zap_class() remove all matching lock order entries
    locking/lockdep: Reorder struct lock_class members
    locking/lockdep: Avoid that add_chain_cache() adds an invalid chain to the cache
    ...

    Linus Torvalds
     
  • decode line:

    RIP: 0010:khugepaged+0x2a2/0x2280

    into

    RIP: 0010:khugepaged (mm/khugepaged.c:1885)

    Link: http://lkml.kernel.org/r/154660071227.52726.15645307951282727605.stgit@buzz
    Signed-off-by: Konstantin Khlebnikov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     
  • Use after scope bugs detector seems to be almost entirely useless for
    the linux kernel. It exists over two years, but I've seen only one
    valid bug so far [1]. And the bug was fixed before it has been
    reported. There were some other use-after-scope reports, but they were
    false-positives due to different reasons like incompatibility with
    structleak plugin.

    This feature significantly increases stack usage, especially with GCC <
    9 version, and causes a 32K stack overflow. It probably adds
    performance penalty too.

    Given all that, let's remove use-after-scope detector entirely.

    While preparing this patch I've noticed that we mistakenly enable
    use-after-scope detection for clang compiler regardless of
    CONFIG_KASAN_EXTRA setting. This is also fixed now.

    [1] http://lkml.kernel.org/r/

    Link: http://lkml.kernel.org/r/20190111185842.13978-1-aryabinin@virtuozzo.com
    Signed-off-by: Andrey Ryabinin
    Acked-by: Will Deacon [arm64]
    Cc: Qian Cai
    Cc: Alexander Potapenko
    Cc: Dmitry Vyukov
    Cc: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Ryabinin
     
  • Pull year 2038 updates from Thomas Gleixner:
    "Another round of changes to make the kernel ready for 2038. After lots
    of preparatory work this is the first set of syscalls which are 2038
    safe:

    403 clock_gettime64
    404 clock_settime64
    405 clock_adjtime64
    406 clock_getres_time64
    407 clock_nanosleep_time64
    408 timer_gettime64
    409 timer_settime64
    410 timerfd_gettime64
    411 timerfd_settime64
    412 utimensat_time64
    413 pselect6_time64
    414 ppoll_time64
    416 io_pgetevents_time64
    417 recvmmsg_time64
    418 mq_timedsend_time64
    419 mq_timedreceiv_time64
    420 semtimedop_time64
    421 rt_sigtimedwait_time64
    422 futex_time64
    423 sched_rr_get_interval_time64

    The syscall numbers are identical all over the architectures"

    * 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    riscv: Use latest system call ABI
    checksyscalls: fix up mq_timedreceive and stat exceptions
    unicore32: Fix __ARCH_WANT_STAT64 definition
    asm-generic: Make time32 syscall numbers optional
    asm-generic: Drop getrlimit and setrlimit syscalls from default list
    32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
    compat ABI: use non-compat openat and open_by_handle_at variants
    y2038: add 64-bit time_t syscalls to all 32-bit architectures
    y2038: rename old time and utime syscalls
    y2038: remove struct definition redirects
    y2038: use time32 syscall names on 32-bit
    syscalls: remove obsolete __IGNORE_ macros
    y2038: syscalls: rename y2038 compat syscalls
    x86/x32: use time64 versions of sigtimedwait and recvmmsg
    timex: change syscalls to use struct __kernel_timex
    timex: use __kernel_timex internally
    sparc64: add custom adjtimex/clock_adjtime functions
    time: fix sys_timer_settime prototype
    time: Add struct __kernel_timex
    time: make adjtime compat handling available for 32 bit
    ...

    Linus Torvalds
     

05 Mar, 2019

1 commit

  • This adjusts structleak to also work with non-struct types when they
    are passed by reference, since those variables may leak just like
    anything else. This is exposed via an improved set of Kconfig options.
    (This does mean structleak is slightly misnamed now.)

    Building with CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL should give the
    kernel complete initialization coverage of all stack variables passed
    by reference, including padding (see lib/test_stackinit.c).

    Using CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE to count added initializations
    under defconfig:

    ..._BYREF: 5945 added initializations
    ..._BYREF_ALL: 16606 added initializations

    There is virtually no change to text+data size (both have less than 0.05%
    growth):

    text data bss dec hex filename
    19502103 5051456 1917000 26470559 193e89f vmlinux.stock
    19513412 5051456 1908808 26473676 193f4cc vmlinux.byref
    19516974 5047360 1900616 26464950 193d2b6 vmlinux.byref_all

    The measured performance difference is in the noise for hackbench and
    kernel build benchmarks:

    Stock:

    5x hackbench -g 20 -l 1000
    Mean: 10.649s
    Std Dev: 0.339

    5x kernel build (4-way parallel)
    Mean: 261.98s
    Std Dev: 1.53

    CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF:

    5x hackbench -g 20 -l 1000
    Mean: 10.540s
    Std Dev: 0.233

    5x kernel build (4-way parallel)
    Mean: 260.52s
    Std Dev: 1.31

    CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL:

    5x hackbench -g 20 -l 1000
    Mean: 10.320
    Std Dev: 0.413

    5x kernel build (4-way parallel)
    Mean: 260.10
    Std Dev: 0.86

    This does not yet solve missing padding initialization for structures
    on the stack that are never passed by reference (which should be a tiny
    minority). Hopefully this will be more easily addressed by upstream
    compiler fixes after clarifying the C11 padding initialization
    specification.

    Signed-off-by: Kees Cook
    Reviewed-by: Ard Biesheuvel

    Kees Cook