12 Feb, 2020

1 commit

  • Pull tracing fixes from Steven Rostedt:
    "Various fixes:

    - Fix an uninitialized variable

    - Fix compile bug to bootconfig userspace tool (in tools directory)

    - Suppress some error messages of bootconfig userspace tool

    - Remove unneded CONFIG_LIBXBC from bootconfig

    - Allocate bootconfig xbc_nodes dynamically. To ease complaints about
    taking up static memory at boot up

    - Use of parse_args() to parse bootconfig instead of strstr() usage
    Prevents issues of double quotes containing the interested string

    - Fix missing ring_buffer_nest_end() on synthetic event error path

    - Return zero not -EINVAL on soft disabled synthetic event (soft
    disabling must be the same as hard disabling, which returns zero)

    - Consolidate synthetic event code (remove duplicate code)"

    * tag 'trace-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Consolidate trace() functions
    tracing: Don't return -EINVAL when tracing soft disabled synth events
    tracing: Add missing nest end to synth_event_trace_start() error case
    tools/bootconfig: Suppress non-error messages
    bootconfig: Allocate xbc_nodes array dynamically
    bootconfig: Use parse_args() to find bootconfig and '--'
    tracing/kprobe: Fix uninitialized variable bug
    bootconfig: Remove unneeded CONFIG_LIBXBC
    tools/bootconfig: Fix wrong __VA_ARGS__ usage

    Linus Torvalds
     

11 Feb, 2020

1 commit

  • Since there is no user except CONFIG_BOOT_CONFIG and no plan
    to use it from other functions, CONFIG_LIBXBC can be removed
    and we can use CONFIG_BOOT_CONFIG directly.

    Link: http://lkml.kernel.org/r/158098769281.939.16293492056419481105.stgit@devnote2

    Suggested-by: Geert Uytterhoeven
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

10 Feb, 2020

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - fix randconfig to generate a sane .config

    - rename hostprogs-y / always to hostprogs / always-y, which are more
    natual syntax.

    - optimize scripts/kallsyms

    - fix yes2modconfig and mod2yesconfig

    - make multiple directory targets ('make foo/ bar/') work

    * tag 'kbuild-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: make multiple directory targets work
    kconfig: Invalidate all symbols after changing to y or m.
    kallsyms: fix type of kallsyms_token_table[]
    scripts/kallsyms: change table to store (strcut sym_entry *)
    scripts/kallsyms: rename local variables in read_symbol()
    kbuild: rename hostprogs-y/always to hostprogs/always-y
    kbuild: fix the document to use extra-y for vmlinux.lds
    kconfig: fix broken dependency in randconfig-generated .config

    Linus Torvalds
     

06 Feb, 2020

1 commit

  • Pull tracing updates from Steven Rostedt:

    - Added new "bootconfig".

    This looks for a file appended to initrd to add boot config options,
    and has been discussed thoroughly at Linux Plumbers.

    Very useful for adding kprobes at bootup.

    Only enabled if "bootconfig" is on the real kernel command line.

    - Created dynamic event creation.

    Merges common code between creating synthetic events and kprobe
    events.

    - Rename perf "ring_buffer" structure to "perf_buffer"

    - Rename ftrace "ring_buffer" structure to "trace_buffer"

    Had to rename existing "trace_buffer" to "array_buffer"

    - Allow trace_printk() to work withing (some) tracing code.

    - Sort of tracing configs to be a little better organized

    - Fixed bug where ftrace_graph hash was not being protected properly

    - Various other small fixes and clean ups

    * tag 'trace-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (88 commits)
    bootconfig: Show the number of nodes on boot message
    tools/bootconfig: Show the number of bootconfig nodes
    bootconfig: Add more parse error messages
    bootconfig: Use bootconfig instead of boot config
    ftrace: Protect ftrace_graph_hash with ftrace_sync
    ftrace: Add comment to why rcu_dereference_sched() is open coded
    tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu
    tracing: Annotate ftrace_graph_hash pointer with __rcu
    bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline
    tracing: Use seq_buf for building dynevent_cmd string
    tracing: Remove useless code in dynevent_arg_pair_add()
    tracing: Remove check_arg() callbacks from dynevent args
    tracing: Consolidate some synth_event_trace code
    tracing: Fix now invalid var_ref_vals assumption in trace action
    tracing: Change trace_boot to use synth_event interface
    tracing: Move tracing selftests to bottom of menu
    tracing: Move mmio tracer config up with the other tracers
    tracing: Move tracing test module configs together
    tracing: Move all function tracing configs together
    tracing: Documentation for in-kernel synthetic event API
    ...

    Linus Torvalds
     

04 Feb, 2020

1 commit

  • In old days, the "host-progs" syntax was used for specifying host
    programs. It was renamed to the current "hostprogs-y" in 2004.

    It is typically useful in scripts/Makefile because it allows Kbuild to
    selectively compile host programs based on the kernel configuration.

    This commit renames like follows:

    always -> always-y
    hostprogs-y -> hostprogs

    So, scripts/Makefile will look like this:

    always-$(CONFIG_BUILD_BIN2C) += ...
    always-$(CONFIG_KALLSYMS) += ...
    ...
    hostprogs := $(always-y) $(always-m)

    I think this makes more sense because a host program is always a host
    program, irrespective of the kernel configuration. We want to specify
    which ones to compile by CONFIG options, so always-y will be handier.

    The "always", "hostprogs-y", "hostprogs-m" will be kept for backward
    compatibility for a while.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

01 Feb, 2020

2 commits

  • Don't instrument 3 more files that contain debugging facilities and
    produce large amounts of uninteresting coverage for every syscall.

    The following snippets are sprinkled all over the place in kcov traces
    in a debugging kernel. We already try to disable instrumentation of
    stack unwinding code and of most debug facilities. I guess we did not
    use fault-inject.c at the time, and stacktrace.c was somehow missed (or
    something has changed in kernel/configs). This change both speeds up
    kcov (kernel doesn't need to store these PCs, user-space doesn't need to
    process them) and frees trace buffer capacity for more useful coverage.

    should_fail
    lib/fault-inject.c:149
    fail_dump
    lib/fault-inject.c:45

    stack_trace_save
    kernel/stacktrace.c:124
    stack_trace_consume_entry
    kernel/stacktrace.c:86
    stack_trace_consume_entry
    kernel/stacktrace.c:89
    ... a hundred frames skipped ...
    stack_trace_consume_entry
    kernel/stacktrace.c:93
    stack_trace_consume_entry
    kernel/stacktrace.c:86

    Link: http://lkml.kernel.org/r/20200116111449.217744-1-dvyukov@gmail.com
    Signed-off-by: Dmitry Vyukov
    Reviewed-by: Andrey Konovalov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Vyukov
     
  • Patch series "S390 hardware support for kernel zlib", v3.

    With IBM z15 mainframe the new DFLTCC instruction is available. It
    implements deflate algorithm in hardware (Nest Acceleration Unit - NXU)
    with estimated compression and decompression performance orders of
    magnitude faster than the current zlib.

    This patchset adds s390 hardware compression support to kernel zlib.
    The code is based on the userspace zlib implementation:

    https://github.com/madler/zlib/pull/410

    The coding style is also preserved for future maintainability. There is
    only limited set of userspace zlib functions represented in kernel.
    Apart from that, all the memory allocation should be performed in
    advance. Thus, the workarea structures are extended with the parameter
    lists required for the DEFLATE CONVENTION CALL instruction.

    Since kernel zlib itself does not support gzip headers, only Adler-32
    checksum is processed (also can be produced by DFLTCC facility). Like
    it was implemented for userspace, kernel zlib will compress in hardware
    on level 1, and in software on all other levels. Decompression will
    always happen in hardware (when enabled).

    Two DFLTCC compression calls produce the same results only when they
    both are made on machines of the same generation, and when the
    respective buffers have the same offset relative to the start of the
    page. Therefore care should be taken when using hardware compression
    when reproducible results are desired. However it does always produce
    the standard conform output which can be inflated anyway.

    The new kernel command line parameter 'dfltcc' is introduced to
    configure s390 zlib hardware support:

    Format: { on | off | def_only | inf_only | always }
    on: s390 zlib hardware support for compression on
    level 1 and decompression (default)
    off: No s390 zlib hardware support
    def_only: s390 zlib hardware support for deflate
    only (compression on level 1)
    inf_only: s390 zlib hardware support for inflate
    only (decompression)
    always: Same as 'on' but ignores the selected compression
    level always using hardware support (used for debugging)

    The main purpose of the integration of the NXU support into the kernel
    zlib is the use of hardware deflate in btrfs filesystem with on-the-fly
    compression enabled. Apart from that, hardware support can also be used
    during boot for decompressing the kernel or the ramdisk image

    With the patch for btrfs expanding zlib buffer from 1 to 4 pages (patch
    6) the following performance results have been achieved using the
    ramdisk with btrfs. These are relative numbers based on throughput rate
    and compression ratio for zlib level 1:

    Input data Deflate rate Inflate rate Compression ratio
    NXU/Software NXU/Software NXU/Software
    stream of zeroes 1.46 1.02 1.00
    random ASCII data 10.44 3.00 0.96
    ASCII text (dickens) 6,21 3.33 0.94
    binary data (vmlinux) 8,37 3.90 1.02

    This means that s390 hardware deflate can provide up to 10 times faster
    compression (on level 1) and up to 4 times faster decompression (refers
    to all compression levels) for btrfs zlib.

    Disclaimer: Performance results are based on IBM internal tests using DD
    command-line utility on btrfs on a Fedora 30 based internal driver in
    native LPAR on a z15 system. Results may vary based on individual
    workload, configuration and software levels.

    This patch (of 9):

    Create zlib_dfltcc library with the s390 DEFLATE CONVERSION CALL
    implementation and related compression functions. Update zlib_deflate
    functions with the hooks for s390 hardware support and adjust workspace
    structures with extra parameter lists required for hardware deflate.

    Link: http://lkml.kernel.org/r/20200103223334.20669-2-zaslonko@linux.ibm.com
    Signed-off-by: Ilya Leoshkevich
    Signed-off-by: Mikhail Zaslonko
    Co-developed-by: Ilya Leoshkevich
    Cc: Chris Mason
    Cc: Christian Borntraeger
    Cc: David Sterba
    Cc: Eduard Shishkin
    Cc: Heiko Carstens
    Cc: Josef Bacik
    Cc: Richard Purdie
    Cc: Vasily Gorbik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mikhail Zaslonko
     

14 Jan, 2020

1 commit

  • Extra Boot Config (XBC) allows admin to pass a tree-structured
    boot configuration file when boot up the kernel. This extends
    the kernel command line in an efficient way.

    Boot config will contain some key-value commands, e.g.

    key.word = value1
    another.key.word = value2

    It can fold same keys with braces, also you can write array
    data. For example,

    key {
    word1 {
    setting1 = data
    setting2
    }
    word2.array = "val1", "val2"
    }

    User can access these key-value pair and tree structure via
    SKC APIs.

    Link: http://lkml.kernel.org/r/157867221257.17873.1775090991929862549.stgit@devnote2

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

09 Jan, 2020

1 commit

  • In the implementation of kexec_file_loaded-based kdump for arm64,
    fdt_appendprop_addrrange() will be needed.

    So include fdt_addresses.c in making libfdt.

    Signed-off-by: AKASHI Takahiro
    Cc: Rob Herring
    Cc: Frank Rowand
    Signed-off-by: Will Deacon

    AKASHI Takahiro
     

06 Dec, 2019

1 commit

  • Pull ARM SoC driver updates from Olof Johansson:
    "Various driver updates for platforms:

    - A larger set of work on Tegra 2/3 around memory controller and
    regulator features, some fuse cleanups, etc..

    - MMP platform drivers, in particular for USB PHY, and other smaller
    additions.

    - Samsung Exynos 5422 driver for DMC (dynamic memory configuration),
    and ASV (adaptive voltage), allowing the platform to run at more
    optimal operating points.

    - Misc refactorings and support for RZ/G2N and R8A774B1 from Renesas

    - Clock/reset control driver for TI/OMAP

    - Meson-A1 reset controller support

    - Qualcomm sdm845 and sda845 SoC IDs for socinfo"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (150 commits)
    firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT
    soc: fsl: add RCPM driver
    dt-bindings: fsl: rcpm: Add 'little-endian' and update Chassis definition
    memory: tegra: Consolidate registers definition into common header
    memory: tegra: Ensure timing control debug features are disabled
    memory: tegra: Introduce Tegra30 EMC driver
    memory: tegra: Do not handle error from wait_for_completion_timeout()
    memory: tegra: Increase handshake timeout on Tegra20
    memory: tegra: Print a brief info message about EMC timings
    memory: tegra: Pre-configure debug register on Tegra20
    memory: tegra: Include io.h instead of iopoll.h
    memory: tegra: Adapt for Tegra20 clock driver changes
    memory: tegra: Don't set EMC rate to maximum on probe for Tegra20
    memory: tegra: Add gr2d and gr3d to DRM IOMMU group
    memory: tegra: Set DMA mask based on supported address bits
    soc: at91: Add Atmel SFR SN (Serial Number) support
    memory: atmel-ebi: switch to SPDX license identifiers
    memory: atmel-ebi: move NUM_CS definition inside EBI driver
    soc: mediatek: Refactor bus protection control
    soc: mediatek: Refactor sram control
    ...

    Linus Torvalds
     

27 Nov, 2019

1 commit

  • Pull ACPI updates from Rafael Wysocki:
    "These update the ACPICA code in the kernel to upstream revision
    20191018, add support for EFI specific purpose memory, update the ACPI
    EC driver to make it work on systems with hardware-reduced ACPI,
    improve ACPI-based device enumeration for some platforms, rework the
    lid blacklist handling in the button driver and add more lid quirks to
    it, unify ACPI _HID/_UID matching, fix assorted issues and clean up
    the code and documentation.

    Specifics:

    - Update the ACPICA code in the kernel to upstream revision 20191018
    including:
    * Fixes for Clang warnings (Bob Moore)
    * Fix for possible overflow in get_tick_count() (Bob Moore)
    * Introduction of acpi_unload_table() (Bob Moore)
    * Debugger and utilities updates (Erik Schmauss)
    * Fix for unloading tables loaded via configfs (Nikolaus Voss)

    - Add support for EFI specific purpose memory to optionally allow
    either application-exclusive or core-kernel-mm managed access to
    differentiated memory (Dan Williams)

    - Fix and clean up processing of the HMAT table (Brice Goglin, Qian
    Cai, Tao Xu)

    - Update the ACPI EC driver to make it work on systems with
    hardware-reduced ACPI (Daniel Drake)

    - Always build in support for the Generic Event Device (GED) to allow
    one kernel binary to work both on systems with full hardware ACPI
    and hardware-reduced ACPI (Arjan van de Ven)

    - Fix the table unload mechanism to unregister platform devices
    created when the given table was loaded (Andy Shevchenko)

    - Rework the lid blacklist handling in the button driver and add more
    lid quirks to it (Hans de Goede)

    - Improve ACPI-based device enumeration for some platforms based on
    Intel BayTrail SoCs (Hans de Goede)

    - Add an OpRegion driver for the Cherry Trail Crystal Cove PMIC and
    prevent handlers from being registered for unhandled PMIC OpRegions
    (Hans de Goede)

    - Unify ACPI _HID/_UID matching (Andy Shevchenko)

    - Clean up documentation and comments (Cao jin, James Pack, Kacper
    Piwiński)"

    * tag 'acpi-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
    ACPI: OSI: Shoot duplicate word
    ACPI: HMAT: use %u instead of %d to print u32 values
    ACPI: NUMA: HMAT: fix a section mismatch
    ACPI: HMAT: don't mix pxm and nid when setting memory target processor_pxm
    ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device
    ACPI: NUMA: HMAT: Register HMAT at device_initcall level
    device-dax: Add a driver for "hmem" devices
    dax: Fix alloc_dax_region() compile warning
    lib: Uplevel the pmem "region" ida to a global allocator
    x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP
    arm/efi: EFI soft reservation to memblock
    x86/efi: EFI soft reservation to E820 enumeration
    efi: Common enable/disable infrastructure for EFI soft reservation
    x86/efi: Push EFI_MEMMAP check into leaf routines
    efi: Enumerate EFI_MEMORY_SP
    ACPI: NUMA: Establish a new drivers/acpi/numa/ directory
    ACPICA: Update version to 20191018
    ACPICA: debugger: remove leading whitespaces when converting a string to a buffer
    ACPICA: acpiexec: initialize all simple types and field units from user input
    ACPICA: debugger: add field unit support for acpi_db_get_next_token
    ...

    Linus Torvalds
     

26 Nov, 2019

2 commits

  • Pull crypto updates from Herbert Xu:
    "API:
    - Add library interfaces of certain crypto algorithms for WireGuard
    - Remove the obsolete ablkcipher and blkcipher interfaces
    - Move add_early_randomness() out of rng_mutex

    Algorithms:
    - Add blake2b shash algorithm
    - Add blake2s shash algorithm
    - Add curve25519 kpp algorithm
    - Implement 4 way interleave in arm64/gcm-ce
    - Implement ciphertext stealing in powerpc/spe-xts
    - Add Eric Biggers's scalar accelerated ChaCha code for ARM
    - Add accelerated 32r2 code from Zinc for MIPS
    - Add OpenSSL/CRYPTOGRAMS poly1305 implementation for ARM and MIPS

    Drivers:
    - Fix entropy reading failures in ks-sa
    - Add support for sam9x60 in atmel
    - Add crypto accelerator for amlogic GXL
    - Add sun8i-ce Crypto Engine
    - Add sun8i-ss cryptographic offloader
    - Add a host of algorithms to inside-secure
    - Add NPCM RNG driver
    - add HiSilicon HPRE accelerator
    - Add HiSilicon TRNG driver"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (285 commits)
    crypto: vmx - Avoid weird build failures
    crypto: lib/chacha20poly1305 - use chacha20_crypt()
    crypto: x86/chacha - only unregister algorithms if registered
    crypto: chacha_generic - remove unnecessary setkey() functions
    crypto: amlogic - enable working on big endian kernel
    crypto: sun8i-ce - enable working on big endian
    crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER
    hwrng: ks-sa - Enable COMPILE_TEST
    crypto: essiv - remove redundant null pointer check before kfree
    crypto: atmel-aes - Change data type for "lastc" buffer
    crypto: atmel-tdes - Set the IV after {en,de}crypt
    crypto: sun4i-ss - fix big endian issues
    crypto: sun4i-ss - hide the Invalid keylen message
    crypto: sun4i-ss - use crypto_ahash_digestsize
    crypto: sun4i-ss - remove dependency on not 64BIT
    crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
    MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver
    crypto: hisilicon - add DebugFS for HiSilicon SEC
    Documentation: add DebugFS doc for HiSilicon SEC
    crypto: hisilicon - add SRIOV for HiSilicon SEC
    ...

    Linus Torvalds
     
  • Pull printk updates from Petr Mladek:

    - Allow to print symbolic error names via new %pe modifier.

    - Use pr_warn() instead of the remaining pr_warning() calls. Fix
    formatting of the related lines.

    - Add VSPRINTF entry to MAINTAINERS.

    * tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits)
    checkpatch: don't warn about new vsprintf pointer extension '%pe'
    MAINTAINERS: Add VSPRINTF
    tools lib api: Renaming pr_warning to pr_warn
    ASoC: samsung: Use pr_warn instead of pr_warning
    lib: cpu_rmap: Use pr_warn instead of pr_warning
    trace: Use pr_warn instead of pr_warning
    dma-debug: Use pr_warn instead of pr_warning
    vgacon: Use pr_warn instead of pr_warning
    fs: afs: Use pr_warn instead of pr_warning
    sh/intc: Use pr_warn instead of pr_warning
    scsi: Use pr_warn instead of pr_warning
    platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
    platform/x86: asus-laptop: Use pr_warn instead of pr_warning
    platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning
    oprofile: Use pr_warn instead of pr_warning
    of: Use pr_warn instead of pr_warning
    macintosh: Use pr_warn instead of pr_warning
    idsn: Use pr_warn instead of pr_warning
    ide: Use pr_warn instead of pr_warning
    crypto: n2: Use pr_warn instead of pr_warning
    ...

    Linus Torvalds
     

17 Nov, 2019

1 commit

  • Currently, our generic ChaCha implementation consists of a permute
    function in lib/chacha.c that operates on the 64-byte ChaCha state
    directly [and which is always included into the core kernel since it
    is used by the /dev/random driver], and the crypto API plumbing to
    expose it as a skcipher.

    In order to support in-kernel users that need the ChaCha streamcipher
    but have no need [or tolerance] for going through the abstractions of
    the crypto API, let's expose the streamcipher bits via a library API
    as well, in a way that permits the implementation to be superseded by
    an architecture specific one if provided.

    So move the streamcipher code into a separate module in lib/crypto,
    and expose the init() and crypt() routines to users of the library.

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     

07 Nov, 2019

1 commit

  • In preparation for handling platform differentiated memory types beyond
    persistent memory, uplevel the "region" identifier to a global number
    space. This enables a device-dax instance to be registered to any memory
    type with guaranteed unique names.

    Signed-off-by: Dan Williams
    Acked-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki

    Dan Williams
     

05 Nov, 2019

1 commit

  • Object file logic_pio.o is always built.

    Ideally the object file should only be built when required. This is
    tricky, as that would be for archs which define PCI_IOBASE, but no common
    config option exists for that.

    For now, continue to always build but at least ensure the symbols are not
    included in the vmlinux when not referenced.

    Suggested-by: Arnd Bergmann
    Signed-off-by: John Garry
    Signed-off-by: Wei Xu

    John Garry
     

02 Nov, 2019

1 commit

  • Add a KUnit test for the kernel doubly linked list implementation in
    include/linux/list.h

    Each test case (list_test_x) is focused on testing the behaviour of the
    list function/macro 'x'. None of the tests pass invalid lists to these
    macros, and so should behave identically with DEBUG_LIST enabled and
    disabled.

    Note that, at present, it only tests the list_ types (not the
    singly-linked hlist_), and does not yet test all of the
    list_for_each_entry* macros (and some related things like
    list_prepare_entry).

    Ignoring checkpatch.pl spurious errors related to its handling of for_each
    and other list macros. checkpatch.pl expects anything with for_each in its
    name to be a loop and expects that the open brace is placed on the same
    line as for a for loop. In this case, test case naming scheme includes
    name of the macro it is testing, which results in the spurious errors.
    Commit message updated by Shuah Khan

    Signed-off-by: David Gow
    Reviewed-by: Brendan Higgins
    Tested-by: Brendan Higgins
    Signed-off-by: Shuah Khan

    David Gow
     

17 Oct, 2019

1 commit

  • It has been suggested several times to extend vsnprintf() to be able
    to convert the numeric value of ENOSPC to print "ENOSPC". This
    implements that as a %p extension: With %pe, one can do

    if (IS_ERR(foo)) {
    pr_err("Sorry, can't do that: %pe\n", foo);
    return PTR_ERR(foo);
    }

    instead of what is seen in quite a few places in the kernel:

    if (IS_ERR(foo)) {
    pr_err("Sorry, can't do that: %ld\n", PTR_ERR(foo));
    return PTR_ERR(foo);
    }

    If the value passed to %pe is an ERR_PTR, but the library function
    errname() added here doesn't know about the value, the value is simply
    printed in decimal. If the value passed to %pe is not an ERR_PTR, we
    treat it as an ordinary %p and thus print the hashed value (passing
    non-ERR_PTR values to %pe indicates a bug in the caller, but we can't
    do much about that).

    With my embedded hat on, and because it's not very invasive to do,
    I've made it possible to remove this. The errname() function and
    associated lookup tables take up about 3K. For most, that's probably
    quite acceptable and a price worth paying for more readable
    dmesg (once this starts getting used), while for those that disable
    printk() it's of very little use - I don't see a
    procfs/sysfs/seq_printf() file reasonably making use of this - and
    they clearly want to squeeze vmlinux as much as possible. Hence the
    default y if PRINTK.

    The symbols to include have been found by massaging the output of

    find arch include -iname 'errno*.h' | xargs grep -E 'define\s*E'

    In the cases where some common aliasing exists
    (e.g. EAGAIN=EWOULDBLOCK on all platforms, EDEADLOCK=EDEADLK on most),
    I've moved the more popular one (in terms of 'git grep -w Efoo | wc)
    to the bottom so that one takes precedence.

    Link: http://lkml.kernel.org/r/20191015190706.15989-1-linux@rasmusvillemoes.dk
    To: "Jonathan Corbet"
    To: linux-kernel@vger.kernel.org
    Cc: "Andy Shevchenko"
    Cc: "Andrew Morton"
    Cc: "Joe Perches"
    Cc: linux-doc@vger.kernel.org
    Signed-off-by: Rasmus Villemoes
    Acked-by: Uwe Kleine-König
    Reviewed-by: Petr Mladek
    [andy.shevchenko@gmail.com: use abs()]
    Acked-by: Andy Shevchenko
    Signed-off-by: Petr Mladek

    Rasmus Villemoes
     

01 Oct, 2019

1 commit

  • KUnit is a new unit testing framework for the kernel and when used is
    built into the kernel as a part of it. Add KUnit to the lib Kconfig and
    Makefile to allow it to be actually built.

    Signed-off-by: Brendan Higgins
    Cc: Randy Dunlap
    Cc: Andrew Morton
    Cc: Masahiro Yamada
    Cc: Kees Cook
    Reviewed-by: Stephen Boyd
    Signed-off-by: Shuah Khan

    Brendan Higgins
     

06 Sep, 2019

1 commit


14 Aug, 2019

1 commit

  • Since architectures can implement ftrace using a variety of mechanisms,
    generic code should always use CC_FLAGS_FTRACE rather than assuming that
    ftrace is built using -pg.

    Since commit:

    2464a609ded09420 ("ftrace: do not trace library functions")

    ... lib/Makefile has removed CC_FLAGS_FTRACE from KBUILD_CFLAGS, so ftrace is
    disabled for all files under lib/.

    Given that, we shouldn't explicitly remove -pg when building
    lib/string.o, as this is redundant and bad form.

    Clean things up accordingly.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Signed-off-by: Borislav Petkov
    Cc: Andrew Morton
    Cc: Andy Shevchenko
    Cc: Ard Biesheuvel
    Cc: Arnd Bergmann
    Cc: Coly Li
    Cc: Gary R Hook
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: Kent Overstreet
    Cc: Masahiro Yamada
    Cc: Matthew Wilcox
    Link: https://lkml.kernel.org/r/20190806162539.51918-1-mark.rutland@arm.com

    Mark Rutland
     

03 Aug, 2019

1 commit

  • objtool points out several conditions that it does not like, depending
    on the combination with other configuration options and compiler
    variants:

    stack protector:
    lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0xbf: call to __stack_chk_fail() with UACCESS enabled
    lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0xbe: call to __stack_chk_fail() with UACCESS enabled

    stackleak plugin:
    lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x4a: call to stackleak_track_stack() with UACCESS enabled
    lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x4a: call to stackleak_track_stack() with UACCESS enabled

    kasan:
    lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x25: call to memcpy() with UACCESS enabled
    lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x25: call to memcpy() with UACCESS enabled

    The stackleak and kasan options just need to be disabled for this file
    as we do for other files already. For the stack protector, we already
    attempt to disable it, but this fails on clang because the check is
    mixed with the gcc specific -fno-conserve-stack option. According to
    Andrey Ryabinin, that option is not even needed, dropping it here fixes
    the stackprotector issue.

    Link: http://lkml.kernel.org/r/20190722125139.1335385-1-arnd@arndb.de
    Link: https://lore.kernel.org/lkml/20190617123109.667090-1-arnd@arndb.de/t/
    Link: https://lore.kernel.org/lkml/20190722091050.2188664-1-arnd@arndb.de/t/
    Fixes: d08965a27e84 ("x86/uaccess, ubsan: Fix UBSAN vs. SMAP")
    Signed-off-by: Arnd Bergmann
    Reviewed-by: Andrey Ryabinin
    Cc: Josh Poimboeuf
    Cc: Peter Zijlstra
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Dmitry Vyukov
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: Matthew Wilcox
    Cc: Ard Biesheuvel
    Cc: Andy Shevchenko
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

20 Jul, 2019

1 commit

  • Pull ARM SoC-related driver updates from Olof Johansson:
    "Various driver updates for platforms and a couple of the small driver
    subsystems we merge through our tree:

    - A driver for SCU (system control) on NXP i.MX8QXP

    - Qualcomm Always-on Subsystem messaging driver (AOSS QMP)

    - Qualcomm PM support for MSM8998

    - Support for a newer version of DRAM PHY driver for Broadcom (DPFE)

    - Reset controller support for Bitmain BM1880

    - TI SCI (System Control Interface) support for CPU control on AM654
    processors

    - More TI sysc refactoring and rework"

    * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits)
    reset: remove redundant null check on pointer dev
    soc: rockchip: work around clang warning
    dt-bindings: reset: imx7: Fix the spelling of 'indices'
    soc: imx: Add i.MX8MN SoC driver support
    soc: aspeed: lpc-ctrl: Fix probe error handling
    soc: qcom: geni: Add support for ACPI
    firmware: ti_sci: Fix gcc unused-but-set-variable warning
    firmware: ti_sci: Use the correct style for SPDX License Identifier
    soc: imx8: Use existing of_root directly
    soc: imx8: Fix potential kernel dump in error path
    firmware/psci: psci_checker: Park kthreads before stopping them
    memory: move jedec_ddr.h from include/memory to drivers/memory/
    memory: move jedec_ddr_data.c from lib/ to drivers/memory/
    MAINTAINERS: Remove myself as qcom maintainer
    soc: aspeed: lpc-ctrl: make parameter optional
    soc: qcom: apr: Don't use reg for domain id
    soc: qcom: fix QCOM_AOSS_QMP dependency and build errors
    memory: tegra: Fix -Wunused-const-variable
    firmware: tegra: Early resume BPMP
    soc/tegra: Select pinctrl for Tegra194
    ...

    Linus Torvalds
     

17 Jul, 2019

1 commit

  • Add tests for heap and pagealloc initialization. These can be used to
    check init_on_alloc and init_on_free implementations as well as other
    approaches to initialization.

    Expected test output in the case the kernel provides heap initialization
    (e.g. when running with either init_on_alloc=1 or init_on_free=1):

    test_meminit: all 10 tests in test_pages passed
    test_meminit: all 40 tests in test_kvmalloc passed
    test_meminit: all 60 tests in test_kmemcache passed
    test_meminit: all 10 tests in test_rcu_persistent passed
    test_meminit: all 120 tests passed!

    Link: http://lkml.kernel.org/r/20190529123812.43089-4-glider@google.com
    Signed-off-by: Alexander Potapenko
    Acked-by: Kees Cook
    Cc: Christoph Lameter
    Cc: Nick Desaulniers
    Cc: Kostya Serebryany
    Cc: Dmitry Vyukov
    Cc: Sandeep Patil
    Cc: Laura Abbott
    Cc: Jann Horn
    Cc: Marco Elver
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Potapenko
     

12 Jul, 2019

1 commit

  • Pull networking updates from David Miller:
    "Some highlights from this development cycle:

    1) Big refactoring of ipv6 route and neigh handling to support
    nexthop objects configurable as units from userspace. From David
    Ahern.

    2) Convert explored_states in BPF verifier into a hash table,
    significantly decreased state held for programs with bpf2bpf
    calls, from Alexei Starovoitov.

    3) Implement bpf_send_signal() helper, from Yonghong Song.

    4) Various classifier enhancements to mvpp2 driver, from Maxime
    Chevallier.

    5) Add aRFS support to hns3 driver, from Jian Shen.

    6) Fix use after free in inet frags by allocating fqdirs dynamically
    and reworking how rhashtable dismantle occurs, from Eric Dumazet.

    7) Add act_ctinfo packet classifier action, from Kevin
    Darbyshire-Bryant.

    8) Add TFO key backup infrastructure, from Jason Baron.

    9) Remove several old and unused ISDN drivers, from Arnd Bergmann.

    10) Add devlink notifications for flash update status to mlxsw driver,
    from Jiri Pirko.

    11) Lots of kTLS offload infrastructure fixes, from Jakub Kicinski.

    12) Add support for mv88e6250 DSA chips, from Rasmus Villemoes.

    13) Various enhancements to ipv6 flow label handling, from Eric
    Dumazet and Willem de Bruijn.

    14) Support TLS offload in nfp driver, from Jakub Kicinski, Dirk van
    der Merwe, and others.

    15) Various improvements to axienet driver including converting it to
    phylink, from Robert Hancock.

    16) Add PTP support to sja1105 DSA driver, from Vladimir Oltean.

    17) Add mqprio qdisc offload support to dpaa2-eth, from Ioana
    Radulescu.

    18) Add devlink health reporting to mlx5, from Moshe Shemesh.

    19) Convert stmmac over to phylink, from Jose Abreu.

    20) Add PTP PHC (Physical Hardware Clock) support to mlxsw, from
    Shalom Toledo.

    21) Add nftables SYNPROXY support, from Fernando Fernandez Mancera.

    22) Convert tcp_fastopen over to use SipHash, from Ard Biesheuvel.

    23) Track spill/fill of constants in BPF verifier, from Alexei
    Starovoitov.

    24) Support bounded loops in BPF, from Alexei Starovoitov.

    25) Various page_pool API fixes and improvements, from Jesper Dangaard
    Brouer.

    26) Just like ipv4, support ref-countless ipv6 route handling. From
    Wei Wang.

    27) Support VLAN offloading in aquantia driver, from Igor Russkikh.

    28) Add AF_XDP zero-copy support to mlx5, from Maxim Mikityanskiy.

    29) Add flower GRE encap/decap support to nfp driver, from Pieter
    Jansen van Vuuren.

    30) Protect against stack overflow when using act_mirred, from John
    Hurley.

    31) Allow devmap map lookups from eBPF, from Toke Høiland-Jørgensen.

    32) Use page_pool API in netsec driver, Ilias Apalodimas.

    33) Add Google gve network driver, from Catherine Sullivan.

    34) More indirect call avoidance, from Paolo Abeni.

    35) Add kTLS TX HW offload support to mlx5, from Tariq Toukan.

    36) Add XDP_REDIRECT support to bnxt_en, from Andy Gospodarek.

    37) Add MPLS manipulation actions to TC, from John Hurley.

    38) Add sending a packet to connection tracking from TC actions, and
    then allow flower classifier matching on conntrack state. From
    Paul Blakey.

    39) Netfilter hw offload support, from Pablo Neira Ayuso"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2080 commits)
    net/mlx5e: Return in default case statement in tx_post_resync_params
    mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync().
    net: dsa: add support for BRIDGE_MROUTER attribute
    pkt_sched: Include const.h
    net: netsec: remove static declaration for netsec_set_tx_de()
    net: netsec: remove superfluous if statement
    netfilter: nf_tables: add hardware offload support
    net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload
    net: flow_offload: add flow_block_cb_is_busy() and use it
    net: sched: remove tcf block API
    drivers: net: use flow block API
    net: sched: use flow block API
    net: flow_offload: add flow_block_cb_{priv, incref, decref}()
    net: flow_offload: add list handling functions
    net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()
    net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*
    net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND
    net: flow_offload: add flow_block_cb_setup_simple()
    net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC
    net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC
    ...

    Linus Torvalds
     

02 Jul, 2019

1 commit

  • Since this is not really a device with all capabilities, this test
    ensures that it has *enough* to make it through the data path
    without causing unwanted side-effects (read crash!).

    Signed-off-by: Mahesh Bandewar
    Signed-off-by: David S. Miller

    Mahesh Bandewar
     

26 Jun, 2019

1 commit


20 Jun, 2019

1 commit


17 Jun, 2019

1 commit

  • jedec_ddr_data.c exports 3 symbols, and all of them are only
    referenced from drivers/memory/{emif.c,of_memory.c}

    drivers/memory/ is a better location than lib/.

    I removed the Kconfig prompt "JEDEC DDR data" because it is only
    select'ed by TI_EMIF, and there is no other user. There is no good
    reason in making it a user-configurable CONFIG option.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Olof Johansson

    Masahiro Yamada
     

15 May, 2019

1 commit

  • For better maintenance and expansion move the mathematic helpers to the
    separate folder.

    No functional change intended.

    Note, the int_sqrt() is not used as a part of lib, so, moved to regular
    obj.

    Link: http://lkml.kernel.org/r/20190323172531.80025-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mauro Carvalho Chehab
    Cc: Randy Dunlap
    Cc: Thierry Reding
    Cc: Lee Jones
    Cc: Daniel Thompson
    Cc: Ray Jui
    [mchehab+samsung@kernel.org: fix broken doc references for div64.c and gcd.c]
    Link: http://lkml.kernel.org/r/734f49bae5d4052b3c25691dfefad59bea2e5843.1555580999.git.mchehab+samsung@kernel.org
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Shevchenko
     

08 May, 2019

1 commit

  • Pull networking updates from David Miller:
    "Highlights:

    1) Support AES128-CCM ciphers in kTLS, from Vakul Garg.

    2) Add fib_sync_mem to control the amount of dirty memory we allow to
    queue up between synchronize RCU calls, from David Ahern.

    3) Make flow classifier more lockless, from Vlad Buslov.

    4) Add PHY downshift support to aquantia driver, from Heiner
    Kallweit.

    5) Add SKB cache for TCP rx and tx, from Eric Dumazet. This reduces
    contention on SLAB spinlocks in heavy RPC workloads.

    6) Partial GSO offload support in XFRM, from Boris Pismenny.

    7) Add fast link down support to ethtool, from Heiner Kallweit.

    8) Use siphash for IP ID generator, from Eric Dumazet.

    9) Pull nexthops even further out from ipv4/ipv6 routes and FIB
    entries, from David Ahern.

    10) Move skb->xmit_more into a per-cpu variable, from Florian
    Westphal.

    11) Improve eBPF verifier speed and increase maximum program size,
    from Alexei Starovoitov.

    12) Eliminate per-bucket spinlocks in rhashtable, and instead use bit
    spinlocks. From Neil Brown.

    13) Allow tunneling with GUE encap in ipvs, from Jacky Hu.

    14) Improve link partner cap detection in generic PHY code, from
    Heiner Kallweit.

    15) Add layer 2 encap support to bpf_skb_adjust_room(), from Alan
    Maguire.

    16) Remove SKB list implementation assumptions in SCTP, your's truly.

    17) Various cleanups, optimizations, and simplifications in r8169
    driver. From Heiner Kallweit.

    18) Add memory accounting on TX and RX path of SCTP, from Xin Long.

    19) Switch PHY drivers over to use dynamic featue detection, from
    Heiner Kallweit.

    20) Support flow steering without masking in dpaa2-eth, from Ioana
    Ciocoi.

    21) Implement ndo_get_devlink_port in netdevsim driver, from Jiri
    Pirko.

    22) Increase the strict parsing of current and future netlink
    attributes, also export such policies to userspace. From Johannes
    Berg.

    23) Allow DSA tag drivers to be modular, from Andrew Lunn.

    24) Remove legacy DSA probing support, also from Andrew Lunn.

    25) Allow ll_temac driver to be used on non-x86 platforms, from Esben
    Haabendal.

    26) Add a generic tracepoint for TX queue timeouts to ease debugging,
    from Cong Wang.

    27) More indirect call optimizations, from Paolo Abeni"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1763 commits)
    cxgb4: Fix error path in cxgb4_init_module
    net: phy: improve pause mode reporting in phy_print_status
    dt-bindings: net: Fix a typo in the phy-mode list for ethernet bindings
    net: macb: Change interrupt and napi enable order in open
    net: ll_temac: Improve error message on error IRQ
    net/sched: remove block pointer from common offload structure
    net: ethernet: support of_get_mac_address new ERR_PTR error
    net: usb: smsc: fix warning reported by kbuild test robot
    staging: octeon-ethernet: Fix of_get_mac_address ERR_PTR check
    net: dsa: support of_get_mac_address new ERR_PTR error
    net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats
    vrf: sit mtu should not be updated when vrf netdev is the link
    net: dsa: Fix error cleanup path in dsa_init_module
    l2tp: Fix possible NULL pointer dereference
    taprio: add null check on sched_nest to avoid potential null pointer dereference
    net: mvpp2: cls: fix less than zero check on a u32 variable
    net_sched: sch_fq: handle non connected flows
    net_sched: sch_fq: do not assume EDT packets are ordered
    net: hns3: use devm_kcalloc when allocating desc_cb
    net: hns3: some cleanup for struct hns3_enet_ring
    ...

    Linus Torvalds
     

07 May, 2019

2 commits

  • …/git/shuah/linux-kselftest

    Pull Kselftest updates from Shuah Khan:

    - fixes to seccomp test, and kselftest framework

    - cleanups to remove duplicate header defines

    - fixes to efivarfs "make clean" target

    - cgroup cleanup path

    - Moving the IMA kexec_load selftest to selftests/kexec work from Mimi
    Johar and Petr Vorel

    - A framework to kselftest for writing kernel test modules addition
    from Tobin C. Harding

    * tag 'linux-kselftest-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (29 commits)
    selftests: build and run gpio when output directory is the src dir
    selftests/ipc: Fix msgque compiler warnings
    selftests/efivarfs: clean up test files from test_create*()
    selftests: fix headers_install circular dependency
    selftests/kexec: update get_secureboot_mode
    selftests/kexec: make kexec_load test independent of IMA being enabled
    selftests/kexec: check kexec_load and kexec_file_load are enabled
    selftests/kexec: Add missing '=y' to config options
    selftests/kexec: kexec_file_load syscall test
    selftests/kexec: define "require_root_privileges"
    selftests/kexec: define common logging functions
    selftests/kexec: define a set of common functions
    selftests/kexec: cleanup the kexec selftest
    selftests/kexec: move the IMA kexec_load selftest to selftests/kexec
    selftests/harness: Add 30 second timeout per test
    selftests/seccomp: Handle namespace failures gracefully
    selftests: cgroup: fix cleanup path in test_memcg_subtree_control()
    selftests: efivarfs: remove the test_create_read file if it was exist
    rseq/selftests: Adapt number of threads to the number of detected cpus
    lib: Add test module for strscpy_pad
    ...

    Linus Torvalds
     
  • Pull objtool updates from Ingo Molnar:
    "This is a series from Peter Zijlstra that adds x86 build-time uaccess
    validation of SMAP to objtool, which will detect and warn about the
    following uaccess API usage bugs and weirdnesses:

    - call to %s() with UACCESS enabled
    - return with UACCESS enabled
    - return with UACCESS disabled from a UACCESS-safe function
    - recursive UACCESS enable
    - redundant UACCESS disable
    - UACCESS-safe disables UACCESS

    As it turns out not leaking uaccess permissions outside the intended
    uaccess functionality is hard when the interfaces are complex and when
    such bugs are mostly dormant.

    As a bonus we now also check the DF flag. We had at least one
    high-profile bug in that area in the early days of Linux, and the
    checking is fairly simple. The checks performed and warnings emitted
    are:

    - call to %s() with DF set
    - return with DF set
    - return with modified stack frame
    - recursive STD
    - redundant CLD

    It's all x86-only for now, but later on this can also be used for PAN
    on ARM and objtool is fairly cross-platform in principle.

    While all warnings emitted by this new checking facility that got
    reported to us were fixed, there might be GCC version dependent
    warnings that were not reported yet - which we'll address, should they
    trigger.

    The warnings are non-fatal build warnings"

    * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
    mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions
    x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation
    sched/x86_64: Don't save flags on context switch
    objtool: Add Direction Flag validation
    objtool: Add UACCESS validation
    objtool: Fix sibling call detection
    objtool: Rewrite alt->skip_orig
    objtool: Add --backtrace support
    objtool: Rewrite add_ignores()
    objtool: Handle function aliases
    objtool: Set insn->func for alternatives
    x86/uaccess, kcov: Disable stack protector
    x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP
    x86/uaccess, ubsan: Fix UBSAN vs. SMAP
    x86/uaccess, kasan: Fix KASAN vs SMAP
    x86/smap: Ditch __stringify()
    x86/uaccess: Introduce user_access_{save,restore}()
    x86/uaccess, signal: Fix AC=1 bloat
    x86/uaccess: Always inline user_access_begin()
    x86/uaccess, xen: Suppress SMAP warnings
    ...

    Linus Torvalds
     

03 May, 2019

1 commit

  • This provides an unified API for accessing register bit fields
    regardless of memory layout. The basic unit of data for these API
    functions is the u64. The process of transforming an u64 from native CPU
    encoding into the peripheral's encoding is called 'pack', and
    transforming it from peripheral to native CPU encoding is 'unpack'.

    Signed-off-by: Vladimir Oltean
    Signed-off-by: David S. Miller

    Vladimir Oltean
     

30 Apr, 2019

1 commit

  • Enablement of AMD's Secure Memory Encryption feature is determined very
    early after start_kernel() is entered. Part of this procedure involves
    scanning the command line for the parameter 'mem_encrypt'.

    To determine intended state, the function sme_enable() uses library
    functions cmdline_find_option() and strncmp(). Their use occurs early
    enough such that it cannot be assumed that any instrumentation subsystem
    is initialized.

    For example, making calls to a KASAN-instrumented function before KASAN
    is set up will result in the use of uninitialized memory and a boot
    failure.

    When AMD's SME support is enabled, conditionally disable instrumentation
    of these dependent functions in lib/string.c and arch/x86/lib/cmdline.c.

    [ bp: Get rid of intermediary nostackp var and cleanup whitespace. ]

    Fixes: aca20d546214 ("x86/mm: Add support to make use of Secure Memory Encryption")
    Reported-by: Li RongQing
    Signed-off-by: Gary R Hook
    Signed-off-by: Borislav Petkov
    Cc: Alexander Shishkin
    Cc: Andrew Morton
    Cc: Andy Shevchenko
    Cc: Boris Brezillon
    Cc: Coly Li
    Cc: "dave.hansen@linux.intel.com"
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: Kent Overstreet
    Cc: "luto@kernel.org"
    Cc: Masahiro Yamada
    Cc: Matthew Wilcox
    Cc: "mingo@redhat.com"
    Cc: "peterz@infradead.org"
    Cc: Sebastian Andrzej Siewior
    Cc: Thomas Gleixner
    Cc: x86-ml
    Link: https://lkml.kernel.org/r/155657657552.7116.18363762932464011367.stgit@sosrh3.amd.com

    Gary Hook
     

09 Apr, 2019

1 commit


03 Apr, 2019

1 commit

  • UBSAN can insert extra code in random locations; including AC=1
    sections. Typically this code is not safe and needs wrapping.

    So far, only __ubsan_handle_type_mismatch* have been observed in AC=1
    sections and therefore only those are annotated.

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Borislav Petkov
    Cc: Dmitry Vyukov
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

14 Mar, 2019

1 commit

  • Currently, the Kbuild core manipulates header search paths in a crazy
    way [1].

    To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
    the search paths in the srctree. Some Makefiles are already written in
    that way, but not all. The goal of this work is to make the notation
    consistent, and finally get rid of the gross hacks.

    Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
    ("kbuild: do not drop -I without parameter").

    [1]: https://patchwork.kernel.org/patch/9632347/

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

13 Mar, 2019

2 commits

  • All existing users have been converted to generic radix trees

    Link: http://lkml.kernel.org/r/20181217131929.11727-8-kent.overstreet@gmail.com
    Signed-off-by: Kent Overstreet
    Acked-by: Dave Hansen
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Eric Paris
    Cc: Marcelo Ricardo Leitner
    Cc: Matthew Wilcox
    Cc: Neil Horman
    Cc: Paul Moore
    Cc: Pravin B Shelar
    Cc: Shaohua Li
    Cc: Stephen Smalley
    Cc: Vlad Yasevich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet
     
  • Very simple radix tree implementation that supports storing arbitrary
    size entries, up to PAGE_SIZE - upcoming patches will convert existing
    flex_array users to genradixes. The new genradix code has a much
    simpler API and implementation, and doesn't have a hard limit on the
    number of elements like flex_array does.

    Link: http://lkml.kernel.org/r/20181217131929.11727-5-kent.overstreet@gmail.com
    Signed-off-by: Kent Overstreet
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: Dave Hansen
    Cc: Eric Paris
    Cc: Marcelo Ricardo Leitner
    Cc: Matthew Wilcox
    Cc: Neil Horman
    Cc: Paul Moore
    Cc: Pravin B Shelar
    Cc: Shaohua Li
    Cc: Stephen Smalley
    Cc: Vlad Yasevich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kent Overstreet