01 Feb, 2020

3 commits

  • Pull updates from Andrew Morton:
    "Most of -mm and quite a number of other subsystems: hotfixes, scripts,
    ocfs2, misc, lib, binfmt, init, reiserfs, exec, dma-mapping, kcov.

    MM is fairly quiet this time. Holidays, I assume"

    * emailed patches from Andrew Morton : (118 commits)
    kcov: ignore fault-inject and stacktrace
    include/linux/io-mapping.h-mapping: use PHYS_PFN() macro in io_mapping_map_atomic_wc()
    execve: warn if process starts with executable stack
    reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()
    init/main.c: fix misleading "This architecture does not have kernel memory protection" message
    init/main.c: fix quoted value handling in unknown_bootoption
    init/main.c: remove unnecessary repair_env_string in do_initcall_level
    init/main.c: log arguments and environment passed to init
    fs/binfmt_elf.c: coredump: allow process with empty address space to coredump
    fs/binfmt_elf.c: coredump: delete duplicated overflow check
    fs/binfmt_elf.c: coredump: allocate core ELF header on stack
    fs/binfmt_elf.c: make BAD_ADDR() unlikely
    fs/binfmt_elf.c: better codegen around current->mm
    fs/binfmt_elf.c: don't copy ELF header around
    fs/binfmt_elf.c: fix ->start_code calculation
    fs/binfmt_elf.c: smaller code generation around auxv vector fill
    lib/find_bit.c: uninline helper _find_next_bit()
    lib/find_bit.c: join _find_next_bit{_le}
    uapi: rename ext2_swab() to swab() and share globally in swab.h
    lib/scatterlist.c: adjust indentation in __sg_alloc_table
    ...

    Linus Torvalds
     
  • Add "issus" and correct it as "issues".

    Link: http://lkml.kernel.org/r/20200105221950.8384-1-luca@lucaceresoli.net
    Signed-off-by: Luca Ceresoli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Luca Ceresoli
     
  • Here are some of the common spelling mistakes and typos that I've found
    while fixing up spelling mistakes in the kernel. Most of them still
    exist in more than two source files.

    Link: http://lkml.kernel.org/r/20191229143626.51238-1-xndchn@gmail.com
    Signed-off-by: Xiong
    Cc: Colin Ian King
    Cc: Stephen Boyd
    Cc: Paul Walmsley
    Cc: Chris Paterson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xiong
     

30 Jan, 2020

3 commits

  • Pull devicetree updates from Rob Herring:

    - Update dtc to upstream v1.5.1-22-gc40aeb60b47a (plus 1 revert)

    - Fix for DMA coherent devices on Power

    - Rework and simplify the DT phandle cache code

    - DT schema conversions for LEDS, gpio-leds, STM32 dfsdm, STM32 UART,
    STM32 ROMEM, STM32 watchdog, STM32 DMAs, STM32 mlahb, STM32 RTC,
    STM32 RCC, STM32 syscon, rs485, Renesas rCar CSI2, Faraday FTIDE010,
    DWC2, Arm idle-states, Allwinner legacy resets, PRCM and clocks,
    Allwinner H6 OPP, Allwinner AHCI, Allwinner MBUS, Allwinner A31 CSI,
    Allwinner h/w codec, Allwinner A10 system ctrl, Allwinner SRAM,
    Allwinner USB PHY, Renesas CEU, generic PCI host, Arm Versatile PCI

    - New binding schemas for SATA and PATA controllers, TI and Infineon VR
    controllers, MAX31730

    - New compatible strings for i.MX8QM, WCN3991, renesas,r8a77961-wdt,
    renesas,etheravb-r8a77961

    - Add USB 'super-speed-plus' as a documented speed

    - Vendor prefixes for broadmobi, calaosystems, kam, and mps

    - Clean-up the multiple flavors of ST-Ericsson vendor prefixes

    * tag 'devicetree-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (66 commits)
    scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles"
    of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc
    dt-bindings: leds: Convert gpio-leds to DT schema
    dt-bindings: leds: Convert common LED binding to schema
    dt-bindings: PCI: Convert generic host binding to DT schema
    dt-bindings: PCI: Convert Arm Versatile binding to DT schema
    dt-bindings: Be explicit about installing deps
    dt-bindings: stm32: convert dfsdm to json-schema
    dt-bindings: serial: Convert STM32 UART to json-schema
    dt-bindings: serial: Convert rs485 bindings to json-schema
    dt-bindings: timer: Use non-empty ranges in example
    dt-bindings: arm-boards: typo fix
    dt-bindings: Add TI and Infineon VR Controllers as trivial devices
    dt-binding: usb: add "super-speed-plus"
    dt-bindings: rcar-csi2: Convert bindings to json-schema
    dt-bindings: iio: adc: ad7606: Fix wrong maxItems value
    dt-bindings: Convert Faraday FTIDE010 to DT schema
    dt-bindings: Create DT bindings for PATA controllers
    dt-bindings: Create DT bindings for SATA controllers
    dt: bindings: add vendor prefix for Kamstrup A/S
    ...

    Linus Torvalds
     
  • Pull documentation updates from Jonathan Corbet:
    "It has been a relatively quiet cycle for documentation, but there's
    still a couple of things of note:

    - Conversion of the NFS documentation to RST

    - A new document on how to help with documentation (and a maintainer
    profile entry too)

    Plus the usual collection of typo fixes, etc"

    * tag 'docs-5.6' of git://git.lwn.net/linux: (40 commits)
    docs: filesystems: add overlayfs to index.rst
    docs: usb: remove some broken references
    scripts/find-unused-docs: Fix massive false positives
    docs: nvdimm: use ReST notation for subsection
    zram: correct documentation about sysfs node of huge page writeback
    Documentation: zram: various fixes in zram.rst
    Add a maintainer entry profile for documentation
    Add a document on how to contribute to the documentation
    docs: Keep up with the location of NoUri
    Documentation: Call out example SYM_FUNC_* usage as x86-specific
    Documentation: nfs: fault_injection: convert to ReST
    Documentation: nfs: pnfs-scsi-server: convert to ReST
    Documentation: nfs: convert pnfs-block-server to ReST
    Documentation: nfs: idmapper: convert to ReST
    Documentation: convert nfsd-admin-interfaces to ReST
    Documentation: nfs-rdma: convert to ReST
    Documentation: nfsroot.rst: COSMETIC: refill a paragraph
    Documentation: nfsroot.txt: convert to ReST
    Documentation: convert nfs.txt to ReST
    Documentation: filesystems: convert vfat.txt to RST
    ...

    Linus Torvalds
     
  • Pull tty/serial driver updates from Greg KH:
    "Here are the big set of tty and serial driver updates for 5.6-rc1

    Included in here are:
    - dummy_con cleanups (touches lots of arch code)
    - sysrq logic cleanups (touches lots of serial drivers)
    - samsung driver fixes (wasn't really being built)
    - conmakeshash move to tty subdir out of scripts
    - lots of small tty/serial driver updates

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

    * tag 'tty-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits)
    tty: n_hdlc: Use flexible-array member and struct_size() helper
    tty: baudrate: SPARC supports few more baud rates
    tty: baudrate: Synchronise baud_table[] and baud_bits[]
    tty: serial: meson_uart: Add support for kernel debugger
    serial: imx: fix a race condition in receive path
    serial: 8250_bcm2835aux: Document struct bcm2835aux_data
    serial: 8250_bcm2835aux: Use generic remapping code
    serial: 8250_bcm2835aux: Allocate uart_8250_port on stack
    serial: 8250_bcm2835aux: Suppress register_port error on -EPROBE_DEFER
    serial: 8250_bcm2835aux: Suppress clk_get error on -EPROBE_DEFER
    serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
    serial_core: Remove unused member in uart_port
    vt: Correct comment documenting do_take_over_console()
    vt: Delete comment referencing non-existent unbind_con_driver()
    arch/xtensa/setup: Drop dummy_con initialization
    arch/x86/setup: Drop dummy_con initialization
    arch/unicore32/setup: Drop dummy_con initialization
    arch/sparc/setup: Drop dummy_con initialization
    arch/sh/setup: Drop dummy_con initialization
    arch/s390/setup: Drop dummy_con initialization
    ...

    Linus Torvalds
     

29 Jan, 2020

3 commits

  • Pull networking updates from David Miller:

    1) Add WireGuard

    2) Add HE and TWT support to ath11k driver, from John Crispin.

    3) Add ESP in TCP encapsulation support, from Sabrina Dubroca.

    4) Add variable window congestion control to TIPC, from Jon Maloy.

    5) Add BCM84881 PHY driver, from Russell King.

    6) Start adding netlink support for ethtool operations, from Michal
    Kubecek.

    7) Add XDP drop and TX action support to ena driver, from Sameeh
    Jubran.

    8) Add new ipv4 route notifications so that mlxsw driver does not have
    to handle identical routes itself. From Ido Schimmel.

    9) Add BPF dynamic program extensions, from Alexei Starovoitov.

    10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes.

    11) Add support for macsec HW offloading, from Antoine Tenart.

    12) Add initial support for MPTCP protocol, from Christoph Paasch,
    Matthieu Baerts, Florian Westphal, Peter Krystad, and many others.

    13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu
    Cherian, and others.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits)
    net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC
    udp: segment looped gso packets correctly
    netem: change mailing list
    qed: FW 8.42.2.0 debug features
    qed: rt init valid initialization changed
    qed: Debug feature: ilt and mdump
    qed: FW 8.42.2.0 Add fw overlay feature
    qed: FW 8.42.2.0 HSI changes
    qed: FW 8.42.2.0 iscsi/fcoe changes
    qed: Add abstraction for different hsi values per chip
    qed: FW 8.42.2.0 Additional ll2 type
    qed: Use dmae to write to widebus registers in fw_funcs
    qed: FW 8.42.2.0 Parser offsets modified
    qed: FW 8.42.2.0 Queue Manager changes
    qed: FW 8.42.2.0 Expose new registers and change windows
    qed: FW 8.42.2.0 Internal ram offsets modifications
    MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver
    Documentation: net: octeontx2: Add RVU HW and drivers overview
    octeontx2-pf: ethtool RSS config support
    octeontx2-pf: Add basic ethtool support
    ...

    Linus Torvalds
     
  • Pull objtool updates from Ingo Molnar:
    "The main changes are to move the ORC unwind table sorting from early
    init to build-time - this speeds up booting.

    No change in functionality intended"

    * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/unwind/orc: Fix !CONFIG_MODULES build warning
    x86/unwind/orc: Remove boot-time ORC unwind tables sorting
    scripts/sorttable: Implement build-time ORC unwind table sorting
    scripts/sorttable: Rename 'sortextable' to 'sorttable'
    scripts/sortextable: Refactor the do_func() function
    scripts/sortextable: Remove dead code
    scripts/sortextable: Clean up the code to meet the kernel coding style better
    scripts/sortextable: Rewrite error/success handling

    Linus Torvalds
     
  • This reverts upstream commit 18d7b2f4ee45fec422b7d82bab0b3c762ee907e4. A
    revert in upstream dtc is pending.

    This commit didn't work for properties such as 'interrupt-map' that have
    phandle in the middle of an entry. It would also not work for a 0 or -1
    phandle value that acts as a NULL.

    Signed-off-by: Rob Herring

    Rob Herring
     

28 Jan, 2020

3 commits

  • scripts/find-unused-docs.sh invokes scripts/kernel-doc to find out if a
    source file contains kerneldoc or not.

    However, as it passes the no longer supported "-text" option to
    scripts/kernel-doc, the latter prints out its help text, causing all
    files to be considered containing kerneldoc.

    Get rid of these false positives by removing the no longer supported
    "-text" option from the scripts/kernel-doc invocation.

    Cc: stable@vger.kernel.org # 4.16+
    Fixes: b05142675310d2ac ("scripts: kernel-doc: get rid of unused output formats")
    Signed-off-by: Geert Uytterhoeven
    Link: https://lore.kernel.org/r/20200127093107.26401-1-geert+renesas@glider.be
    Signed-off-by: Jonathan Corbet

    Geert Uytterhoeven
     
  • Pull ioremap updates from Christoph Hellwig:
    "Remove the ioremap_nocache API (plus wrappers) that are always
    identical to ioremap"

    * tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremap:
    remove ioremap_nocache and devm_ioremap_nocache
    MIPS: define ioremap_nocache to ioremap

    Linus Torvalds
     
  • Pull arm64 updates from Will Deacon:
    "The changes are a real mixed bag this time around.

    The only scary looking one from the diffstat is the uapi change to
    asm-generic/mman-common.h, but this has been acked by Arnd and is
    actually just adding a pair of comments in an attempt to prevent
    allocation of some PROT values which tend to get used for
    arch-specific purposes. We'll be using them for Branch Target
    Identification (a CFI-like hardening feature), which is currently
    under review on the mailing list.

    New architecture features:

    - Support for Armv8.5 E0PD, which benefits KASLR in the same way as
    KPTI but without the overhead. This allows KPTI to be disabled on
    CPUs that are not affected by Meltdown, even is KASLR is enabled.

    - Initial support for the Armv8.5 RNG instructions, which claim to
    provide access to a high bandwidth, cryptographically secure
    hardware random number generator. As well as exposing these to
    userspace, we also use them as part of the KASLR seed and to seed
    the crng once all CPUs have come online.

    - Advertise a bunch of new instructions to userspace, including
    support for Data Gathering Hint, Matrix Multiply and 16-bit
    floating point.

    Kexec:

    - Cleanups in preparation for relocating with the MMU enabled

    - Support for loading crash dump kernels with kexec_file_load()

    Perf and PMU drivers:

    - Cleanups and non-critical fixes for a couple of system PMU drivers

    FPU-less (aka broken) CPU support:

    - Considerable fixes to support CPUs without the FP/SIMD extensions,
    including their presence in heterogeneous systems. Good luck
    finding a 64-bit userspace that handles this.

    Modern assembly function annotations:

    - Start migrating our use of ENTRY() and ENDPROC() over to the
    new-fangled SYM_{CODE,FUNC}_{START,END} macros, which are intended
    to aid debuggers

    Kbuild:

    - Cleanup detection of LSE support in the assembler by introducing
    'as-instr'

    - Remove compressed Image files when building clean targets

    IP checksumming:

    - Implement optimised IPv4 checksumming routine when hardware offload
    is not in use. An IPv6 version is in the works, pending testing.

    Hardware errata:

    - Work around Cortex-A55 erratum #1530923

    Shadow call stack:

    - Work around some issues with Clang's integrated assembler not
    liking our perfectly reasonable assembly code

    - Avoid allocating the X18 register, so that it can be used to hold
    the shadow call stack pointer in future

    ACPI:

    - Fix ID count checking in IORT code. This may regress broken
    firmware that happened to work with the old implementation, in
    which case we'll have to revert it and try something else

    - Fix DAIF corruption on return from GHES handler with pseudo-NMIs

    Miscellaneous:

    - Whitelist some CPUs that are unaffected by Spectre-v2

    - Reduce frequency of ASID rollover when KPTI is compiled in but
    inactive

    - Reserve a couple of arch-specific PROT flags that are already used
    by Sparc and PowerPC and are planned for later use with BTI on
    arm64

    - Preparatory cleanup of our entry assembly code in preparation for
    moving more of it into C later on

    - Refactoring and cleanup"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (73 commits)
    arm64: acpi: fix DAIF manipulation with pNMI
    arm64: kconfig: Fix alignment of E0PD help text
    arm64: Use v8.5-RNG entropy for KASLR seed
    arm64: Implement archrandom.h for ARMv8.5-RNG
    arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean'
    arm64: entry: Avoid empty alternatives entries
    arm64: Kconfig: select HAVE_FUTEX_CMPXCHG
    arm64: csum: Fix pathological zero-length calls
    arm64: entry: cleanup sp_el0 manipulation
    arm64: entry: cleanup el0 svc handler naming
    arm64: entry: mark all entry code as notrace
    arm64: assembler: remove smp_dmb macro
    arm64: assembler: remove inherit_daif macro
    ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map()
    mm: Reserve asm-generic prot flags 0x10 and 0x20 for arch use
    arm64: Use macros instead of hard-coded constants for MAIR_EL1
    arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list
    arm64: kernel: avoid x18 in __cpu_soft_restart
    arm64: kvm: stop treating register x18 as caller save
    arm64/lib: copy_page: avoid x18 register in assembler code
    ...

    Linus Torvalds
     

26 Jan, 2020

2 commits


23 Jan, 2020

2 commits

  • Alexei Starovoitov says:

    ====================
    pull-request: bpf-next 2020-01-22

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

    We've added 92 non-merge commits during the last 16 day(s) which contain
    a total of 320 files changed, 7532 insertions(+), 1448 deletions(-).

    The main changes are:

    1) function by function verification and program extensions from Alexei.

    2) massive cleanup of selftests/bpf from Toke and Andrii.

    3) batched bpf map operations from Brian and Yonghong.

    4) tcp congestion control in bpf from Martin.

    5) bulking for non-map xdp_redirect form Toke.

    6) bpf_send_signal_thread helper from Yonghong.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • When trying to compile with CONFIG_DEBUG_INFO_BTF enabled, I got this
    error:

    % make -s
    Failed to generate BTF for vmlinux
    Try to disable CONFIG_DEBUG_INFO_BTF
    make[3]: *** [vmlinux] Error 1

    Compiling again without -s shows the true error (that pahole is
    missing), but since this is fatal, we should show the error
    unconditionally on stderr as well, not silence it using the `info`
    function. With this patch:

    % make -s
    BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
    Failed to generate BTF for vmlinux
    Try to disable CONFIG_DEBUG_INFO_BTF
    make[3]: *** [vmlinux] Error 1

    Signed-off-by: Chris Down
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200122000110.GA310073@chrisdown.name

    Chris Down
     

20 Jan, 2020

1 commit

  • Scenario 1, ARMv7
    =================

    If code in arch/arm/kernel/ftrace.c would operate on mcount() pointer
    the following may be generated:

    00000230 :
    230: b5f8 push {r3, r4, r5, r6, r7, lr}
    232: b500 push {lr}
    234: f7ff fffe bl 0
    234: R_ARM_THM_CALL __gnu_mcount_nc
    238: f240 0600 movw r6, #0
    238: R_ARM_THM_MOVW_ABS_NC __gnu_mcount_nc
    23c: f8d0 1180 ldr.w r1, [r0, #384] ; 0x180

    FTRACE currently is not able to deal with it:

    WARNING: CPU: 0 PID: 0 at .../kernel/trace/ftrace.c:1979 ftrace_bug+0x1ad/0x230()
    ...
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.116-... #1
    ...
    [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
    [] (show_stack) from [] (dump_stack+0x81/0xa8)
    [] (dump_stack) from [] (warn_slowpath_common+0x69/0x90)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c)
    [] (warn_slowpath_null) from [] (ftrace_bug+0x1ad/0x230)
    [] (ftrace_bug) from [] (ftrace_process_locs+0x27d/0x444)
    [] (ftrace_process_locs) from [] (ftrace_init+0x91/0xe8)
    [] (ftrace_init) from [] (start_kernel+0x34b/0x358)
    [] (start_kernel) from [] (0x308095)
    ---[ end trace cb88537fdc8fa200 ]---
    ftrace failed to modify [] prealloc_fixed_plts+0x8/0x60
    actual: 44:f2:e1:36
    ftrace record flags: 0
    (0) expected tramp: c03143e9

    Scenario 2, ARMv4T
    ==================

    ftrace: allocating 14435 entries in 43 pages
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:2029 ftrace_bug+0x204/0x310
    CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.5 #1
    Hardware name: Cirrus Logic EDB9302 Evaluation Board
    [] (unwind_backtrace) from [] (show_stack+0x20/0x2c)
    [] (show_stack) from [] (dump_stack+0x20/0x30)
    [] (dump_stack) from [] (__warn+0xdc/0x104)
    [] (__warn) from [] (warn_slowpath_null+0x4c/0x5c)
    [] (warn_slowpath_null) from [] (ftrace_bug+0x204/0x310)
    [] (ftrace_bug) from [] (ftrace_init+0x3b4/0x4d4)
    [] (ftrace_init) from [] (start_kernel+0x20c/0x410)
    [] (start_kernel) from [] ( (null))
    ---[ end trace 0506a2f5dae6b341 ]---
    ftrace failed to modify
    [] perf_trace_sys_exit+0x5c/0xe8
    actual: 1e:ff:2f:e1
    Initializing ftrace call sites
    ftrace record flags: 0
    (0)
    expected tramp: c000fb24

    The analysis for this problem has been already performed previously,
    refer to the link below.

    Fix the above problems by allowing only selected reloc types in
    __mcount_loc. The list itself comes from the legacy recordmcount.pl
    script.

    Link: https://lore.kernel.org/lkml/56961010.6000806@pengutronix.de/
    Cc: stable@vger.kernel.org
    Fixes: ed60453fa8f8 ("ARM: 6511/1: ftrace: add ARM support for C version of recordmcount")
    Signed-off-by: Alexander Sverdlin
    Acked-by: Steven Rostedt (VMware)
    Signed-off-by: Russell King

    Alex Sverdlin
     

15 Jan, 2020

1 commit

  • Similar to 'cc-option' or 'ld-option', it is occasionally necessary to
    check whether the assembler supports certain ISA extensions. In the
    arm64 code we currently do this in Makefile with an additional define:

    lseinstr := $(call as-instr,.arch_extension lse,-DCONFIG_AS_LSE=1)

    Add the 'as-instr' option so that it can be used in Kconfig directly:

    def_bool $(as-instr,.arch_extension lse)

    Acked-by: Masahiro Yamada
    Reviewed-by: Vladimir Murzin
    Tested-by: Vladimir Murzin
    Signed-off-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Catalin Marinas
     

14 Jan, 2020

1 commit

  • bpf_helpers_doc.py script, used to generate bpf_helper_defs.h, unconditionally
    emits one informational message to stderr. Remove it and preserve stderr to
    contain only relevant errors. Also make sure script invocations command is
    muted by default in libbpf's Makefile.

    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200113073143.1779940-3-andriin@fb.com

    Andrii Nakryiko
     

13 Jan, 2020

1 commit


06 Jan, 2020

1 commit


04 Jan, 2020

1 commit


03 Jan, 2020

2 commits

  • Cross compiling the x86 kernel on a non-x86 build machine produces
    the following error when CONFIG_UNWINDER_ORC is enabled, regardless
    of whether libelf-dev is installed or not.

    dpkg-checkbuilddeps: error: Unmet build dependencies: libelf-dev
    dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
    dpkg-buildpackage: warning: (Use -d flag to override.)

    Since this is a build time dependency for a build tool, we need to
    depend on the native version of libelf-dev so add the appropriate
    annotation.

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Masahiro Yamada

    Ard Biesheuvel
     
  • I noticed that randconfig builds with gcc no longer produce a lot of
    ccache hits, unlike with clang, and traced this back to plugins
    now being enabled unconditionally if they are supported.

    I am now working around this by adding

    export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler%

    to my top-level Makefile. This changes the heuristic that ccache uses
    to determine whether the plugins are the same after a 'make clean'.

    However, it also seems that being able to just turn off the plugins is
    generally useful, at least for build testing it adds noticeable overhead
    but does not find a lot of bugs additional bugs, and may be easier for
    ccache users than my workaround.

    Fixes: 9f671e58159a ("security: Create "kernel hardening" config area")
    Signed-off-by: Arnd Bergmann
    Acked-by: Ard Biesheuvel
    Reviewed-by: Masahiro Yamada
    Link: https://lore.kernel.org/r/20191211133951.401933-1-arnd@arndb.de
    Cc: stable@vger.kernel.org
    Signed-off-by: Kees Cook

    Arnd Bergmann
     

27 Dec, 2019

1 commit

  • This adds the following commits from upstream:

    c40aeb60b47a travis.yml: Run tests on the non-x86 builders, too
    9f86aff444f4 Add .cirrus.yml for FreeBSD build
    34c82275bae6 Avoid gnu_printf attribute when using Clang
    743000931bc9 tests: default to 'cc' if CC not set
    adcd676491cc Add test-case for trailing zero
    d9c55f855b65 Remove trailing zero from the overlay path
    7a22132c79ec pylibfdt: Adjust for deprecated test methods
    dbe80d577ee2 tests: add extension to sed -i for GNU/BSD sed compatibility
    af57d440d887 libfdt: Correct prototype for fdt_ro_probe_()
    6ce585ac153b Use correct inttypes.h format specifier
    715028622547 support byacc in addition to bison
    fdf3f6d897ab pylibfdt: Correct the type for fdt_property_stub()
    430419c28100 tests: fix some python warnings
    588a29ff2e4e util: use gnu_printf format attribute
    bc876708ab1d fstree: replace lstat with stat
    4c3c4ccb9916 dumptrees: pass outputdir as first argument
    aa522da9fff6 tests: allow out-of-tree test run
    0d0d0fa51b1f fdtoverlay: Return non-zero exit code if overlays can't be applied
    4605eb047b38 Add .editorconfig
    18d7b2f4ee45 yamltree: Ensure consistent bracketing of properties with phandles
    67f790c1adcc libfdt.h: add explicit cast from void* to uint8_t* in fdt(32|64)_st
    b111122ea5eb pylibfdt: use python3 shebang
    60e0db3d65a1 Ignore phandle properties in /aliases
    95ce19c14064 README: update for Python 3
    5345db19f615 livetree: simplify condition in get_node_by_path
    b8d6eca78210 libfdt: Allow #size-cells of 0
    184f51099471 Makefile: Add EXTRA_CFLAGS variable
    812b1956a076 libfdt: Tweak data handling to satisfy Coverity
    5c715a44776a fdtoverlay: Ignore symbols in overlays which don't apply to the target tree
    b99353474850 fdtoverlay: Allow adding labels to __overlay__ nodes in overlays
    d6de81b81b68 pylibfdt: Add support for fdt_get_alias()
    1c17714dbb3a pylibfdt: Correct the FdtSw example
    ad57e4574a37 tests: Add a failed test case for 'fdtoverlay' with long target path
    bbe3b36f542b fdtoverlay: Rework output allocation
    6c2e61f08396 fdtoverlay: Improve error messages
    297f5abb362e fdtoverlay: Check for truncated overlay blobs

    Cc: Frank Rowand
    Cc: clang-built-linux@googlegroups.com
    Signed-off-by: Rob Herring

    Rob Herring
     

23 Dec, 2019

1 commit


22 Dec, 2019

1 commit

  • …asahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - fix warning in out-of-tree 'make clean'

    - add READELF variable to the top Makefile

    - fix broken builds when LINUX_COMPILE_BY contains a backslash

    - fix build warning in kallsyms

    - fix NULL pointer access in expr_eq() in Kconfig

    - fix missing dependency on rsync in deb-pkg build

    - remove ---help--- from documentation

    - fix misleading documentation about directory descending

    * tag 'kbuild-fixes-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: clarify the difference between obj-y and obj-m w.r.t. descending
    kconfig: remove ---help--- from documentation
    scripts: package: mkdebian: add missing rsync dependency
    kconfig: don't crash on NULL expressions in expr_eq()
    scripts/kallsyms: fix offset overflow of kallsyms_relative_base
    mkcompile_h: use printf for LINUX_COMPILE_BY
    mkcompile_h: git rid of UTS_TRUNCATE from LINUX_COMPILE_{BY,HOST}
    x86/boot: kbuild: allow readelf executable to be specified
    kbuild: fix 'No such file or directory' warning when cleaning

    Linus Torvalds
     

17 Dec, 2019

3 commits


14 Dec, 2019

3 commits

  • Since commit 5e5c4fa78745 ("scripts/kallsyms: shrink table before
    sorting it"), kallsyms_relative_base can be larger than _text, which
    causes overflow when building the 32-bit kernel.

    https://lkml.org/lkml/2019/12/7/156

    This is because _text is, unless --all-symbols is specified, now
    trimmed from the symbol table before record_relative_base() is called.

    Handle the offset signedness also for kallsyms_relative_base. Introduce
    a new helper, output_address(), to reduce the code duplication.

    Fixes: 5e5c4fa78745 ("scripts/kallsyms: shrink table before sorting it")
    Reported-by: Olof Johansson
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Commit 858805b336be ("kbuild: add $(BASH) to run scripts with
    bash-extension") shed light on portability issues. Here is another one.

    Since commit f07726048d59 ("Fix handling of backlash character in
    LINUX_COMPILE_BY name"), we must escape a backslash contained in
    LINUX_COMPILE_BY. This is not working on such distros as Ubuntu.

    As the POSIX spec [1] says, if any of the operands contain a backslash
    ( '\' ) character, the results are implementation-defined.

    The actual shell of /bin/sh could be bash, dash, etc. depending on
    distros, and the behavior of builtin echo command is different among
    them.

    The bash builtin echo, unless -e is given, copies the arguments to
    stdout without expanding escape sequences (BSD-like behavior).

    The dash builtin echo, in contrast, adopts System V behavior, which
    does expand escape sequences without any option given.

    Even non-builtin /bin/echo behaves differently depending on the system.
    Due to these variations, echo is considered as a non-portable command.
    Using printf is the common solution to avoid the portability issue.

    [1] https://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html

    Fixes: 858805b336be ("kbuild: add $(BASH) to run scripts with bash-extension")
    Reported-by: XXing Wei
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • UTS_VERSION is set to struct uts_namespace, hence a too long string
    should be truncated so it fits in 64 characters.

    On the other hand, LINUX_COMPILE_BY/HOST are not set to uts_namespace.
    They are just used in the banners, which do not have specific length
    limitation.

    I dug into the git history, but I could not find the reason why
    these two strings must fit in 64 characters. Remove them.

    Now that UTS_VERSION is the only user of UTS_TRUNCATE, I squashed it.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

13 Dec, 2019

7 commits

  • Now that the orc_unwind and orc_unwind_ip tables are sorted at build time,
    remove the boot time sorting pass.

    No change in functionality.

    [ mingo: Rewrote the changelog and code comments. ]

    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Peter Zijlstra
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-8-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • The ORC unwinder has two tables: .orc_unwind_ip and .orc_unwind, which
    need to be sorted for binary search. Previously this sorting was done
    during bootup.

    Sort them at build time to speed up booting.

    Add the ORC tables sorting in a parallel build process to speed up the build.

    [ mingo: Rewrote the changelog and fixed some comments. ]

    Suggested-by: Andy Lutomirski
    Suggested-by: Peter Zijlstra
    Reported-by: kbuild test robot
    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-7-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • Use a more generic name for additional table sorting usecases,
    such as the upcoming ORC table sorting feature. This tool is
    not tied to exception table sorting anymore.

    No functional changes intended.

    [ mingo: Rewrote the changelog. ]

    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-6-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • Refine the loop, naming and code structure, make the code more readable
    and extendable. No functional changes intended.

    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-5-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-4-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • Fix various style errors and inconsistencies, no functional changes
    intended.

    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-3-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang
     
  • The scripts/sortextable.c code has originally copied some code from
    scripts/recordmount.c, which used the same setjmp/longjmp method to
    manage control flow.

    Meanwhile recordmcount has improved its error handling via:

    3f1df12019f3 ("recordmcount: Rewrite error/success handling").

    So rewrite this part of sortextable as well to get rid of the setjmp/longjmp
    kludges, with additional refactoring, to make it more readable and
    easier to extend.

    No functional changes intended.

    [ mingo: Rewrote the changelog. ]

    Signed-off-by: Shile Zhang
    Acked-by: Peter Zijlstra (Intel)
    Cc: Josh Poimboeuf
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-kbuild@vger.kernel.org
    Link: https://lkml.kernel.org/r/20191204004633.88660-2-shile.zhang@linux.alibaba.com
    Signed-off-by: Ingo Molnar

    Shile Zhang