1. 13 Nov, 2020 1 commit
  2. 29 Sep, 2020 1 commit
  3. 15 Sep, 2020 1 commit
  4. 11 Sep, 2020 1 commit
  5. 31 Aug, 2020 1 commit
  6. 27 Aug, 2020 1 commit
  7. 26 Aug, 2020 1 commit
    • Dan Carpenter's avatar
      selinux: fix error handling bugs in security_load_policy() · 0256b0aa
      Dan Carpenter authored
      There are a few bugs in the error handling for security_load_policy().
      
      1) If the newpolicy->sidtab allocation fails then it leads to a NULL
         dereference.  Also the error code was not set to -ENOMEM on that
         path.
      2) If policydb_read() failed then we call policydb_destroy() twice
         which meands we call kvfree(p->sym_val_to_name[i]) twice.
      3) If policydb_load_isids() failed then we call sidtab_destroy() twice
         and that results in a double free in the sidtab_destroy_tree()
         function because entry.ptr_inner and entry.ptr_leaf are not set to
         NULL.
      
      One thing that makes this code nice to deal with is that none of the
      functions return partially allocated data.  In other words, the
      policydb_read() either allocates everything successfully or it frees
      all the data it allocates.  It never returns a mix of allocated and
      not allocated data.
      
      I re-wrote this to only free the successfully allocated data which
      avoids the double frees.  I also re-ordered selinux_policy_free() so
      it's in the reverse order of the allocation function.
      
      Fixes: c7c556f1 ("selinux: refactor changing booleans")
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      [PM: partially merged by hand due to merge fuzz]
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      0256b0aa
  8. 25 Aug, 2020 1 commit
  9. 24 Aug, 2020 1 commit
  10. 21 Aug, 2020 7 commits
    • Peter Enderborg's avatar
      selinux: add basic filtering for audit trace events · 30969bc8
      Peter Enderborg authored
      This patch adds further attributes to the event. These attributes are
      helpful to understand the context of the message and can be used
      to filter the events.
      
      There are three common items. Source context, target context and tclass.
      There are also items from the outcome of operation performed.
      
      An event is similar to:
                 <...>-1309  [002] ....  6346.691689: selinux_audited:
             requested=0x4000000 denied=0x4000000 audited=0x4000000
             result=-13
             scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023
             tcontext=system_u:object_r:bin_t:s0 tclass=file
      
      With systems where many denials are occurring, it is useful to apply a
      filter. The filtering is a set of logic that is inserted with
      the filter file. Example:
       echo "tclass==\"file\" " > events/avc/selinux_audited/filter
      
      This adds that we only get tclass=file.
      
      The trace can also have extra properties. Adding the user stack
      can be done with
         echo 1 > options/userstacktrace
      
      Now the output will be
               runcon-1365  [003] ....  6960.955530: selinux_audited:
           requested=0x4000000 denied=0x4000000 audited=0x4000000
           result=-13
           scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023
           tcontext=system_u:object_r:bin_t:s0 tclass=file
                runcon-1365  [003] ....  6960.955560: <user stack trace>
       =>  <00007f325b4ce45b>
       =>  <00005607093efa57>
      Signed-off-by: default avatarPeter Enderborg <peter.enderborg@sony.com>
      Reviewed-by: default avatarThiébaud Weksteen <tweek@google.com>
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      30969bc8
    • Thiébaud Weksteen's avatar
      selinux: add tracepoint on audited events · dd816621
      Thiébaud Weksteen authored
      The audit data currently captures which process and which target
      is responsible for a denial. There is no data on where exactly in the
      process that call occurred. Debugging can be made easier by being able to
      reconstruct the unified kernel and userland stack traces [1]. Add a
      tracepoint on the SELinux denials which can then be used by userland
      (i.e. perf).
      
      Although this patch could manually be added by each OS developer to
      trouble shoot a denial, adding it to the kernel streamlines the
      developers workflow.
      
      It is possible to use perf for monitoring the event:
        # perf record -e avc:selinux_audited -g -a
        ^C
        # perf report -g
        [...]
            6.40%     6.40%  audited=800000 tclass=4
                     |
                        __libc_start_main
                        |
                        |--4.60%--__GI___ioctl
                        |          entry_SYSCALL_64
                        |          do_syscall_64
                        |          __x64_sys_ioctl
                        |          ksys_ioctl
                        |          binder_ioctl
                        |          binder_set_nice
                        |          can_nice
                        |          capable
                        |          security_capable
                        |          cred_has_capability.isra.0
                        |          slow_avc_audit
                        |          common_lsm_audit
                        |          avc_audit_post_callback
                        |          avc_audit_post_callback
                        |
      
      It is also possible to use the ftrace interface:
        # echo 1 > /sys/kernel/debug/tracing/events/avc/selinux_audited/enable
        # cat /sys/kernel/debug/tracing/trace
        tracer: nop
        entries-in-buffer/entries-written: 1/1   #P:8
        [...]
        dmesg-3624  [001] 13072.325358: selinux_denied: audited=800000 tclass=4
      
      The tclass value can be mapped to a class by searching
      security/selinux/flask.h. The audited value is a bit field of the
      permissions described in security/selinux/av_permissions.h for the
      corresponding class.
      
      [1] https://source.android.com/devices/tech/debug/native_stack_dumpSigned-off-by: default avatarThiébaud Weksteen <tweek@google.com>
      Suggested-by: default avatarJoel Fernandes <joelaf@google.com>
      Reviewed-by: default avatarPeter Enderborg <peter.enderborg@sony.com>
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      dd816621
    • Daniel Burgener's avatar
      selinux: Create new booleans and class dirs out of tree · 0eea6091
      Daniel Burgener authored
      In order to avoid concurrency issues around selinuxfs resource availability
      during policy load, we first create new directories out of tree for
      reloaded resources, then swap them in, and finally delete the old versions.
      
      This fix focuses on concurrency in each of the two subtrees swapped, and
      not concurrency between the trees.  This means that it is still possible
      that subsequent reads to eg the booleans directory and the class directory
      during a policy load could see the old state for one and the new for the other.
      The problem of ensuring that policy loads are fully atomic from the perspective
      of userspace is larger than what is dealt with here.  This commit focuses on
      ensuring that the directories contents always match either the new or the old
      policy state from the perspective of userspace.
      
      In the previous implementation, on policy load /sys/fs/selinux is updated
      by deleting the previous contents of
      /sys/fs/selinux/{class,booleans} and then recreating them.  This means
      that there is a period of time when the contents of these directories do not
      exist which can cause race conditions as userspace relies on them for
      information about the policy.  In addition, it means that error recovery in
      the event of failure is challenging.
      
      In order to demonstrate the race condition that this series fixes, you
      can use the following commands:
      
      while true; do cat /sys/fs/selinux/class/service/perms/status
      >/dev/null; done &
      while true; do load_policy; done;
      
      In the existing code, this will display errors fairly often as the class
      lookup fails.  (In normal operation from systemd, this would result in a
      permission check which would be allowed or denied based on policy settings
      around unknown object classes.) After applying this patch series you
      should expect to no longer see such error messages.
      Signed-off-by: default avatarDaniel Burgener <dburgener@linux.microsoft.com>
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      0eea6091
    • Daniel Burgener's avatar
      selinux: Standardize string literal usage for selinuxfs directory names · 613ba187
      Daniel Burgener authored
      Switch class and policy_capabilities directory names to be referred to with
      global constants, consistent with booleans directory name.  This will allow
      for easy consistency of naming in future development.
      Signed-off-by: default avatarDaniel Burgener <dburgener@linux.microsoft.com>
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      613ba187
    • Daniel Burgener's avatar
      selinux: Refactor selinuxfs directory populating functions · 66ec384a
      Daniel Burgener authored
      Make sel_make_bools and sel_make_classes take the specific elements of
      selinux_fs_info that they need rather than the entire struct.
      
      This will allow a future patch to pass temporary elements that are not in
      the selinux_fs_info struct to these functions so that the original elements
      can be preserved until we are ready to perform the switch over.
      Signed-off-by: default avatarDaniel Burgener <dburgener@linux.microsoft.com>
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      66ec384a
    • Daniel Burgener's avatar
      selinux: Create function for selinuxfs directory cleanup · aeecf4a3
      Daniel Burgener authored
      Separating the cleanup from the creation will simplify two things in
      future patches in this series.  First, the creation can be made generic,
      to create directories not tied to the selinux_fs_info structure.  Second,
      we will ultimately want to reorder creation and deletion so that the
      deletions aren't performed until the new directory structures have already
      been moved into place.
      Signed-off-by: default avatarDaniel Burgener <dburgener@linux.microsoft.com>
      Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      aeecf4a3
    • Stephen Smalley's avatar
      selinux: permit removing security.selinux xattr before policy load · 9530a3e0
      Stephen Smalley authored
      Currently SELinux denies attempts to remove the security.selinux xattr
      always, even when permissive or no policy is loaded.  This was originally
      motivated by the view that all files should be labeled, even if that label
      is unlabeled_t, and we shouldn't permit files that were once labeled to
      have their labels removed entirely.  This however prevents removing
      SELinux xattrs in the case where one "disables" SELinux by not loading
      a policy (e.g. a system where runtime disable is removed and selinux=0
      was not specified).  Allow removing the xattr before SELinux is
      initialized.  We could conceivably permit it even after initialization
      if permissive, or introduce a separate permission check here.
      Signed-off-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      9530a3e0
  11. 20 Aug, 2020 2 commits
  12. 19 Aug, 2020 1 commit
  13. 18 Aug, 2020 4 commits
    • Stephen Smalley's avatar
      selinux: refactor changing booleans · c7c556f1
      Stephen Smalley authored
      Refactor the logic for changing SELinux policy booleans in a similar
      manner to the refactoring of policy load, thereby reducing the
      size of the critical section when the policy write-lock is held
      and making it easier to convert the policy rwlock to RCU in the
      future.  Instead of directly modifying the policydb in place, modify
      a copy and then swap it into place through a single pointer update.
      Only fully copy the portions of the policydb that are affected by
      boolean changes to avoid the full cost of a deep policydb copy.
      Introduce another level of indirection for the sidtab since changing
      booleans does not require updating the sidtab, unlike policy load.
      While we are here, create a common helper for notifying
      other kernel components and userspace of a policy change and call it
      from both security_set_bools() and selinux_policy_commit().
      
      Based on an old (2004) patch by Kaigai Kohei [1] to convert the policy
      rwlock to RCU that was deferred at the time since it did not
      significantly improve performance and introduced complexity. Peter
      Enderborg later submitted a patch series to convert to RCU [2] that
      would have made changing booleans a much more expensive operation
      by requiring a full policydb_write();policydb_read(); sequence to
      deep copy the entire policydb and also had concerns regarding
      atomic allocations.
      
      This change is now simplified by the earlier work to encapsulate
      policy state in the selinux_policy struct and to refactor
      policy load.  After this change, the last major obstacle to
      converting the policy rwlock to RCU is likely the sidtab live
      convert support.
      
      [1] https://lore.kernel.org/selinux/6e2f9128-e191-ebb3-0e87-74bfccb0767f@tycho.nsa.gov/
      [2] https://lore.kernel.org/selinux/20180530141104.28569-1-peter.enderborg@sony.com/Signed-off-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      c7c556f1
    • Stephen Smalley's avatar
      selinux: move policy commit after updating selinuxfs · 02a52c5c
      Stephen Smalley authored
      With the refactoring of the policy load logic in the security
      server from the previous change, it is now possible to split out
      the committing of the new policy from security_load_policy() and
      perform it only after successful updating of selinuxfs.  Change
      security_load_policy() to return the newly populated policy
      data structures to the caller, export selinux_policy_commit()
      for external callers, and introduce selinux_policy_cancel() to
      provide a way to cancel the policy load in the event of an error
      during updating of the selinuxfs directory tree.  Further, rework
      the interfaces used by selinuxfs to get information from the policy
      when creating the new directory tree to take and act upon the
      new policy data structure rather than the current/active policy.
      Update selinuxfs to use these updated and new interfaces.  While
      we are here, stop re-creating the policy_capabilities directory
      on each policy load since it does not depend on the policy, and
      stop trying to create the booleans and classes directories during
      the initial creation of selinuxfs since no information is available
      until first policy load.
      
      After this change, a failure while updating the booleans and class
      directories will cause the entire policy load to be canceled, leaving
      the original policy intact, and policy load notifications to userspace
      will only happen after a successful completion of updating those
      directories.  This does not (yet) provide full atomicity with respect
      to the updating of the directory trees themselves.
      Signed-off-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      02a52c5c
    • Stephen Smalley's avatar
      selinux: encapsulate policy state, refactor policy load · 46169802
      Stephen Smalley authored
      Encapsulate the policy state in its own structure (struct
      selinux_policy) that is separately allocated but referenced from the
      selinux_ss structure.  The policy state includes the SID table
      (particularly the context structures), the policy database, and the
      mapping between the kernel classes/permissions and the policy values.
      Refactor the security server portion of the policy load logic to
      cleanly separate loading of the new structures from committing the new
      policy.  Unify the initial policy load and reload code paths as much
      as possible, avoiding duplicated code.  Make sure we are taking the
      policy read-lock prior to any dereferencing of the policy.  Move the
      copying of the policy capability booleans into the state structure
      outside of the policy write-lock because they are separate from the
      policy and are read outside of any policy lock; possibly they should
      be using at least READ_ONCE/WRITE_ONCE or smp_load_acquire/store_release.
      
      These changes simplify the policy loading logic, reduce the size of
      the critical section while holding the policy write-lock, and should
      facilitate future changes to e.g. refactor the entire policy reload
      logic including the selinuxfs code to make the updating of the policy
      and the selinuxfs directory tree atomic and/or to convert the policy
      read-write lock to RCU.
      Signed-off-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      46169802
    • Stephen Smalley's avatar
      scripts/selinux,selinux: update mdp to enable policy capabilities · 339949be
      Stephen Smalley authored
      Presently mdp does not enable any SELinux policy capabilities
      in the dummy policy it generates. Thus, policies derived from
      it will by default lack various features commonly used in modern
      policies such as open permission, extended socket classes, network
      peer controls, etc.  Split the policy capability definitions out into
      their own headers so that we can include them into mdp without pulling in
      other kernel headers and extend mdp generate policycap statements for the
      policy capabilities known to the kernel.  Policy authors may wish to
      selectively remove some of these from the generated policy.
      Signed-off-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      339949be
  14. 16 Aug, 2020 6 commits
    • Linus Torvalds's avatar
      Linux 5.9-rc1 · 9123e3a7
      Linus Torvalds authored
      9123e3a7
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.9-2020-08-15' of git://git.kernel.dk/linux-block · 2cc3c4b3
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few differerent things in here.
      
        Seems like syzbot got some more io_uring bits wired up, and we got a
        handful of reports and the associated fixes are in here.
      
        General fixes too, and a lot of them marked for stable.
      
        Lastly, a bit of fallout from the async buffered reads, where we now
        more easily trigger short reads. Some applications don't really like
        that, so the io_read() code now handles short reads internally, and
        got a cleanup along the way so that it's now easier to read (and
        documented). We're now passing tests that failed before"
      
      * tag 'io_uring-5.9-2020-08-15' of git://git.kernel.dk/linux-block:
        io_uring: short circuit -EAGAIN for blocking read attempt
        io_uring: sanitize double poll handling
        io_uring: internally retry short reads
        io_uring: retain iov_iter state over io_read/io_write calls
        task_work: only grab task signal lock when needed
        io_uring: enable lookup of links holding inflight files
        io_uring: fail poll arm on queue proc failure
        io_uring: hold 'ctx' reference around task_work queue + execute
        fs: RWF_NOWAIT should imply IOCB_NOIO
        io_uring: defer file table grabbing request cleanup for locked requests
        io_uring: add missing REQ_F_COMP_LOCKED for nested requests
        io_uring: fix recursive completion locking on oveflow flush
        io_uring: use TWA_SIGNAL for task_work uncondtionally
        io_uring: account locked memory before potential error case
        io_uring: set ctx sq/cq entry count earlier
        io_uring: Fix NULL pointer dereference in loop_rw_iter()
        io_uring: add comments on how the async buffered read retry works
        io_uring: io_async_buf_func() need not test page bit
      2cc3c4b3
    • Mike Rapoport's avatar
      parisc: fix PMD pages allocation by restoring pmd_alloc_one() · 6f6aea7e
      Mike Rapoport authored
      Commit 1355c31e ("asm-generic: pgalloc: provide generic pmd_alloc_one()
      and pmd_free_one()") converted parisc to use generic version of
      pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
      PMD.
      
      Restore the original version of pmd_alloc_one() for parisc, just use
      GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
      memset.
      
      Fixes: 1355c31e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
      Reported-by: default avatarMeelis Roos <mroos@linux.ee>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Tested-by: default avatarMeelis Roos <mroos@linux.ee>
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.eeSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6f6aea7e
    • Linus Torvalds's avatar
      Merge tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block · 4b6c093e
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes on the block side of things:
      
         - Discard granularity fix (Coly)
      
         - rnbd cleanups (Guoqing)
      
         - md error handling fix (Dan)
      
         - md sysfs fix (Junxiao)
      
         - Fix flush request accounting, which caused an IO slowdown for some
           configurations (Ming)
      
         - Properly propagate loop flag for partition scanning (Lennart)"
      
      * tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block:
        block: fix double account of flush request's driver tag
        loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE
        rnbd: no need to set bi_end_io in rnbd_bio_map_kern
        rnbd: remove rnbd_dev_submit_io
        md-cluster: Fix potential error pointer dereference in resize_bitmaps()
        block: check queue's limits.discard_granularity in __blkdev_issue_discard()
        md: get sysfs entry after redundancy attr group create
      4b6c093e
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.9-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · d84835b1
      Linus Torvalds authored
      Pull RISC-V fix from Palmer Dabbelt:
       "I collected a single fix during the merge window: we managed to break
        the early trap setup on !MMU, this fixes it"
      
      * tag 'riscv-for-linus-5.9-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Setup exception vector for nommu platform
      d84835b1
    • Linus Torvalds's avatar
      Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh · 5bbec3cf
      Linus Torvalds authored
      Pull arch/sh updates from Rich Felker:
       "Cleanup, SECCOMP_FILTER support, message printing fixes, and other
        changes to arch/sh"
      
      * tag 'sh-for-5.9' of git://git.libc.org/linux-sh: (34 commits)
        sh: landisk: Add missing initialization of sh_io_port_base
        sh: bring syscall_set_return_value in line with other architectures
        sh: Add SECCOMP_FILTER
        sh: Rearrange blocks in entry-common.S
        sh: switch to copy_thread_tls()
        sh: use the generic dma coherent remap allocator
        sh: don't allow non-coherent DMA for NOMMU
        dma-mapping: consolidate the NO_DMA definition in kernel/dma/Kconfig
        sh: unexport register_trapped_io and match_trapped_io_handler
        sh: don't include <asm/io_trapped.h> in <asm/io.h>
        sh: move the ioremap implementation out of line
        sh: move ioremap_fixed details out of <asm/io.h>
        sh: remove __KERNEL__ ifdefs from non-UAPI headers
        sh: sort the selects for SUPERH alphabetically
        sh: remove -Werror from Makefiles
        sh: Replace HTTP links with HTTPS ones
        arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA*
        sh: stacktrace: Remove stacktrace_ops.stack()
        sh: machvec: Modernize printing of kernel messages
        sh: pci: Modernize printing of kernel messages
        ...
      5bbec3cf
  15. 15 Aug, 2020 11 commits
    • Jens Axboe's avatar
      io_uring: short circuit -EAGAIN for blocking read attempt · f91daf56
      Jens Axboe authored
      One case was missed in the short IO retry handling, and that's hitting
      -EAGAIN on a blocking attempt read (eg from io-wq context). This is a
      problem on sockets that are marked as non-blocking when created, they
      don't carry any REQ_F_NOWAIT information to help us terminate them
      instead of perpetually retrying.
      
      Fixes: 227c0c96 ("io_uring: internally retry short reads")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f91daf56
    • Jens Axboe's avatar
      io_uring: sanitize double poll handling · d4e7cd36
      Jens Axboe authored
      There's a bit of confusion on the matching pairs of poll vs double poll,
      depending on if the request is a pure poll (IORING_OP_POLL_ADD) or
      poll driven retry.
      
      Add io_poll_get_double() that returns the double poll waitqueue, if any,
      and io_poll_get_single() that returns the original poll waitqueue. With
      that, remove the argument to io_poll_remove_double().
      
      Finally ensure that wait->private is cleared once the double poll handler
      has run, so that remove knows it's already been seen.
      
      Cc: stable@vger.kernel.org # v5.8
      Reported-by: syzbot+7f617d4a9369028b8a2c@syzkaller.appspotmail.com
      Fixes: 18bceab1 ("io_uring: allow POLL_ADD with double poll_wait() users")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d4e7cd36
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux · 713eee84
      Linus Torvalds authored
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
       "Fixes:
         - Fixes for 'perf bench numa'.
      
         - Always memset source before memcpy in 'perf bench mem'.
      
         - Quote CC and CXX for their arguments to fix build in environments
           using those variables to pass more than just the compiler names.
      
         - Fix module symbol processing, addressing regression detected via
           "perf test".
      
         - Allow multiple probes in record+script_probe_vfs_getname.sh 'perf
           test' entry.
      
        Improvements:
         - Add script to autogenerate socket family name id->string table from
           copy of kernel header, used so far in 'perf trace'.
      
         - 'perf ftrace' improvements to provide similar options for this
           utility so that one can go from 'perf record', 'perf trace', etc to
           'perf ftrace' just by changing the name of the subcommand.
      
         - Prefer new "sched:sched_waking" trace event when it exists in 'perf
           sched' post processing.
      
         - Update POWER9 metrics to utilize other metrics.
      
         - Fall back to querying debuginfod if debuginfo not found locally.
      
        Miscellaneous:
         - Sync various kvm headers with kernel sources"
      
      * tag 'perf-tools-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (40 commits)
        perf ftrace: Make option description initials all capital letters
        perf build-ids: Fall back to debuginfod query if debuginfo not found
        perf bench numa: Remove dead code in parse_nodes_opt()
        perf stat: Update POWER9 metrics to utilize other metrics
        perf ftrace: Add change log
        perf: ftrace: Add set_tracing_options() to set all trace options
        perf ftrace: Add option --tid to filter by thread id
        perf ftrace: Add option -D/--delay to delay tracing
        perf: ftrace: Allow set graph depth by '--graph-opts'
        perf ftrace: Add support for trace option tracing_thresh
        perf ftrace: Add option 'verbose' to show more info for graph tracer
        perf ftrace: Add support for tracing option 'irq-info'
        perf ftrace: Add support for trace option funcgraph-irqs
        perf ftrace: Add support for trace option sleep-time
        perf ftrace: Add support for tracing option 'func_stack_trace'
        perf tools: Add general function to parse sublevel options
        perf ftrace: Add option '--inherit' to trace children processes
        perf ftrace: Show trace column header
        perf ftrace: Add option '-m/--buffer-size' to set per-cpu buffer size
        perf ftrace: Factor out function write_tracing_file_int()
        ...
      713eee84
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 50f6c7db
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Misc fixes and small updates all around the place:
      
         - Fix mitigation state sysfs output
      
         - Fix an FPU xstate/sxave code assumption bug triggered by
           Architectural LBR support
      
         - Fix Lightning Mountain SoC TSC frequency enumeration bug
      
         - Fix kexec debug output
      
         - Fix kexec memory range assumption bug
      
         - Fix a boundary condition in the crash kernel code
      
         - Optimize porgatory.ro generation a bit
      
         - Enable ACRN guests to use X2APIC mode
      
         - Reduce a __text_poke() IRQs-off critical section for the benefit of
           PREEMPT_RT"
      
      * tag 'x86-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/alternatives: Acquire pte lock with interrupts enabled
        x86/bugs/multihit: Fix mitigation reporting when VMX is not in use
        x86/fpu/xstate: Fix an xstate size check warning with architectural LBRs
        x86/purgatory: Don't generate debug info for purgatory.ro
        x86/tsr: Fix tsc frequency enumeration bug on Lightning Mountain SoC
        kexec_file: Correctly output debugging information for the PT_LOAD ELF header
        kexec: Improve & fix crash_exclude_mem_range() to handle overlapping ranges
        x86/crash: Correct the address boundary of function parameters
        x86/acrn: Remove redundant chars from ACRN signature
        x86/acrn: Allow ACRN guest to use X2APIC mode
      50f6c7db
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1195d58f
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Two fixes: fix a new tracepoint's output value, and fix the formatting
        of show-state syslog printouts"
      
      * tag 'sched-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/debug: Fix the alignment of the show-state debug output
        sched: Fix use of count for nr_running tracepoint
      1195d58f
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7f5faaaa
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Misc fixes, an expansion of perf syscall access to CAP_PERFMON
        privileged tools, plus a RAPL HW-enablement for Intel SPR platforms"
      
      * tag 'perf-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/rapl: Add support for Intel SPR platform
        perf/x86/rapl: Support multiple RAPL unit quirks
        perf/x86/rapl: Fix missing psys sysfs attributes
        hw_breakpoint: Remove unused __register_perf_hw_breakpoint() declaration
        kprobes: Remove show_registers() function prototype
        perf/core: Take over CAP_SYS_PTRACE creds to CAP_PERFMON capability
      7f5faaaa
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · eb1319af
      Linus Torvalds authored
      Pull locking fixlets from Ingo Molnar:
       "A documentation fix and a 'fallthrough' macro update"
      
      * tag 'locking-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Convert to use the preferred 'fallthrough' macro
        Documentation/locking/locktypes: Fix a typo
      eb1319af
    • Linus Torvalds's avatar
      Merge tag '9p-for-5.9-rc1' of git://github.com/martinetd/linux · 410520d0
      Linus Torvalds authored
      Pull 9p updates from Dominique Martinet:
      
       - some code cleanup
      
       - a couple of static analysis fixes
      
       - setattr: try to pick a fid associated with the file rather than the
         dentry, which might sometimes matter
      
      * tag '9p-for-5.9-rc1' of git://github.com/martinetd/linux:
        9p: Remove unneeded cast from memory allocation
        9p: remove unused code in 9p
        net/9p: Fix sparse endian warning in trans_fd.c
        9p: Fix memory leak in v9fs_mount
        9p: retrieve fid from file when file instance exist.
      410520d0
    • Linus Torvalds's avatar
      Merge tag '5.9-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · f6513bd3
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Three small cifs/smb3 fixes, one for stable fixing mkdir path with
        the 'idsfromsid' mount option"
      
      * tag '5.9-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        SMB3: Fix mkdir when idsfromsid configured on mount
        cifs: Convert to use the fallthrough macro
        cifs: Fix an error pointer dereference in cifs_mount()
      f6513bd3
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 37711e5e
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Stable fixes:
         - pNFS: Don't return layout segments that are being used for I/O
         - pNFS: Don't move layout segments off the active list when being used for I/O
      
        Features:
         - NFS: Add support for user xattrs through the NFSv4.2 protocol
         - NFS: Allow applications to speed up readdir+statx() using AT_STATX_DONT_SYNC
         - NFSv4.0 allow nconnect for v4.0
      
        Bugfixes and cleanups:
         - nfs: ensure correct writeback errors are returned on close()
         - nfs: nfs_file_write() should check for writeback errors
         - nfs: Fix getxattr kernel panic and memory overflow
         - NFS: Fix the pNFS/flexfiles mirrored read failover code
         - SUNRPC: dont update timeout value on connection reset
         - freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS
         - sunrpc: destroy rpc_inode_cachep after unregister_filesystem"
      
      * tag 'nfs-for-5.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (32 commits)
        NFS: Fix flexfiles read failover
        fs: nfs: delete repeated words in comments
        rpc_pipefs: convert comma to semicolon
        nfs: Fix getxattr kernel panic and memory overflow
        NFS: Don't return layout segments that are in use
        NFS: Don't move layouts to plh_return_segs list while in use
        NFS: Add layout segment info to pnfs read/write/commit tracepoints
        NFS: Add tracepoints for layouterror and layoutstats.
        NFS: Report the stateid + status in trace_nfs4_layoutreturn_on_close()
        SUNRPC dont update timeout value on connection reset
        nfs: nfs_file_write() should check for writeback errors
        nfs: ensure correct writeback errors are returned on close()
        NFSv4.2: xattr cache: get rid of cache discard work queue
        NFS: remove redundant initialization of variable result
        NFSv4.0 allow nconnect for v4.0
        freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS
        sunrpc: destroy rpc_inode_cachep after unregister_filesystem
        NFSv4.2: add client side xattr caching.
        NFSv4.2: hook in the user extended attribute handlers
        NFSv4.2: add the extended attribute proc functions.
        ...
      37711e5e
    • Linus Torvalds's avatar
      Merge tag 'edac_updates_for_5.9_pt2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 6ffdcde4
      Linus Torvalds authored
      Pull edac fix from Tony Luck:
       "Fix for the ie31200 driver that missed the first pull"
      
      * tag 'edac_updates_for_5.9_pt2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/ie31200: Fallback if host bridge device is already initialized
      6ffdcde4