1. 28 Apr, 2021 25 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.13-1' of git://github.com/cminyard/linux-ipmi · 6fa09d31
      Linus Torvalds authored
      Pull IPMI updates from Corey Minyard:
       "A bunch of little cleanups
      
        Nothing major, no functional changes"
      
      * tag 'for-linus-5.13-1' of git://github.com/cminyard/linux-ipmi:
        ipmi_si: Join string literals back
        ipmi_si: Drop redundant check before calling put_device()
        ipmi_si: Use strstrip() to remove surrounding spaces
        ipmi_si: Get rid of ->addr_source_cleanup()
        ipmi_si: Reuse si_to_str[] array in ipmi_hardcode_init_one()
        ipmi_si: Introduce ipmi_panic_event_str[] array
        ipmi_si: Use proper ACPI macros to check error code for failures
        ipmi_si: Utilize temporary variable to hold device pointer
        ipmi_si: Remove bogus err_free label
        ipmi_si: Switch to use platform_get_mem_or_io()
        ipmi: Handle device properties with software node API
        ipmi:ssif: make ssif_i2c_send() void
        ipmi: Refine retry conditions for getting device id
      6fa09d31
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 0080665f
      Linus Torvalds authored
      Pull devicetree updates from Rob Herring:
      
       - Refactor powerpc and arm64 kexec DT handling to common code. This
         enables IMA on arm64.
      
       - Add kbuild support for applying DT overlays at build time. The first
         user are the DT unittests.
      
       - Fix kerneldoc formatting and W=1 warnings in drivers/of/
      
       - Fix handling 64-bit flag on PCI resources
      
       - Bump dtschema version required to v2021.2.1
      
       - Enable undocumented compatible checks for dtbs_check. This allows
         tracking of missing binding schemas.
      
       - DT docs improvements. Regroup the DT docs and add the example schema
         and DT kernel ABI docs to the doc build.
      
       - Convert Broadcom Bluetooth and video-mux bindings to schema
      
       - Add QCom sm8250 Venus video codec binding schema
      
       - Add vendor prefixes for AESOP, YIC System Co., Ltd, and Siliconfile
         Technologies Inc.
      
       - Cleanup of DT schema type references on common properties and
         standard unit properties
      
      * tag 'devicetree-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (64 commits)
        powerpc: If kexec_build_elf_info() fails return immediately from elf64_load()
        powerpc: Free fdt on error in elf64_load()
        of: overlay: Fix kerneldoc warning in of_overlay_remove()
        of: linux/of.h: fix kernel-doc warnings
        of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses
        dt-bindings: bcm4329-fmac: add optional brcm,ccode-map
        docs: dt: update writing-schema.rst references
        dt-bindings: media: venus: Add sm8250 dt schema
        of: base: Fix spelling issue with function param 'prop'
        docs: dt: Add DT API documentation
        of: Add missing 'Return' section in kerneldoc comments
        of: Fix kerneldoc output formatting
        docs: dt: Group DT docs into relevant sub-sections
        docs: dt: Make 'Devicetree' wording more consistent
        docs: dt: writing-schema: Include the example schema in the doc build
        docs: dt: writing-schema: Remove spurious indentation
        dt-bindings: Fix reference in submitting-patches.rst to the DT ABI doc
        dt-bindings: ddr: Add optional manufacturer and revision ID to LPDDR3
        dt-bindings: media: video-interfaces: Drop the example
        devicetree: bindings: clock: Minor typo fix in the file armada3700-tbg-clock.txt
        ...
      0080665f
    • Linus Torvalds's avatar
      Merge tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 5a69e9bc
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
       "battery/charger driver changes:
         - core:
            - provide function stubs if CONFIG_POWER_SUPPLY=n
            - reduce loglevel for probe defer info
         - surface:
            - new battery and charger drivers for Surface
         - bq27xxx:
            - add bq78z100 support
            - fix current_now/power_avg for newer chips
         - cw2015:
            - add CHARGE_NOW support
         - ab8500:
            - drop pdata support
         - convert most DT bindings to YAML
         - lots of minor fixes and cleanups
      
        reset drivers:
         - ltc2952-poweroff:
            - make trigger delay configurable from DT
         - minor fixes and cleanups"
      
      * tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (97 commits)
        power: supply: cpcap-battery: fix invalid usage of list cursor
        power: supply: bq256xx: add kerneldoc for structure members
        power: supply: act8945a: correct kerneldoc
        power: supply: max17040: remove unneeded double cast
        power: supply: max17040: handle device_property_read_u8_array() failure
        power: supply: max14577: remove unneeded variable initialization
        power: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static
        power: supply: surface-battery: Make some symbols static
        power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLE
        power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE
        power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()
        power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()
        power: supply: Add AC driver for Surface Aggregator Module
        power: supply: Add battery driver for Surface Aggregator Module
        power: supply: bq25980: Move props from battery node
        power: supply: core: Use true and false for bool variable
        power: supply: goldfish: Remove the GOLDFISH dependency
        power: reset: ltc2952: make trigger delay configurable
        power: supply: cpcap-charger: Simplify bool conversion
        power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce
        ...
      5a69e9bc
    • Linus Torvalds's avatar
      Merge tag 'hsi-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi · a8b5e037
      Linus Torvalds authored
      Pull HSI update from Sebastian Reichel:
      
       - memory leak fix in hsi_add_client_from_dt() error path
      
      * tag 'hsi-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
        HSI: core: fix resource leaks in hsi_add_client_from_dt()
      a8b5e037
    • Linus Torvalds's avatar
      Merge tag 'for-5.13/io_uring-2021-04-27' of git://git.kernel.dk/linux-block · 625434da
      Linus Torvalds authored
      Pull io_uring updates from Jens Axboe:
      
       - Support for multi-shot mode for POLL requests
      
       - More efficient reference counting. This is shamelessly stolen from
         the mm side. Even though referencing is mostly single/dual user, the
         128 count was retained to keep the code the same. Maybe this
         should/could be made generic at some point.
      
       - Removal of the need to have a manager thread for each ring. The
         manager threads only job was checking and creating new io-threads as
         needed, instead we handle this from the queue path.
      
       - Allow SQPOLL without CAP_SYS_ADMIN or CAP_SYS_NICE. Since 5.12, this
         thread is "just" a regular application thread, so no need to restrict
         use of it anymore.
      
       - Cleanup of how internal async poll data lifetime is managed.
      
       - Fix for syzbot reported crash on SQPOLL cancelation.
      
       - Make buffer registration more like file registrations, which includes
         flexibility in avoiding full set unregistration and re-registration.
      
       - Fix for io-wq affinity setting.
      
       - Be a bit more defensive in task->pf_io_worker setup.
      
       - Various SQPOLL fixes.
      
       - Cleanup of SQPOLL creds handling.
      
       - Improvements to in-flight request tracking.
      
       - File registration cleanups.
      
       - Tons of cleanups and little fixes
      
      * tag 'for-5.13/io_uring-2021-04-27' of git://git.kernel.dk/linux-block: (156 commits)
        io_uring: maintain drain logic for multishot poll requests
        io_uring: Check current->io_uring in io_uring_cancel_sqpoll
        io_uring: fix NULL reg-buffer
        io_uring: simplify SQPOLL cancellations
        io_uring: fix work_exit sqpoll cancellations
        io_uring: Fix uninitialized variable up.resv
        io_uring: fix invalid error check after malloc
        io_uring: io_sq_thread() no longer needs to reset current->pf_io_worker
        kernel: always initialize task->pf_io_worker to NULL
        io_uring: update sq_thread_idle after ctx deleted
        io_uring: add full-fledged dynamic buffers support
        io_uring: implement fixed buffers registration similar to fixed files
        io_uring: prepare fixed rw for dynanic buffers
        io_uring: keep table of pointers to ubufs
        io_uring: add generic rsrc update with tags
        io_uring: add IORING_REGISTER_RSRC
        io_uring: enumerate dynamic resources
        io_uring: add generic path for rsrc update
        io_uring: preparation for rsrc tagging
        io_uring: decouple CQE filling from requests
        ...
      625434da
    • Linus Torvalds's avatar
      Merge tag 'for-5.13/libata-2021-04-27' of git://git.kernel.dk/linux-block · c05a182b
      Linus Torvalds authored
      Pull libata updates from Jens Axboe:
       "Mostly cleanups this time, but also a few additions:
      
         - kernel-doc cleanups and sanitization (Lee)
      
         - Spelling fix (Bhaskar)
      
         - Fix ata_qc_from_tag() return value check in dwc_460ex (Dinghao)
      
         - Fall-through warning fix (Gustavo)
      
         - IRQ registration fixes (Sergey)
      
         - Add AHCI support for Tegra186 (Sowjanya)
      
         - Add xiling phy support for AHCI (Piyush)
      
         - SXS disable fix for AHCI for Hisilicon Kunpeng920 (Xingui)
      
         - pata legacy probe mask support (Maciej)"
      
      * tag 'for-5.13/libata-2021-04-27' of git://git.kernel.dk/linux-block: (54 commits)
        libata: Fix fall-through warnings for Clang
        pata_ipx4xx_cf: Fix unsigned comparison with less than zero
        ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present
        ata: ahci_tegra: Add AHCI support for Tegra186
        dt-binding: ata: tegra: Add dt-binding documentation for Tegra186
        dt-bindings: ata: tegra: Convert binding documentation to YAML
        pata_legacy: Add `probe_mask' parameter like with ide-generic
        pata_platform: Document `pio_mask' module parameter
        pata_legacy: Properly document module parameters
        ata: ahci: ceva: Updated code by using dev_err_probe()
        ata: ahci: Disable SXS for Hisilicon Kunpeng920
        ata: libahci_platform: fix IRQ check
        sata_mv: add IRQ checks
        ata: pata_acpi: Fix some incorrect function param descriptions
        ata: libata-acpi: Fix function name and provide description for 'prev_gtf'
        ata: sata_mv: Fix misnaming of 'mv_bmdma_stop()'
        ata: pata_cs5530: Fix misspelling of 'cs5530_init_one()'s 'pdev' param
        ata: pata_legacy: Repair a couple kernel-doc problems
        ata: ata_generic: Fix misspelling of 'ata_generic_init_one()'
        ata: pata_opti: Fix spelling issue of 'val' in 'opti_write_reg()'
        ...
      c05a182b
    • Linus Torvalds's avatar
      Merge tag 'for-5.13/drivers-2021-04-27' of git://git.kernel.dk/linux-block · fc058606
      Linus Torvalds authored
      Pull block driver updates from Jens Axboe:
      
       - MD changes via Song:
              - raid5 POWER fix
              - raid1 failure fix
              - UAF fix for md cluster
              - mddev_find_or_alloc() clean up
              - Fix NULL pointer deref with external bitmap
              - Performance improvement for raid10 discard requests
              - Fix missing information of /proc/mdstat
      
       - rsxx const qualifier removal (Arnd)
      
       - Expose allocated brd pages (Calvin)
      
       - rnbd via Gioh Kim:
              - Change maintainer
              - Change domain address of maintainers' email
              - Add polling IO mode and document update
              - Fix memory leak and some bug detected by static code analysis
                tools
              - Code refactoring
      
       - Series of floppy cleanups/fixes (Denis)
      
       - s390 dasd fixes (Julian)
      
       - kerneldoc fixes (Lee)
      
       - null_blk double free (Lv)
      
       - null_blk virtual boundary addition (Max)
      
       - Remove xsysace driver (Michal)
      
       - umem driver removal (Davidlohr)
      
       - ataflop fixes (Dan)
      
       - Revalidate disk removal (Christoph)
      
       - Bounce buffer cleanups (Christoph)
      
       - Mark lightnvm as deprecated (Christoph)
      
       - mtip32xx init cleanups (Shixin)
      
       - Various fixes (Tian, Gustavo, Coly, Yang, Zhang, Zhiqiang)
      
      * tag 'for-5.13/drivers-2021-04-27' of git://git.kernel.dk/linux-block: (143 commits)
        async_xor: increase src_offs when dropping destination page
        drivers/block/null_blk/main: Fix a double free in null_init.
        md/raid1: properly indicate failure when ending a failed write request
        md-cluster: fix use-after-free issue when removing rdev
        nvme: introduce generic per-namespace chardev
        nvme: cleanup nvme_configure_apst
        nvme: do not try to reconfigure APST when the controller is not live
        nvme: add 'kato' sysfs attribute
        nvme: sanitize KATO setting
        nvmet: avoid queuing keep-alive timer if it is disabled
        brd: expose number of allocated pages in debugfs
        ataflop: fix off by one in ataflop_probe()
        ataflop: potential out of bounds in do_format()
        drbd: Fix fall-through warnings for Clang
        block/rnbd: Use strscpy instead of strlcpy
        block/rnbd-clt-sysfs: Remove copy buffer overlap in rnbd_clt_get_path_name
        block/rnbd-clt: Remove max_segment_size
        block/rnbd-clt: Generate kobject_uevent when the rnbd device state changes
        block/rnbd-srv: Remove unused arguments of rnbd_srv_rdma_ev
        Documentation/ABI/rnbd-clt: Add description for nr_poll_queues
        ...
      fc058606
    • Linus Torvalds's avatar
      Merge tag 'for-5.13/block-2021-04-27' of git://git.kernel.dk/linux-block · 6c002921
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
       "Pretty quiet round this time, which is nice. In detail:
      
         - Series revamping bounce buffer support (Christoph)
      
         - Dead code removal (Christoph, Bart)
      
         - Partition iteration revamp, now using xarray (Christoph)
      
         - Passthrough request scheduler improvements (Lin)
      
         - Series of BFQ improvements (Paolo)
      
         - Fix ioprio task iteration (Peter)
      
         - Various little tweaks and fixes (Tejun, Saravanan, Bhaskar, Max,
           Nikolay)"
      
      * tag 'for-5.13/block-2021-04-27' of git://git.kernel.dk/linux-block: (41 commits)
        blk-iocost: don't ignore vrate_min on QD contention
        blk-mq: Fix spurious debugfs directory creation during initialization
        bfq/mq-deadline: remove redundant check for passthrough request
        blk-mq: bypass IO scheduler's limit_depth for passthrough request
        block: Remove an obsolete comment from sg_io()
        block: move bio_list_copy_data to pktcdvd
        block: remove zero_fill_bio_iter
        block: add queue_to_disk() to get gendisk from request_queue
        block: remove an incorrect check from blk_rq_append_bio
        block: initialize ret in bdev_disk_changed
        block: Fix sys_ioprio_set(.which=IOPRIO_WHO_PGRP) task iteration
        block: remove disk_part_iter
        block: simplify diskstats_show
        block: simplify show_partition
        block: simplify printk_all_partitions
        block: simplify partition_overlaps
        block: simplify partition removal
        block: take bd_mutex around delete_partitions in del_gendisk
        block: refactor blk_drop_partitions
        block: move more syncing and invalidation to delete_partition
        ...
      6c002921
    • Linus Torvalds's avatar
      Merge tag 'sched-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 16b3d0cf
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
      
       - Clean up SCHED_DEBUG: move the decades old mess of sysctl, procfs and
         debugfs interfaces to a unified debugfs interface.
      
       - Signals: Allow caching one sigqueue object per task, to improve
         performance & latencies.
      
       - Improve newidle_balance() irq-off latencies on systems with a large
         number of CPU cgroups.
      
       - Improve energy-aware scheduling
      
       - Improve the PELT metrics for certain workloads
      
       - Reintroduce select_idle_smt() to improve load-balancing locality -
         but without the previous regressions
      
       - Add 'scheduler latency debugging': warn after long periods of pending
         need_resched. This is an opt-in feature that requires the enabling of
         the LATENCY_WARN scheduler feature, or the use of the
         resched_latency_warn_ms=xx boot parameter.
      
       - CPU hotplug fixes for HP-rollback, and for the 'fail' interface. Fix
         remaining balance_push() vs. hotplug holes/races
      
       - PSI fixes, plus allow /proc/pressure/ files to be written by
         CAP_SYS_RESOURCE tasks as well
      
       - Fix/improve various load-balancing corner cases vs. capacity margins
      
       - Fix sched topology on systems with NUMA diameter of 3 or above
      
       - Fix PF_KTHREAD vs to_kthread() race
      
       - Minor rseq optimizations
      
       - Misc cleanups, optimizations, fixes and smaller updates
      
      * tag 'sched-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (61 commits)
        cpumask/hotplug: Fix cpu_dying() state tracking
        kthread: Fix PF_KTHREAD vs to_kthread() race
        sched/debug: Fix cgroup_path[] serialization
        sched,psi: Handle potential task count underflow bugs more gracefully
        sched: Warn on long periods of pending need_resched
        sched/fair: Move update_nohz_stats() to the CONFIG_NO_HZ_COMMON block to simplify the code & fix an unused function warning
        sched/debug: Rename the sched_debug parameter to sched_verbose
        sched,fair: Alternative sched_slice()
        sched: Move /proc/sched_debug to debugfs
        sched,debug: Convert sysctl sched_domains to debugfs
        debugfs: Implement debugfs_create_str()
        sched,preempt: Move preempt_dynamic to debug.c
        sched: Move SCHED_DEBUG sysctl to debugfs
        sched: Don't make LATENCYTOP select SCHED_DEBUG
        sched: Remove sched_schedstats sysctl out from under SCHED_DEBUG
        sched/numa: Allow runtime enabling/disabling of NUMA balance without SCHED_DEBUG
        sched: Use cpu_dying() to fix balance_push vs hotplug-rollback
        cpumask: Introduce DYING mask
        cpumask: Make cpu_{online,possible,present,active}() inline
        rseq: Optimise rseq_get_rseq_cs() and clear_rseq_cs()
        ...
      16b3d0cf
    • Linus Torvalds's avatar
      Merge tag 'perf-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 42dec9a9
      Linus Torvalds authored
      Pull perf event updates from Ingo Molnar:
      
       - Improve Intel uncore PMU support:
      
           - Parse uncore 'discovery tables' - a new hardware capability
             enumeration method introduced on the latest Intel platforms. This
             table is in a well-defined PCI namespace location and is read via
             MMIO. It is organized in an rbtree.
      
             These uncore tables will allow the discovery of standard counter
             blocks, but fancier counters still need to be enumerated
             explicitly.
      
           - Add Alder Lake support
      
           - Improve IIO stacks to PMON mapping support on Skylake servers
      
       - Add Intel Alder Lake PMU support - which requires the introduction of
         'hybrid' CPUs and PMUs. Alder Lake is a mix of Golden Cove ('big')
         and Gracemont ('small' - Atom derived) cores.
      
         The CPU-side feature set is entirely symmetrical - but on the PMU
         side there's core type dependent PMU functionality.
      
       - Reduce data loss with CPU level hardware tracing on Intel PT / AUX
         profiling, by fixing the AUX allocation watermark logic.
      
       - Improve ring buffer allocation on NUMA systems
      
       - Put 'struct perf_event' into their separate kmem_cache pool
      
       - Add support for synchronous signals for select perf events. The
         immediate motivation is to support low-overhead sampling-based race
         detection for user-space code. The feature consists of the following
         main changes:
      
           - Add thread-only event inheritance via
             perf_event_attr::inherit_thread, which limits inheritance of
             events to CLONE_THREAD.
      
           - Add the ability for events to not leak through exec(), via
             perf_event_attr::remove_on_exec.
      
           - Allow the generation of SIGTRAP via perf_event_attr::sigtrap,
             extend siginfo with an u64 ::si_perf, and add the breakpoint
             information to ::si_addr and ::si_perf if the event is
             PERF_TYPE_BREAKPOINT.
      
         The siginfo support is adequate for breakpoints right now - but the
         new field can be used to introduce support for other types of
         metadata passed over siginfo as well.
      
       - Misc fixes, cleanups and smaller updates.
      
      * tag 'perf-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
        signal, perf: Add missing TRAP_PERF case in siginfo_layout()
        signal, perf: Fix siginfo_t by avoiding u64 on 32-bit architectures
        perf/x86: Allow for 8<num_fixed_counters<16
        perf/x86/rapl: Add support for Intel Alder Lake
        perf/x86/cstate: Add Alder Lake CPU support
        perf/x86/msr: Add Alder Lake CPU support
        perf/x86/intel/uncore: Add Alder Lake support
        perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE
        perf/x86/intel: Add Alder Lake Hybrid support
        perf/x86: Support filter_match callback
        perf/x86/intel: Add attr_update for Hybrid PMUs
        perf/x86: Add structures for the attributes of Hybrid PMUs
        perf/x86: Register hybrid PMUs
        perf/x86: Factor out x86_pmu_show_pmu_cap
        perf/x86: Remove temporary pmu assignment in event_init
        perf/x86/intel: Factor out intel_pmu_check_extra_regs
        perf/x86/intel: Factor out intel_pmu_check_event_constraints
        perf/x86/intel: Factor out intel_pmu_check_num_counters
        perf/x86: Hybrid PMU support for extra_regs
        perf/x86: Hybrid PMU support for event constraints
        ...
      42dec9a9
    • Linus Torvalds's avatar
      Merge tag 'objtool-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 03b2cd72
      Linus Torvalds authored
      Pull objtool updates from Ingo Molnar:
      
       - Standardize the crypto asm code so that it looks like compiler-
         generated code to objtool - so that it can understand it. This
         enables unwinding from crypto asm code - and also fixes the last
         known remaining objtool warnings for LTO and more.
      
       - x86 decoder fixes: clean up and fix the decoder, and also extend it a
         bit
      
       - Misc fixes and cleanups
      
      * tag 'objtool-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
        x86/crypto: Enable objtool in crypto code
        x86/crypto/sha512-ssse3: Standardize stack alignment prologue
        x86/crypto/sha512-avx2: Standardize stack alignment prologue
        x86/crypto/sha512-avx: Standardize stack alignment prologue
        x86/crypto/sha256-avx2: Standardize stack alignment prologue
        x86/crypto/sha1_avx2: Standardize stack alignment prologue
        x86/crypto/sha_ni: Standardize stack alignment prologue
        x86/crypto/crc32c-pcl-intel: Standardize jump table
        x86/crypto/camellia-aesni-avx2: Unconditionally allocate stack buffer
        x86/crypto/aesni-intel_avx: Standardize stack alignment prologue
        x86/crypto/aesni-intel_avx: Fix register usage comments
        x86/crypto/aesni-intel_avx: Remove unused macros
        objtool: Support asm jump tables
        objtool: Parse options from OBJTOOL_ARGS
        objtool: Collate parse_options() users
        objtool: Add --backup
        objtool,x86: More ModRM sugar
        objtool,x86: Rewrite ADD/SUB/AND
        objtool,x86: Support %riz encodings
        objtool,x86: Simplify register decode
        ...
      03b2cd72
    • Linus Torvalds's avatar
      Merge tag 'locking-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0ff0edb5
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
      
       - rtmutex cleanup & spring cleaning pass that removes ~400 lines of
         code
      
       - Futex simplifications & cleanups
      
       - Add debugging to the CSD code, to help track down a tenacious race
         (or hw problem)
      
       - Add lockdep_assert_not_held(), to allow code to require a lock to not
         be held, and propagate this into the ath10k driver
      
       - Misc LKMM documentation updates
      
       - Misc KCSAN updates: cleanups & documentation updates
      
       - Misc fixes and cleanups
      
       - Fix locktorture bugs with ww_mutexes
      
      * tag 'locking-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits)
        kcsan: Fix printk format string
        static_call: Relax static_call_update() function argument type
        static_call: Fix unused variable warn w/o MODULE
        locking/rtmutex: Clean up signal handling in __rt_mutex_slowlock()
        locking/rtmutex: Restrict the trylock WARN_ON() to debug
        locking/rtmutex: Fix misleading comment in rt_mutex_postunlock()
        locking/rtmutex: Consolidate the fast/slowpath invocation
        locking/rtmutex: Make text section and inlining consistent
        locking/rtmutex: Move debug functions as inlines into common header
        locking/rtmutex: Decrapify __rt_mutex_init()
        locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs
        locking/rtmutex: Inline chainwalk depth check
        locking/rtmutex: Move rt_mutex_debug_task_free() to rtmutex.c
        locking/rtmutex: Remove empty and unused debug stubs
        locking/rtmutex: Consolidate rt_mutex_init()
        locking/rtmutex: Remove output from deadlock detector
        locking/rtmutex: Remove rtmutex deadlock tester leftovers
        locking/rtmutex: Remove rt_mutex_timed_lock()
        MAINTAINERS: Add myself as futex reviewer
        locking/mutex: Remove repeated declaration
        ...
      0ff0edb5
    • Linus Torvalds's avatar
      Merge tag 'core-rcu-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9a45da92
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
      
       - Support for "N" as alias for last bit in bitmap parsing library (eg
         using syntax like "nohz_full=2-N")
      
       - kvfree_rcu updates
      
       - mm_dump_obj() updates. (One of these is to mm, but was suggested by
         Andrew Morton.)
      
       - RCU callback offloading update
      
       - Polling RCU grace-period interfaces
      
       - Realtime-related RCU updates
      
       - Tasks-RCU updates
      
       - Torture-test updates
      
       - Torture-test scripting updates
      
       - Miscellaneous fixes
      
      * tag 'core-rcu-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits)
        rcutorture: Test start_poll_synchronize_rcu() and poll_state_synchronize_rcu()
        rcu: Provide polling interfaces for Tiny RCU grace periods
        torture: Fix kvm.sh --datestamp regex check
        torture: Consolidate qemu-cmd duration editing into kvm-transform.sh
        torture: Print proper vmlinux path for kvm-again.sh runs
        torture: Make TORTURE_TRUST_MAKE available in kvm-again.sh environment
        torture: Make kvm-transform.sh update jitter commands
        torture: Add --duration argument to kvm-again.sh
        torture: Add kvm-again.sh to rerun a previous torture-test
        torture: Create a "batches" file for build reuse
        torture: De-capitalize TORTURE_SUITE
        torture: Make upper-case-only no-dot no-slash scenario names official
        torture: Rename SRCU-t and SRCU-u to avoid lowercase characters
        torture: Remove no-mpstat error message
        torture: Record kvm-test-1-run.sh and kvm-test-1-run-qemu.sh PIDs
        torture: Record jitter start/stop commands
        torture: Extract kvm-test-1-run-qemu.sh from kvm-test-1-run.sh
        torture: Record TORTURE_KCONFIG_GDB_ARG in qemu-cmd
        torture: Abstract jitter.sh start/stop into scripts
        rcu: Provide polling interfaces for Tree RCU grace periods
        ...
      9a45da92
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm · 68a32ba1
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "The usual lots of work all over the place.
      
        i915 has gotten some Alderlake work and prelim DG1 code, along with a
        major locking rework over the GEM code, and brings back the property
        of timing out long running jobs using a watchdog. amdgpu has some
        Alderbran support (new GPU), freesync HDMI support along with a lot
        other fixes.
      
        Outside of the drm, there is a new printf specifier added which should
        have all the correct acks/sobs:
      
         - printk fourcc modifier support added %p4cc
      
        Summary:
      
        core:
         - drm_crtc_commit_wait
         - atomic plane state helpers reworked for full state
         - dma-buf heaps API rework
         - edid: rework and improvements for displayid
      
        dp-mst:
         - better topology logging
      
        bridge:
         - Chipone ICN6211
         - Lontium LT8912B
         - anx7625 regulator support
      
        panel:
         - fix lt9611 4k panels handling
      
        simple-kms:
         - add plane state helpers
      
        ttm:
         - debugfs support
         - removal of unused sysfs
         - ignore signaled moved fences
         - ioremap buffer according to mem caching
      
        i915:
         - Alderlake S enablement
         - Conversion to dma_resv_locking
         - Bring back watchdog timeout support
         - legacy ioctl cleanups
         - add GEM TDDO and RFC process
         - DG1 LMEM preparation work
         - intel_display.c refactoring
         - Gen9/TGL PCH combination support
         - eDP MSO Support
         - multiple PSR instance support
         - Link training debug updates
         - Disable PSR2 support on JSL/EHL
         - DDR5/LPDDR5 support for bw calcs
         - LSPCON limited to gen9/10 platforms
         - HSW/BDW async flip/VTd corruption workaround
         - SAGV watermark fixes
         - SNB hard hang on ring resume fix
         - Limit imported dma-buf size
         - move to use new tasklet API
         - refactor KBL/TGL/ADL-S display/gt steppings
         - refactoring legacy DP/HDMI, FB plane code out
      
        amdgpu:
         - uapi: add ioctl to query video capabilities
         - Iniital AMD Freesync HDMI support
         - Initial Adebaran support
         - 10bpc dithering improvements
         - DCN secure display support
         - Drop legacy IO BAR requirements
         - PCIE/S0ix/RAS/Prime/Reset fixes
         - Display ASSR support
         - SMU gfx busy queues for RV/PCO
         - Initial LTTPR display work
      
        amdkfd:
         - MMU notifier fixes
         - APU fixes
      
        radeon:
         - debugfs cleanps
         - fw error handling ifix
         - Flexible array cleanups
      
        msm:
         - big DSI phy/pll cleanup
         - sc7280 initial support
         - commong bandwidth scaling path
         - shrinker locking contention fixes
         - unpin/swap support for GEM objcets
      
        ast:
         - cursor plane handling reworked
      
        tegra:
         - don't register DP AUX channels before connectors
      
        zynqmp:
         - fix OOB struct padding memset
      
        gma500:
         - drop ttm and medfield support
      
        exynos:
         - request_irq cleanup function
      
        mediatek:
         - fine tune line time for EOTp
         - MT8192 dpi support
         - atomic crtc config updates
         - don't support HDMI connector creation
      
        mxsdb:
         - imx8mm support
      
        panfrost:
         - MMU IRQ handling rework
      
        qxl:
         - locking fixes
         - resource deallocation changes
      
        sun4i:
         - add alpha properties to UI/VI layers
      
        vc4:
         - RPi4 CEC support
      
        vmwgfx:
         - doc cleanups
      
        arc:
         - moved to drm/tiny"
      
      * tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm: (1390 commits)
        drm/ttm: Don't count pages in SG BOs against pages_limit
        drm/ttm: fix return value check
        drm/bridge: lt8912b: fix incorrect handling of of_* return values
        drm: bridge: fix LONTIUM use of mipi_dsi_() functions
        drm: bridge: fix ANX7625 use of mipi_dsi_() functions
        drm/amdgpu: page retire over debugfs mechanism
        drm/radeon: Fix a missing check bug in radeon_dp_mst_detect()
        drm/amd/display: Fix the Wunused-function warning
        drm/radeon/r600: Fix variables that are not used after assignment
        drm/amdgpu/smu7: fix CAC setting on TOPAZ
        drm/amd/display: Update DCN302 SR Exit Latency
        drm/amdgpu: enable ras eeprom on aldebaran
        drm/amdgpu: RAS harvest on driver load
        drm/amdgpu: add ras aldebaran ras eeprom driver
        drm/amd/pm: increase time out value when sending msg to SMU
        drm/amdgpu: add DMUB outbox event IRQ source define/complete/debug flag
        drm/amd/pm: add the callback to get vbios bootup values for vangogh
        drm/radeon: Fix size overflow
        drm/amdgpu: Fix size overflow
        drm/amdgpu: move mmhub ras_func init to ip specific file
        ...
      68a32ba1
    • Linus Torvalds's avatar
      Merge tag 'media/v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 3aa139aa
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - addition of a maintainer's profile for the media subsystem
      
       - addition of i.MX8 IP support
      
       - qcom/camss gained support for hardware version Titan 170
      
       - new RC keymaps
      
       - Lots of other improvements, cleanups and bug fixes
      
      * tag 'media/v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (488 commits)
        media: coda: fix macroblocks count control usage
        media: rkisp1: params: fix wrong bits settings
        media: cedrus: Fix H265 status definitions
        media: meson-ge2d: fix rotation parameters
        media: v4l2-ctrls: fix reference to freed memory
        media: venus : hfi: add venus image info into smem
        media: venus: Fix internal buffer size calculations for v6.
        media: venus: helpers: keep max bandwidth when mbps exceeds the supported range
        media: venus: fix hw overload error log condition
        media: venus: core: correct firmware name for sm8250
        media: venus: core,pm: fix potential infinite loop
        media: venus: core: Fix kerneldoc warnings
        media: gscpa/stv06xx: fix memory leak
        media: cx25821: remove unused including <linux/version.h>
        media: staging: media/meson: remove redundant dev_err call
        media: adv7842: support 1 block EDIDs, fix clearing EDID
        media: adv7842: configure all pads
        media: allegro: change kernel-doc comment blocks to normal comments
        media: camss: ispif: Remove redundant dev_err call in msm_ispif_subdev_init()
        media: i2c: rdamc21: Fix warning on u8 cast
        ...
      3aa139aa
    • Linus Torvalds's avatar
      Merge tag 'fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · acd3d285
      Linus Torvalds authored
      Pull security layer fixes from James Morris:
       "Miscellaneous minor fixes"
      
      * tag 'fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        security: commoncap: clean up kernel-doc comments
        security: commoncap: fix -Wstringop-overread warning
      acd3d285
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-kunit-5.13-rc1' of... · 1e9599df
      Linus Torvalds authored
      Merge tag 'linux-kselftest-kunit-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull KUnit updates from Shuah Khan:
       "Several fixes and a new feature to support failure from dynamic
        analysis tools such as UBSAN and fake ops for testing.
      
         - a fake ops struct for testing a "free" function to complain if it
           was called with an invalid argument, or caught a double-free. Most
           return void and have no normal means of signalling failure (e.g.
           super_operations, iommu_ops, etc.)"
      
      * tag 'linux-kselftest-kunit-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        Documentation: kunit: add tips for using current->kunit_test
        kunit: fix -Wunused-function warning for __kunit_fail_current_test
        kunit: support failure from dynamic analysis tools
        kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment
        kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals
        kunit: Match parenthesis alignment to improve code readability
      1e9599df
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-next-5.13-rc1' of... · 2a68c268
      Linus Torvalds authored
      Merge tag 'linux-kselftest-next-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest updates from Shuah Khan:
      
       - fixes and updates to resctrl test from Fenghua Yu and Reinette Chatre
      
       - fixes to Kselftest documentation, framework
      
       - minor spelling correction in timers test
      
      * tag 'linux-kselftest-next-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (25 commits)
        selftests/resctrl: Change a few printed messages
        Documentation: kselftest: fix path to test module files
        selftests/resctrl: Create .gitignore to include resctrl_tests
        selftests/resctrl: Fix checking for < 0 for unsigned values
        selftests/resctrl: Fix incorrect parsing of iMC counters
        selftests/resctrl: Fix unmount resctrl FS
        selftests/resctrl: Skip the test if requested resctrl feature is not supported
        selftests/resctrl: Modularize resctrl test suite main() function
        selftests/resctrl: Don't hard code value of "no_of_bits" variable
        selftests/resctrl: Fix MBA/MBM results reporting format
        selftests/resctrl: Use resctrl/info for feature detection
        selftests/resctrl: Check for resctrl mount point only if resctrl FS is supported
        selftests/resctrl: Add config dependencies
        selftests/resctrl: Fix a printed message
        selftests/resctrl: Share show_cache_info() by CAT and CMT tests
        selftests/resctrl: Call kselftest APIs to log test results
        selftests/resctrl: Rename CQM test as CMT test
        selftests/resctrl: Fix missing options "-n" and "-p"
        selftests/resctrl: Ensure sibling CPU is not same as original CPU
        selftests/resctrl: Clean up resctrl features check
        ...
      2a68c268
    • Linus Torvalds's avatar
      Merge branch 'for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 55e6be65
      Linus Torvalds authored
      Pull cgroup changes from Tejun Heo:
       "The only notable change is Vipin's new misc cgroup controller.
      
        This implements generic support for resources which can be controlled
        by simply counting and limiting the number of resource instances - ie
        there's X number of these on the system and this cgroup subtree can
        have upto Y of those.
      
        The first user is the address space IDs used for virtual machine
        memory encryption and expected future usages are similar - niche
        hardware features with concrete resource limits and simple usage
        models"
      
      * 'for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: use tsk->in_iowait instead of delayacct_is_task_waiting_on_io()
        cgroup/cpuset: fix typos in comments
        cgroup: misc: mark dummy misc_cg_res_total_usage() static inline
        svm/sev: Register SEV and SEV-ES ASIDs to the misc controller
        cgroup: Miscellaneous cgroup documentation.
        cgroup: Add misc cgroup controller
      55e6be65
    • Linus Torvalds's avatar
      Merge tag 'livepatching-for-5.13' of... · eb6bbacc
      Linus Torvalds authored
      Merge tag 'livepatching-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
      
      Pull livepatching update from Petr Mladek:
      
       - Use TIF_NOTIFY_SIGNAL infrastructure instead of the fake signal
      
      * tag 'livepatching-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
        livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure
      eb6bbacc
    • Linus Torvalds's avatar
      Merge tag 'printk-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux · 7f3d08b2
      Linus Torvalds authored
      Pull printk updates from Petr Mladek:
      
       - Stop synchronizing kernel log buffer readers by logbuf_lock. As a
         result, the access to the buffer is fully lockless now.
      
         Note that printk() itself still uses locks because it tries to flush
         the messages to the console immediately. Also the per-CPU temporary
         buffers are still there because they prevent infinite recursion and
         serialize backtraces from NMI. All this is going to change in the
         future.
      
       - kmsg_dump API rework and cleanup as a side effect of the logbuf_lock
         removal.
      
       - Make bstr_printf() aware that %pf and %pF formats could deference the
         given pointer.
      
       - Show also page flags by %pGp format.
      
       - Clarify the documentation for plain pointer printing.
      
       - Do not show no_hash_pointers warning multiple times.
      
       - Update Senozhatsky email address.
      
       - Some clean up.
      
      * tag 'printk-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (24 commits)
        lib/vsprintf.c: remove leftover 'f' and 'F' cases from bstr_printf()
        printk: clarify the documentation for plain pointer printing
        kernel/printk.c: Fixed mundane typos
        printk: rename vprintk_func to vprintk
        vsprintf: dump full information of page flags in pGp
        mm, slub: don't combine pr_err with INFO
        mm, slub: use pGp to print page flags
        MAINTAINERS: update Senozhatsky email address
        lib/vsprintf: do not show no_hash_pointers message multiple times
        printk: console: remove unnecessary safe buffer usage
        printk: kmsg_dump: remove _nolock() variants
        printk: remove logbuf_lock
        printk: introduce a kmsg_dump iterator
        printk: kmsg_dumper: remove @active field
        printk: add syslog_lock
        printk: use atomic64_t for devkmsg_user.seq
        printk: use seqcount_latch for clear_seq
        printk: introduce CONSOLE_LOG_MAX
        printk: consolidate kmsg_dump_get_buffer/syslog_print_all code
        printk: refactor kmsg_dump_get_buffer()
        ...
      7f3d08b2
    • Linus Torvalds's avatar
      Merge tag 'kgdb-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux · 916a7596
      Linus Torvalds authored
      Pull kgdb updates from Daniel Thompson:
       "Exclusively tidy ups this cycle. Most of them are thanks to Sumit Garg
        and, as it happens, the clean ups do result in a slight increase in
        the line count. This is due to registering kdb commands using data
        structures rather than function calls which, in turn, simplifies the
        memory management during command registration.
      
        In addition to changes to command registration we also have some dead
        code removal, a clearer implementation of environment variable
        handling and a typo fix"
      
      * tag 'kgdb-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
        kdb: Refactor env variables get/set code
        kernel: debug: Ordinary typo fixes in the file gdbstub.c
        kdb: Simplify kdb commands registration
        kdb: Remove redundant function definitions/prototypes
      916a7596
    • Linus Torvalds's avatar
      Merge tag 's390-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 6daa755f
      Linus Torvalds authored
      Pull s390 updates from Heiko Carstens:
      
       - fix buffer size for in-kernel disassembler for ebpf programs.
      
       - fix two memory leaks in zcrypt driver.
      
       - expose PCI device UID as index, including an indicator if the uid is
         unique.
      
       - remove some oprofile leftovers.
      
       - improve stack unwinder tests.
      
       - don't use gcc atomic builtins anymore, just like all other
         architectures. Even though I'm sure the current code is ok, I totally
         dislike that s390 is the only architecture being special here;
         especially considering that there was a lengthly discussion about
         this topic and the outcome was not to use the builtins. Therefore
         open-code atomic ops again with inline assembly and switch to gcc
         builtins as soon as other architectures are doing.
      
       - couple of other changes to atomic and cmpxchg, and use
         atomic-instrumented.h for KASAN.
      
       - separate zbus creation, registration, and scanning in our PCI code
         which allows for cleaner and easier handling.
      
       - a rather large change to the vfio-ap code to fix circular locking
         dependencies when updating crypto masks.
      
       - move QAOB handling from qdio layer down to drivers.
      
       - add CRW inject facility to common I/O layer. This adds debugs files
         which allow to generate artificial events from user space for testing
         purposes.
      
       - increase SCLP console line length from 80 to 320 characters to avoid
         odd wrapped lines.
      
       - add protected virtualization guest and host indication files, which
         indicate either that a guest is running in pv mode or if the
         hypervisor is capable of starting pv guests.
      
       - various other small fixes and improvements all over the place.
      
      * tag 's390-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (53 commits)
        s390/disassembler: increase ebpf disasm buffer size
        s390/archrandom: add parameter check for s390_arch_random_generate
        s390/zcrypt: fix zcard and zqueue hot-unplug memleak
        s390/pci: expose a PCI device's UID as its index
        s390/atomic,cmpxchg: always inline __xchg/__cmpxchg
        s390/smp: fix do_restart() prototype
        s390: get rid of oprofile leftovers
        s390/atomic,cmpxchg: make constraints work with old compilers
        s390/test_unwind: print test suite start/end info
        s390/cmpxchg: use unsigned long values instead of void pointers
        s390/test_unwind: add WARN if tests failed
        s390/test_unwind: unify error handling paths
        s390: update defconfigs
        s390/spinlock: use R constraint in inline assembly
        s390/atomic,cmpxchg: switch to use atomic-instrumented.h
        s390/cmpxchg: get rid of gcc atomic builtins
        s390/atomic: get rid of gcc atomic builtins
        s390/atomic: use proper constraints
        s390/atomic: move remaining inline assemblies to atomic_ops.h
        s390/bitops: make bitops only work on longs
        ...
      6daa755f
    • Linus Torvalds's avatar
      Merge tag 'x86_core_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c6536676
      Linus Torvalds authored
      Pull x86 updates from Borislav Petkov:
      
       - Turn the stack canary into a normal __percpu variable on 32-bit which
         gets rid of the LAZY_GS stuff and a lot of code.
      
       - Add an insn_decode() API which all users of the instruction decoder
         should preferrably use. Its goal is to keep the details of the
         instruction decoder away from its users and simplify and streamline
         how one decodes insns in the kernel. Convert its users to it.
      
       - kprobes improvements and fixes
      
       - Set the maximum DIE per package variable on Hygon
      
       - Rip out the dynamic NOP selection and simplify all the machinery
         around selecting NOPs. Use the simplified NOPs in objtool now too.
      
       - Add Xeon Sapphire Rapids to list of CPUs that support PPIN
      
       - Simplify the retpolines by folding the entire thing into an
         alternative now that objtool can handle alternatives with stack ops.
         Then, have objtool rewrite the call to the retpoline with the
         alternative which then will get patched at boot time.
      
       - Document Intel uarch per models in intel-family.h
      
       - Make Sub-NUMA Clustering topology the default and Cluster-on-Die the
         exception on Intel.
      
      * tag 'x86_core_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
        x86, sched: Treat Intel SNC topology as default, COD as exception
        x86/cpu: Comment Skylake server stepping too
        x86/cpu: Resort and comment Intel models
        objtool/x86: Rewrite retpoline thunk calls
        objtool: Skip magical retpoline .altinstr_replacement
        objtool: Cache instruction relocs
        objtool: Keep track of retpoline call sites
        objtool: Add elf_create_undef_symbol()
        objtool: Extract elf_symbol_add()
        objtool: Extract elf_strtab_concat()
        objtool: Create reloc sections implicitly
        objtool: Add elf_create_reloc() helper
        objtool: Rework the elf_rebuild_reloc_section() logic
        objtool: Fix static_call list generation
        objtool: Handle per arch retpoline naming
        objtool: Correctly handle retpoline thunk calls
        x86/retpoline: Simplify retpolines
        x86/alternatives: Optimize optimize_nops()
        x86: Add insn_decode_kernel()
        x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration
        ...
      c6536676
    • Linus Torvalds's avatar
      Fix misc new gcc warnings · e7c6e405
      Linus Torvalds authored
      It seems like Fedora 34 ends up enabling a few new gcc warnings, notably
      "-Wstringop-overread" and "-Warray-parameter".
      
      Both of them cause what seem to be valid warnings in the kernel, where
      we have array size mismatches in function arguments (that are no longer
      just silently converted to a pointer to element, but actually checked).
      
      This fixes most of the trivial ones, by making the function declaration
      match the function definition, and in the case of intel_pm.c, removing
      the over-specified array size from the argument declaration.
      
      At least one 'stringop-overread' warning remains in the i915 driver, but
      that one doesn't have the same obvious trivial fix, and may or may not
      actually be indicative of a bug.
      
      [ It was a mistake to upgrade one of my machines to Fedora 34 while
        being busy with the merge window, but if this is the extent of the
        compiler upgrade problems, things are better than usual    - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e7c6e405
  2. 27 Apr, 2021 15 commits
    • Linus Torvalds's avatar
      Merge tag 'audit-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · e359bce3
      Linus Torvalds authored
      Pull audit updates from Paul Moore:
       "Another small pull request for audit, most of the patches are
        documentation updates with only two real code changes: one to fix a
        compiler warning for a dummy function/macro, and one to cleanup some
        code since we removed the AUDIT_FILTER_ENTRY ages ago (v4.17)"
      
      * tag 'audit-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
        audit: drop /proc/PID/loginuid documentation Format field
        audit: avoid -Wempty-body warning
        audit: document /proc/PID/sessionid
        audit: document /proc/PID/loginuid
        MAINTAINERS: update audit files
        audit: further cleanup of AUDIT_FILTER_ENTRY deprecation
      e359bce3
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · f1c921fb
      Linus Torvalds authored
      Pull selinux updates from Paul Moore:
      
       - Add support for measuring the SELinux state and policy capabilities
         using IMA.
      
       - A handful of SELinux/NFS patches to compare the SELinux state of one
         mount with a set of mount options. Olga goes into more detail in the
         patch descriptions, but this is important as it allows more
         flexibility when using NFS and SELinux context mounts.
      
       - Properly differentiate between the subjective and objective LSM
         credentials; including support for the SELinux and Smack. My clumsy
         attempt at a proper fix for AppArmor didn't quite pass muster so John
         is working on a proper AppArmor patch, in the meantime this set of
         patches shouldn't change the behavior of AppArmor in any way. This
         change explains the bulk of the diffstat beyond security/.
      
       - Fix a problem where we were not properly terminating the permission
         list for two SELinux object classes.
      
      * tag 'selinux-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: add proper NULL termination to the secclass_map permissions
        smack: differentiate between subjective and objective task credentials
        selinux: clarify task subjective and objective credentials
        lsm: separate security_task_getsecid() into subjective and objective variants
        nfs: account for selinux security context when deciding to share superblock
        nfs: remove unneeded null check in nfs_fill_super()
        lsm,selinux: add new hook to compare new mount to an existing mount
        selinux: fix misspellings using codespell tool
        selinux: fix misspellings using codespell tool
        selinux: measure state and policy capabilities
        selinux: Allow context mounts for unpriviliged overlayfs
      f1c921fb
    • Linus Torvalds's avatar
      Merge tag 'afs-netfs-lib-20210426' of... · fafe1e39
      Linus Torvalds authored
      Merge tag 'afs-netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      Pull AFS updates from David Howells:
       "Use the new netfs lib.
      
        Begin the process of overhauling the use of the fscache API by AFS and
        the introduction of support for features such as Transparent Huge
        Pages (THPs).
      
         - Add some support for THPs, including using core VM helper functions
           to find details of pages.
      
         - Use the ITER_XARRAY I/O iterator to mediate access to the pagecache
           as this handles THPs and doesn't require allocation of large bvec
           arrays.
      
         - Delegate address_space read/pre-write I/O methods for AFS to the
           netfs helper library. A method is provided to the library that
           allows it to issue a read against the server.
      
           This includes a change in use for PG_fscache (it now indicates a
           DIO write in progress from the marked page), so a number of waits
           need to be deployed for it.
      
         - Split the core AFS writeback function to make it easier to modify
           in future patches to handle writing to the cache. [This might
           feasibly make more sense moved out into my fscache-iter branch].
      
        I've tested these with "xfstests -g quick" against an AFS volume
        (xfstests needs patching to make it work). With this, AFS without a
        cache passes all expected xfstests; with a cache, there's an extra
        failure, but that's also there before these patches. Fixing that
        probably requires a greater overhaul (as can be found on my
        fscache-iter branch, but that's for a later time).
      
        Thanks should go to Marc Dionne and Jeff Altman of AuriStor for
        exercising the patches in their test farm also"
      
      Link: https://lore.kernel.org/lkml/3785063.1619482429@warthog.procyon.org.uk/
      
      * tag 'afs-netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Use the netfs_write_begin() helper
        afs: Use new netfs lib read helper API
        afs: Use the fs operation ops to handle FetchData completion
        afs: Prepare for use of THPs
        afs: Extract writeback extension into its own function
        afs: Wait on PG_fscache before modifying/releasing a page
        afs: Use ITER_XARRAY for writing
        afs: Set up the iov_iter before calling afs_extract_data()
        afs: Log remote unmarshalling errors
        afs: Don't truncate iter during data fetch
        afs: Move key to afs_read struct
        afs: Print the operation debug_id when logging an unexpected data version
        afs: Pass page into dirty region helpers to provide THP size
        afs: Disable use of the fscache I/O routines
      fafe1e39
    • Linus Torvalds's avatar
      Merge tag 'netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 820c4bae
      Linus Torvalds authored
      Pull network filesystem helper library updates from David Howells:
       "Here's a set of patches for 5.13 to begin the process of overhauling
        the local caching API for network filesystems. This set consists of
        two parts:
      
        (1) Add a helper library to handle the new VM readahead interface.
      
            This is intended to be used unconditionally by the filesystem
            (whether or not caching is enabled) and provides a common
            framework for doing caching, transparent huge pages and, in the
            future, possibly fscrypt and read bandwidth maximisation. It also
            allows the netfs and the cache to align, expand and slice up a
            read request from the VM in various ways; the netfs need only
            provide a function to read a stretch of data to the pagecache and
            the helper takes care of the rest.
      
        (2) Add an alternative fscache/cachfiles I/O API that uses the kiocb
            facility to do async DIO to transfer data to/from the netfs's
            pages, rather than using readpage with wait queue snooping on one
            side and vfs_write() on the other. It also uses less memory, since
            it doesn't do buffered I/O on the backing file.
      
            Note that this uses SEEK_HOLE/SEEK_DATA to locate the data
            available to be read from the cache. Whilst this is an improvement
            from the bmap interface, it still has a problem with regard to a
            modern extent-based filesystem inserting or removing bridging
            blocks of zeros. Fixing that requires a much greater overhaul.
      
        This is a step towards overhauling the fscache API. The change is
        opt-in on the part of the network filesystem. A netfs should not try
        to mix the old and the new API because of conflicting ways of handling
        pages and the PG_fscache page flag and because it would be mixing DIO
        with buffered I/O. Further, the helper library can't be used with the
        old API.
      
        This does not change any of the fscache cookie handling APIs or the
        way invalidation is done at this time.
      
        In the near term, I intend to deprecate and remove the old I/O API
        (fscache_allocate_page{,s}(), fscache_read_or_alloc_page{,s}(),
        fscache_write_page() and fscache_uncache_page()) and eventually
        replace most of fscache/cachefiles with something simpler and easier
        to follow.
      
        This patchset contains the following parts:
      
         - Some helper patches, including provision of an ITER_XARRAY iov
           iterator and a function to do readahead expansion.
      
         - Patches to add the netfs helper library.
      
         - A patch to add the fscache/cachefiles kiocb API.
      
         - A pair of patches to fix some review issues in the ITER_XARRAY and
           read helpers as spotted by Al and Willy.
      
        Jeff Layton has patches to add support in Ceph for this that he
        intends for this merge window. I have a set of patches to support AFS
        that I will post a separate pull request for.
      
        With this, AFS without a cache passes all expected xfstests; with a
        cache, there's an extra failure, but that's also there before these
        patches. Fixing that probably requires a greater overhaul. Ceph also
        passes the expected tests.
      
        I also have patches in a separate branch to tidy up the handling of
        PG_fscache/PG_private_2 and their contribution to page refcounting in
        the core kernel here, but I haven't included them in this set and will
        route them separately"
      
      Link: https://lore.kernel.org/lkml/3779937.1619478404@warthog.procyon.org.uk/
      
      * tag 'netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        netfs: Miscellaneous fixes
        iov_iter: Four fixes for ITER_XARRAY
        fscache, cachefiles: Add alternate API to use kiocb for read/write to cache
        netfs: Add a tracepoint to log failures that would be otherwise unseen
        netfs: Define an interface to talk to a cache
        netfs: Add write_begin helper
        netfs: Gather stats
        netfs: Add tracepoints
        netfs: Provide readahead and readpage netfs helpers
        netfs, mm: Add set/end/wait_on_page_fscache() aliases
        netfs, mm: Move PG_fscache helper funcs to linux/netfs.h
        netfs: Documentation for helper library
        netfs: Make a netfs helper module
        mm: Implement readahead_control pageset expansion
        mm/readahead: Handle ractl nr_pages being modified
        fs: Document file_ra_state
        mm/filemap: Pass the file_ra_state in the ractl
        mm: Add set/end/wait functions for PG_private_2
        iov_iter: Add ITER_XARRAY
      820c4bae
    • Linus Torvalds's avatar
      Merge tag 'fs.idmapped.helpers.v5.13' of... · 34a456eb
      Linus Torvalds authored
      Merge tag 'fs.idmapped.helpers.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux
      
      Pull fs mapping helper updates from Christian Brauner:
       "This adds kernel-doc to all new idmapping helpers and improves their
        naming which was triggered by a discussion with some fs developers.
        Some of the names are based on suggestions by Vivek and Al.
      
        Also remove the open-coded permission checking in a few places with
        simple helpers. Overall this should lead to more clarity and make it
        easier to maintain"
      
      * tag 'fs.idmapped.helpers.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        fs: introduce two inode i_{u,g}id initialization helpers
        fs: introduce fsuidgid_has_mapping() helper
        fs: document and rename fsid helpers
        fs: document mapping helpers
      34a456eb
    • Linus Torvalds's avatar
      Merge tag 'fs.idmapped.docs.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · cc15422c
      Linus Torvalds authored
      Pull fs helper kernel-doc updates from Christian Brauner:
       "In the last cycles we forgot to update the kernel-docs in some places
        that were changed during the idmapped mount work. Lukas and Randy took
        the chance to not just fixup those places but also fixup and expand
        kernel-docs for some additional helpers.
      
        No functional changes"
      
      * tag 'fs.idmapped.docs.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        fs: update kernel-doc for vfs_rename()
        fs: turn some comments into kernel-doc
        xattr: fix kernel-doc for mnt_userns and vfs xattr helpers
        namei: fix kernel-doc for struct renamedata and more
        libfs: fix kernel-doc for mnt_userns
      cc15422c
    • Linus Torvalds's avatar
      Merge tag 'iomap-5.13-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · b34b95eb
      Linus Torvalds authored
      Pull iomap update from Darrick Wong:
       "A single patch to the iomap code, which augments what gets logged when
        someone tries to swapon an unacceptable swap file. (Yes, this is a
        continuation of the swapfile drama from last season...)"
      
      * tag 'iomap-5.13-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        iomap: improve the warnings from iomap_swapfile_activate
      b34b95eb
    • Linus Torvalds's avatar
      Merge branch 'miklos.fileattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · a4f7fae1
      Linus Torvalds authored
      Pull fileattr conversion updates from Miklos Szeredi via Al Viro:
       "This splits the handling of FS_IOC_[GS]ETFLAGS from ->ioctl() into a
        separate method.
      
        The interface is reasonably uniform across the filesystems that
        support it and gives nice boilerplate removal"
      
      * 'miklos.fileattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (23 commits)
        ovl: remove unneeded ioctls
        fuse: convert to fileattr
        fuse: add internal open/release helpers
        fuse: unsigned open flags
        fuse: move ioctl to separate source file
        vfs: remove unused ioctl helpers
        ubifs: convert to fileattr
        reiserfs: convert to fileattr
        ocfs2: convert to fileattr
        nilfs2: convert to fileattr
        jfs: convert to fileattr
        hfsplus: convert to fileattr
        efivars: convert to fileattr
        xfs: convert to fileattr
        orangefs: convert to fileattr
        gfs2: convert to fileattr
        f2fs: convert to fileattr
        ext4: convert to fileattr
        ext2: convert to fileattr
        btrfs: convert to fileattr
        ...
      a4f7fae1
    • Linus Torvalds's avatar
      Merge branch 'work.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 5e672088
      Linus Torvalds authored
      Pull coredump updates from Al Viro:
       "Just a couple of patches this cycle: use of seek + write instead of
        expanding truncate and minor header cleanup"
      
      * 'work.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        coredump.h: move CONFIG_COREDUMP-only stuff inside the ifdef
        coredump: don't bother with do_truncate()
      5e672088
    • Linus Torvalds's avatar
      Merge branch 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d1466bc5
      Linus Torvalds authored
      Pull vfs inode type handling updates from Al Viro:
       "We should never change the type bits of ->i_mode or the method tables
        (->i_op and ->i_fop) of a live inode.
      
        Unfortunately, not all filesystems took care to prevent that"
      
      * 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        spufs: fix bogosity in S_ISGID handling
        9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"
        openpromfs: don't do unlock_new_inode() until the new inode is set up
        hostfs_mknod(): don't bother with init_special_inode()
        cifs: have cifs_fattr_to_inode() refuse to change type on live inode
        cifs: have ->mkdir() handle race with another client sanely
        do_cifs_create(): don't set ->i_mode of something we had not created
        gfs2: be careful with inode refresh
        ocfs2_inode_lock_update(): make sure we don't change the type bits of i_mode
        orangefs_inode_is_stale(): i_mode type bits do *not* form a bitmap...
        vboxsf: don't allow to change the inode type
        afs: Fix updating of i_mode due to 3rd party change
        ceph: don't allow type or device number to change on non-I_NEW inodes
        ceph: fix up error handling with snapdirs
        new helper: inode_wrong_type()
      d1466bc5
    • Linus Torvalds's avatar
      Merge tag 'cfi-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 57fa2369
      Linus Torvalds authored
      Pull CFI on arm64 support from Kees Cook:
       "This builds on last cycle's LTO work, and allows the arm64 kernels to
        be built with Clang's Control Flow Integrity feature. This feature has
        happily lived in Android kernels for almost 3 years[1], so I'm excited
        to have it ready for upstream.
      
        The wide diffstat is mainly due to the treewide fixing of mismatched
        list_sort prototypes. Other things in core kernel are to address
        various CFI corner cases. The largest code portion is the CFI runtime
        implementation itself (which will be shared by all architectures
        implementing support for CFI). The arm64 pieces are Acked by arm64
        maintainers rather than coming through the arm64 tree since carrying
        this tree over there was going to be awkward.
      
        CFI support for x86 is still under development, but is pretty close.
        There are a handful of corner cases on x86 that need some improvements
        to Clang and objtool, but otherwise works well.
      
        Summary:
      
         - Clean up list_sort prototypes (Sami Tolvanen)
      
         - Introduce CONFIG_CFI_CLANG for arm64 (Sami Tolvanen)"
      
      * tag 'cfi-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        arm64: allow CONFIG_CFI_CLANG to be selected
        KVM: arm64: Disable CFI for nVHE
        arm64: ftrace: use function_nocfi for ftrace_call
        arm64: add __nocfi to __apply_alternatives
        arm64: add __nocfi to functions that jump to a physical address
        arm64: use function_nocfi with __pa_symbol
        arm64: implement function_nocfi
        psci: use function_nocfi for cpu_resume
        lkdtm: use function_nocfi
        treewide: Change list_sort to use const pointers
        bpf: disable CFI in dispatcher functions
        kallsyms: strip ThinLTO hashes from static functions
        kthread: use WARN_ON_FUNCTION_MISMATCH
        workqueue: use WARN_ON_FUNCTION_MISMATCH
        module: ensure __cfi_check alignment
        mm: add generic function_nocfi macro
        cfi: add __cficanonical
        add support for Clang CFI
      57fa2369
    • Linus Torvalds's avatar
      Merge tag 'overflow-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 2fbc66c7
      Linus Torvalds authored
      Pull overflow update from Kees Cook:
       "I was expecting more in this tree for this cycle, but the other work
        has not yet landed for -next. As a result, only this single typo fix
        exists. Yay tiny pulls. :)
      
         - Fix typo in check_shl_overflow() kern-dec (Keith Busch)"
      
      * tag 'overflow-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        overflow: Correct check_shl_overflow() comment
      2fbc66c7
    • Linus Torvalds's avatar
      Merge tag 'pstore-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 288321a9
      Linus Torvalds authored
      Pull pstore update from Kees Cook:
      
       - Add mem_type property to expand support for >2 memory types (Mukesh Ojha)
      
      * tag 'pstore-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore: Add mem_type property DT parsing support
      288321a9
    • Linus Torvalds's avatar
      Merge tag 'seccomp-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 7e4910b9
      Linus Torvalds authored
      Pull seccomp updates from Kees Cook:
      
       - Fix "cacheable" typo in comments (Cui GaoSheng)
      
       - Fix CONFIG for /proc/$pid/status Seccomp_filters (Kenta.Tada@sony.com)
      
      * tag 'seccomp-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        seccomp: Fix "cacheable" typo in comments
        seccomp: Fix CONFIG tests for Seccomp_filters
      7e4910b9
    • Johannes Berg's avatar
      cfg80211: fix locking in netlink owner interface destruction · ea6b2098
      Johannes Berg authored
      Harald Arnesen reported [1] a deadlock at reboot time, and after
      he captured a stack trace a picture developed of what's going on:
      
      The distribution he's using is using iwd (not wpa_supplicant) to
      manage wireless. iwd will usually use the "socket owner" option
      when it creates new interfaces, so that they're automatically
      destroyed when it quits (unexpectedly or otherwise). This is also
      done by wpa_supplicant, but it doesn't do it for the normal one,
      only for additional ones, which is different with iwd.
      
      Anyway, during shutdown, iwd quits while the netdev is still UP,
      i.e. IFF_UP is set. This causes the stack trace that Linus so
      nicely transcribed from the pictures:
      
      cfg80211_destroy_iface_wk() takes wiphy_lock
       -> cfg80211_destroy_ifaces()
        ->ieee80211_del_iface
          ->ieeee80211_if_remove
            ->cfg80211_unregister_wdev
              ->unregister_netdevice_queue
                ->dev_close_many
                  ->__dev_close_many
                    ->raw_notifier_call_chain
                      ->cfg80211_netdev_notifier_call
      and that last call tries to take wiphy_lock again.
      
      In commit a05829a7 ("cfg80211: avoid holding the RTNL when
      calling the driver") I had taken into account the possibility of
      recursing from cfg80211 into cfg80211_netdev_notifier_call() via
      the network stack, but only for NETDEV_UNREGISTER, not for what
      happens here, NETDEV_GOING_DOWN and NETDEV_DOWN notifications.
      
      Additionally, while this worked still back in commit 78f22b6a
      ("cfg80211: allow userspace to take ownership of interfaces"), it
      missed another corner case: unregistering a netdev will cause
      dev_close() to be called, and thus stop wireless operations (e.g.
      disconnecting), but there are some types of virtual interfaces in
      wifi that don't have a netdev - for that we need an additional
      call to cfg80211_leave().
      
      So, to fix this mess, change cfg80211_destroy_ifaces() to not
      require the wiphy_lock(), but instead make it acquire it, but
      only after it has actually closed all the netdevs on the list,
      and then call cfg80211_leave() as well before removing them
      from the driver, to fix the second issue. The locking change in
      this requires modifying the nl80211 call to not get the wiphy
      lock passed in, but acquire it by itself after flushing any
      potentially pending destruction requests.
      
      [1] https://lore.kernel.org/r/09464e67-f3de-ac09-28a3-e27b7914ee7d@skogtun.org
      
      Cc: stable@vger.kernel.org # 5.12
      Reported-by: default avatarHarald Arnesen <harald@skogtun.org>
      Fixes: 776a39b8 ("cfg80211: call cfg80211_destroy_ifaces() with wiphy lock held")
      Fixes: 78f22b6a ("cfg80211: allow userspace to take ownership of interfaces")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Tested-by: default avatarHarald Arnesen <harald@skogtun.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ea6b2098