16 Aug, 2018

2 commits

  • Pull Kconfig updates from Masahiro Yamada:

    - show clearer error messages where pkg-config is needed, but not
    installed

    - rename SYMBOL_AUTO to SYMBOL_NO_WRITE to reflect its semantics

    - create all necessary directories by Kconfig tool itself instead of
    Makefile

    - update the .config unconditionally when syncconfig is invoked

    - use 'include' directive instead of '-include' where
    include/config/{auto,tristate}.conf is mandatory

    - do not try to update the .config when running install targets

    - add .DELETE_ON_ERROR to delete partially updated files

    - misc cleanups and fixes

    * tag 'kconfig-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: remove P_ENV property type
    kconfig: remove unused sym_get_env_prop() function
    kconfig: fix the rule of mainmenu_stmt symbol
    init/Kconfig: Use short unix-style option instead of --longname
    Kbuild: Makefile.modbuiltin: include auto.conf and tristate.conf mandatory
    kbuild: remove auto.conf from prerequisite of phony targets
    kbuild: do not update config for 'make kernelrelease'
    kbuild: do not update config when running install targets
    kbuild: add .DELETE_ON_ERROR special target
    kbuild: use 'include' directive to load auto.conf from top Makefile
    kconfig: allow all config targets to write auto.conf if missing
    kconfig: make syncconfig update .config regardless of sym_change_count
    kconfig: create directories needed for syncconfig by itself
    kconfig: remove unneeded directory generation from local*config
    kconfig: split out useful helpers in confdata.c
    kconfig: rename file_write_dep and move it to confdata.c
    kconfig: fix typos in description of "choice" in kconfig-language.txt
    kconfig: handle format string before calling conf_message_callback()
    kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE
    kconfig: check for pkg-config on make {menu,n,g,x}config

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - verify depmod is installed before modules_install

    - support build salt in case build ids must be unique between builds

    - allow users to specify additional host compiler flags via HOST*FLAGS,
    and rename internal variables to KBUILD_HOST*FLAGS

    - update buildtar script to drop vax support, add arm64 support

    - update builddeb script for better debarch support

    - document the pit-fall of if_changed usage

    - fix parallel build of UML with O= option

    - make 'samples' target depend on headers_install to fix build errors

    - remove deprecated host-progs variable

    - add a new coccinelle script for refcount_t vs atomic_t check

    - improve double-test coccinelle script

    - misc cleanups and fixes

    * tag 'kbuild-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (41 commits)
    coccicheck: return proper error code on fail
    Coccinelle: doubletest: reduce side effect false positives
    kbuild: remove deprecated host-progs variable
    kbuild: make samples really depend on headers_install
    um: clean up archheaders recipe
    kbuild: add %asm-generic to no-dot-config-targets
    um: fix parallel building with O= option
    scripts: Add Python 3 support to tracing/draw_functrace.py
    builddeb: Add automatic support for sh{3,4}{,eb} architectures
    builddeb: Add automatic support for riscv* architectures
    builddeb: Add automatic support for m68k architecture
    builddeb: Add automatic support for or1k architecture
    builddeb: Add automatic support for sparc64 architecture
    builddeb: Add automatic support for mips{,64}r6{,el} architectures
    builddeb: Add automatic support for mips64el architecture
    builddeb: Add automatic support for ppc64 and powerpcspe architectures
    builddeb: Introduce functions to simplify kconfig tests in set_debarch
    builddeb: Drop check for 32-bit s390
    builddeb: Change architecture detection fallback to use dpkg-architecture
    builddeb: Skip architecture detection when KBUILD_DEBARCH is set
    ...

    Linus Torvalds
     

13 Aug, 2018

1 commit


09 Aug, 2018

1 commit

  • Kernel headers must be installed into $(objtree)/usr/include to avoid
    the build failure of samples.

    Commit ddea05fa148b ("kbuild: make samples depend on headers_install")
    addressed this, but "samples/" is only used for the single target build.

    "make samples/" properly installs kernel headers, but it does not work
    for general building because a phony target "sample" (no trailing slash)
    is used.

    Reported-by: David Howells
    Signed-off-by: Masahiro Yamada
    Tested-by: David Howells

    Masahiro Yamada
     

07 Aug, 2018

1 commit


06 Aug, 2018

1 commit


30 Jul, 2018

1 commit


28 Jul, 2018

1 commit


25 Jul, 2018

4 commits

  • The top-level Makefile adds include/config/auto.conf as
    prerequisites of 'scripts', 'prepare1', etc.

    They were needed to terminate the build when include/config/auto.conf
    is missing.

    Now that the inclusion of include/config/auto.conf is mandatory
    in the top-level Makefile if dot-config is 1 (Note 'include' directive
    is used instead of '-include').

    Make terminates the build by itself if it fails to create or update
    include/config/auto.conf so we are sure that include/config/auto.conf
    exists in the very first stage of make.

    I am still keeping include/config/auto.conf as the prerequisite of
    %/modules.builtin because modules.builtin is a real file. According
    to commit a6c366324cac ("kbuild: Do not unnecessarily regenerate
    modules.builtin"), it is intentional to compare time-stamps between
    %/modules.builtin and include/config/auto.conf . I moved tristate.conf
    here because it is only included from scripts/Makefile.modbuiltin.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • 'make kernelrelease' depends on CONFIG_LOCALVERSION(_AUTO), but
    for the same reason as install targets, we do not want to update
    the configuration just for printing the kernelrelease string.

    This is likely to happen when you compiled the kernel with
    CROSS_COMPILE, but forget to pass it to 'make kernelrelease'.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • "make syncconfig" is automatically invoked when any of the following
    happens:

    - .config is updated
    - any of Kconfig files is updated
    - any of environment variables referenced in Kconfig is changed

    Then, it updates configuration files such as include/config/auto.conf
    include/generated/autoconf.h, etc.

    Even install targets (install, modules_install, etc.) are no exception.
    However, they should never ever modify the source tree. Install
    targets are often run with root privileges. Once those configuration
    files are owned by root, "make mrproper" would end up with permission
    error.

    Install targets should just copy things blindly. They should not care
    whether the configuration is up-to-date or not. This makes more sense
    because we are interested in the configuration that was used in the
    previous kernel building.

    This issue has existed since before, but rarely happened. I expect
    more chance where people are hit by this; with the new Kconfig syntax
    extension, the .config now contains the compiler information. If you
    cross-compile the kernel with CROSS_COMPILE, but forget to pass it
    for "make install", you meet "any of environment variables referenced
    in Kconfig is changed" because $(CC) is referenced in Kconfig.
    Another scenario is the compiler upgrade before the installation.

    Install targets need the configuration. "make modules_install" refer
    to CONFIG_MODULES etc. "make dtbs_install" also needs CONFIG_ARCH_*
    to decide which dtb files to install. However, the auto-update of
    the configuration files should be avoided. We already do this for
    external modules.

    Now, Make targets are categorized into 3 groups:

    [1] Do not need the kernel configuration at all

    help, coccicheck, headers_install etc.

    [2] Need the latest kernel configuration

    If new config options are added, Kconfig will show prompt to
    ask user's selection.

    Build targets such as vmlinux, in-kernel modules are the cases.

    [3] Need the kernel configuration, but do not want to update it

    Install targets except headers_install, and external modules
    are the cases.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • When you build targets that require the kernel configuration, dot-config
    is set to 1, then the top-level Makefile includes auto.conf. However,
    Make considers its inclusion is optional because the '-include' directive
    is used here.

    If a necessary configuration file is missing for the external module
    building, the following error message is displayed:

    ERROR: Kernel configuration is invalid.
    include/generated/autoconf.h or include/config/auto.conf are missing.
    Run 'make oldconfig && make prepare' on kernel src to fix it.

    However, Make still continues building; /bin/false let the creation of
    'include/config/auto.config' fail, but Make can ignore the error since
    it is included by the '-include' directive.

    I guess the reason of using '-include' directive was to suppress
    the warning when you build the kernel from a pristine source tree:

    Makefile:605: include/config/auto.conf: No such file or directory

    The previous commit made sure include/config/auto.conf exists after
    the 'make *config' stage. Now, we can use the 'include' directive
    without showing the warning.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

23 Jul, 2018

1 commit


18 Jul, 2018

5 commits


16 Jul, 2018

1 commit


14 Jul, 2018

1 commit

  • …t/masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - update Kbuild and Kconfig documents

    - sanitize -I compiler option handling

    - update extract-vmlinux script to recognize LZ4 and ZSTD

    - fix tools Makefiles

    - update tags.sh to handle __ro_after_init

    - suppress warnings in case getconf does not recognize LFS_* parameters

    * tag 'kbuild-fixes-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: suppress warnings from 'getconf LFS_*'
    scripts/tags.sh: add __ro_after_init
    tools: build: Use HOSTLDFLAGS with fixdep
    tools: build: Fixup host c flags
    tools build: fix # escaping in .cmd files for future Make
    scripts: teach extract-vmlinux about LZ4 and ZSTD
    kbuild: remove duplicated comments about PHONY
    kbuild: .PHONY is not a variable, but PHONY is
    kbuild: do not drop -I without parameter
    kbuild: document the KBUILD_KCONFIG env. variable
    kconfig: update user kconfig tools doc.
    kbuild: delete INSTALL_FW_PATH from kbuild documentation
    kbuild: update ARCH alias info for sparc
    kbuild: update ARCH alias info for sh

    Linus Torvalds
     

12 Jul, 2018

1 commit

  • Suppress warnings for systems that do not recognize LFS_*.

    getconf: no such configuration parameter `LFS_CFLAGS'
    getconf: no such configuration parameter `LFS_LDFLAGS'
    getconf: no such configuration parameter `LFS_LIBS'

    Fixes: d7f14c66c273 ("kbuild: Enable Large File Support for hostprogs")
    Reported-by: Chen Feng
    Signed-off-by: Masahiro Yamada
    Acked-by: Uwe Kleine-König

    Masahiro Yamada
     

09 Jul, 2018

1 commit


06 Jul, 2018

1 commit


03 Jul, 2018

1 commit

  • Pull networking fixes from David Miller:

    1) Verify netlink attributes properly in nf_queue, from Eric Dumazet.

    2) Need to bump memory lock rlimit for test_sockmap bpf test, from
    Yonghong Song.

    3) Fix VLAN handling in lan78xx driver, from Dave Stevenson.

    4) Fix uninitialized read in nf_log, from Jann Horn.

    5) Fix raw command length parsing in mlx5, from Alex Vesker.

    6) Cleanup loopback RDS connections upon netns deletion, from Sowmini
    Varadhan.

    7) Fix regressions in FIB rule matching during create, from Jason A.
    Donenfeld and Roopa Prabhu.

    8) Fix mpls ether type detection in nfp, from Pieter Jansen van Vuuren.

    9) More bpfilter build fixes/adjustments from Masahiro Yamada.

    10) Fix XDP_{TX,REDIRECT} flushing in various drivers, from Jesper
    Dangaard Brouer.

    11) fib_tests.sh file permissions were broken, from Shuah Khan.

    12) Make sure BH/preemption is disabled in data path of mac80211, from
    Denis Kenzior.

    13) Don't ignore nla_parse_nested() return values in nl80211, from
    Johannes berg.

    14) Properly account sock objects ot kmemcg, from Shakeel Butt.

    15) Adjustments to setting bpf program permissions to read-only, from
    Daniel Borkmann.

    16) TCP Fast Open key endianness was broken, it always took on the host
    endiannness. Whoops. Explicitly make it little endian. From Yuching
    Cheng.

    17) Fix prefix route setting for link local addresses in ipv6, from
    David Ahern.

    18) Potential Spectre v1 in zatm driver, from Gustavo A. R. Silva.

    19) Various bpf sockmap fixes, from John Fastabend.

    20) Use after free for GRO with ESP, from Sabrina Dubroca.

    21) Passing bogus flags to crypto_alloc_shash() in ipv6 SR code, from
    Eric Biggers.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (87 commits)
    qede: Adverstise software timestamp caps when PHC is not available.
    qed: Fix use of incorrect size in memcpy call.
    qed: Fix setting of incorrect eswitch mode.
    qed: Limit msix vectors in kdump kernel to the minimum required count.
    ipvlan: call dev_change_flags when ipvlan mode is reset
    ipv6: sr: fix passing wrong flags to crypto_alloc_shash()
    net: fix use-after-free in GRO with ESP
    tcp: prevent bogus FRTO undos with non-SACK flows
    bpf: sockhash, add release routine
    bpf: sockhash fix omitted bucket lock in sock_close
    bpf: sockmap, fix smap_list_map_remove when psock is in many maps
    bpf: sockmap, fix crash when ipv6 sock is added
    net: fib_rules: bring back rule_exists to match rule during add
    hv_netvsc: split sub-channel setup into async and sync
    net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN
    atm: zatm: Fix potential Spectre v1
    s390/qeth: consistently re-enable device features
    s390/qeth: don't clobber buffer on async TX completion
    s390/qeth: avoid using is_multicast_ether_addr_64bits on (u8 *)[6]
    s390/qeth: fix race when setting MAC address
    ...

    Linus Torvalds
     

02 Jul, 2018

1 commit


28 Jun, 2018

1 commit

  • With the brand-new syntax extension of Kconfig, we can directly
    check the compiler capability in the configuration phase.

    If the cc-can-link.sh fails, the BPFILTER_UMH is automatically
    hidden by the dependency.

    I also deleted 'default n', which is no-op.

    Signed-off-by: Masahiro Yamada
    Acked-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Masahiro Yamada
     

24 Jun, 2018

1 commit


17 Jun, 2018

1 commit


14 Jun, 2018

1 commit

  • The changes to automatically test for working stack protector compiler
    support in the Kconfig files removed the special STACKPROTECTOR_AUTO
    option that picked the strongest stack protector that the compiler
    supported.

    That was all a nice cleanup - it makes no sense to have the AUTO case
    now that the Kconfig phase can just determine the compiler support
    directly.

    HOWEVER.

    It also meant that doing "make oldconfig" would now _disable_ the strong
    stackprotector if you had AUTO enabled, because in a legacy config file,
    the sane stack protector configuration would look like

    CONFIG_HAVE_CC_STACKPROTECTOR=y
    # CONFIG_CC_STACKPROTECTOR_NONE is not set
    # CONFIG_CC_STACKPROTECTOR_REGULAR is not set
    # CONFIG_CC_STACKPROTECTOR_STRONG is not set
    CONFIG_CC_STACKPROTECTOR_AUTO=y

    and when you ran this through "make oldconfig" with the Kbuild changes,
    it would ask you about the regular CONFIG_CC_STACKPROTECTOR (that had
    been renamed from CONFIG_CC_STACKPROTECTOR_REGULAR to just
    CONFIG_CC_STACKPROTECTOR), but it would think that the STRONG version
    used to be disabled (because it was really enabled by AUTO), and would
    disable it in the new config, resulting in:

    CONFIG_HAVE_CC_STACKPROTECTOR=y
    CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
    CONFIG_CC_STACKPROTECTOR=y
    # CONFIG_CC_STACKPROTECTOR_STRONG is not set
    CONFIG_CC_HAS_SANE_STACKPROTECTOR=y

    That's dangerously subtle - people could suddenly find themselves with
    the weaker stack protector setup without even realizing.

    The solution here is to just rename not just the old RECULAR stack
    protector option, but also the strong one. This does that by just
    removing the CC_ prefix entirely for the user choices, because it really
    is not about the compiler support (the compiler support now instead
    automatially impacts _visibility_ of the options to users).

    This results in "make oldconfig" actually asking the user for their
    choice, so that we don't have any silent subtle security model changes.
    The end result would generally look like this:

    CONFIG_HAVE_CC_STACKPROTECTOR=y
    CONFIG_CC_HAS_STACKPROTECTOR_NONE=y
    CONFIG_STACKPROTECTOR=y
    CONFIG_STACKPROTECTOR_STRONG=y
    CONFIG_CC_HAS_SANE_STACKPROTECTOR=y

    where the "CC_" versions really are about internal compiler
    infrastructure, not the user selections.

    Acked-by: Masahiro Yamada
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

11 Jun, 2018

1 commit

  • As Documentation/kbuild/kconfig-language.txt notes, 'select' should be
    be used with care - it forces a lower limit of another symbol, ignoring
    the dependency. Currently, KCOV can select GCC_PLUGINS even if arch
    does not select HAVE_GCC_PLUGINS. This could cause the unmet direct
    dependency.

    Now that Kconfig can test compiler capability, let's handle this in a
    more sophisticated way.

    There are two ways to enable KCOV; use the compiler that natively
    supports -fsanitize-coverage=trace-pc, or build the SANCOV plugin if
    the compiler has ability to build GCC plugins. Hence, the correct
    dependency for KCOV is:

    depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS

    You do not need to build the SANCOV plugin if the compiler already
    supports -fsanitize-coverage=trace-pc. Hence, the select should be:

    select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC

    With this, GCC_PLUGIN_SANCOV is selected only when necessary, so
    scripts/Makefile.gcc-plugins can be cleaner.

    I also cleaned up Kconfig and scripts/Makefile.kcov as well.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Kees Cook

    Masahiro Yamada
     

08 Jun, 2018

2 commits

  • Move the test for -fstack-protector(-strong) option to Kconfig.

    If the compiler does not support the option, the corresponding menu
    is automatically hidden. If STRONG is not supported, it will fall
    back to REGULAR. If REGULAR is not supported, it will be disabled.
    This means, AUTO is implicitly handled by the dependency solver of
    Kconfig, hence removed.

    I also turned the 'choice' into only two boolean symbols. The use of
    'choice' is not a good idea here, because all of all{yes,mod,no}config
    would choose the first visible value, while we want allnoconfig to
    disable as many features as possible.

    X86 has additional shell scripts in case the compiler supports those
    options, but generates broken code. I added CC_HAS_SANE_STACKPROTECTOR
    to test this. I had to add -m32 to gcc-x86_32-has-stack-protector.sh
    to make it work correctly.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kees Cook

    Masahiro Yamada
     
  • Commit 21c54b774744 ("kconfig: show compiler version text in the top
    comment") was intended to detect the compiler upgrade, but Geert
    reported a breakage on the m68k build.

    The compiler upgrade is detected by the change of the environment
    variable, CC_VERSION_TEXT, which contains the first line of the output
    from $(CC) --version. Currently, this works well when CROSS_COMPILE
    is given via the environment variable or the Make command line.

    However, some architectures such as m68k can specify CROSS_COMPILE
    from arch/$(SRCARCH)/Makefile as well. In this case, "make ARCH=m68k"
    ends up with endless syncconfig loop.

    $ make ARCH=m68k defconfig
    *** Default configuration is based on 'multi_defconfig'
    #
    # configuration written to .config
    #
    $ make ARCH=m68k
    scripts/kconfig/conf --syncconfig Kconfig
    scripts/kconfig/conf --syncconfig Kconfig
    scripts/kconfig/conf --syncconfig Kconfig
    scripts/kconfig/conf --syncconfig Kconfig

    Things are happening like this:

    Because arch/$(SRCARCH)/Makefile is included after CC_VERSION_TEXT
    is set, it contains the host compiler version in the defconfig phase.

    To create or update auto.conf, the following line is triggered:

    include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
    $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig

    This recurses the top Makefile after arch/$(SRCARCH)/Makefile is
    included. CROSS_COMPILE is set to a m68k toolchain prefix and
    exported to the recursed Make. Then, syncconfig is invoked with
    the target compiler version in CC_VERSION_TEXT.

    The Make will restart because auto.conf and auto.conf.cmd have been
    updated. At this point, CROSS_COMPILE is reset, so CC_VERSION_TEXT
    is set to the host compiler version again. Then, syncconfig is
    triggered due to the change of CC_VERSION_TEXT. This loop continues
    eternally.

    To fix this problem, $(CC_VERSION_TEXT) must be evaluated only after
    arch/$(SRCARCH)/Makefile. Setting it earlier is OK as long as it is
    defined by using the '=' operator instead of ':='.

    For the defconfig phase, $(CC_VERSION_TEXT) is evaluated when Kbuild
    descends into scripts/kconfig/, so it contains the target compiler
    version correctly.

    include/config/auto.conf.cmd references $(CC_VERSION_TEXT) as well,
    so it must be included after arch/$(SRCARCH)/Makefile.

    Fixes: 21c54b774744 ("kconfig: show compiler version text in the top comment")
    Reported-by: Geert Uytterhoeven
    Signed-off-by: Masahiro Yamada
    Tested-by: Geert Uytterhoeven

    Masahiro Yamada
     

07 Jun, 2018

3 commits

  • Pull networking updates from David Miller:

    1) Add Maglev hashing scheduler to IPVS, from Inju Song.

    2) Lots of new TC subsystem tests from Roman Mashak.

    3) Add TCP zero copy receive and fix delayed acks and autotuning with
    SO_RCVLOWAT, from Eric Dumazet.

    4) Add XDP_REDIRECT support to mlx5 driver, from Jesper Dangaard
    Brouer.

    5) Add ttl inherit support to vxlan, from Hangbin Liu.

    6) Properly separate ipv6 routes into their logically independant
    components. fib6_info for the routing table, and fib6_nh for sets of
    nexthops, which thus can be shared. From David Ahern.

    7) Add bpf_xdp_adjust_tail helper, which can be used to generate ICMP
    messages from XDP programs. From Nikita V. Shirokov.

    8) Lots of long overdue cleanups to the r8169 driver, from Heiner
    Kallweit.

    9) Add BTF ("BPF Type Format"), from Martin KaFai Lau.

    10) Add traffic condition monitoring to iwlwifi, from Luca Coelho.

    11) Plumb extack down into fib_rules, from Roopa Prabhu.

    12) Add Flower classifier offload support to igb, from Vinicius Costa
    Gomes.

    13) Add UDP GSO support, from Willem de Bruijn.

    14) Add documentation for eBPF helpers, from Quentin Monnet.

    15) Add TLS tx offload to mlx5, from Ilya Lesokhin.

    16) Allow applications to be given the number of bytes available to read
    on a socket via a control message returned from recvmsg(), from
    Soheil Hassas Yeganeh.

    17) Add x86_32 eBPF JIT compiler, from Wang YanQing.

    18) Add AF_XDP sockets, with zerocopy support infrastructure as well.
    From Björn Töpel.

    19) Remove indirect load support from all of the BPF JITs and handle
    these operations in the verifier by translating them into native BPF
    instead. From Daniel Borkmann.

    20) Add GRO support to ipv6 gre tunnels, from Eran Ben Elisha.

    21) Allow XDP programs to do lookups in the main kernel routing tables
    for forwarding. From David Ahern.

    22) Allow drivers to store hardware state into an ELF section of kernel
    dump vmcore files, and use it in cxgb4. From Rahul Lakkireddy.

    23) Various RACK and loss detection improvements in TCP, from Yuchung
    Cheng.

    24) Add TCP SACK compression, from Eric Dumazet.

    25) Add User Mode Helper support and basic bpfilter infrastructure, from
    Alexei Starovoitov.

    26) Support ports and protocol values in RTM_GETROUTE, from Roopa
    Prabhu.

    27) Support bulking in ->ndo_xdp_xmit() API, from Jesper Dangaard
    Brouer.

    28) Add lots of forwarding selftests, from Petr Machata.

    29) Add generic network device failover driver, from Sridhar Samudrala.

    * ra.kernel.org:/pub/scm/linux/kernel/git/davem/net-next: (1959 commits)
    strparser: Add __strp_unpause and use it in ktls.
    rxrpc: Fix terminal retransmission connection ID to include the channel
    net: hns3: Optimize PF CMDQ interrupt switching process
    net: hns3: Fix for VF mailbox receiving unknown message
    net: hns3: Fix for VF mailbox cannot receiving PF response
    bnx2x: use the right constant
    Revert "net: sched: cls: Fix offloading when ingress dev is vxlan"
    net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
    enic: fix UDP rss bits
    netdev-FAQ: clarify DaveM's position for stable backports
    rtnetlink: validate attributes in do_setlink()
    mlxsw: Add extack messages for port_{un, }split failures
    netdevsim: Add extack error message for devlink reload
    devlink: Add extack to reload and port_{un, }split operations
    net: metrics: add proper netlink validation
    ipmr: fix error path when ipmr_new_table fails
    ip6mr: only set ip6mr_table from setsockopt when ip6mr_new_table succeeds
    net: hns3: remove unused hclgevf_cfg_func_mta_filter
    netfilter: provide udp*_lib_lookup for nf_tproxy
    qed*: Utilize FW 8.37.2.0
    ...

    Linus Torvalds
     
  • Pull Kconfig updates from Masahiro Yamada:
    "Kconfig now supports new functionality to perform textual
    substitution. It has been a while since Linus suggested to move
    compiler option tests from makefiles to Kconfig. Finally, here it is.

    The implementation has been generalized into a Make-like macro
    language.

    Some built-in functions such as 'shell' are provided. Variables and
    user-defined functions are also supported so that 'cc-option',
    'ld-option', etc. are implemented as macros.

    Summary:

    - refactor package checks for building {m,n,q,g}conf

    - remove unused/unmaintained localization support

    - remove Kbuild cache

    - drop CONFIG_CROSS_COMPILE support

    - replace 'option env=' with direct variable expansion

    - add built-in functions such as 'shell'

    - support variables and user-defined functions

    - add helper macros as as 'cc-option'

    - add unit tests and a document of the new macro language

    - add 'testconfig' to help

    - fix warnings from GCC 8.1"

    * tag 'kconfig-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits)
    kconfig: Avoid format overflow warning from GCC 8.1
    kbuild: Move last word of nconfig help to the previous line
    kconfig: Add testconfig into make help output
    kconfig: add basic helper macros to scripts/Kconfig.include
    kconfig: show compiler version text in the top comment
    kconfig: test: add Kconfig macro language tests
    Documentation: kconfig: document a new Kconfig macro language
    kconfig: error out if a recursive variable references itself
    kconfig: add 'filename' and 'lineno' built-in variables
    kconfig: add 'info', 'warning-if', and 'error-if' built-in functions
    kconfig: expand lefthand side of assignment statement
    kconfig: support append assignment operator
    kconfig: support simply expanded variable
    kconfig: support user-defined function and recursively expanded variable
    kconfig: begin PARAM state only when seeing a command keyword
    kconfig: replace $(UNAME_RELEASE) with function call
    kconfig: add 'shell' built-in function
    kconfig: add built-in function support
    kconfig: make default prompt of mainmenu less specific
    kconfig: remove sym_expand_string_value()
    ...

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - improve fixdep to coalesce consecutive slashes in dep-files

    - fix some issues of the maintainer string generation in deb-pkg script

    - remove unused CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX and clean-up
    several tools and linker scripts

    - clean-up modpost

    - allow to enable the dead code/data elimination for PowerPC in EXPERT
    mode

    - improve two coccinelle scripts for better performance

    - pass endianness and machine size flags to sparse for all architecture

    - misc fixes

    * tag 'kbuild-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
    kbuild: add machine size to CHECKFLAGS
    kbuild: add endianness flag to CHEKCFLAGS
    kbuild: $(CHECK) doesnt need NOSTDINC_FLAGS twice
    scripts: Fixed printf format mismatch
    scripts/tags.sh: use `find` for $ALLSOURCE_ARCHS generation
    coccinelle: deref_null: improve performance
    coccinelle: mini_lock: improve performance
    powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected
    kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selectable if enabled
    kbuild: LD_DEAD_CODE_DATA_ELIMINATION no -ffunction-sections/-fdata-sections for module build
    kbuild: Fix asm-generic/vmlinux.lds.h for LD_DEAD_CODE_DATA_ELIMINATION
    modpost: constify *modname function argument where possible
    modpost: remove redundant is_vmlinux() test
    modpost: use strstarts() helper more widely
    modpost: pass struct elf_info pointer to get_modinfo()
    checkpatch: remove VMLINUX_SYMBOL() check
    vmlinux.lds.h: remove no-op macro VMLINUX_SYMBOL()
    kbuild: remove CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
    export.h: remove code for prefixing symbols with underscore
    depmod.sh: remove symbol prefix support
    ...

    Linus Torvalds
     

05 Jun, 2018

1 commit


04 Jun, 2018

1 commit


01 Jun, 2018

1 commit

  • By default, sparse assumes a 64bit machine when compiled on x86-64
    and 32bit when compiled on anything else.

    This can of course create all sort of problems for the other archs, like
    issuing false warnings ('shift too big (32) for type unsigned long'), or
    worse, failing to emit legitimate warnings.

    Fix this by adding the -m32/-m64 flag, depending on CONFIG_64BIT,
    to CHECKFLAGS in the main Makefile (and so for all archs).
    Also, remove the now unneeded -m32/-m64 in arch specific Makefiles.

    Signed-off-by: Luc Van Oostenryck
    Signed-off-by: Masahiro Yamada

    Luc Van Oostenryck
     

29 May, 2018

2 commits

  • The kernel depends on macros like __BYTE_ORDER__,
    __BIG_ENDIAN__ or __LITTLE_ENDIAN__.

    OTOH, sparse doesn't know about the endianness of the kernel and
    by default uses the same as the machine on which sparse was built.

    Ensure that sparse can predefine the macros corresponding to
    how the kernel was configured by adding -m{big,little}-endian
    to CHECKFLAGS in the main Makefile (and so for all archs).
    Also, remove the equivalent done in arch specific Makefiles.

    Signed-off-by: Luc Van Oostenryck
    Signed-off-by: Masahiro Yamada

    Luc Van Oostenryck
     
  • Currently, $(CHECK) receives NOSTDINC_FLAGS twice:
    * first directly in the main Makefile via CHECKFLAGS,
    * then indirectly in scripts/Makefile.build via c_flags.

    Since once is enough, leave the occurence via c_flags and
    remove the one via CHECKFLAGS.

    Signed-off-by: Luc Van Oostenryck
    Signed-off-by: Masahiro Yamada

    Luc Van Oostenryck