08 Jul, 2019

1 commit


30 Jun, 2019

1 commit


23 Jun, 2019

1 commit


17 Jun, 2019

1 commit


09 Jun, 2019

1 commit


05 Jun, 2019

1 commit

  • Current implementation of kselftest-merge only finds config files that
    are one level deep using `$(srctree)/tools/testing/selftests/*/config`.

    Often, config files are added in nested directories, and do not get
    picked up by kselftest-merge.

    Use `find` to catch all config files under
    `$(srctree)/tools/testing/selftests` instead.

    Signed-off-by: Dan Rue
    Signed-off-by: Masahiro Yamada

    Dan Rue
     

03 Jun, 2019

1 commit


27 May, 2019

1 commit


20 May, 2019

1 commit


18 May, 2019

8 commits

  • In the recent build test of linux-next, Stephen saw a build error
    caused by a broken .tmp_versions/*.mod file:

    https://lkml.org/lkml/2019/5/13/991

    drivers/net/phy/asix.ko and drivers/net/usb/asix.ko have the same
    basename, and there is a race in generating .tmp_versions/asix.mod

    Kbuild has not checked this before, and it suddenly shows up with
    obscure error messages when this kind of race occurs.

    Non-unique module names cause various sort of problems, but it is
    not trivial to catch them by eyes.

    Hence, this script.

    It checks not only real modules, but also built-in modules (i.e.
    controlled by tristate CONFIG option, but currently compiled with =y).
    Non-unique names for built-in modules also cause problems because
    /sys/modules/ would fall over.

    For the latest kernel, I tested "make allmodconfig all" (or more
    quickly "make allyesconfig modules"), and it detected the following:

    warning: same basename if the following are built as modules:
    drivers/regulator/88pm800.ko
    drivers/mfd/88pm800.ko
    warning: same basename if the following are built as modules:
    drivers/gpu/drm/bridge/adv7511/adv7511.ko
    drivers/media/i2c/adv7511.ko
    warning: same basename if the following are built as modules:
    drivers/net/phy/asix.ko
    drivers/net/usb/asix.ko
    warning: same basename if the following are built as modules:
    fs/coda/coda.ko
    drivers/media/platform/coda/coda.ko
    warning: same basename if the following are built as modules:
    drivers/net/phy/realtek.ko
    drivers/net/dsa/realtek.ko

    Reported-by: Stephen Rothwell
    Signed-off-by: Masahiro Yamada
    Reviewed-by: Kees Cook
    Reviewed-by: Stephen Rothwell
    Reviewed-by: Lucas De Marchi

    Masahiro Yamada
     
  • For *-pkg targets, the LICENSES directory should be included in the
    source tarball.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • If the compiler specified by $(CC) is not present, the Kconfig stage
    sprinkles 'not found' messages, then succeeds.

    $ make CROSS_COMPILE=foo defconfig
    /bin/sh: 1: foogcc: not found
    /bin/sh: 1: foogcc: not found
    *** Default configuration is based on 'x86_64_defconfig'
    ./scripts/gcc-version.sh: 17: ./scripts/gcc-version.sh: foogcc: not found
    ./scripts/gcc-version.sh: 18: ./scripts/gcc-version.sh: foogcc: not found
    ./scripts/gcc-version.sh: 19: ./scripts/gcc-version.sh: foogcc: not found
    ./scripts/gcc-version.sh: 17: ./scripts/gcc-version.sh: foogcc: not found
    ./scripts/gcc-version.sh: 18: ./scripts/gcc-version.sh: foogcc: not found
    ./scripts/gcc-version.sh: 19: ./scripts/gcc-version.sh: foogcc: not found
    ./scripts/clang-version.sh: 11: ./scripts/clang-version.sh: foogcc: not found
    ./scripts/gcc-plugin.sh: 11: ./scripts/gcc-plugin.sh: foogcc: not found
    init/Kconfig:16:warning: 'GCC_VERSION': number is invalid
    #
    # configuration written to .config
    #

    Terminate parsing files immediately if $(CC) or $(LD) is not found.
    "make *config" will fail more nicely.

    $ make CROSS_COMPILE=foo defconfig
    *** Default configuration is based on 'x86_64_defconfig'
    scripts/Kconfig.include:34: compiler 'foogcc' not found
    make[1]: *** [scripts/kconfig/Makefile;82: defconfig] Error 1
    make: *** [Makefile;557: defconfig] Error 2

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • syncconfig is responsible for keeping auto.conf up-to-date, so if it
    fails for any reason, the build must be terminated immediately.

    However, since commit 9390dff66a52 ("kbuild: invoke syncconfig if
    include/config/auto.conf.cmd is missing"), Kbuild continues running
    even after syncconfig fails.

    You can confirm this by intentionally making syncconfig error out:

    diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
    index 08ba146..307b9de 100644
    --- a/scripts/kconfig/confdata.c
    +++ b/scripts/kconfig/confdata.c
    @@ -1023,6 +1023,9 @@ int conf_write_autoconf(int overwrite)
    FILE *out, *tristate, *out_h;
    int i;

    + if (overwrite)
    + return 1;
    +
    if (!overwrite && is_present(autoconf_name))
    return 0;

    Then, syncconfig fails, but Make would not stop:

    $ make -s mrproper allyesconfig defconfig
    $ make
    scripts/kconfig/conf --syncconfig Kconfig

    *** Error during sync of the configuration.

    make[2]: *** [scripts/kconfig/Makefile;69: syncconfig] Error 1
    make[1]: *** [Makefile;557: syncconfig] Error 2
    make: *** [include/config/auto.conf.cmd] Deleting file 'include/config/tristate.conf'
    make: Failed to remake makefile 'include/config/auto.conf'.
    SYSTBL arch/x86/include/generated/asm/syscalls_32.h
    SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h
    SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h
    SYSTBL arch/x86/include/generated/asm/syscalls_64.h
    [ continue running ... ]

    The reason is in the behavior of a pattern rule with multi-targets.

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

    GNU Make knows this rule is responsible for making all the three files
    simultaneously. As far as examined, auto.conf.cmd is the target in
    question when this rule is invoked. It is probably because auto.conf.cmd
    is included below the inclusion of auto.conf.

    The inclusion of auto.conf is mandatory, while that of auto.conf.cmd
    is optional. GNU Make does not care about the failure in the process
    of updating optional include files.

    I filed this issue (https://savannah.gnu.org/bugs/?56301) in case this
    behavior could be improved somehow in future releases of GNU Make.
    Anyway, it is quite easy to fix our Makefile.

    Given that auto.conf is already a mandatory include file, there is no
    reason to stick auto.conf.cmd optional. Make it mandatory as well.

    Cc: linux-stable # 5.0+
    Fixes: 9390dff66a52 ("kbuild: invoke syncconfig if include/config/auto.conf.cmd is missing")
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • We do not support old Clang versions. Upgrade your clang version
    if any of these flags is unsupported.

    Let's add all flags inside ifdef CONFIG_CC_IS_CLANG unconditionally.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Sedat Dilek
    Reviewed-by: Nathan Chancellor
    Tested-by: Nick Desaulniers

    Masahiro Yamada
     
  • This is no longer a valid option in clang, it was removed in 3.5, which
    we don't support.

    https://github.com/llvm/llvm-project/commit/cb3f812b6b9fab8f3b41414f24e90222170417b4

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

    Nathan Chancellor
     
  • This flag is documented in the GCC 4.6 manual, and recognized by
    Clang as well. Let's rip off the cc-option switch.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Sedat Dilek
    Reviewed-by: Nathan Chancellor
    Acked-by: Kees Cook
    Tested-by: Nick Desaulniers

    Masahiro Yamada
     
  • This warning was disabled by commit bd664f6b3e37 ("disable new
    gcc-7.1.1 warnings for now") just because it was too noisy.

    Thanks to Arnd Bergmann, all warnings have been fixed. Now, we are
    ready to re-enable it.

    Signed-off-by: Masahiro Yamada
    Cc: Arnd Bergmann

    Masahiro Yamada
     

09 May, 2019

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - allow users to invoke 'make' out of the source tree

    - refactor scripts/mkmakefile

    - deprecate KBUILD_SRC, which was used to track the source tree
    location for O= build.

    - fix recordmcount.pl in case objdump output is localized

    - turn unresolved symbols in external modules to errors from warnings
    by default; pass KBUILD_MODPOST_WARN=1 to get them back to warnings

    - generate modules.builtin.modinfo to collect .modinfo data from
    built-in modules

    - misc Makefile cleanups

    * tag 'kbuild-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (21 commits)
    .gitignore: add more all*.config patterns
    moduleparam: Save information about built-in modules in separate file
    Remove MODULE_ALIAS() calls that take undefined macro
    .gitignore: add leading and trailing slashes to generated directories
    scripts/tags.sh: fix direct execution of scripts/tags.sh
    scripts: override locale from environment when running recordmcount.pl
    samples: kobject: allow CONFIG_SAMPLE_KOBJECT to become y
    samples: seccomp: turn CONFIG_SAMPLE_SECCOMP into a bool option
    kbuild: move Documentation to vmlinux-alldirs
    kbuild: move samples/ to KBUILD_VMLINUX_OBJS
    modpost: make KBUILD_MODPOST_WARN also configurable for external modules
    kbuild: check arch/$(SRCARCH)/include/generated before out-of-tree build
    kbuild: remove unneeded dependency for include/config/kernel.release
    memory: squash drivers/memory/Makefile.asm-offsets
    kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build
    kbuild: mkmakefile: generate a simple wrapper of top Makefile
    kbuild: mkmakefile: do not check the generated Makefile marker
    kbuild: allow Kbuild to start from any directory
    kbuild: pass $(MAKECMDGOALS) to sub-make as is
    kbuild: fix warning "overriding recipe for target 'Makefile'"
    ...

    Linus Torvalds
     

08 May, 2019

2 commits

  • 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
     
  • Pull compiler-based variable initialization updates from Kees Cook:
    "This is effectively part of my gcc-plugins tree, but as this adds some
    Clang support, it felt weird to still call it "gcc-plugins". :)

    This consolidates Kconfig for the existing stack variable
    initialization (via structleak and stackleak gcc plugins) and adds
    Alexander Potapenko's support for Clang's new similar functionality.

    Summary:

    - Consolidate memory initialization Kconfigs (Kees)

    - Implement support for Clang's stack variable auto-init (Alexander)"

    * tag 'meminit-v5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    security: Implement Clang's stack initialization
    security: Move stackleak config to Kconfig.hardening
    security: Create "kernel hardening" config area

    Linus Torvalds
     

07 May, 2019

2 commits

  • Pull livepatching updates from Jiri Kosina:

    - livepatching kselftests improvements from Joe Lawrence and Miroslav
    Benes

    - making use of gcc's -flive-patching option when available, from
    Miroslav Benes

    - kobject handling cleanups, from Petr Mladek

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
    livepatch: Remove duplicated code for early initialization
    livepatch: Remove custom kobject state handling
    livepatch: Convert error about unsupported reliable stacktrace into a warning
    selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDED
    kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled
    selftests/livepatch: use TEST_PROGS for test scripts

    Linus Torvalds
     
  • Problem:

    When a kernel module is compiled as a separate module, some important
    information about the kernel module is available via .modinfo section of
    the module. In contrast, when the kernel module is compiled into the
    kernel, that information is not available.

    Information about built-in modules is necessary in the following cases:

    1. When it is necessary to find out what additional parameters can be
    passed to the kernel at boot time.

    2. When you need to know which module names and their aliases are in
    the kernel. This is very useful for creating an initrd image.

    Proposal:

    The proposed patch does not remove .modinfo section with module
    information from the vmlinux at the build time and saves it into a
    separate file after kernel linking. So, the kernel does not increase in
    size and no additional information remains in it. Information is stored
    in the same format as in the separate modules (null-terminated string
    array). Because the .modinfo section is already exported with a separate
    modules, we are not creating a new API.

    It can be easily read in the userspace:

    $ tr '\0' '\n' < modules.builtin.modinfo
    ext4.softdep=pre: crc32c
    ext4.license=GPL
    ext4.description=Fourth Extended Filesystem
    ext4.author=Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
    ext4.alias=fs-ext4
    ext4.alias=ext3
    ext4.alias=fs-ext3
    ext4.alias=ext2
    ext4.alias=fs-ext2
    md_mod.alias=block-major-9-*
    md_mod.alias=md
    md_mod.description=MD RAID framework
    md_mod.license=GPL
    md_mod.parmtype=create_on_open:bool
    md_mod.parmtype=start_dirty_degraded:int
    ...

    Co-Developed-by: Gleb Fotengauer-Malinovskiy
    Signed-off-by: Gleb Fotengauer-Malinovskiy
    Signed-off-by: Alexey Gladkov
    Acked-by: Jessica Yu
    Signed-off-by: Masahiro Yamada

    Alexey Gladkov
     

06 May, 2019

1 commit


03 May, 2019

3 commits


02 May, 2019

1 commit


29 Apr, 2019

1 commit


26 Apr, 2019

1 commit


25 Apr, 2019

1 commit

  • CONFIG_INIT_STACK_ALL turns on stack initialization based on
    -ftrivial-auto-var-init in Clang builds, which has greater coverage
    than CONFIG_GCC_PLUGINS_STRUCTLEAK_BYREF_ALL.

    -ftrivial-auto-var-init Clang option provides trivial initializers for
    uninitialized local variables, variable fields and padding.

    It has three possible values:
    pattern - uninitialized locals are filled with a fixed pattern
    (mostly 0xAA on 64-bit platforms, see https://reviews.llvm.org/D54604
    for more details, but 0x000000AA for 32-bit pointers) likely to cause
    crashes when uninitialized value is used;
    zero (it's still debated whether this flag makes it to the official
    Clang release) - uninitialized locals are filled with zeroes;
    uninitialized (default) - uninitialized locals are left intact.

    This patch uses only the "pattern" mode when CONFIG_INIT_STACK_ALL is
    enabled.

    Developers have the possibility to opt-out of this feature on a
    per-variable basis by using __attribute__((uninitialized)), but such
    use should be well justified in comments.

    Co-developed-by: Alexander Potapenko
    Signed-off-by: Alexander Potapenko
    Signed-off-by: Kees Cook
    Tested-by: Alexander Potapenko
    Acked-by: Masahiro Yamada

    Kees Cook
     

22 Apr, 2019

1 commit


18 Apr, 2019

1 commit


15 Apr, 2019

1 commit


12 Apr, 2019

1 commit

  • Daniel Borkmann says:

    ====================
    pull-request: bpf-next 2019-04-12

    The following pull-request contains BPF updates for your *net-next* tree.

    The main changes are:

    1) Improve BPF verifier scalability for large programs through two
    optimizations: i) remove verifier states that are not useful in pruning,
    ii) stop walking parentage chain once first LIVE_READ is seen. Combined
    gives approx 20x speedup. Increase limits for accepting large programs
    under root, and add various stress tests, from Alexei.

    2) Implement global data support in BPF. This enables static global variables
    for .data, .rodata and .bss sections to be properly handled which allows
    for more natural program development. This also opens up the possibility
    to optimize program workflow by compiling ELFs only once and later only
    rewriting section data before reload, from Daniel and with test cases and
    libbpf refactoring from Joe.

    3) Add config option to generate BTF type info for vmlinux as part of the
    kernel build process. DWARF debug info is converted via pahole to BTF.
    Latter relies on libbpf and makes use of BTF deduplication algorithm which
    results in 100x savings compared to DWARF data. Resulting .BTF section is
    typically about 2MB in size, from Andrii.

    4) Add BPF verifier support for stack access with variable offset from
    helpers and add various test cases along with it, from Andrey.

    5) Extend bpf_skb_adjust_room() growth BPF helper to mark inner MAC header
    so that L2 encapsulation can be used for tc tunnels, from Alan.

    6) Add support for input __sk_buff context in BPF_PROG_TEST_RUN so that
    users can define a subset of allowed __sk_buff fields that get fed into
    the test program, from Stanislav.

    7) Add bpf fs multi-dimensional array tests for BTF test suite and fix up
    various UBSAN warnings in bpftool, from Yonghong.

    8) Generate a pkg-config file for libbpf, from Luca.

    9) Dump program's BTF id in bpftool, from Prashant.

    10) libbpf fix to use smaller BPF log buffer size for AF_XDP's XDP
    program, from Magnus.

    11) kallsyms related fixes for the case when symbols are not present in
    BPF selftests and samples, from Daniel
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

09 Apr, 2019

2 commits

  • After cross-compiling the kernel, "make mrproper" should be executed
    with the proper ARCH= option. Otherwise, stale objects will remain
    under arch/$(SRCARCH)/.

    One bad scenario is like this:

    $ make ARCH=arm defconfig all # cross-compile the kernel for arm
    $ make mrproper # mrproper for host-arch (i.e. x86)
    $ make ARCH=arm O=build_dir defconfig all

    If you miss ARCH= for mrproper and cross-compile the kernel with O=
    and ARCH= options, Kbuild will happily start to build, but may fail
    due to stale objects in the srctree.

    If $(srctree)/arch/$(SRCARCH)/include/generated/ exists, let's stop
    the out-of-tree build. To detect this, mrproper should clean only
    arch/$(SRCARCH)/include/generated/.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • This is unneeded since commit 43fee2b23895 ("kbuild: do not redirect
    the first prerequisite for filechk").

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

08 Apr, 2019

2 commits

  • GCC 9 introduces a new option, -flive-patching. It disables certain
    optimizations which could make a compilation unsafe for later live
    patching of the running kernel.

    The option is used only if CONFIG_LIVEPATCH is enabled and $(CC)
    supports it.

    Performance impact of the option was measured on three different
    Intel machines - two bigger NUMA boxes and one smaller UMA box. Kernel
    intensive (IO, scheduling, networking) benchmarks were selected, plus a
    set of HPC workloads from NAS Parallel Benchmark. The tests were done on
    upstream kernel 5.0-rc8 with openSUSE Leap 15.0 userspace.

    The majority of the tests is unaffected. The only significant exception
    is the scheduler section which suffers 1-3% degradation.

    Evaluated-by: Giovanni Gherdovich
    Signed-off-by: Miroslav Benes
    Acked-by: Josh Poimboeuf
    Signed-off-by: Petr Mladek

    Miroslav Benes
     
  • Linus Torvalds
     

03 Apr, 2019

1 commit

  • This patch adds new config option to trigger generation of BTF type
    information from DWARF debuginfo for vmlinux and kernel modules through
    pahole, which in turn relies on libbpf for btf_dedup() algorithm.

    The intent is to record compact type information of all types used
    inside kernel, including all the structs/unions/typedefs/etc. This
    enables BPF's compile-once-run-everywhere ([0]) approach, in which
    tracing programs that are inspecting kernel's internal data (e.g.,
    struct task_struct) can be compiled on a system running some kernel
    version, but would be possible to run on other kernel versions (and
    configurations) without recompilation, even if the layout of structs
    changed and/or some of the fields were added, removed, or renamed.

    This is only possible if BPF loader can get kernel type info to adjust
    all the offsets correctly. This patch is a first time in this direction,
    making sure that BTF type info is part of Linux kernel image in
    non-loadable ELF section.

    BTF deduplication ([1]) algorithm typically provides 100x savings
    compared to DWARF data, so resulting .BTF section is not big as is
    typically about 2MB in size.

    [0] http://vger.kernel.org/lpc-bpf2018.html#session-2
    [1] https://facebookmicrosites.github.io/bpf/blog/2018/11/14/btf-enhancement.html

    Cc: Masahiro Yamada
    Cc: Arnaldo Carvalho de Melo
    Cc: Daniel Borkmann
    Cc: Alexei Starovoitov
    Cc: Yonghong Song
    Cc: Martin KaFai Lau
    Signed-off-by: Andrii Nakryiko
    Acked-by: David S. Miller
    Acked-by: Alexei Starovoitov
    Acked-by: Daniel Borkmann
    Signed-off-by: Daniel Borkmann

    Andrii Nakryiko
     

02 Apr, 2019

1 commit

  • KBUILD_SRC was conventionally used for some different purposes:
    [1] To remember the source tree path
    [2] As a flag to check if sub-make is already done
    [3] As a flag to check if Kbuild runs out of tree

    For [1], we do not need to remember it because the top Makefile
    can compute it by $(realpath $(dir $(lastword $(MAKEFILE_LIST))))

    [2] has been replaced with self-commenting 'sub_make_done'.

    For [3], we can distinguish in-tree/out-of-tree by comparing
    $(srctree) and '.'

    This commit converts [3] to prepare for the KBUILD_SRC removal.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada