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
     

10 Mar, 2019

1 commit

  • 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
     

09 Mar, 2019

1 commit

  • Pull livepatching updates from Jiri Kosina:

    - support for something we call 'atomic replace', and allows for much
    better handling of cumulative patches (which is something very useful
    for distros), from Jason Baron with help of Petr Mladek and Joe
    Lawrence

    - improvement of handling of tasks blocking finalization, from Miroslav
    Benes

    - update of MAINTAINERS file to reflect move towards group
    maintainership

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: (22 commits)
    livepatch/selftests: use "$@" to preserve argument list
    livepatch: Module coming and going callbacks can proceed with all listed patches
    livepatch: Proper error handling in the shadow variables selftest
    livepatch: return -ENOMEM on ptr_id() allocation failure
    livepatch: Introduce klp_for_each_patch macro
    livepatch: core: Return EOPNOTSUPP instead of ENOSYS
    selftests/livepatch: add DYNAMIC_DEBUG config dependency
    livepatch: samples: non static warnings fix
    livepatch: update MAINTAINERS
    livepatch: Remove signal sysfs attribute
    livepatch: Send a fake signal periodically
    selftests/livepatch: introduce tests
    livepatch: Remove ordering (stacking) of the livepatches
    livepatch: Atomic replace and cumulative patches documentation
    livepatch: Remove Nop structures when unused
    livepatch: Add atomic replace
    livepatch: Use lists to manage patches, objects and functions
    livepatch: Simplify API by removing registration step
    livepatch: Don't block the removal of patches loaded after a forced transition
    livepatch: Consolidate klp_free functions
    ...

    Linus Torvalds
     

06 Mar, 2019

1 commit

  • This adds a new kernel module for analysis of vmalloc allocator. It is
    only enabled as a module. There are two main reasons this module should
    be used for: performance evaluation and stressing of vmalloc subsystem.

    It consists of several test cases. As of now there are 8. The module
    has five parameters we can specify to change its the behaviour.

    1) run_test_mask - set of tests to be run

    id: 1, name: fix_size_alloc_test
    id: 2, name: full_fit_alloc_test
    id: 4, name: long_busy_list_alloc_test
    id: 8, name: random_size_alloc_test
    id: 16, name: fix_align_alloc_test
    id: 32, name: random_size_align_alloc_test
    id: 64, name: align_shift_alloc_test
    id: 128, name: pcpu_alloc_test

    By default all tests are in run test mask. If you want to select some
    specific tests it is possible to pass the mask. For example for first,
    second and fourth tests we go 11 value.

    2) test_repeat_count - how many times each test should be repeated
    By default it is one time per test. It is possible to pass any number.
    As high the value is the test duration gets increased.

    3) test_loop_count - internal test loop counter. By default it is set
    to 1000000.

    4) single_cpu_test - use one CPU to run the tests
    By default this parameter is set to false. It means that all online
    CPUs execute tests. By setting it to 1, the tests are executed by
    first online CPU only.

    5) sequential_test_order - run tests in sequential order
    By default this parameter is set to false. It means that before running
    tests the order is shuffled. It is possible to make it sequential, just
    set it to 1.

    Performance analysis:
    In order to evaluate performance of vmalloc allocations, usually it
    makes sense to use only one CPU that runs tests, use sequential order,
    number of repeat tests can be different as well as set of test mask.

    For example if we want to run all tests, to use one CPU and repeat each
    test 3 times. Insert the module passing following parameters:

    single_cpu_test=1 sequential_test_order=1 test_repeat_count=3

    with following output:

    Summary: fix_size_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 901177 usec
    Summary: full_fit_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 1039341 usec
    Summary: long_busy_list_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 11775763 usec
    Summary: random_size_alloc_test passed 3: failed: 0 repeat: 3 loops: 1000000 avg: 6081992 usec
    Summary: fix_align_alloc_test passed: 3 failed: 0 repeat: 3, loops: 1000000 avg: 2003712 usec
    Summary: random_size_align_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 2895689 usec
    Summary: align_shift_alloc_test passed: 0 failed: 3 repeat: 3 loops: 1000000 avg: 573 usec
    Summary: pcpu_alloc_test passed: 3 failed: 0 repeat: 3 loops: 1000000 avg: 95802 usec
    All test took CPU0=192945605995 cycles

    The align_shift_alloc_test is expected to be failed.

    Stressing:
    In order to stress the vmalloc subsystem we run all available test cases
    on all available CPUs simultaneously. In order to prevent constant behaviour
    pattern, the test cases array is shuffled by default to randomize the order
    of test execution.

    For example if we want to run all tests(default), use all online CPUs(default)
    with shuffled order(default) and to repeat each test 30 times. The command
    would be like:

    modprobe vmalloc_test test_repeat_count=30

    Expected results are the system is alive, there are no any BUG_ONs or Kernel
    Panics the tests are completed, no memory leaks.

    [urezki@gmail.com: fix 32-bit builds]
    Link: http://lkml.kernel.org/r/20190106214839.ffvjvmrn52uqog7k@pc636
    [urezki@gmail.com: make CONFIG_TEST_VMALLOC depend on CONFIG_MMU]
    Link: http://lkml.kernel.org/r/20190219085441.s6bg2gpy4esny5vw@pc636
    Link: http://lkml.kernel.org/r/20190103142108.20744-3-urezki@gmail.com
    Signed-off-by: Uladzislau Rezki (Sony)
    Cc: Kees Cook
    Cc: Matthew Wilcox
    Cc: Michal Hocko
    Cc: Oleksiy Avramchenko
    Cc: Shuah Khan
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uladzislau Rezki (Sony)
     

05 Mar, 2019

1 commit

  • Adds test for stack initialization coverage. We have several build options
    that control the level of stack variable initialization. This test lets us
    visualize which options cover which cases, and provide tests for some of
    the pathological padding conditions the compiler will sometimes fail to
    initialize.

    All options pass the explicit initialization cases and the partial
    initializers (even with padding):

    test_stackinit: u8_zero ok
    test_stackinit: u16_zero ok
    test_stackinit: u32_zero ok
    test_stackinit: u64_zero ok
    test_stackinit: char_array_zero ok
    test_stackinit: small_hole_zero ok
    test_stackinit: big_hole_zero ok
    test_stackinit: trailing_hole_zero ok
    test_stackinit: packed_zero ok
    test_stackinit: small_hole_dynamic_partial ok
    test_stackinit: big_hole_dynamic_partial ok
    test_stackinit: trailing_hole_dynamic_partial ok
    test_stackinit: packed_dynamic_partial ok
    test_stackinit: small_hole_static_partial ok
    test_stackinit: big_hole_static_partial ok
    test_stackinit: trailing_hole_static_partial ok
    test_stackinit: packed_static_partial ok
    test_stackinit: packed_static_all ok
    test_stackinit: packed_dynamic_all ok
    test_stackinit: packed_runtime_all ok

    The results of the other tests (which contain no explicit initialization),
    change based on the build's configured compiler instrumentation.

    No options:

    test_stackinit: small_hole_static_all FAIL (uninit bytes: 3)
    test_stackinit: big_hole_static_all FAIL (uninit bytes: 61)
    test_stackinit: trailing_hole_static_all FAIL (uninit bytes: 7)
    test_stackinit: small_hole_dynamic_all FAIL (uninit bytes: 3)
    test_stackinit: big_hole_dynamic_all FAIL (uninit bytes: 61)
    test_stackinit: trailing_hole_dynamic_all FAIL (uninit bytes: 7)
    test_stackinit: small_hole_runtime_partial FAIL (uninit bytes: 23)
    test_stackinit: big_hole_runtime_partial FAIL (uninit bytes: 127)
    test_stackinit: trailing_hole_runtime_partial FAIL (uninit bytes: 24)
    test_stackinit: packed_runtime_partial FAIL (uninit bytes: 24)
    test_stackinit: small_hole_runtime_all FAIL (uninit bytes: 3)
    test_stackinit: big_hole_runtime_all FAIL (uninit bytes: 61)
    test_stackinit: trailing_hole_runtime_all FAIL (uninit bytes: 7)
    test_stackinit: u8_none FAIL (uninit bytes: 1)
    test_stackinit: u16_none FAIL (uninit bytes: 2)
    test_stackinit: u32_none FAIL (uninit bytes: 4)
    test_stackinit: u64_none FAIL (uninit bytes: 8)
    test_stackinit: char_array_none FAIL (uninit bytes: 16)
    test_stackinit: switch_1_none FAIL (uninit bytes: 8)
    test_stackinit: switch_2_none FAIL (uninit bytes: 8)
    test_stackinit: small_hole_none FAIL (uninit bytes: 24)
    test_stackinit: big_hole_none FAIL (uninit bytes: 128)
    test_stackinit: trailing_hole_none FAIL (uninit bytes: 32)
    test_stackinit: packed_none FAIL (uninit bytes: 32)
    test_stackinit: user FAIL (uninit bytes: 32)
    test_stackinit: failures: 25

    CONFIG_GCC_PLUGIN_STRUCTLEAK_USER=y
    This only tries to initialize structs with __user markings, so
    only the difference from above is now the "user" test passes:

    test_stackinit: small_hole_static_all FAIL (uninit bytes: 3)
    test_stackinit: big_hole_static_all FAIL (uninit bytes: 61)
    test_stackinit: trailing_hole_static_all FAIL (uninit bytes: 7)
    test_stackinit: small_hole_dynamic_all FAIL (uninit bytes: 3)
    test_stackinit: big_hole_dynamic_all FAIL (uninit bytes: 61)
    test_stackinit: trailing_hole_dynamic_all FAIL (uninit bytes: 7)
    test_stackinit: small_hole_runtime_partial FAIL (uninit bytes: 23)
    test_stackinit: big_hole_runtime_partial FAIL (uninit bytes: 127)
    test_stackinit: trailing_hole_runtime_partial FAIL (uninit bytes: 24)
    test_stackinit: packed_runtime_partial FAIL (uninit bytes: 24)
    test_stackinit: small_hole_runtime_all FAIL (uninit bytes: 3)
    test_stackinit: big_hole_runtime_all FAIL (uninit bytes: 61)
    test_stackinit: trailing_hole_runtime_all FAIL (uninit bytes: 7)
    test_stackinit: u8_none FAIL (uninit bytes: 1)
    test_stackinit: u16_none FAIL (uninit bytes: 2)
    test_stackinit: u32_none FAIL (uninit bytes: 4)
    test_stackinit: u64_none FAIL (uninit bytes: 8)
    test_stackinit: char_array_none FAIL (uninit bytes: 16)
    test_stackinit: switch_1_none FAIL (uninit bytes: 8)
    test_stackinit: switch_2_none FAIL (uninit bytes: 8)
    test_stackinit: small_hole_none FAIL (uninit bytes: 24)
    test_stackinit: big_hole_none FAIL (uninit bytes: 128)
    test_stackinit: trailing_hole_none FAIL (uninit bytes: 32)
    test_stackinit: packed_none FAIL (uninit bytes: 32)
    test_stackinit: user ok
    test_stackinit: failures: 24

    CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF=y
    This initializes all structures passed by reference (scalars and strings
    remain uninitialized):

    test_stackinit: small_hole_static_all ok
    test_stackinit: big_hole_static_all ok
    test_stackinit: trailing_hole_static_all ok
    test_stackinit: small_hole_dynamic_all ok
    test_stackinit: big_hole_dynamic_all ok
    test_stackinit: trailing_hole_dynamic_all ok
    test_stackinit: small_hole_runtime_partial ok
    test_stackinit: big_hole_runtime_partial ok
    test_stackinit: trailing_hole_runtime_partial ok
    test_stackinit: packed_runtime_partial ok
    test_stackinit: small_hole_runtime_all ok
    test_stackinit: big_hole_runtime_all ok
    test_stackinit: trailing_hole_runtime_all ok
    test_stackinit: u8_none FAIL (uninit bytes: 1)
    test_stackinit: u16_none FAIL (uninit bytes: 2)
    test_stackinit: u32_none FAIL (uninit bytes: 4)
    test_stackinit: u64_none FAIL (uninit bytes: 8)
    test_stackinit: char_array_none FAIL (uninit bytes: 16)
    test_stackinit: switch_1_none FAIL (uninit bytes: 8)
    test_stackinit: switch_2_none FAIL (uninit bytes: 8)
    test_stackinit: small_hole_none ok
    test_stackinit: big_hole_none ok
    test_stackinit: trailing_hole_none ok
    test_stackinit: packed_none ok
    test_stackinit: user ok
    test_stackinit: failures: 7

    CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
    This initializes all variables, so it matches above with the scalars
    and arrays included:

    test_stackinit: small_hole_static_all ok
    test_stackinit: big_hole_static_all ok
    test_stackinit: trailing_hole_static_all ok
    test_stackinit: small_hole_dynamic_all ok
    test_stackinit: big_hole_dynamic_all ok
    test_stackinit: trailing_hole_dynamic_all ok
    test_stackinit: small_hole_runtime_partial ok
    test_stackinit: big_hole_runtime_partial ok
    test_stackinit: trailing_hole_runtime_partial ok
    test_stackinit: packed_runtime_partial ok
    test_stackinit: small_hole_runtime_all ok
    test_stackinit: big_hole_runtime_all ok
    test_stackinit: trailing_hole_runtime_all ok
    test_stackinit: u8_none ok
    test_stackinit: u16_none ok
    test_stackinit: u32_none ok
    test_stackinit: u64_none ok
    test_stackinit: char_array_none ok
    test_stackinit: switch_1_none ok
    test_stackinit: switch_2_none ok
    test_stackinit: small_hole_none ok
    test_stackinit: big_hole_none ok
    test_stackinit: trailing_hole_none ok
    test_stackinit: packed_none ok
    test_stackinit: user ok
    test_stackinit: all tests passed!

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

    Kees Cook
     

12 Jan, 2019

1 commit

  • Add a few livepatch modules and simple target modules that the included
    regression suite can run tests against:

    - basic livepatching (multiple patches, atomic replace)
    - pre/post (un)patch callbacks
    - shadow variable API

    Signed-off-by: Joe Lawrence
    Signed-off-by: Petr Mladek
    Tested-by: Miroslav Benes
    Tested-by: Alice Ferrazzi
    Acked-by: Joe Lawrence
    Acked-by: Josh Poimboeuf
    Signed-off-by: Jiri Kosina

    Joe Lawrence
     

28 Dec, 2018

1 commit

  • Pull crypto updates from Herbert Xu:
    "API:
    - Add 1472-byte test to tcrypt for IPsec
    - Reintroduced crypto stats interface with numerous changes
    - Support incremental algorithm dumps

    Algorithms:
    - Add xchacha12/20
    - Add nhpoly1305
    - Add adiantum
    - Add streebog hash
    - Mark cts(cbc(aes)) as FIPS allowed

    Drivers:
    - Improve performance of arm64/chacha20
    - Improve performance of x86/chacha20
    - Add NEON-accelerated nhpoly1305
    - Add SSE2 accelerated nhpoly1305
    - Add AVX2 accelerated nhpoly1305
    - Add support for 192/256-bit keys in gcmaes AVX
    - Add SG support in gcmaes AVX
    - ESN for inline IPsec tx in chcr
    - Add support for CryptoCell 703 in ccree
    - Add support for CryptoCell 713 in ccree
    - Add SM4 support in ccree
    - Add SM3 support in ccree
    - Add support for chacha20 in caam/qi2
    - Add support for chacha20 + poly1305 in caam/jr
    - Add support for chacha20 + poly1305 in caam/qi2
    - Add AEAD cipher support in cavium/nitrox"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (130 commits)
    crypto: skcipher - remove remnants of internal IV generators
    crypto: cavium/nitrox - Fix build with !CONFIG_DEBUG_FS
    crypto: salsa20-generic - don't unnecessarily use atomic walk
    crypto: skcipher - add might_sleep() to skcipher_walk_virt()
    crypto: x86/chacha - avoid sleeping under kernel_fpu_begin()
    crypto: cavium/nitrox - Added AEAD cipher support
    crypto: mxc-scc - fix build warnings on ARM64
    crypto: api - document missing stats member
    crypto: user - remove unused dump functions
    crypto: chelsio - Fix wrong error counter increments
    crypto: chelsio - Reset counters on cxgb4 Detach
    crypto: chelsio - Handle PCI shutdown event
    crypto: chelsio - cleanup:send addr as value in function argument
    crypto: chelsio - Use same value for both channel in single WR
    crypto: chelsio - Swap location of AAD and IV sent in WR
    crypto: chelsio - remove set but not used variable 'kctx_len'
    crypto: ux500 - Use proper enum in hash_set_dma_transfer
    crypto: ux500 - Use proper enum in cryp_set_dma_transfer
    crypto: aesni - Add scatter/gather avx stubs, and use them in C
    crypto: aesni - Introduce partial block macro
    ..

    Linus Torvalds
     

20 Nov, 2018

1 commit

  • In preparation for adding XChaCha12 support, rename/refactor
    chacha20-generic to support different numbers of rounds. The
    justification for needing XChaCha12 support is explained in more detail
    in the patch "crypto: chacha - add XChaCha12 support".

    The only difference between ChaCha{8,12,20} are the number of rounds
    itself; all other parts of the algorithm are the same. Therefore,
    remove the "20" from all definitions, structures, functions, files, etc.
    that will be shared by all ChaCha versions.

    Also make ->setkey() store the round count in the chacha_ctx (previously
    chacha20_ctx). The generic code then passes the round count through to
    chacha_block(). There will be a ->setkey() function for each explicitly
    allowed round count; the encrypt/decrypt functions will be the same. I
    decided not to do it the opposite way (same ->setkey() function for all
    round counts, with different encrypt/decrypt functions) because that
    would have required more boilerplate code in architecture-specific
    implementations of ChaCha and XChaCha.

    Reviewed-by: Ard Biesheuvel
    Acked-by: Martin Willi
    Signed-off-by: Eric Biggers
    Signed-off-by: Herbert Xu

    Eric Biggers
     

16 Nov, 2018

1 commit

  • This lib tracks objects which could be of two types:
    1) root object
    2) nested object - with a "delta" which differentiates it from
    the associated root object
    The objects are tracked by a hashtable and reference-counted. User is
    responsible of implementing callbacks to create/destroy root entity
    related to each root object and callback to create/destroy nested object
    delta.

    Signed-off-by: Jiri Pirko
    Signed-off-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Jiri Pirko
     

01 Nov, 2018

2 commits

  • …l/git/palmer/riscv-linux

    Pull more RISC-V updates from Palmer Dabbelt:
    "This contains the follow-on patches I'd like to target for the 4.20
    merge window. I'm being somewhat conservative here, as while there are
    a few patches on the mailing list that were posted early in the merge
    window I'd like to let those bake for another round -- this was a
    fairly big release as far as RISC-V is concerened, and we need to walk
    before we can run.

    As far as the patches that made it go:

    - A patch to ignore offline CPUs when calculating AT_HWCAP. This
    should fix GDB on the HiFive unleashed, which has an embedded core
    for hart 0 which is exposed to Linux as an offline CPU.

    - A move of EM_RISCV to elf-em.h, which is where it should have been
    to begin with.

    - I've also removed the 64-bit divide routines. I know I'm not really
    playing by my own rules here because I posted the patches this
    morning, but since they shouldn't be in the kernel I think it's
    better to err on the side of going too fast here.

    I don't anticipate any more patch sets for the merge window"

    * tag 'riscv-for-linus-4.20-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
    Move EM_RISCV into elf-em.h
    RISC-V: properly determine hardware caps
    Revert "lib: Add umoddi3 and udivmoddi4 of GCC library routines"
    Revert "RISC-V: Select GENERIC_LIB_UMODDI3 on RV32"

    Linus Torvalds
     
  • We don't want 64-bit divide in the kernel.

    This reverts commit 6315730e9eab7de5fa9864bb13a352713f48aef1.

    Signed-off-by: Palmer Dabbelt

    Palmer Dabbelt
     

29 Oct, 2018

2 commits

  • Pull VLA removal from Kees Cook:
    "Globally warn on VLA use.

    This turns on "-Wvla" globally now that the last few trees with their
    VLA removals have landed (crypto, block, net, and powerpc).

    Arnd mentioned that there may be a couple more VLAs hiding in
    hard-to-find randconfigs, but nothing big has shaken out in the last
    month or so in linux-next.

    We should be basically VLA-free now! Wheee. :)

    Summary:

    - Remove unused fallback for BUILD_BUG_ON (which technically contains
    a VLA)

    - Lift -Wvla to the top-level Makefile"

    * tag 'vla-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    Makefile: Globally enable VLA warning
    compiler.h: give up __compiletime_assert_fallback()

    Linus Torvalds
     
  • Pull XArray conversion from Matthew Wilcox:
    "The XArray provides an improved interface to the radix tree data
    structure, providing locking as part of the API, specifying GFP flags
    at allocation time, eliminating preloading, less re-walking the tree,
    more efficient iterations and not exposing RCU-protected pointers to
    its users.

    This patch set

    1. Introduces the XArray implementation

    2. Converts the pagecache to use it

    3. Converts memremap to use it

    The page cache is the most complex and important user of the radix
    tree, so converting it was most important. Converting the memremap
    code removes the only other user of the multiorder code, which allows
    us to remove the radix tree code that supported it.

    I have 40+ followup patches to convert many other users of the radix
    tree over to the XArray, but I'd like to get this part in first. The
    other conversions haven't been in linux-next and aren't suitable for
    applying yet, but you can see them in the xarray-conv branch if you're
    interested"

    * 'xarray' of git://git.infradead.org/users/willy/linux-dax: (90 commits)
    radix tree: Remove multiorder support
    radix tree test: Convert multiorder tests to XArray
    radix tree tests: Convert item_delete_rcu to XArray
    radix tree tests: Convert item_kill_tree to XArray
    radix tree tests: Move item_insert_order
    radix tree test suite: Remove multiorder benchmarking
    radix tree test suite: Remove __item_insert
    memremap: Convert to XArray
    xarray: Add range store functionality
    xarray: Move multiorder_check to in-kernel tests
    xarray: Move multiorder_shrink to kernel tests
    xarray: Move multiorder account test in-kernel
    radix tree test suite: Convert iteration test to XArray
    radix tree test suite: Convert tag_tagged_items to XArray
    radix tree: Remove radix_tree_clear_tags
    radix tree: Remove radix_tree_maybe_preload_order
    radix tree: Remove split/join code
    radix tree: Remove radix_tree_update_node_t
    page cache: Finish XArray conversion
    dax: Convert page fault handlers to XArray
    ...

    Linus Torvalds
     

27 Oct, 2018

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big set of char/misc patches for 4.20-rc1.

    Loads of things here, we have new code in all of these driver
    subsystems:
    - fpga
    - stm
    - extcon
    - nvmem
    - eeprom
    - hyper-v
    - gsmi
    - coresight
    - thunderbolt
    - vmw_balloon
    - goldfish
    - soundwire
    along with lots of fixes and minor changes to other small drivers.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (245 commits)
    Documentation/security-bugs: Clarify treatment of embargoed information
    lib: Fix ia64 bootloader linkage
    MAINTAINERS: Clarify UIO vs UIOVEC maintainer
    docs/uio: fix a grammar nitpick
    docs: fpga: document programming fpgas using regions
    fpga: add devm_fpga_region_create
    fpga: bridge: add devm_fpga_bridge_create
    fpga: mgr: add devm_fpga_mgr_create
    hv_balloon: Replace spin_is_locked() with lockdep
    sgi-xp: Replace spin_is_locked() with lockdep
    eeprom: New ee1004 driver for DDR4 memory
    eeprom: at25: remove unneeded 'at25_remove'
    w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size).
    misc: mic: scif: remove set but not used variables 'src_dma_addr, dst_dma_addr'
    misc: mic: fix a DMA pool free failure
    platform: goldfish: pipe: Add a blank line to separate varibles and code
    platform: goldfish: pipe: Remove redundant casting
    platform: goldfish: pipe: Call misc_deregister if init fails
    platform: goldfish: pipe: Move the file-scope goldfish_pipe_dev variable into the driver state
    platform: goldfish: pipe: Move the file-scope goldfish_pipe_miscdev variable into the driver state
    ...

    Linus Torvalds
     

23 Oct, 2018

1 commit

  • Add umoddi3 and udivmoddi4 support for 32-bit.

    The RV32 need the umoddi3 to do modulo when the operands are long long
    type, like other libraries implementation such as ucmpdi2, lshrdi3 and
    so on.

    I encounter the undefined reference 'umoddi3' when I use the in
    house dma driver, although it is in house driver, but I think that
    umoddi3 is a common function for RV32.

    The udivmoddi4 and umoddi3 are copies from libgcc in gcc. There are other
    functions use the udivmoddi4 in libgcc, so I separate the umoddi3 and
    udivmoddi4 for flexible extension in the future.

    Signed-off-by: Zong Li
    Signed-off-by: Palmer Dabbelt

    Zong Li
     

21 Oct, 2018

2 commits

  • The xa_load function brings with it a lot of infrastructure; xa_empty(),
    xa_is_err(), and large chunks of the XArray advanced API that are used
    to implement xa_load.

    As the test-suite demonstrates, it is possible to use the XArray functions
    on a radix tree. The radix tree functions depend on the GFP flags being
    stored in the root of the tree, so it's not possible to use the radix
    tree functions on an XArray.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • This is a direct replacement for struct radix_tree_root. Some of the
    struct members have changed name; convert those, and use a #define so
    that radix_tree users continue to work without change.

    Signed-off-by: Matthew Wilcox
    Reviewed-by: Josef Bacik

    Matthew Wilcox
     

16 Oct, 2018

1 commit

  • kbuild robot reports that since commit ce76d938dd98 ("lib: Add memcat_p():
    paste 2 pointer arrays together") the ia64/hp/sim/boot fails to link:

    > LD arch/ia64/hp/sim/boot/bootloader
    > lib/string.o: In function `__memcat_p':
    > string.c:(.text+0x1f22): undefined reference to `__kmalloc'
    > string.c:(.text+0x1ff2): undefined reference to `__kmalloc'
    > make[1]: *** [arch/ia64/hp/sim/boot/Makefile:37: arch/ia64/hp/sim/boot/bootloader] Error 1

    The reason is, the above commit, via __memcat_p(), adds a call to
    __kmalloc to string.o, which happens to be used in the bootloader, but
    there's no kmalloc or slab or anything.

    Since the linker would only pull in objects that contain referenced
    symbols, moving __memcat_p() to a different compilation unit solves the
    problem.

    Fixes: ce76d938dd98 ("lib: Add memcat_p(): paste 2 pointer arrays together")
    Signed-off-by: Alexander Shishkin
    Reported-by: kbuild test robot
    Cc: Fenghua Yu
    Cc: Tony Luck
    Cc: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     

12 Oct, 2018

1 commit

  • The previous patch introduced very large kernel stack usage and a Makefile
    change to hide the warning about it.

    From what I can tell, a number of things went wrong here:

    - The BCH_MAX_T constant was set to the maximum value for 'n',
    not the maximum for 't', which is much smaller.

    - The stack usage is actually larger than the entire kernel stack
    on some architectures that can use 4KB stacks (m68k, sh, c6x), which
    leads to an immediate overrun.

    - The justification in the patch description claimed that nothing
    changed, however that is not the case even without the two points above:
    the configuration is machine specific, and most boards never use the
    maximum BCH_ECC_WORDS() length but instead have something much smaller.
    That maximum would only apply to machines that use both the maximum
    block size and the maximum ECC strength.

    The largest value for 't' that I could find is '32', which in turn leads
    to a 60 byte array instead of 2048 bytes. Making it '64' for future
    extension seems also worthwhile, with 120 bytes for the array. Anything
    larger won't fit into the OOB area on NAND flash.

    With that changed, the warning can be enabled again.

    Only linux-4.19+ contains the breakage, so this is only needed
    as a stable backport if it does not make it into the release.

    Fixes: 02361bc77888 ("lib/bch: Remove VLA usage")
    Reported-by: Ard Biesheuvel
    Cc: stable@vger.kernel.org
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Boris Brezillon

    Arnd Bergmann
     

11 Oct, 2018

1 commit

  • Now that Variable Length Arrays (VLAs) have been entirely removed[1]
    from the kernel, enable the VLA warning globally. The only exceptions
    to this are the KASan an UBSan tests which are explicitly checking that
    VLAs trigger their respective tests.

    [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

    Cc: Masahiro Yamada
    Cc: Andrew Morton
    Cc: David Airlie
    Cc: linux-kbuild@vger.kernel.org
    Cc: intel-gfx@lists.freedesktop.org
    Cc: dri-devel@lists.freedesktop.org
    Signed-off-by: Kees Cook

    Kees Cook