Skip to content
  1. Apr 29, 2021
    • 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
  2. Apr 28, 2021
    • 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
    • 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
  3. Apr 27, 2021
    • 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
    • Petr Mladek's avatar
      Merge branch 'printk-rework' into for-linus · c8dbea6d
      Petr Mladek authored
      c8dbea6d
    • Petr Mladek's avatar
      da34b03f
    • Linus Torvalds's avatar
      Merge tag 'spi-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 4a0225c3
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "The only core work for SPI this time around is the completion of the
        conversion to the new style method for specifying transfer delays,
        meaning we can cope with what most controllers support more directly
        using conversions in the core rather than open coding in drivers.
      
        Otherwise it's a good stack of cleanups and fixes plus a few new
        drivers.
      
        Summary:
      
         - Completion of the conversion to new style transfer delay
           configuration
      
         - Introduction and use of module_parport_driver() helper, merged here
           as there's no parport tree
      
         - Support for Altera SoCs on DFL buses, NXP i.MX8DL, HiSilicon
           Kunpeng, MediaTek MT8195"
      
      * tag 'spi-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (113 commits)
        spi: Rename enable1 to activate in spi_set_cs()
        spi: Convert Freescale QSPI binding to json schema
        spi: stm32-qspi: fix debug format string
        spi: tools: make a symbolic link to the header file spi.h
        spi: fsi: add a missing of_node_put
        spi: Make error handling of gpiod_count() call cleaner
        spidev: Add Micron SPI NOR Authenta device compatible
        spi: brcm,spi-bcm-qspi: convert to the json-schema
        spi: altera: Add DFL bus driver for Altera API Controller
        spi: altera: separate core code from platform code
        spi: stm32-qspi: Fix compilation warning in ARM64
        spi: Handle SPI device setup callback failure.
        spi: sync up initial chipselect state
        spi: stm32-qspi: Add dirmap support
        spi: stm32-qspi: Trigger DMA only if more than 4 bytes to transfer
        spi: stm32-qspi: fix pm_runtime usage_count counter
        spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails
        spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op
        spi: spi-zynqmp-gqspi: Resolved slab-out-of-bounds bug
        spi: spi-zynqmp-gqspi: fix hang issue when suspend/resume
        ...
      4a0225c3
    • Linus Torvalds's avatar
      Merge tag 'regulator-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · ca62e909
      Linus Torvalds authored
      Pull regulator updates from Mark Brown:
       "Not much going on with regulator this cycle, even in terms of cleanups
        and fixes things were fairly quiet.
      
         - New helper for setting ramp delay
      
         - Conversion of the Qualcomm RPMH bindings to YAML
      
         - Support for Tang Cheng TCS4525"
      
      * tag 'regulator-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (26 commits)
        regulator: Add binding for TCS4525
        regulator: fan53555: Add TCS4525 DCDC support
        dt-bindings: vendor-prefixes: Add Tang Cheng (TCS)
        regulator: core: Fix off_on_delay handling
        regulator: core: Respect off_on_delay at startup
        regulator: core.c: Improve a comment
        regulator: Avoid a double 'of_node_get' in 'regulator_of_get_init_node()'
        regulator: core.c: Fix indentation of comment
        regulator: s2mps11: Drop initialization via platform data
        regulator: s2mpa01: Drop initialization via platform data
        regulator: da9121: automotive variants identity fix
        regulator: Add regmap helper for ramp-delay setting
        regulator: helpers: Export helper voltage listing
        regulator: Add compatibles for PM7325/PMR735A
        regulator: Convert RPMh regulator bindings to YAML
        regulator: qcom-rpmh: Add PM7325/PMR735A regulator support
        regulator: qcom-rpmh: Add pmic5_ftsmps520 buck
        regulator: mt6360: remove redundant error print
        regulator: bd9576: Fix return from bd957x_probe()
        regulator: add missing call to of_node_put()
        ...
      ca62e909
    • Linus Torvalds's avatar
      Merge tag 'regmap-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · fed584c4
      Linus Torvalds authored
      Pull regmap updates from Mark Brown:
       "A couple of fixes in this release, plus a couple of new features for
        regmap-irq - we now support sub-irq blocks at arbatrary addresses and
        can remap configuration bitfields for interrupts split over multiple
        registers to the Linux configurations"
      
      * tag 'regmap-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap-irq: Fix dereference of a potentially null d->virt_buf
        regmap-irq: Add driver callback to configure virtual regs
        regmap-irq: Introduce virtual regs to handle more config regs
        regmap-irq: Extend sub-irq to support non-fixed reg strides
        regmap: set debugfs_name to NULL after it is freed
      fed584c4
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 070a7252
      Linus Torvalds authored
      Pull mtd updates from Miquel Raynal:
       "MTD core:
         - Handle possible -EPROBE_DEFER from parse_mtd_partitions()
         - Constify buf in mtd_write_user_prot_reg()
         - Constify name param in mtd_bdi_init
         - Fix fall-through warnings for Clang
         - Get rid of Big MTD Lock ouf of mtdchar
         - Drop mtd_mutex usage from mtdchar_open()
         - Don't lock when recursively deleting partitions
         - Use module_mtd_blktrans() to register driver when relevant
         - Parse MTD as NVMEM cells
         - New OTP (one-time-programmable) erase ioctl
         - Require write permissions for locking and badblock ioctls
         - physmap:
            - Fix error return code of physmap_flash_remove()
            - physmap-bt1-rom: Fix unintentional stack access
         - ofpart parser:
            - Support Linksys Northstar partitions
            - Make symbol 'bcm4908_partitions_quirks' static
            - Limit parsing of deprecated DT syntax
            - Support BCM4908 fixed partitions
         - Qcom parser:
            - Incompatible with spi-nor 4k sectors
            - Fix error condition
            - Extend Qcom SMEM parser to SPI flash
      
        CFI:
         - Disable broken buffered writes for CFI chips within ID 0x2201
         - Address a Coverity report for unused value
      
        SPI NOR core:
         - Add OTP support
         - Fix module unload while an op in progress
         - Add various cleanup patches
         - Add Michael and Pratyush as designated reviewers in MAINTAINERS
      
        SPI NOR controller drivers:
         - intel-spi:
            - Move platform data header to x86 subfolder
      
        NAND core:
         - Fix error handling in nand_prog_page_op() (x2)
         - Add a helper to retrieve the number of ECC bytes per step
         - Add a helper to retrieve the number of ECC steps
         - Let ECC engines advertize the exact number of steps
         - ECC Hamming:
            - Populate the public nsteps field
            - Use the public nsteps field
         - ECC BCH:
            - Populate the public nsteps field
            - Use the public nsteps field
      
        Raw NAND core:
         - Add support for secure regions in NAND memory
         - Try not to use the ECC private structures
         - Remove duplicate include in rawnand.h
         - BBT:
            - Skip bad blocks when searching for the BBT in NAND (APPLIED THEN REVERTED)
      
        Raw NAND controller drivers:
         - Qcom:
            - Convert bindings to YAML
            - Use dma_mapping_error() for error check
            - Add missing nand_cleanup() in error path
            - Return actual error code instead of -ENODEV
            - Update last code word register
            - Add helper to configure location register
            - Rename parameter name in macro
            - Add helper to check last code word
            - Convert nandc to chip in Read/Write helper
            - Update register macro name for 0x2c offset
         - GPMI:
            - Fix a double free in gpmi_nand_init
         - Rockchip:
            - Use flexible-array member instead of zero-length array
         - Atmel:
            - Update ecc_stats.corrected counter
         - MXC:
            - Remove unneeded of_match_ptr()
         - R852:
            - replace spin_lock_irqsave by spin_lock in hard IRQ
         - Brcmnand:
            - Move to polling in pio mode on oops write
            - Read/write oob during EDU transfer
            - Fix OOB R/W with Hamming ECC
         - FSMC:
            - Fix error code in fsmc_nand_probe()
         - OMAP:
            - Use ECC information from the generic structures
      
        SPI-NAND core:
         - Add missing MODULE_DEVICE_TABLE()
      
        SPI-NAND drivers:
         - gigadevice: Support GD5F1GQ5UExxG"
      
      * tag 'mtd/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (89 commits)
        Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND"
        mtd: core: Constify buf in mtd_write_user_prot_reg()
        Revert "mtd: spi-nor: macronix: Add support for mx25l51245g"
        mtd: spi-nor: core: Fix an issue of releasing resources during read/write
        mtd: cfi_cmdset_0002: remove redundant assignment to variable timeo
        mtd: cfi_cmdset_0002: Disable buffered writes for AMD chip 0x2201
        mtd: rawnand: qcom: Use dma_mapping_error() for error check
        mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init
        mtd: rawnand: qcom: Add missing nand_cleanup() in error path
        mtd: rawnand: Add support for secure regions in NAND memory
        dt-bindings: mtd: Add a property to declare secure regions in NAND chips
        dt-bindings: mtd: Convert Qcom NANDc binding to YAML
        mtd: spi-nor: winbond: add OTP support to w25q32fw/jw
        mtd: spi-nor: implement OTP support for Winbond and similar flashes
        mtd: spi-nor: add OTP support
        mtd: spi-nor: swp: Improve code around spi_nor_check_lock_status_sr()
        mtd: spi-nor: Move Software Write Protection logic out of the core
        mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND
        include: linux: mtd: Remove duplicate include of nand.h
        mtd: parsers: ofpart: support Linksys Northstar partitions
        ...
      070a7252
    • Linus Torvalds's avatar
      Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · e19eede5
      Linus Torvalds authored
      Pull dmi update from Jean Delvare.
      
      * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        MAINTAINERS: The DMI/SMBIOS tree has moved
        firmware/dmi: Include product_sku info to modalias
      e19eede5
    • David Howells's avatar
      netfs: Miscellaneous fixes · 53b776c7
      David Howells authored
      
      
      Fix some miscellaneous things in the new netfs lib[1]:
      
       (1) The kerneldoc for netfs_readpage() shouldn't say netfs_page().
      
       (2) netfs_readpage() can get an integer overflow on 32-bit when it
           multiplies page_index(page) by PAGE_SIZE.  It should use
           page_file_offset() instead.
      
       (3) netfs_write_begin() should use page_offset() to avoid the same
           overflow.
      
      Note that netfs_readpage() needs to use page_file_offset() rather than
      page_offset() as it may see swap-over-NFS.
      
      Reported-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Link: https://lore.kernel.org/r/161789062190.6155.12711584466338493050.stgit@warthog.procyon.org.uk/ [1]
      53b776c7
    • Linus Torvalds's avatar
      Merge tag 'devprop-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f0728bfe
      Linus Torvalds authored
      Pull device properties framework update from Rafael Wysocki:
       "Add MAINTAINERS entry for software nodes core code (Heikki Krogerus)"
      
      * tag 'devprop-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        MAINTAINERS: Add entry for the software nodes
      f0728bfe
    • Linus Torvalds's avatar
      Merge tag 'pm-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 5469f160
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "These add some new hardware support (for example, IceLake-D idle
        states in intel_idle), fix some issues (for example, the handling of
        negative "sleep length" values in cpuidle governors), add new
        functionality to the existing drivers (for example, scale-invariance
        support in the ACPI CPPC cpufreq driver) and clean up code all over.
      
        Specifics:
      
         - Add idle states table for IceLake-D to the intel_idle driver and
           update IceLake-X C6 data in it (Artem Bityutskiy).
      
         - Fix the C7 idle state on Tegra114 in the tegra cpuidle driver and
           drop the unused do_idle() firmware call from it (Dmitry Osipenko).
      
         - Fix cpuidle-qcom-spm Kconfig entry (He Ying).
      
         - Fix handling of possible negative tick_nohz_get_next_hrtimer()
           return values of in cpuidle governors (Rafael Wysocki).
      
         - Add support for frequency-invariance to the ACPI CPPC cpufreq
           driver and update the frequency-invariance engine (FIE) to use it
           as needed (Viresh Kumar).
      
         - Simplify the default delay_us setting in the ACPI CPPC cpufreq
           driver (Tom Saeger).
      
         - Clean up frequency-related computations in the intel_pstate cpufreq
           driver (Rafael Wysocki).
      
         - Fix TBG parent setting for load levels in the armada-37xx cpufreq
           driver and drop the CPU PM clock .set_parent method for armada-37xx
           (Marek Behún).
      
         - Fix multiple issues in the armada-37xx cpufreq driver (Pali Rohár).
      
         - Fix handling of dev_pm_opp_of_cpumask_add_table() return values in
           cpufreq-dt to take the -EPROBE_DEFER one into acconut as
           appropriate (Quanyang Wang).
      
         - Fix format string in ia64-acpi-cpufreq (Sergei Trofimovich).
      
         - Drop the unused for_each_policy() macro from cpufreq (Shaokun
           Zhang).
      
         - Simplify computations in the schedutil cpufreq governor to avoid
           unnecessary overhead (Yue Hu).
      
         - Fix typos in the s5pv210 cpufreq driver (Bhaskar Chowdhury).
      
         - Fix cpufreq documentation links in Kconfig (Alexander Monakov).
      
         - Fix PCI device power state handling in pci_enable_device_flags() to
           avoid issuse in some cases when the device depends on an ACPI power
           resource (Rafael Wysocki).
      
         - Add missing documentation of pm_runtime_resume_and_get() (Alan
           Stern).
      
         - Add missing static inline stub for pm_runtime_has_no_callbacks() to
           pm_runtime.h and drop the unused try_to_freeze_nowarn() definition
           (YueHaibing).
      
         - Drop duplicate struct device declaration from pm.h and fix a
           structure type declaration in intel_rapl.h (Wan Jiabing).
      
         - Use dev_set_name() instead of an open-coded equivalent of it in the
           wakeup sources code and drop a redundant local variable
           initialization from it (Andy Shevchenko, Colin Ian King).
      
         - Use crc32 instead of md5 for e820 memory map integrity check during
           resume from hibernation on x86 (Chris von Recklinghausen).
      
         - Fix typos in comments in the system-wide and hibernation support
           code (Lu Jialin).
      
         - Modify the generic power domains (genpd) code to avoid resuming
           devices in the "prepare" phase of system-wide suspend and
           hibernation (Ulf Hansson).
      
         - Add Hygon Fam18h RAPL support to the intel_rapl power capping
           driver (Pu Wen).
      
         - Add MAINTAINERS entry for the dynamic thermal power management
           (DTPM) code (Daniel Lezcano).
      
         - Add devm variants of operating performance points (OPP) API
           functions and switch over some users of the OPP framework to the
           new resource-managed API (Yangtao Li and Dmitry Osipenko).
      
         - Update devfreq core:
      
            * Register devfreq devices as cooling devices on demand (Daniel
              Lezcano).
      
            * Add missing unlock opeation in devfreq_add_device() (Lukasz
              Luba).
      
            * Use the next frequency as resume_freq instead of the previous
              frequency when using the opp-suspend property (Dong Aisheng).
      
            * Check get_dev_status in devfreq_update_stats() (Dong Aisheng).
      
            * Fix set_freq path for the userspace governor in Kconfig (Dong
              Aisheng).
      
            * Remove invalid description of get_target_freq() (Dong Aisheng).
      
         - Update devfreq drivers:
      
            * imx8m-ddrc: Remove imx8m_ddrc_get_dev_status() and unneeded
              of_match_ptr() (Dong Aisheng, Fabio Estevam).
      
            * rk3399_dmc: dt-bindings: Add rockchip,pmu phandle and drop
              references to undefined symbols (Enric Balletbo i Serra, Gaël
              PORTAY).
      
            * rk3399_dmc: Use dev_err_probe() to simplify the code (Krzysztof
              Kozlowski).
      
            * imx-bus: Remove unneeded of_match_ptr() (Fabio Estevam).
      
         - Fix kernel-doc warnings in three places (Pierre-Louis Bossart).
      
         - Fix typo in the pm-graph utility code (Ricardo Ribalda)"
      
      * tag 'pm-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits)
        PM: wakeup: remove redundant assignment to variable retval
        PM: hibernate: x86: Use crc32 instead of md5 for hibernation e820 integrity check
        cpufreq: Kconfig: fix documentation links
        PM: wakeup: use dev_set_name() directly
        PM: runtime: Add documentation for pm_runtime_resume_and_get()
        cpufreq: intel_pstate: Simplify intel_pstate_update_perf_limits()
        cpufreq: armada-37xx: Fix module unloading
        cpufreq: armada-37xx: Remove cur_frequency variable
        cpufreq: armada-37xx: Fix determining base CPU frequency
        cpufreq: armada-37xx: Fix driver cleanup when registration failed
        clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0
        clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz
        cpufreq: armada-37xx: Fix the AVS value for load L1
        clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock
        cpufreq: armada-37xx: Fix setting TBG parent for load levels
        cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration
        cpuidle: tegra: Remove do_idle firmware call
        cpuidle: tegra: Fix C7 idling state on Tegra114
        PM: sleep: fix typos in comments
        cpufreq: Remove unused for_each_policy macro
        ...
      5469f160