20 Jan, 2021

1 commit

  • Tested-by: Linux Kernel Functional Testing
    Tested-by: Pavel Machek (CIP)
    Tested-by: Jon Hunter
    Tested-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20210118113352.764293297@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

17 Jan, 2021

1 commit

  • Tested-by: Jon Hunter
    Tested-by: Shuah Khan
    Tested-by: Guenter Roeck
    Tested-by: Linux Kernel Functional Testing
    Tested-by: Pavel Machek (CIP)
    Link: https://lore.kernel.org/r/20210115122006.047132306@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

13 Jan, 2021

2 commits

  • Tested-by: Jon Hunter
    Tested-by: Guenter Roeck
    Tested-by: Shuah Khan
    Tested-by: Linux Kernel Functional Testing
    Link: https://lore.kernel.org/r/20210111161510.602817176@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • commit 436e980e2ed526832de822cbf13c317a458b78e1 upstream.

    depmod is not guaranteed to be in /sbin, just let make look for
    it in the path like all the other invoked programs

    Signed-off-by: Dominique Martinet
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman

    Dominique Martinet
     

09 Jan, 2021

1 commit

  • Tested-by: Jon Hunter
    Tested-by: Shuah Khan
    Tested-by: Linux Kernel Functional Testing
    Tested-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20210107143052.392839477@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

06 Jan, 2021

1 commit

  • Tested-by: Jon Hunter
    Tested-by: Linux Kernel Functional Testing
    Tested-by: Jeffrin Jose T
    Tested-by: Shuah Khan
    Tested-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20210104155708.800470590@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

30 Dec, 2020

1 commit

  • Tested-by: Jon Hunter
    Tested-by: Guenter Roeck
    Tested-by: Linux Kernel Functional Testing
    Link: https://lore.kernel.org/r/20201229103832.108495696@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

26 Dec, 2020

1 commit

  • Tested-by: Jon Hunter
    Tested-by: Linux Kernel Functional Testing
    Tested-by: Jeffrin Jose T
    Tested-by: Guenter Roeck
    Link: https://lore.kernel.org/r/20201223150515.553836647@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

21 Dec, 2020

1 commit

  • Tested-by: Jeffrin Jose T
    Tested-by: Guenter Roeck
    Tested-by: Linux Kernel Functional Testing
    Tested-by: Jon Hunter
    Link: https://lore.kernel.org/r/20201219125339.066340030@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

15 Dec, 2020

1 commit


14 Dec, 2020

1 commit


07 Dec, 2020

2 commits

  • Linus Torvalds
     
  • …t/masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - Move -Wcast-align to W=3, which tends to be false-positive and there
    is no tree-wide solution.

    - Pass -fmacro-prefix-map to KBUILD_CPPFLAGS because it is a
    preprocessor option and makes sense for .S files as well.

    - Disable -gdwarf-2 for Clang's integrated assembler to avoid warnings.

    - Disable --orphan-handling=warn for LLD 10.0.1 to avoid warnings.

    - Fix undesirable line breaks in *.mod files.

    * tag 'kbuild-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: avoid split lines in .mod files
    kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1
    kbuild: Hoist '--orphan-handling' into Kconfig
    Kbuild: do not emit debug info for assembly with LLVM_IAS=1
    kbuild: use -fmacro-prefix-map for .S sources
    Makefile.extrawarn: move -Wcast-align to W=3

    Linus Torvalds
     

01 Dec, 2020

1 commit

  • Currently, '--orphan-handling=warn' is spread out across four different
    architectures in their respective Makefiles, which makes it a little
    unruly to deal with in case it needs to be disabled for a specific
    linker version (in this case, ld.lld 10.0.1).

    To make it easier to control this, hoist this warning into Kconfig and
    the main Makefile so that disabling it is simpler, as the warning will
    only be enabled in a couple places (main Makefile and a couple of
    compressed boot folders that blow away LDFLAGS_vmlinx) and making it
    conditional is easier due to Kconfig syntax. One small additional
    benefit of this is saving a call to ld-option on incremental builds
    because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN.

    To keep the list of supported architectures the same, introduce
    CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to
    gain this automatically after all of the sections are specified and size
    asserted. A special thanks to Kees Cook for the help text on this
    config.

    Link: https://github.com/ClangBuiltLinux/linux/issues/1187
    Acked-by: Kees Cook
    Acked-by: Michael Ellerman (powerpc)
    Reviewed-by: Nick Desaulniers
    Tested-by: Nick Desaulniers
    Signed-off-by: Nathan Chancellor
    Signed-off-by: Masahiro Yamada

    Nathan Chancellor
     

30 Nov, 2020

1 commit


29 Nov, 2020

1 commit


25 Nov, 2020

2 commits

  • Clang's integrated assembler produces the warning for assembly files:

    warning: DWARF2 only supports one section per compilation unit

    If -Wa,-gdwarf-* is unspecified, then debug info is not emitted for
    assembly sources (it is still emitted for C sources). This will be
    re-enabled for newer DWARF versions in a follow up patch.

    Enables defconfig+CONFIG_DEBUG_INFO to build cleanly with
    LLVM=1 LLVM_IAS=1 for x86_64 and arm64.

    Cc:
    Link: https://github.com/ClangBuiltLinux/linux/issues/716
    Reported-by: Dmitry Golovin
    Reported-by: Nathan Chancellor
    Suggested-by: Dmitry Golovin
    Suggested-by: Nathan Chancellor
    Suggested-by: Sedat Dilek
    Reviewed-by: Fangrui Song
    Reviewed-by: Nathan Chancellor
    Signed-off-by: Nick Desaulniers
    Signed-off-by: Masahiro Yamada

    Nick Desaulniers
     
  • Follow-up to commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to
    make __FILE__ a relative path"). Assembler sources also use __FILE__
    macro so this flag should be also applied to those sources.

    Signed-off-by: Denys Zagorui
    Signed-off-by: Masahiro Yamada

    Denys Zagorui
     

23 Nov, 2020

1 commit


16 Nov, 2020

1 commit


09 Nov, 2020

1 commit


02 Nov, 2020

2 commits

  • The "size" tool has been solely used by s390 to enforce .bss section usage
    restrictions in early startup code. Since commit 980d5f9ab36b ("s390/boot:
    enable .bss section for compressed kernel") and commit 2e83e0eb85ca
    ("s390: clean .bss before running uncompressed kernel") these restrictions
    have been lifted for the decompressor and uncompressed kernel and the
    size tool is now unused.

    Signed-off-by: Vasily Gorbik
    Reviewed-by: Nathan Chancellor
    Signed-off-by: Masahiro Yamada

    Vasily Gorbik
     
  • Linus Torvalds
     

26 Oct, 2020

1 commit


23 Oct, 2020

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - Support 'make compile_commands.json' to generate the compilation
    database more easily, avoiding stale entries

    - Support 'make clang-analyzer' and 'make clang-tidy' for static checks
    using clang-tidy

    - Preprocess scripts/modules.lds.S to allow CONFIG options in the
    module linker script

    - Drop cc-option tests from compiler flags supported by our minimal
    GCC/Clang versions

    - Use always 12-digits commit hash for CONFIG_LOCALVERSION_AUTO=y

    - Use sha1 build id for both BFD linker and LLD

    - Improve deb-pkg for reproducible builds and rootless builds

    - Remove stale, useless scripts/namespace.pl

    - Turn -Wreturn-type warning into error

    - Fix build error of deb-pkg when CONFIG_MODULES=n

    - Replace 'hostname' command with more portable 'uname -n'

    - Various Makefile cleanups

    * tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits)
    kbuild: Use uname for LINUX_COMPILE_HOST detection
    kbuild: Only add -fno-var-tracking-assignments for old GCC versions
    kbuild: remove leftover comment for filechk utility
    treewide: remove DISABLE_LTO
    kbuild: deb-pkg: clean up package name variables
    kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n
    kbuild: enforce -Werror=return-type
    scripts: remove namespace.pl
    builddeb: Add support for all required debian/rules targets
    builddeb: Enable rootless builds
    builddeb: Pass -n to gzip for reproducible packages
    kbuild: split the build log of kallsyms
    kbuild: explicitly specify the build id style
    scripts/setlocalversion: make git describe output more reliable
    kbuild: remove cc-option test of -Werror=date-time
    kbuild: remove cc-option test of -fno-stack-check
    kbuild: remove cc-option test of -fno-strict-overflow
    kbuild: move CFLAGS_{KASAN,UBSAN,KCSAN} exports to relevant Makefiles
    kbuild: remove redundant CONFIG_KASAN check from scripts/Makefile.kasan
    kbuild: do not create built-in objects for external module builds
    ...

    Linus Torvalds
     

20 Oct, 2020

1 commit

  • Some old GCC versions between 4.5.0 and 4.9.1 might miscompile code
    with -fvar-tracking-assingments (which is enabled by default with -g -O2).
    Commit 2062afb4f804 ("Fix gcc-4.9.0 miscompilation of load_balance()
    in scheduler") added -fno-var-tracking-assignments unconditionally to
    work around this. But newer versions of GCC no longer have this bug, so
    only add it for versions of GCC before 5.0. This allows various tools
    such as a perf probe or gdb debuggers or systemtap to resolve variable
    locations using dwarf locations in more code.

    Signed-off-by: Mark Wielaard
    Acked-by: Ian Rogers
    Reviewed-by: Andi Kleen
    Signed-off-by: Masahiro Yamada

    Mark Wielaard
     

16 Oct, 2020

1 commit

  • Pull networking updates from Jakub Kicinski:

    - Add redirect_neigh() BPF packet redirect helper, allowing to limit
    stack traversal in common container configs and improving TCP
    back-pressure.

    Daniel reports ~10Gbps => ~15Gbps single stream TCP performance gain.

    - Expand netlink policy support and improve policy export to user
    space. (Ge)netlink core performs request validation according to
    declared policies. Expand the expressiveness of those policies
    (min/max length and bitmasks). Allow dumping policies for particular
    commands. This is used for feature discovery by user space (instead
    of kernel version parsing or trial and error).

    - Support IGMPv3/MLDv2 multicast listener discovery protocols in
    bridge.

    - Allow more than 255 IPv4 multicast interfaces.

    - Add support for Type of Service (ToS) reflection in SYN/SYN-ACK
    packets of TCPv6.

    - In Multi-patch TCP (MPTCP) support concurrent transmission of data on
    multiple subflows in a load balancing scenario. Enhance advertising
    addresses via the RM_ADDR/ADD_ADDR options.

    - Support SMC-Dv2 version of SMC, which enables multi-subnet
    deployments.

    - Allow more calls to same peer in RxRPC.

    - Support two new Controller Area Network (CAN) protocols - CAN-FD and
    ISO 15765-2:2016.

    - Add xfrm/IPsec compat layer, solving the 32bit user space on 64bit
    kernel problem.

    - Add TC actions for implementing MPLS L2 VPNs.

    - Improve nexthop code - e.g. handle various corner cases when nexthop
    objects are removed from groups better, skip unnecessary
    notifications and make it easier to offload nexthops into HW by
    converting to a blocking notifier.

    - Support adding and consuming TCP header options by BPF programs,
    opening the doors for easy experimental and deployment-specific TCP
    option use.

    - Reorganize TCP congestion control (CC) initialization to simplify
    life of TCP CC implemented in BPF.

    - Add support for shipping BPF programs with the kernel and loading
    them early on boot via the User Mode Driver mechanism, hence reusing
    all the user space infra we have.

    - Support sleepable BPF programs, initially targeting LSM and tracing.

    - Add bpf_d_path() helper for returning full path for given 'struct
    path'.

    - Make bpf_tail_call compatible with bpf-to-bpf calls.

    - Allow BPF programs to call map_update_elem on sockmaps.

    - Add BPF Type Format (BTF) support for type and enum discovery, as
    well as support for using BTF within the kernel itself (current use
    is for pretty printing structures).

    - Support listing and getting information about bpf_links via the bpf
    syscall.

    - Enhance kernel interfaces around NIC firmware update. Allow
    specifying overwrite mask to control if settings etc. are reset
    during update; report expected max time operation may take to users;
    support firmware activation without machine reboot incl. limits of
    how much impact reset may have (e.g. dropping link or not).

    - Extend ethtool configuration interface to report IEEE-standard
    counters, to limit the need for per-vendor logic in user space.

    - Adopt or extend devlink use for debug, monitoring, fw update in many
    drivers (dsa loop, ice, ionic, sja1105, qed, mlxsw, mv88e6xxx,
    dpaa2-eth).

    - In mlxsw expose critical and emergency SFP module temperature alarms.
    Refactor port buffer handling to make the defaults more suitable and
    support setting these values explicitly via the DCBNL interface.

    - Add XDP support for Intel's igb driver.

    - Support offloading TC flower classification and filtering rules to
    mscc_ocelot switches.

    - Add PTP support for Marvell Octeontx2 and PP2.2 hardware, as well as
    fixed interval period pulse generator and one-step timestamping in
    dpaa-eth.

    - Add support for various auth offloads in WiFi APs, e.g. SAE (WPA3)
    offload.

    - Add Lynx PHY/PCS MDIO module, and convert various drivers which have
    this HW to use it. Convert mvpp2 to split PCS.

    - Support Marvell Prestera 98DX3255 24-port switch ASICs, as well as
    7-port Mediatek MT7531 IP.

    - Add initial support for QCA6390 and IPQ6018 in ath11k WiFi driver,
    and wcn3680 support in wcn36xx.

    - Improve performance for packets which don't require much offloads on
    recent Mellanox NICs by 20% by making multiple packets share a
    descriptor entry.

    - Move chelsio inline crypto drivers (for TLS and IPsec) from the
    crypto subtree to drivers/net. Move MDIO drivers out of the phy
    directory.

    - Clean up a lot of W=1 warnings, reportedly the actively developed
    subsections of networking drivers should now build W=1 warning free.

    - Make sure drivers don't use in_interrupt() to dynamically adapt their
    code. Convert tasklets to use new tasklet_setup API (sadly this
    conversion is not yet complete).

    * tag 'net-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2583 commits)
    Revert "bpfilter: Fix build error with CONFIG_BPFILTER_UMH"
    net, sockmap: Don't call bpf_prog_put() on NULL pointer
    bpf, selftest: Fix flaky tcp_hdr_options test when adding addr to lo
    bpf, sockmap: Add locking annotations to iterator
    netfilter: nftables: allow re-computing sctp CRC-32C in 'payload' statements
    net: fix pos incrementment in ipv6_route_seq_next
    net/smc: fix invalid return code in smcd_new_buf_create()
    net/smc: fix valid DMBE buffer sizes
    net/smc: fix use-after-free of delayed events
    bpfilter: Fix build error with CONFIG_BPFILTER_UMH
    cxgb4/ch_ipsec: Replace the module name to ch_ipsec from chcr
    net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info
    bpf: Fix register equivalence tracking.
    rxrpc: Fix loss of final ack on shutdown
    rxrpc: Fix bundle counting for exclusive connections
    netfilter: restore NF_INET_NUMHOOKS
    ibmveth: Identify ingress large send packets.
    ibmveth: Switch order of ibmveth_helper calls.
    cxgb4: handle 4-tuple PEDIT to NAT mode translation
    selftests: Add VRF route leaking tests
    ...

    Linus Torvalds
     

14 Oct, 2020

1 commit

  • This reverts commit 87e0d4f0f37fb0c8c4aeeac46fff5e957738df79.

    -fno-merge-all-constants has been the default since clang-6; the minimum
    supported version of clang in the kernel is clang-10 (10.0.1).

    Suggested-by: Nathan Chancellor
    Signed-off-by: Nick Desaulniers
    Signed-off-by: Andrew Morton
    Tested-by: Sedat Dilek
    Reviewed-by: Fangrui Song
    Reviewed-by: Nathan Chancellor
    Reviewed-by: Sedat Dilek
    Reviewed-by: Kees Cook
    Cc: Andrey Konovalov
    Cc: Marco Elver
    Cc: Miguel Ojeda
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Cc: Masahiro Yamada
    Cc: Vincenzo Frascino
    Cc: Will Deacon
    Link: https://lkml.kernel.org/r/20200902225911.209899-3-ndesaulniers@google.com
    Link: https://reviews.llvm.org/rL329300.
    Link: https://github.com/ClangBuiltLinux/linux/issues/9
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     

12 Oct, 2020

3 commits

  • Catch errors which at least gcc tolerates by default:
    warning: 'return' with no value, in function returning non-void [-Wreturn-type]

    Signed-off-by: Olaf Hering
    Signed-off-by: Masahiro Yamada

    Olaf Hering
     
  • Linus Torvalds
     
  • namespace.pl is intended to help locate symbols which are defined but
    are not used externally. The goal is to avoid bloat of the namespace in
    the resulting kernel image.

    The script relies on object data, and only finds unused symbols for the
    configuration used to generate that object data. This results in a lot
    of false positive warnings such as symbols only used by a single
    architecture, or symbols which are used externally only under certain
    configurations.

    Running namespace.pl using allyesconfig, allmodconfig, and
    x86_64_defconfig yields the following results:

    * allmodconfig
    * 11122 unique symbol names with no external reference
    * 1194 symbols listed as multiply defined
    * 214 symbols it can't resolve
    * allyesconfig
    * 10997 unique symbol names with no external reference
    * 1194 symbols listed as multiply defined
    * 214 symbols it can't resolve
    * x86_64_defconfig
    * 5757 unique symbol names with no external reference
    * 528 symbols listed as multiply defined
    * 154 symbols it can't resolve

    The script also has no way to easily limit the scope of the checks to
    a given subset of the kernel, such as only checking for symbols defined
    within a module or subsystem.

    Discussion on public mailing lists seems to indicate that many view the
    tool output as suspect or not very useful (see discussions at [1] and
    [2] for further context).

    As described by Masahiro Yamada at [2], namespace.pl provides 3 types of
    checks: listing multiply defined symbols, resolving external symbols,
    and warnings about symbols with no reference.

    The first category of issues is easily caught by the linker as any set
    of multiply defined symbols should fail to link. The second category of
    issues is also caught by linking, as undefined symbols would cause
    issues. Even with modules, these types of issues where a module relies
    on an external symbol are caught by modpost.

    The remaining category of issues reported is the list of symbols with no
    external reference, and is the primary motivation of this script.
    However, it ought to be clear from the above examples that the output is
    difficult to sort through. Even allyesconfig has ~10000 entries.

    The current submit-checklist indicates that patches ought to go through
    namespacecheck and fix any new issues arising. But that itself presents
    problems. As described at [1], many cases of reports are due to
    configuration where a function is used externally by some configuration
    settings. Prominent maintainers appear to dislike changes modify code
    such that symbols become static based on CONFIG_* flags ([3], and [4])

    One possible solution is to adjust the advice and indicate that we only
    care about the output of namespacecheck on allyesconfig or allmodconfig
    builds...

    However, given the discussion at [2], I suspect that few people are
    actively using this tool. It doesn't have a maintainer in the
    MAINTAINERS flie, and it produces so many warnings for unused symbols
    that it is difficult to use effectively. Thus, I propose we simply
    remove it.

    [1] https://lore.kernel.org/netdev/20200708164812.384ae8ea@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/
    [2] https://lore.kernel.org/lkml/20190129204319.15238-1-jacob.e.keller@intel.com/
    [3] https://lore.kernel.org/netdev/20190828.154744.2058157956381129672.davem@davemloft.net/
    [4] https://lore.kernel.org/netdev/20190827210928.576c5fef@cakuba.netronome.com/

    Signed-off-by: Jacob Keller
    Acked-by: Randy Dunlap
    Acked-by: Jakub Kicinski
    Signed-off-by: Masahiro Yamada

    Jacob Keller
     

09 Oct, 2020

1 commit


06 Oct, 2020

1 commit


05 Oct, 2020

1 commit


28 Sep, 2020

1 commit


24 Sep, 2020

5 commits

  • The minimal compiler versions, GCC 4.9 and Clang 10 support this flag.

    Here is the godbolt:
    https://godbolt.org/z/xvjcMa

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Nathan Chancellor
    Acked-by: Will Deacon

    Masahiro Yamada
     
  • The minimal compiler version, GCC 4.9 supports this flag.

    Nathan Chancellor pointed out:
    "This flag is technically ignored by clang (see commit
    05b0798916f01690b5903302e51f3136274e291f) but that obviously
    does not matter for the sake of this."

    Here is the godbolt:
    https://godbolt.org/z/59cK6o

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Nathan Chancellor

    Masahiro Yamada
     
  • The minimal compiler versions, GCC 4.9 and Clang 10 support this flag.

    Here is the godbolt:
    https://godbolt.org/z/odq8h9

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Nathan Chancellor
    Acked-by: Will Deacon

    Masahiro Yamada
     
  • Move CFLAGS_KASAN*, CFLAGS_UBSAN, CFLAGS_KCSAN to Makefile.kasan,
    Makefile.ubsan, Makefile.kcsan, respectively.

    This commit also avoids the same -fsanitize=* flags being added to
    CFLAGS_UBSAN multiple times.

    Prior to this commit, the ubsan flags were appended by the '+='
    operator, without any initialization. Some build targets such as
    'make bindeb-pkg' recurses to the top Makefile, and ended up with
    adding the same flags to CFLAGS_UBSAN twice.

    Clear CFLAGS_UBSAN with ':=' to make it a simply expanded variable.
    This is better than a recursively expanded variable, which evaluates
    $(call cc-option, ...) multiple times before Kbuild starts descending
    to subdirectories.

    Signed-off-by: Masahiro Yamada
    Acked-by: Marco Elver

    Masahiro Yamada
     
  • 'make M=/path/to/your/external/module' creates a pointless built-in.a
    in the top of the external module directory because KBUILD_BUILTIN is
    set to 1.

    Clear KBUILD_BUILTIN when we are building external modules so that
    'make M=...' and 'make M=... modules' work equivalently.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada