01 Apr, 2020

2 commits

  • Pull networking updates from David Miller:
    "Highlights:

    1) Fix the iwlwifi regression, from Johannes Berg.

    2) Support BSS coloring and 802.11 encapsulation offloading in
    hardware, from John Crispin.

    3) Fix some potential Spectre issues in qtnfmac, from Sergey
    Matyukevich.

    4) Add TTL decrement action to openvswitch, from Matteo Croce.

    5) Allow paralleization through flow_action setup by not taking the
    RTNL mutex, from Vlad Buslov.

    6) A lot of zero-length array to flexible-array conversions, from
    Gustavo A. R. Silva.

    7) Align XDP statistics names across several drivers for consistency,
    from Lorenzo Bianconi.

    8) Add various pieces of infrastructure for offloading conntrack, and
    make use of it in mlx5 driver, from Paul Blakey.

    9) Allow using listening sockets in BPF sockmap, from Jakub Sitnicki.

    10) Lots of parallelization improvements during configuration changes
    in mlxsw driver, from Ido Schimmel.

    11) Add support to devlink for generic packet traps, which report
    packets dropped during ACL processing. And use them in mlxsw
    driver. From Jiri Pirko.

    12) Support bcmgenet on ACPI, from Jeremy Linton.

    13) Make BPF compatible with RT, from Thomas Gleixnet, Alexei
    Starovoitov, and your's truly.

    14) Support XDP meta-data in virtio_net, from Yuya Kusakabe.

    15) Fix sysfs permissions when network devices change namespaces, from
    Christian Brauner.

    16) Add a flags element to ethtool_ops so that drivers can more simply
    indicate which coalescing parameters they actually support, and
    therefore the generic layer can validate the user's ethtool
    request. Use this in all drivers, from Jakub Kicinski.

    17) Offload FIFO qdisc in mlxsw, from Petr Machata.

    18) Support UDP sockets in sockmap, from Lorenz Bauer.

    19) Fix stretch ACK bugs in several TCP congestion control modules,
    from Pengcheng Yang.

    20) Support virtual functiosn in octeontx2 driver, from Tomasz
    Duszynski.

    21) Add region operations for devlink and use it in ice driver to dump
    NVM contents, from Jacob Keller.

    22) Add support for hw offload of MACSEC, from Antoine Tenart.

    23) Add support for BPF programs that can be attached to LSM hooks,
    from KP Singh.

    24) Support for multiple paths, path managers, and counters in MPTCP.
    From Peter Krystad, Paolo Abeni, Florian Westphal, Davide Caratti,
    and others.

    25) More progress on adding the netlink interface to ethtool, from
    Michal Kubecek"

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2121 commits)
    net: ipv6: rpl_iptunnel: Fix potential memory leak in rpl_do_srh_inline
    cxgb4/chcr: nic-tls stats in ethtool
    net: dsa: fix oops while probing Marvell DSA switches
    net/bpfilter: remove superfluous testing message
    net: macb: Fix handling of fixed-link node
    net: dsa: ksz: Select KSZ protocol tag
    netdevsim: dev: Fix memory leak in nsim_dev_take_snapshot_write
    net: stmmac: add EHL 2.5Gbps PCI info and PCI ID
    net: stmmac: add EHL PSE0 & PSE1 1Gbps PCI info and PCI ID
    net: stmmac: create dwmac-intel.c to contain all Intel platform
    net: dsa: bcm_sf2: Support specifying VLAN tag egress rule
    net: dsa: bcm_sf2: Add support for matching VLAN TCI
    net: dsa: bcm_sf2: Move writing of CFP_DATA(5) into slicing functions
    net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT
    net: dsa: bcm_sf2: Disable learning for ASP port
    net: dsa: b53: Deny enslaving port 7 for 7278 into a bridge
    net: dsa: b53: Prevent tagged VLAN on port 7 for 7278
    net: dsa: b53: Restore VLAN entries upon (re)configuration
    net: dsa: bcm_sf2: Fix overflow checks
    hv_netvsc: Remove unnecessary round_up for recv_completion_cnt
    ...

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:
    "Build system:

    - add CONFIG_UNUSED_KSYMS_WHITELIST, which will be useful to define a
    fixed set of export symbols for Generic Kernel Image (GKI)

    - allow to run 'make dt_binding_check' without .config

    - use full schema for checking DT examples in *.yaml files

    - make modpost fail for missing MODULE_IMPORT_NS(), which makes more
    sense because we know the produced modules are never loadable

    - Remove unused 'AS' variable

    Kconfig:

    - sanitize DEFCONFIG_LIST, and remove ARCH_DEFCONFIG from Kconfig
    files

    - relax the 'imply' behavior so that symbols implied by 'y' can
    become 'm'

    - make 'imply' obey 'depends on' in order to make 'imply' really weak

    Misc:

    - add documentation on building the kernel with Clang/LLVM

    - revive __HAVE_ARCH_STRLEN for 32bit sparc to use optimized strlen()

    - fix warning from deb-pkg builds when CONFIG_DEBUG_INFO=n

    - various script and Makefile cleanups"

    * tag 'kbuild-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits)
    Makefile: Update kselftest help information
    kbuild: deb-pkg: fix warning when CONFIG_DEBUG_INFO is unset
    kbuild: add outputmakefile to no-dot-config-targets
    kbuild: remove AS variable
    net: wan: wanxl: refactor the firmware rebuild rule
    net: wan: wanxl: use $(M68KCC) instead of $(M68KAS) for rebuilding firmware
    net: wan: wanxl: use allow to pass CROSS_COMPILE_M68k for rebuilding firmware
    kbuild: add comment about grouped target
    kbuild: add -Wall to KBUILD_HOSTCXXFLAGS
    kconfig: remove unused variable in qconf.cc
    sparc: revive __HAVE_ARCH_STRLEN for 32bit sparc
    kbuild: refactor Makefile.dtbinst more
    kbuild: compute the dtbs_install destination more simply
    Makefile: disallow data races on gcc-10 as well
    kconfig: make 'imply' obey the direct dependency
    kconfig: allow symbols implied by y to become m
    net: drop_monitor: use IS_REACHABLE() to guard net_dm_hw_report()
    modpost: return error if module is missing ns imports and MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=n
    modpost: rework and consolidate logging interface
    kbuild: allow to run dt_binding_check without kernel configuration
    ...

    Linus Torvalds
     

31 Mar, 2020

3 commits

  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull scheduler updates from Ingo Molnar:
    "The main changes in this cycle are:

    - Various NUMA scheduling updates: harmonize the load-balancer and
    NUMA placement logic to not work against each other. The intended
    result is better locality, better utilization and fewer migrations.

    - Introduce Thermal Pressure tracking and optimizations, to improve
    task placement on thermally overloaded systems.

    - Implement frequency invariant scheduler accounting on (some) x86
    CPUs. This is done by observing and sampling the 'recent' CPU
    frequency average at ~tick boundaries. The CPU provides this data
    via the APERF/MPERF MSRs. This hopefully makes our capacity
    estimates more precise and keeps tasks on the same CPU better even
    if it might seem overloaded at a lower momentary frequency. (As
    usual, turbo mode is a complication that we resolve by observing
    the maximum frequency and renormalizing to it.)

    - Add asymmetric CPU capacity wakeup scan to improve capacity
    utilization on asymmetric topologies. (big.LITTLE systems)

    - PSI fixes and optimizations.

    - RT scheduling capacity awareness fixes & improvements.

    - Optimize the CONFIG_RT_GROUP_SCHED constraints code.

    - Misc fixes, cleanups and optimizations - see the changelog for
    details"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (62 commits)
    threads: Update PID limit comment according to futex UAPI change
    sched/fair: Fix condition of avg_load calculation
    sched/rt: cpupri_find: Trigger a full search as fallback
    kthread: Do not preempt current task if it is going to call schedule()
    sched/fair: Improve spreading of utilization
    sched: Avoid scale real weight down to zero
    psi: Move PF_MEMSTALL out of task->flags
    MAINTAINERS: Add maintenance information for psi
    psi: Optimize switching tasks inside shared cgroups
    psi: Fix cpu.pressure for cpu.max and competing cgroups
    sched/core: Distribute tasks within affinity masks
    sched/fair: Fix enqueue_task_fair warning
    thermal/cpu-cooling, sched/core: Move the arch_set_thermal_pressure() API to generic scheduler code
    sched/rt: Remove unnecessary push for unfit tasks
    sched/rt: Allow pulling unfitting task
    sched/rt: Optimize cpupri_find() on non-heterogenous systems
    sched/rt: Re-instate old behavior in select_task_rq_rt()
    sched/rt: cpupri_find: Implement fallback mechanism for !fit case
    sched/fair: Fix reordering of enqueue/dequeue_task_fair()
    sched/fair: Fix runnable_avg for throttled cfs
    ...

    Linus Torvalds
     
  • LSM and tracing programs share their helpers with bpf_tracing_func_proto
    which is only defined (in bpf_trace.c) when BPF_EVENTS is enabled.

    Instead of adding __weak symbol, make BPF_LSM depend on BPF_EVENTS so
    that both tracing and LSM programs can actually share helpers.

    Fixes: fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM")
    Reported-by: Randy Dunlap
    Signed-off-by: KP Singh
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20200330204059.13024-1-kpsingh@chromium.org

    KP Singh
     

30 Mar, 2020

1 commit

  • Introduce types and configs for bpf programs that can be attached to
    LSM hooks. The programs can be enabled by the config option
    CONFIG_BPF_LSM.

    Signed-off-by: KP Singh
    Signed-off-by: Daniel Borkmann
    Reviewed-by: Brendan Jackman
    Reviewed-by: Florent Revest
    Reviewed-by: Thomas Garnier
    Acked-by: Yonghong Song
    Acked-by: Andrii Nakryiko
    Acked-by: James Morris
    Link: https://lore.kernel.org/bpf/20200329004356.27286-2-kpsingh@chromium.org

    KP Singh
     

12 Mar, 2020

1 commit

  • The support for __uint128_t is dependent on the target bit size.

    GCC that defaults to the 32-bit can still build the 64-bit kernel
    with -m64 flag passed.

    However, $(cc-option,-D__SIZEOF_INT128__=0) is evaluated against the
    default machine bit, which may not match to the kernel it is building.

    Theoretically, this could be evaluated separately for 64BIT/32BIT.

    config CC_HAS_INT128
    bool
    default !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) if 64BIT
    default !$(cc-option,$(m32-flag) -D__SIZEOF_INT128__=0)

    I simplified it more because the 32-bit compiler is unlikely to support
    __uint128_t.

    Fixes: c12d3362a74b ("int128: move __uint128_t compiler test to Kconfig")
    Reported-by: George Spelvin
    Signed-off-by: Masahiro Yamada
    Tested-by: George Spelvin

    Masahiro Yamada
     

06 Mar, 2020

1 commit

  • Extrapolating on the existing framework to track rt/dl utilization using
    pelt signals, add a similar mechanism to track thermal pressure. The
    difference here from rt/dl utilization tracking is that, instead of
    tracking time spent by a CPU running a RT/DL task through util_avg, the
    average thermal pressure is tracked through load_avg. This is because
    thermal pressure signal is weighted time "delta" capacity unlike util_avg
    which is binary. "delta capacity" here means delta between the actual
    capacity of a CPU and the decreased capacity a CPU due to a thermal event.

    In order to track average thermal pressure, a new sched_avg variable
    avg_thermal is introduced. Function update_thermal_load_avg can be called
    to do the periodic bookkeeping (accumulate, decay and average) of the
    thermal pressure.

    Reviewed-by: Vincent Guittot
    Signed-off-by: Thara Gopinath
    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Ingo Molnar
    Link: https://lkml.kernel.org/r/20200222005213.3873-2-thara.gopinath@linaro.org

    Thara Gopinath
     

03 Mar, 2020

2 commits

  • CONFIG_TRIM_UNUSED_KSYMS currently removes all unused exported symbols
    from ksymtab. This works really well when using in-tree drivers, but
    cannot be used in its current form if some of them are out-of-tree.

    Indeed, even if the list of symbols required by out-of-tree drivers is
    known at compile time, the only solution today to guarantee these don't
    get trimmed is to set CONFIG_TRIM_UNUSED_KSYMS=n. This not only wastes
    space, but also makes it difficult to control the ABI usable by vendor
    modules in distribution kernels such as Android. Being able to control
    the kernel ABI surface is particularly useful to ship a unique Generic
    Kernel Image (GKI) for all vendors, which is a first step in the
    direction of getting all vendors to contribute their code upstream.

    As such, attempt to improve the situation by enabling users to specify a
    symbol 'whitelist' at compile time. Any symbol specified in this
    whitelist will be kept exported when CONFIG_TRIM_UNUSED_KSYMS is set,
    even if it has no in-tree user. The whitelist is defined as a simple
    text file, listing symbols, one per line.

    Acked-by: Jessica Yu
    Acked-by: Nicolas Pitre
    Tested-by: Matthias Maennich
    Reviewed-by: Matthias Maennich
    Signed-off-by: Quentin Perret
    Signed-off-by: Masahiro Yamada

    Quentin Perret
     
  • Most of the Kconfig commands (except defconfig and all*config) read
    the .config file as a base set of CONFIG options.

    When it does not exist, the files in DEFCONFIG_LIST are searched in
    this order and loaded if found.

    I do not see much sense in the last two lines in DEFCONFIG_LIST.

    [1] ARCH_DEFCONFIG

    The entry for DEFCONFIG_LIST is guarded by 'depends on !UML'. So, the
    ARCH_DEFCONFIG definition in arch/x86/um/Kconfig is meaningless.

    arch/{sh,sparc,x86}/Kconfig define ARCH_DEFCONFIG depending on 32 or
    64 bit variant symbols. This is a little bit strange; ARCH_DEFCONFIG
    should be a fixed string because the base config file is loaded before
    the symbol evaluation stage.

    Using KBUILD_DEFCONFIG makes more sense because it is fixed before
    Kconfig is invoked. Fortunately, arch/{sh,sparc,x86}/Makefile define it
    in the same way, and it works as expected. Hence, replace ARCH_DEFCONFIG
    with "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)".

    [2] arch/$(ARCH)/defconfig

    This file path is no longer valid. The defconfig files are always located
    in the arch configs/ directories.

    $ find arch -name defconfig | sort
    arch/alpha/configs/defconfig
    arch/arm64/configs/defconfig
    arch/csky/configs/defconfig
    arch/nds32/configs/defconfig
    arch/riscv/configs/defconfig
    arch/s390/configs/defconfig
    arch/unicore32/configs/defconfig

    The path arch/*/configs/defconfig is already covered by
    "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)". So, this file path is
    not necessary.

    I moved the default KBUILD_DEFCONFIG to the top Makefile. Otherwise,
    the 7 architectures listed above would end up with endless loop of
    syncconfig.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

27 Feb, 2020

1 commit

  • Pull tracing and bootconfig updates:
    "Fixes and changes to bootconfig before it goes live in a release.

    Change in API of bootconfig (before it comes live in a release):
    - Have a magic value "BOOTCONFIG" in initrd to know a bootconfig
    exists
    - Set CONFIG_BOOT_CONFIG to 'n' by default
    - Show error if "bootconfig" on cmdline but not compiled in
    - Prevent redefining the same value
    - Have a way to append values
    - Added a SELECT BLK_DEV_INITRD to fix a build failure

    Synthetic event fixes:
    - Switch to raw_smp_processor_id() for recording CPU value in preempt
    section. (No care for what the value actually is)
    - Fix samples always recording u64 values
    - Fix endianess
    - Check number of values matches number of fields
    - Fix a printing bug

    Fix of trace_printk() breaking postponed start up tests

    Make a function static that is only used in a single file"

    * tag 'trace-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    bootconfig: Fix CONFIG_BOOTTIME_TRACING dependency issue
    bootconfig: Add append value operator support
    bootconfig: Prohibit re-defining value on same key
    bootconfig: Print array as multiple commands for legacy command line
    bootconfig: Reject subkey and value on same parent key
    tools/bootconfig: Remove unneeded error message silencer
    bootconfig: Add bootconfig magic word for indicating bootconfig explicitly
    bootconfig: Set CONFIG_BOOT_CONFIG=n by default
    tracing: Clear trace_state when starting trace
    bootconfig: Mark boot_config_checksum() static
    tracing: Disable trace_printk() on post poned tests
    tracing: Have synthetic event test use raw_smp_processor_id()
    tracing: Fix number printing bug in print_synth_event()
    tracing: Check that number of vals matches number of synth event fields
    tracing: Make synth_event trace functions endian-correct
    tracing: Make sure synth_event_trace() example always uses u64

    Linus Torvalds
     

26 Feb, 2020

1 commit

  • Since commit d8a953ddde5e ("bootconfig: Set CONFIG_BOOT_CONFIG=n by
    default") also changed the CONFIG_BOOTTIME_TRACING to select
    CONFIG_BOOT_CONFIG to show the boot-time tracing on the menu,
    it introduced wrong dependencies with BLK_DEV_INITRD as below.

    WARNING: unmet direct dependencies detected for BOOT_CONFIG
    Depends on [n]: BLK_DEV_INITRD [=n]
    Selected by [y]:
    - BOOTTIME_TRACING [=y] && TRACING_SUPPORT [=y] && FTRACE [=y] && TRACING [=y]

    This makes the CONFIG_BOOT_CONFIG selects CONFIG_BLK_DEV_INITRD to
    fix this error and make CONFIG_BOOTTIME_TRACING=n by default, so
    that both boot-time tracing and boot configuration off but those
    appear on the menu list.

    Link: http://lkml.kernel.org/r/158264140162.23842.11237423518607465535.stgit@devnote2

    Fixes: d8a953ddde5e ("bootconfig: Set CONFIG_BOOT_CONFIG=n by default")
    Reported-by: Randy Dunlap
    Compiled-tested-by: Randy Dunlap
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

21 Feb, 2020

2 commits

  • Add bootconfig magic word to the end of bootconfig on initrd
    image for indicating explicitly the bootconfig is there.
    Also tools/bootconfig treats wrong size or wrong checksum or
    parse error as an error, because if there is a bootconfig magic
    word, there must be a bootconfig.

    The bootconfig magic word is "#BOOTCONFIG\n", 12 bytes word.
    Thus the block image of the initrd file with bootconfig is
    as follows.

    [Initrd][bootconfig][size][csum][#BOOTCONFIG\n]

    Link: http://lkml.kernel.org/r/158220112263.26565.3944814205960612841.stgit@devnote2

    Suggested-by: Steven Rostedt
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     
  • Set CONFIG_BOOT_CONFIG=n by default. This also warns
    user if CONFIG_BOOT_CONFIG=n but "bootconfig" is given
    in the kernel command line.

    Link: http://lkml.kernel.org/r/158220111291.26565.9036889083940367969.stgit@devnote2

    Suggested-by: Steven Rostedt
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

12 Feb, 2020

1 commit

  • Pull tracing fixes from Steven Rostedt:
    "Various fixes:

    - Fix an uninitialized variable

    - Fix compile bug to bootconfig userspace tool (in tools directory)

    - Suppress some error messages of bootconfig userspace tool

    - Remove unneded CONFIG_LIBXBC from bootconfig

    - Allocate bootconfig xbc_nodes dynamically. To ease complaints about
    taking up static memory at boot up

    - Use of parse_args() to parse bootconfig instead of strstr() usage
    Prevents issues of double quotes containing the interested string

    - Fix missing ring_buffer_nest_end() on synthetic event error path

    - Return zero not -EINVAL on soft disabled synthetic event (soft
    disabling must be the same as hard disabling, which returns zero)

    - Consolidate synthetic event code (remove duplicate code)"

    * tag 'trace-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Consolidate trace() functions
    tracing: Don't return -EINVAL when tracing soft disabled synth events
    tracing: Add missing nest end to synth_event_trace_start() error case
    tools/bootconfig: Suppress non-error messages
    bootconfig: Allocate xbc_nodes array dynamically
    bootconfig: Use parse_args() to find bootconfig and '--'
    tracing/kprobe: Fix uninitialized variable bug
    bootconfig: Remove unneeded CONFIG_LIBXBC
    tools/bootconfig: Fix wrong __VA_ARGS__ usage

    Linus Torvalds
     

11 Feb, 2020

1 commit

  • Since there is no user except CONFIG_BOOT_CONFIG and no plan
    to use it from other functions, CONFIG_LIBXBC can be removed
    and we can use CONFIG_BOOT_CONFIG directly.

    Link: http://lkml.kernel.org/r/158098769281.939.16293492056419481105.stgit@devnote2

    Suggested-by: Geert Uytterhoeven
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

06 Feb, 2020

1 commit

  • Pull tracing updates from Steven Rostedt:

    - Added new "bootconfig".

    This looks for a file appended to initrd to add boot config options,
    and has been discussed thoroughly at Linux Plumbers.

    Very useful for adding kprobes at bootup.

    Only enabled if "bootconfig" is on the real kernel command line.

    - Created dynamic event creation.

    Merges common code between creating synthetic events and kprobe
    events.

    - Rename perf "ring_buffer" structure to "perf_buffer"

    - Rename ftrace "ring_buffer" structure to "trace_buffer"

    Had to rename existing "trace_buffer" to "array_buffer"

    - Allow trace_printk() to work withing (some) tracing code.

    - Sort of tracing configs to be a little better organized

    - Fixed bug where ftrace_graph hash was not being protected properly

    - Various other small fixes and clean ups

    * tag 'trace-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (88 commits)
    bootconfig: Show the number of nodes on boot message
    tools/bootconfig: Show the number of bootconfig nodes
    bootconfig: Add more parse error messages
    bootconfig: Use bootconfig instead of boot config
    ftrace: Protect ftrace_graph_hash with ftrace_sync
    ftrace: Add comment to why rcu_dereference_sched() is open coded
    tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu
    tracing: Annotate ftrace_graph_hash pointer with __rcu
    bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline
    tracing: Use seq_buf for building dynevent_cmd string
    tracing: Remove useless code in dynevent_arg_pair_add()
    tracing: Remove check_arg() callbacks from dynevent args
    tracing: Consolidate some synth_event_trace code
    tracing: Fix now invalid var_ref_vals assumption in trace action
    tracing: Change trace_boot to use synth_event interface
    tracing: Move tracing selftests to bottom of menu
    tracing: Move mmio tracer config up with the other tracers
    tracing: Move tracing test module configs together
    tracing: Move all function tracing configs together
    tracing: Documentation for in-kernel synthetic event API
    ...

    Linus Torvalds
     

29 Jan, 2020

3 commits

  • Pull UML updates from Anton Ivanov:
    "I am sending this on behalf of Richard who is traveling.

    This contains the following changes for UML:

    - Fix for time travel mode

    - Disable CONFIG_CONSTRUCTORS again

    - A new command line option to have an non-raw serial line

    - Preparations to remove obsolete UML network drivers"

    * tag 'for-linus-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    um: Fix time-travel=inf-cpu with xor/raid6
    Revert "um: Enable CONFIG_CONSTRUCTORS"
    um: Mark non-vector net transports as obsolete
    um: Add an option to make serial driver non-raw

    Linus Torvalds
     
  • 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
     

22 Jan, 2020

1 commit

  • Fix Kconfig help message since the bootconfig file is
    only available to be appended to initramfs. And also
    add a reference to the documentation.

    Link: http://lkml.kernel.org/r/157949058031.25888.18399447161895787505.stgit@devnote2

    Reported-by: Randy Dunlap
    Acked-by: Randy Dunlap
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

20 Jan, 2020

1 commit

  • This reverts commit 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS").

    There are two issues with this commit, uncovered by Anton in tests
    on some (Debian) systems:

    1) I completely forgot to call any constructors if CONFIG_CONSTRUCTORS
    isn't set. Don't recall now if it just wasn't needed on my system, or
    if I never tested this case.

    2) With that fixed, it works - with CONFIG_CONSTRUCTORS *unset*. If I
    set CONFIG_CONSTRUCTORS, it fails again, which isn't totally
    unexpected since whatever wanted to run is likely to have to run
    before the kernel init etc. that calls the constructors in this case.

    Basically, some constructors that gcc emits (libc has?) need to run
    very early during init; the failure mode otherwise was that the ptrace
    fork test already failed:

    ----------------------
    $ ./linux mem=512M
    Core dump limits :
    soft - 0
    hard - NONE
    Checking that ptrace can change system call numbers...check_ptrace : child exited with exitcode 6, while expecting 0; status 0x67f
    Aborted
    ----------------------

    Thinking more about this, it's clear that we simply cannot support
    CONFIG_CONSTRUCTORS in UML. All the cases we need now (gcov, kasan)
    involve not use of the __attribute__((constructor)), but instead
    some constructor code/entry generated by gcc. Therefore, we cannot
    distinguish between kernel constructors and system constructors.

    Thus, revert this commit.

    Cc: stable@vger.kernel.org [5.4+]
    Fixes: 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS")
    Reported-by: Anton Ivanov
    Signed-off-by: Johannes Berg
    Acked-by: Anton Ivanov

    Signed-off-by: Richard Weinberger

    Johannes Berg
     

14 Jan, 2020

4 commits

  • To support time namespaces in the vdso with a minimal impact on regular non
    time namespace affected tasks, the namespace handling needs to be hidden in
    a slow path.

    The most obvious place is vdso_seq_begin(). If a task belongs to a time
    namespace then the VVAR page which contains the system wide vdso data is
    replaced with a namespace specific page which has the same layout as the
    VVAR page. That page has vdso_data->seq set to 1 to enforce the slow path
    and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time
    namespace handling path.

    The extra check in the case that vdso_data->seq is odd, e.g. a concurrent
    update of the vdso data is in progress, is not really affecting regular
    tasks which are not part of a time namespace as the task is spin waiting
    for the update to finish and vdso_data->seq to become even again.

    If a time namespace task hits that code path, it invokes the corresponding
    time getter function which retrieves the real VVAR page, reads host time
    and then adds the offset for the requested clock which is stored in the
    special VVAR page.

    If VDSO time namespace support is disabled the whole magic is compiled out.

    Initial testing shows that the disabled case is almost identical to the
    host case which does not take the slow timens path. With the special timens
    page installed the performance hit is constant time and in the range of
    5-7%.

    For the vdso functions which are not using the sequence count an
    unconditional check for vdso_data->clock_mode is added which switches to
    the real vdso when the clock_mode is VCLOCK_TIMENS.

    [avagin: Make do_hres_timens() work with raw clocks too: choose vdso_data
    pointer by CS_RAW offset.]

    Suggested-by: Andy Lutomirski
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrei Vagin
    Signed-off-by: Dmitry Safonov
    Signed-off-by: Thomas Gleixner
    Link: https://lore.kernel.org/r/20191112012724.250792-21-dima@arista.com

    Thomas Gleixner
     
  • Time Namespace isolates clock values.

    The kernel provides access to several clocks CLOCK_REALTIME,
    CLOCK_MONOTONIC, CLOCK_BOOTTIME, etc.

    CLOCK_REALTIME
    System-wide clock that measures real (i.e., wall-clock) time.

    CLOCK_MONOTONIC
    Clock that cannot be set and represents monotonic time since
    some unspecified starting point.

    CLOCK_BOOTTIME
    Identical to CLOCK_MONOTONIC, except it also includes any time
    that the system is suspended.

    For many users, the time namespace means the ability to changes date and
    time in a container (CLOCK_REALTIME). Providing per namespace notions of
    CLOCK_REALTIME would be complex with a massive overhead, but has a dubious
    value.

    But in the context of checkpoint/restore functionality, monotonic and
    boottime clocks become interesting. Both clocks are monotonic with
    unspecified starting points. These clocks are widely used to measure time
    slices and set timers. After restoring or migrating processes, it has to be
    guaranteed that they never go backward. In an ideal case, the behavior of
    these clocks should be the same as for a case when a whole system is
    suspended. All this means that it is required to set CLOCK_MONOTONIC and
    CLOCK_BOOTTIME clocks, which can be achieved by adding per-namespace
    offsets for clocks.

    A time namespace is similar to a pid namespace in the way how it is
    created: unshare(CLONE_NEWTIME) system call creates a new time namespace,
    but doesn't set it to the current process. Then all children of the process
    will be born in the new time namespace, or a process can use the setns()
    system call to join a namespace.

    This scheme allows setting clock offsets for a namespace, before any
    processes appear in it.

    All available clone flags have been used, so CLONE_NEWTIME uses the highest
    bit of CSIGNAL. It means that it can be used only with the unshare() and
    the clone3() system calls.

    [ tglx: Adjusted paragraph about clone3() to reality and massaged the
    changelog a bit. ]

    Co-developed-by: Dmitry Safonov
    Signed-off-by: Andrei Vagin
    Signed-off-by: Dmitry Safonov
    Signed-off-by: Thomas Gleixner
    Link: https://criu.org/Time_namespace
    Link: https://lists.openvz.org/pipermail/criu/2018-June/041504.html
    Link: https://lore.kernel.org/r/20191112012724.250792-4-dima@arista.com

    Andrei Vagin
     
  • Load the extended boot config data from the tail of initrd
    image. If there is an SKC data there, it has
    [(u32)size][(u32)checksum] header (in really, this is a
    footer) at the end of initrd. If the checksum (simple sum
    of bytes) is match, this starts parsing it from there.

    Link: http://lkml.kernel.org/r/157867222435.17873.9936667353335606867.stgit@devnote2

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     
  • Extra Boot Config (XBC) allows admin to pass a tree-structured
    boot configuration file when boot up the kernel. This extends
    the kernel command line in an efficient way.

    Boot config will contain some key-value commands, e.g.

    key.word = value1
    another.key.word = value2

    It can fold same keys with braces, also you can write array
    data. For example,

    key {
    word1 {
    setting1 = data
    setting2
    }
    word2.array = "val1", "val2"
    }

    User can access these key-value pair and tree structure via
    SKC APIs.

    Link: http://lkml.kernel.org/r/157867221257.17873.1775090991929862549.stgit@devnote2

    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)

    Masami Hiramatsu
     

13 Dec, 2019

1 commit

  • 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
     

12 Dec, 2019

1 commit

  • After Spectre 2 fix via 290af86629b2 ("bpf: introduce BPF_JIT_ALWAYS_ON
    config") most major distros use BPF_JIT_ALWAYS_ON configuration these days
    which compiles out the BPF interpreter entirely and always enables the
    JIT. Also given recent fix in e1608f3fa857 ("bpf: Avoid setting bpf insns
    pages read-only when prog is jited"), we additionally avoid fragmenting
    the direct map for the BPF insns pages sitting in the general data heap
    since they are not used during execution. Latter is only needed when run
    through the interpreter.

    Since both x86 and arm64 JITs have seen a lot of exposure over the years,
    are generally most up to date and maintained, there is more downside in
    !BPF_JIT_ALWAYS_ON configurations to have the interpreter enabled by default
    rather than the JIT. Add a ARCH_WANT_DEFAULT_BPF_JIT config which archs can
    use to set the bpf_jit_{enable,kallsyms} to 1. Back in the days the
    bpf_jit_kallsyms knob was set to 0 by default since major distros still
    had /proc/kallsyms addresses exposed to unprivileged user space which is
    not the case anymore. Hence both knobs are set via BPF_JIT_DEFAULT_ON which
    is set to 'y' in case of BPF_JIT_ALWAYS_ON or ARCH_WANT_DEFAULT_BPF_JIT.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: Alexei Starovoitov
    Acked-by: Will Deacon
    Acked-by: Martin KaFai Lau
    Link: https://lore.kernel.org/bpf/f78ad24795c2966efcc2ee19025fa3459f622185.1575903816.git.daniel@iogearbox.net

    Daniel Borkmann
     

05 Dec, 2019

1 commit

  • Adjust indentation from spaces to tab (+optional two spaces) as in
    coding style with command like:
    $ sed -e 's/^ / /' -i */Kconfig

    Link: http://lkml.kernel.org/r/1574306670-30234-1-git-send-email-krzk@kernel.org
    Signed-off-by: Krzysztof Kozlowski
    Cc: Jiri Kosina
    Cc: Masahiro Yamada
    Cc: Greg Kroah-Hartman
    Cc: David Hildenbrand
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     

03 Dec, 2019

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - remove unneeded asm headers from hexagon, ia64

    - add 'dir-pkg' target, which works like 'tar-pkg' but skips archiving

    - add 'helpnewconfig' target, which shows help for new CONFIG options

    - support 'make nsdeps' for external modules

    - make rebuilds faster by deleting $(wildcard $^) checks

    - remove compile tests for kernel-space headers

    - refactor modpost to simplify modversion handling

    - make single target builds faster

    - optimize and clean up scripts/kallsyms.c

    - refactor various Makefiles and scripts

    * tag 'kbuild-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (59 commits)
    MAINTAINERS: update Kbuild/Kconfig maintainer's email address
    scripts/kallsyms: remove redundant initializers
    scripts/kallsyms: put check_symbol_range() calls close together
    scripts/kallsyms: make check_symbol_range() void function
    scripts/kallsyms: move ignored symbol types to is_ignored_symbol()
    scripts/kallsyms: move more patterns to the ignored_prefixes array
    scripts/kallsyms: skip ignored symbols very early
    scripts/kallsyms: add const qualifiers where possible
    scripts/kallsyms: make find_token() return (unsigned char *)
    scripts/kallsyms: replace prefix_underscores_count() with strspn()
    scripts/kallsyms: add sym_name() to mitigate cast ugliness
    scripts/kallsyms: remove unneeded length check for prefix matching
    scripts/kallsyms: remove redundant is_arm_mapping_symbol()
    scripts/kallsyms: set relative_base more effectively
    scripts/kallsyms: shrink table before sorting it
    scripts/kallsyms: fix definitely-lost memory leak
    scripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE
    kbuild: make single target builds even faster
    modpost: respect the previous export when 'exported twice' is warned
    modpost: do not set ->preloaded for symbols from Module.symvers
    ...

    Linus Torvalds
     

02 Dec, 2019

1 commit

  • Pull sysctl system call removal from Eric Biederman:
    "As far as I can tell we have reached the point where no one enables
    the sysctl system call anymore. It still is enabled in a few
    defconfigs but they are mostly the rarely used one and in asking
    people about that it was more cut & paste enabled than anything else.

    This is single commit that just deletes code. Leaving just enough code
    so that the deprecated sysctl warning continues to be printed. If my
    analysis turns out to be wrong and someone actually cares it will be
    easy to revert this commit and have the system call again.

    There was one new xtensa defconfig in linux-next that enabled the
    system call this cycle and when asked about it the maintainer of the
    code replied that it was not enabled on purpose. As of today's
    linux-next tree that defconfig no longer enables the system call.

    What we saw in the review discussion was that if we go a step farther
    than my patch and mess with uapi headers there are pieces of code that
    won't compile, but nothing minds the system call actually disappearing
    from the kernel"

    Link: https://lore.kernel.org/lkml/201910011140.EA0181F13@keescook/

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    sysctl: Remove the sysctl system call

    Linus Torvalds
     

27 Nov, 2019

1 commit

  • This system call has been deprecated almost since it was introduced, and
    in a survey of the linux distributions I can no longer find any of them
    that enable CONFIG_SYSCTL_SYSCALL. The only indication that I can find
    that anyone might care is that a few of the defconfigs in the kernel
    enable CONFIG_SYSCTL_SYSCALL. However this appears in only 31 of 414
    defconfigs in the kernel, so I suspect this symbols presence is simply
    because it is harmless to include rather than because it is necessary.

    As there appear to be no users of the sysctl system call, remove the
    code. As this removes one of the few uses of the internal kernel mount
    of proc I hope this allows for even more simplifications of the proc
    filesystem.

    Cc: Alex Smith
    Cc: Anders Berg
    Cc: Apelete Seketeli
    Cc: Arnd Bergmann
    Cc: Chee Nouk Phoon
    Cc: Chris Zankel
    Cc: Christian Ruppert
    Cc: Greg Ungerer
    Cc: Harvey Hunt
    Cc: Helge Deller
    Cc: Hongliang Tao
    Cc: Hua Yan
    Cc: Huacai Chen
    Cc: John Crispin
    Cc: Jonas Jensen
    Cc: Josh Boyer
    Cc: Jun Nie
    Cc: Kevin Hilman
    Cc: Kevin Wells
    Cc: Kumar Gala
    Cc: Lars-Peter Clausen
    Cc: Ley Foon Tan
    Cc: Linus Walleij
    Cc: Markos Chandras
    Cc: Max Filippov
    Cc: Noam Camus
    Cc: Olof Johansson
    Cc: Paul Burton
    Cc: Paul Mundt
    Cc: Phil Edworthy
    Cc: Pierrick Hascoet
    Cc: Ralf Baechle
    Cc: Roland Stigge
    Cc: Santosh Shilimkar
    Cc: Scott Telford
    Cc: Stephen Boyd
    Cc: Steven J. Hill
    Cc: Tanmay Inamdar
    Cc: Vineet Gupta
    Cc: Wolfram Sang
    Acked-by: Andi Kleen
    Reviewed-by: Kees Cook
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

26 Nov, 2019

1 commit

  • Pull crypto updates from Herbert Xu:
    "API:
    - Add library interfaces of certain crypto algorithms for WireGuard
    - Remove the obsolete ablkcipher and blkcipher interfaces
    - Move add_early_randomness() out of rng_mutex

    Algorithms:
    - Add blake2b shash algorithm
    - Add blake2s shash algorithm
    - Add curve25519 kpp algorithm
    - Implement 4 way interleave in arm64/gcm-ce
    - Implement ciphertext stealing in powerpc/spe-xts
    - Add Eric Biggers's scalar accelerated ChaCha code for ARM
    - Add accelerated 32r2 code from Zinc for MIPS
    - Add OpenSSL/CRYPTOGRAMS poly1305 implementation for ARM and MIPS

    Drivers:
    - Fix entropy reading failures in ks-sa
    - Add support for sam9x60 in atmel
    - Add crypto accelerator for amlogic GXL
    - Add sun8i-ce Crypto Engine
    - Add sun8i-ss cryptographic offloader
    - Add a host of algorithms to inside-secure
    - Add NPCM RNG driver
    - add HiSilicon HPRE accelerator
    - Add HiSilicon TRNG driver"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (285 commits)
    crypto: vmx - Avoid weird build failures
    crypto: lib/chacha20poly1305 - use chacha20_crypt()
    crypto: x86/chacha - only unregister algorithms if registered
    crypto: chacha_generic - remove unnecessary setkey() functions
    crypto: amlogic - enable working on big endian kernel
    crypto: sun8i-ce - enable working on big endian
    crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER
    hwrng: ks-sa - Enable COMPILE_TEST
    crypto: essiv - remove redundant null pointer check before kfree
    crypto: atmel-aes - Change data type for "lastc" buffer
    crypto: atmel-tdes - Set the IV after {en,de}crypt
    crypto: sun4i-ss - fix big endian issues
    crypto: sun4i-ss - hide the Invalid keylen message
    crypto: sun4i-ss - use crypto_ahash_digestsize
    crypto: sun4i-ss - remove dependency on not 64BIT
    crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
    MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver
    crypto: hisilicon - add DebugFS for HiSilicon SEC
    Documentation: add DebugFS doc for HiSilicon SEC
    crypto: hisilicon - add SRIOV for HiSilicon SEC
    ...

    Linus Torvalds
     

17 Nov, 2019

1 commit

  • In order to use 128-bit integer arithmetic in C code, the architecture
    needs to have declared support for it by setting ARCH_SUPPORTS_INT128,
    and it requires a version of the toolchain that supports this at build
    time. This is why all existing tests for ARCH_SUPPORTS_INT128 also test
    whether __SIZEOF_INT128__ is defined, since this is only the case for
    compilers that can support 128-bit integers.

    Let's fold this additional test into the Kconfig declaration of
    ARCH_SUPPORTS_INT128 so that we can also use the symbol in Makefiles,
    e.g., to decide whether a certain object needs to be included in the
    first place.

    Cc: Masahiro Yamada
    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     

14 Nov, 2019

1 commit

  • There are both positive and negative options about this feature.
    At first, I thought it was a good idea, but actually Linus stated a
    negative opinion (https://lkml.org/lkml/2019/9/29/227). I admit it
    is ugly and annoying.

    The baseline I'd like to keep is the compile-test of uapi headers.
    (Otherwise, kernel developers have no way to ensure the correctness
    of the exported headers.)

    I will maintain a small build rule in usr/include/Makefile.
    Remove the other header test functionality.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

30 Oct, 2019

1 commit

  • Drop various work-arounds we have for workqueues:

    - We no longer need the async_list for tracking sequential IO.

    - We don't have to maintain our own mm tracking/setting.

    - We don't need a separate workqueue for buffered writes. This didn't
    even work that well to begin with, as it was suboptimal for multiple
    buffered writers on multiple files.

    - We can properly cancel pending interruptible work. This fixes
    deadlocks with particularly socket IO, where we cannot cancel them
    when the io_uring is closed. Hence the ring will wait forever for
    these requests to complete, which may never happen. This is different
    from disk IO where we know requests will complete in a finite amount
    of time.

    - Due to being able to cancel work interruptible work that is already
    running, we can implement file table support for work. We need that
    for supporting system calls that add to a process file table.

    - It gets us one step closer to adding async support for any system
    call.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

28 Sep, 2019

2 commits

  • Pull kernel lockdown mode from James Morris:
    "This is the latest iteration of the kernel lockdown patchset, from
    Matthew Garrett, David Howells and others.

    From the original description:

    This patchset introduces an optional kernel lockdown feature,
    intended to strengthen the boundary between UID 0 and the kernel.
    When enabled, various pieces of kernel functionality are restricted.
    Applications that rely on low-level access to either hardware or the
    kernel may cease working as a result - therefore this should not be
    enabled without appropriate evaluation beforehand.

    The majority of mainstream distributions have been carrying variants
    of this patchset for many years now, so there's value in providing a
    doesn't meet every distribution requirement, but gets us much closer
    to not requiring external patches.

    There are two major changes since this was last proposed for mainline:

    - Separating lockdown from EFI secure boot. Background discussion is
    covered here: https://lwn.net/Articles/751061/

    - Implementation as an LSM, with a default stackable lockdown LSM
    module. This allows the lockdown feature to be policy-driven,
    rather than encoding an implicit policy within the mechanism.

    The new locked_down LSM hook is provided to allow LSMs to make a
    policy decision around whether kernel functionality that would allow
    tampering with or examining the runtime state of the kernel should be
    permitted.

    The included lockdown LSM provides an implementation with a simple
    policy intended for general purpose use. This policy provides a coarse
    level of granularity, controllable via the kernel command line:

    lockdown={integrity|confidentiality}

    Enable the kernel lockdown feature. If set to integrity, kernel features
    that allow userland to modify the running kernel are disabled. If set to
    confidentiality, kernel features that allow userland to extract
    confidential information from the kernel are also disabled.

    This may also be controlled via /sys/kernel/security/lockdown and
    overriden by kernel configuration.

    New or existing LSMs may implement finer-grained controls of the
    lockdown features. Refer to the lockdown_reason documentation in
    include/linux/security.h for details.

    The lockdown feature has had signficant design feedback and review
    across many subsystems. This code has been in linux-next for some
    weeks, with a few fixes applied along the way.

    Stephen Rothwell noted that commit 9d1f8be5cf42 ("bpf: Restrict bpf
    when kernel lockdown is in confidentiality mode") is missing a
    Signed-off-by from its author. Matthew responded that he is providing
    this under category (c) of the DCO"

    * 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (31 commits)
    kexec: Fix file verification on S390
    security: constify some arrays in lockdown LSM
    lockdown: Print current->comm in restriction messages
    efi: Restrict efivar_ssdt_load when the kernel is locked down
    tracefs: Restrict tracefs when the kernel is locked down
    debugfs: Restrict debugfs when the kernel is locked down
    kexec: Allow kexec_file() with appropriate IMA policy when locked down
    lockdown: Lock down perf when in confidentiality mode
    bpf: Restrict bpf when kernel lockdown is in confidentiality mode
    lockdown: Lock down tracing and perf kprobes when in confidentiality mode
    lockdown: Lock down /proc/kcore
    x86/mmiotrace: Lock down the testmmiotrace module
    lockdown: Lock down module params that specify hardware parameters (eg. ioport)
    lockdown: Lock down TIOCSSERIAL
    lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
    acpi: Disable ACPI table override if the kernel is locked down
    acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
    ACPI: Limit access to custom_method when the kernel is locked down
    x86/msr: Restrict MSR access when the kernel is locked down
    x86: Lock down IO port access when the kernel is locked down
    ...

    Linus Torvalds
     
  • Pull integrity updates from Mimi Zohar:
    "The major feature in this time is IMA support for measuring and
    appraising appended file signatures. In addition are a couple of bug
    fixes and code cleanup to use struct_size().

    In addition to the PE/COFF and IMA xattr signatures, the kexec kernel
    image may be signed with an appended signature, using the same
    scripts/sign-file tool that is used to sign kernel modules.

    Similarly, the initramfs may contain an appended signature.

    This contained a lot of refactoring of the existing appended signature
    verification code, so that IMA could retain the existing framework of
    calculating the file hash once, storing it in the IMA measurement list
    and extending the TPM, verifying the file's integrity based on a file
    hash or signature (eg. xattrs), and adding an audit record containing
    the file hash, all based on policy. (The IMA support for appended
    signatures patch set was posted and reviewed 11 times.)

    The support for appended signature paves the way for adding other
    signature verification methods, such as fs-verity, based on a single
    system-wide policy. The file hash used for verifying the signature and
    the signature, itself, can be included in the IMA measurement list"

    * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
    ima: ima_api: Use struct_size() in kzalloc()
    ima: use struct_size() in kzalloc()
    sefltest/ima: support appended signatures (modsig)
    ima: Fix use after free in ima_read_modsig()
    MODSIGN: make new include file self contained
    ima: fix freeing ongoing ahash_request
    ima: always return negative code for error
    ima: Store the measurement again when appraising a modsig
    ima: Define ima-modsig template
    ima: Collect modsig
    ima: Implement support for module-style appended signatures
    ima: Factor xattr_verify() out of ima_appraise_measurement()
    ima: Add modsig appraise_type option for module-style appended signatures
    integrity: Select CONFIG_KEYS instead of depending on it
    PKCS#7: Introduce pkcs7_get_digest()
    PKCS#7: Refactor verify_pkcs7_signature()
    MODSIGN: Export module signature definitions
    ima: initialize the "template" field with the default template

    Linus Torvalds
     

23 Sep, 2019

1 commit

  • Pull modules updates from Jessica Yu:
    "The main bulk of this pull request introduces a new exported symbol
    namespaces feature. The number of exported symbols is increasingly
    growing with each release (we're at about 31k exports as of 5.3-rc7)
    and we currently have no way of visualizing how these symbols are
    "clustered" or making sense of this huge export surface.

    Namespacing exported symbols allows kernel developers to more
    explicitly partition and categorize exported symbols, as well as more
    easily limiting the availability of namespaced symbols to other parts
    of the kernel. For starters, we have introduced the USB_STORAGE
    namespace to demonstrate the API's usage. I have briefly summarized
    the feature and its main motivations in the tag below.

    Summary:

    - Introduce exported symbol namespaces.

    This new feature allows subsystem maintainers to partition and
    categorize their exported symbols into explicit namespaces. Module
    authors are now required to import the namespaces they need.

    Some of the main motivations of this feature include: allowing
    kernel developers to better manage the export surface, allow
    subsystem maintainers to explicitly state that usage of some
    exported symbols should only be limited to certain users (think:
    inter-module or inter-driver symbols, debugging symbols, etc), as
    well as more easily limiting the availability of namespaced symbols
    to other parts of the kernel.

    With the module import requirement, it is also easier to spot the
    misuse of exported symbols during patch review.

    Two new macros are introduced: EXPORT_SYMBOL_NS() and
    EXPORT_SYMBOL_NS_GPL(). The API is thoroughly documented in
    Documentation/kbuild/namespaces.rst.

    - Some small code and kbuild cleanups here and there"

    * tag 'modules-for-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
    module: Remove leftover '#undef' from export header
    module: remove unneeded casts in cmp_name()
    module: move CONFIG_UNUSED_SYMBOLS to the sub-menu of MODULES
    module: remove redundant 'depends on MODULES'
    module: Fix link failure due to invalid relocation on namespace offset
    usb-storage: export symbols in USB_STORAGE namespace
    usb-storage: remove single-use define for debugging
    docs: Add documentation for Symbol Namespaces
    scripts: Coccinelle script for namespace dependencies.
    modpost: add support for generating namespace dependencies
    export: allow definition default namespaces in Makefiles or sources
    module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
    modpost: add support for symbol namespaces
    module: add support for symbol namespaces.
    export: explicitly align struct kernel_symbol
    module: support reading multiple values per modinfo tag

    Linus Torvalds
     

22 Sep, 2019

1 commit

  • Pull UML updates from Richard Weinberger:

    - virtio support

    - fixes for our new time travel mode

    - various improvements to make lockdep and kasan work better

    - SPDX header updates

    * tag 'for-linus-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (25 commits)
    um: irq: Fix LAST_IRQ usage in init_IRQ()
    um: Add SPDX headers for files in arch/um/include
    um: Add SPDX headers for files in arch/um/os-Linux
    um: Add SPDX headers to files in arch/um/kernel/
    um: Add SPDX headers for files in arch/um/drivers
    um: virtio: Implement VHOST_USER_PROTOCOL_F_REPLY_ACK
    um: virtio: Implement VHOST_USER_PROTOCOL_F_SLAVE_REQ
    um: drivers: Add virtio vhost-user driver
    um: Use real DMA barriers
    um: Don't use generic barrier.h
    um: time-travel: Restrict time update in IRQ handler
    um: time-travel: Fix periodic timers
    um: Enable CONFIG_CONSTRUCTORS
    um: Place (soft)irq text with macros
    um: Fix VDSO compiler warning
    um: Implement TRACE_IRQFLAGS_SUPPORT
    um: Remove misleading #define ARCh_IRQ_ENABLED
    um: Avoid using uninitialized regs
    um: Remove sig_info[SIGALRM]
    um: Error handling fixes in vector drivers
    ...

    Linus Torvalds