1. 29 Jun, 2021 2 commits
  2. 21 Jun, 2021 1 commit
  3. 27 May, 2021 2 commits
  4. 19 May, 2021 4 commits
  5. 17 May, 2021 4 commits
  6. 28 Apr, 2021 5 commits
    • 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
  7. 27 Apr, 2021 17 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
    • Petr Mladek's avatar
      Merge branch 'printk-rework' into for-linus · c8dbea6d
      Petr Mladek authored
      c8dbea6d
    • Petr Mladek's avatar
      da34b03f
  8. 26 Apr, 2021 5 commits
    • 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