1. 01 Dec, 2019 1 commit
    • Ingo Molnar's avatar
      x86/mm/pat: Fix off-by-one bugs in interval tree search · 91298f1a
      Ingo Molnar authored
      There's a bug in the new PAT code, the conversion of memtype_check_conflict()
      is buggy:
      
         8d04a5f9: ("x86/mm/pat: Convert the PAT tree to a generic interval tree")
      
              dprintk("Overlap at 0x%Lx-0x%Lx\n", match->start, match->end);
              found_type = match->type;
      
      -       node = rb_next(&match->rb);
      -       while (node) {
      -               match = rb_entry(node, struct memtype, rb);
      -
      -               if (match->start >= end) /* Checked all possible matches */
      -                       goto success;
      -
      -               if (is_node_overlap(match, start, end) &&
      -                   match->type != found_type) {
      +       match = memtype_interval_iter_next(match, start, end);
      +       while (match) {
      +               if (match->type != found_type)
                              goto failure;
      -               }
      
      -               node = rb_next(&match->rb);
      +               match = memtype_interval_iter_next(match, start, end);
              }
      
      Note how the '>= end' condition to end the interval check, got converted
      into:
      
      +       match = memtype_interval_iter_next(match, start, end);
      
      This is subtly off by one, because the interval trees interfaces require
      closed interval parameters:
      
        include/linux/interval_tree_generic.h
      
       /*                                                                            \
        * Iterate over intervals intersecting [start;last]                           \
        *                                                                            \
        * Note that a node's interval intersects [start;last] iff:                   \
        *   Cond1: ITSTART(node) <= last                                             \
        * and                                                                        \
        *   Cond2: start <= ITLAST(node)                                             \
        */                                                                           \
      
        ...
      
                      if (ITSTART(node) <= last) {            /* Cond1 */           \
                              if (start <= ITLAST(node))      /* Cond2 */           \
                                      return node;    /* node is leftmost match */  \
      
      [start;last] is a closed interval (note that '<= last' check) - while the
      PAT 'end' parameter is 1 byte beyond the end of the range, because
      ioremap() and the other mapping APIs usually use the [start,end)
      half-open interval, derived from 'size'.
      
      This is what ioremap() does for example:
      
              /*
               * Mappings have to be page-aligned
               */
              offset = phys_addr & ~PAGE_MASK;
              phys_addr &= PHYSICAL_PAGE_MASK;
              size = PAGE_ALIGN(last_addr+1) - phys_addr;
      
              retval = reserve_memtype(phys_addr, (u64)phys_addr + size,
                                                      pcm, &new_pcm);
      
      phys_addr+size will be on a page boundary, after the last byte of the
      mapped interval.
      
      So the correct parameter to use in the interval tree searches is not
      'end' but 'end-1'.
      
      This could have relevance if conflicting PAT ranges are exactly adjacent,
      for example a future WC region is followed immediately by an already
      mapped UC- region - in this case memtype_check_conflict() would
      incorrectly deny the WC memtype region and downgrade the memtype to UC-.
      
      BTW., rather annoyingly this downgrading is done silently in
      memtype_check_insert():
      
      int memtype_check_insert(struct memtype *new,
                               enum page_cache_mode *ret_type)
      {
              int err = 0;
      
              err = memtype_check_conflict(new->start, new->end, new->type, ret_type);
              if (err)
                      return err;
      
              if (ret_type)
                      new->type = *ret_type;
      
              memtype_interval_insert(new, &memtype_rbroot);
              return 0;
      }
      
      So on such a conflict we'd just silently get UC- in *ret_type, and write
      it into the new region, never the wiser ...
      
      So assuming that the patch below fixes the primary bug the diagnostics
      side of ioremap() cache attribute downgrades would be another thing to
      fix.
      
      Anyway, I checked all the interval-tree iterations, and most of them are
      off by one - but I think the one related to memtype_check_conflict() is
      the one causing this particular performance regression.
      
      The only correct interval-tree searches were these two:
      
        arch/x86/mm/pat_interval.c:     match = memtype_interval_iter_first(&memtype_rbroot, 0, ULONG_MAX);
        arch/x86/mm/pat_interval.c:             match = memtype_interval_iter_next(match, 0, ULONG_MAX);
      
      The ULONG_MAX was hiding the off-by-one in plain sight. :-)
      
      Note that the bug was probably benign in the sense of implementing a too
      strict cache attribute conflict policy and downgrading cache attributes,
      so AFAICS the worst outcome of this bug would be a performance regression,
      not any instabilities.
      Reported-by: default avatarkernel test robot <rong.a.chen@intel.com>
      Reported-by: default avatarKenneth R. Crudup <kenny@panix.com>
      Reported-by: default avatarMariusz Ceier <mceier+kernel@gmail.com>
      Tested-by: default avatarMariusz Ceier <mceier@gmail.com>
      Tested-by: default avatarKenneth R. Crudup <kenny@panix.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@surriel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20191201144947.GA4167@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      91298f1a
  2. 30 Nov, 2019 1 commit
  3. 28 Nov, 2019 1 commit
    • Sebastian Andrzej Siewior's avatar
      x86/fpu: Don't cache access to fpu_fpregs_owner_ctx · 59c4bd85
      Sebastian Andrzej Siewior authored
      The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing
      to the context that is currently loaded. It never changed during the
      lifetime of a task - it remained stable/constant.
      
      After deferred FPU registers loading until return to userland was
      implemented, the content of fpu_fpregs_owner_ctx may change during
      preemption and must not be cached.
      
      This went unnoticed for some time and was now noticed, in particular
      since gcc 9 is caching that load in copy_fpstate_to_sigframe() and
      reusing it in the retry loop:
      
        copy_fpstate_to_sigframe()
          load fpu_fpregs_owner_ctx and save on stack
          fpregs_lock()
          copy_fpregs_to_sigframe() /* failed */
          fpregs_unlock()
               *** PREEMPTION, another uses FPU, changes fpu_fpregs_owner_ctx ***
      
          fault_in_pages_writeable() /* succeed, retry */
      
          fpregs_lock()
      	__fpregs_load_activate()
      	  fpregs_state_valid() /* uses fpu_fpregs_owner_ctx from stack */
          copy_fpregs_to_sigframe() /* succeeds, random FPU content */
      
      This is a comparison of the assembly produced by gcc 9, without vs with this
      patch:
      
      | # arch/x86/kernel/fpu/signal.c:173:      if (!access_ok(buf, size))
      |        cmpq    %rdx, %rax      # tmp183, _4
      |        jb      .L190   #,
      |-# arch/x86/include/asm/fpu/internal.h:512:       return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
      |-#APP
      |-# 512 "arch/x86/include/asm/fpu/internal.h" 1
      |-       movq %gs:fpu_fpregs_owner_ctx,%rax      #, pfo_ret__
      |-# 0 "" 2
      |-#NO_APP
      |-       movq    %rax, -88(%rbp) # pfo_ret__, %sfp
      …
      |-# arch/x86/include/asm/fpu/internal.h:512:       return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
      |-       movq    -88(%rbp), %rcx # %sfp, pfo_ret__
      |-       cmpq    %rcx, -64(%rbp) # pfo_ret__, %sfp
      |+# arch/x86/include/asm/fpu/internal.h:512:       return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
      |+#APP
      |+# 512 "arch/x86/include/asm/fpu/internal.h" 1
      |+       movq %gs:fpu_fpregs_owner_ctx(%rip),%rax        # fpu_fpregs_owner_ctx, pfo_ret__
      |+# 0 "" 2
      |+# arch/x86/include/asm/fpu/internal.h:512:       return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
      |+#NO_APP
      |+       cmpq    %rax, -64(%rbp) # pfo_ret__, %sfp
      
      Use this_cpu_read() instead this_cpu_read_stable() to avoid caching of
      fpu_fpregs_owner_ctx during preemption points.
      
      The Fixes: tag points to the commit where deferred FPU loading was
      added. Since this commit, the compiler is no longer allowed to move the
      load of fpu_fpregs_owner_ctx somewhere else / outside of the locked
      section. A task preemption will change its value and stale content will
      be observed.
      
       [ bp: Massage. ]
      Debugged-by: default avatarAustin Clements <austin@google.com>
      Debugged-by: default avatarDavid Chase <drchase@golang.org>
      Debugged-by: default avatarIan Lance Taylor <ian@airs.com>
      Fixes: 5f409e20 ("x86/fpu: Defer FPU state load until return to userspace")
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarRik van Riel <riel@surriel.com>
      Tested-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Aubrey Li <aubrey.li@intel.com>
      Cc: Austin Clements <austin@google.com>
      Cc: Barret Rhoden <brho@google.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: David Chase <drchase@golang.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: ian@airs.com
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Josh Bleecher Snyder <josharian@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86-ml <x86@kernel.org>
      Link: https://lkml.kernel.org/r/20191128085306.hxfa2o3knqtu4wfn@linutronix.de
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=205663
      59c4bd85
  4. 27 Nov, 2019 1 commit
  5. 26 Nov, 2019 36 commits
    • Andy Lutomirski's avatar
      x86/ptrace: Document FSBASE and GSBASE ABI oddities · 56f2ab41
      Andy Lutomirski authored
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      56f2ab41
    • Andy Lutomirski's avatar
      x86/ptrace: Remove set_segment_reg() implementations for current · 8e05f1b4
      Andy Lutomirski authored
      seg_segment_reg() should be unreachable with task == current.
      Rather than confusingly trying to make it work, just explicitly
      disable this case.
      
      (regset->get is used for current in the coredump code, but the ->set
       interface is only used for ptrace, and you can't ptrace yourself.)
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8e05f1b4
    • Andy Lutomirski's avatar
      x86/traps: die() instead of panicking on a double fault · 0337b7eb
      Andy Lutomirski authored
      A double fault has a decent chance of being recoverable by killing
      the offending thread.  Use die() so that we at least try to recover.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0337b7eb
    • Andy Lutomirski's avatar
      x86/doublefault/32: Rewrite the x86_32 #DF handler and unify with 64-bit · 7d8d8cfd
      Andy Lutomirski authored
      The old x86_32 doublefault_fn() was old and crufty, and it did not
      even try to recover.  do_double_fault() is much nicer.  Rewrite the
      32-bit double fault code to sanitize CPU state and call
      do_double_fault().  This is mostly an exercise i386 archaeology.
      
      With this patch applied, 32-bit double faults get a real stack trace,
      just like 64-bit double faults.
      
      [ mingo: merged the patch to a later kernel base. ]
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7d8d8cfd
    • Andy Lutomirski's avatar
      x86/doublefault/32: Move #DF stack and TSS to cpu_entry_area · dc4e0021
      Andy Lutomirski authored
      There are three problems with the current layout of the doublefault
      stack and TSS.  First, the TSS is only cacheline-aligned, which is
      not enough -- if the hardware portion of the TSS (struct x86_hw_tss)
      crosses a page boundary, horrible things happen [0].  Second, the
      stack and TSS are global, so simultaneous double faults on different
      CPUs will cause massive corruption.  Third, the whole mechanism
      won't work if user CR3 is loaded, resulting in a triple fault [1].
      
      Let the doublefault stack and TSS share a page (which prevents the
      TSS from spanning a page boundary), make it percpu, and move it into
      cpu_entry_area.  Teach the stack dump code about the doublefault
      stack.
      
      [0] Real hardware will read past the end of the page onto the next
          *physical* page if a task switch happens.  Virtual machines may
          have any number of bugs, and I would consider it reasonable for
          a VM to summarily kill the guest if it tries to task-switch to
          a page-spanning TSS.
      
      [1] Real hardware triple faults.  At least some VMs seem to hang.
          I'm not sure what's going on.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      dc4e0021
    • Andy Lutomirski's avatar
      x86/doublefault/32: Rename doublefault.c to doublefault_32.c · e99b6f46
      Andy Lutomirski authored
      doublefault.c now only contains 32-bit code.  Rename it to
      doublefault_32.c.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e99b6f46
    • Andy Lutomirski's avatar
      x86/traps: Disentangle the 32-bit and 64-bit doublefault code · 93efbde2
      Andy Lutomirski authored
      The 64-bit doublefault handler is much nicer than the 32-bit one.
      As a first step toward unifying them, make the 64-bit handler
      self-contained.  This should have no effect no functional effect
      except in the odd case of x86_64 with CONFIG_DOUBLEFAULT=n in which
      case it will change the logging a bit.
      
      This also gets rid of CONFIG_DOUBLEFAULT configurability on 64-bit
      kernels.  It didn't do anything useful -- CONFIG_DOUBLEFAULT=n
      didn't actually disable doublefault handling on x86_64.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      93efbde2
    • Andy Lutomirski's avatar
      lkdtm: Add a DOUBLE_FAULT crash type on x86 · b09511c2
      Andy Lutomirski authored
      The DOUBLE_FAULT crash does INT $8, which is a decent approximation
      of a double fault.  This is useful for testing the double fault
      handling.  Use it like:
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b09511c2
    • Andy Lutomirski's avatar
      selftests/x86/single_step_syscall: Check SYSENTER directly · 3300c4f3
      Andy Lutomirski authored
      We used to test SYSENTER only through the vDSO.  Test it directly
      too, just in case.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3300c4f3
    • Joerg Roedel's avatar
      x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all() · 9a62d200
      Joerg Roedel authored
      The job of vmalloc_sync_all() is to help the lazy freeing of vmalloc()
      ranges: before such vmap ranges are reused we make sure that they are
      unmapped from every task's page tables.
      
      This is really easy on pagetable setups where the kernel page tables
      are shared between all tasks - this is the case on 32-bit kernels
      with SHARED_KERNEL_PMD = 1.
      
      But on !SHARED_KERNEL_PMD 32-bit kernels this involves iterating
      over the pgd_list and clearing all pmd entries in the pgds that
      are cleared in the init_mm.pgd, which is the reference pagetable
      that the vmalloc() code uses.
      
      In that context the current practice of vmalloc_sync_all() iterating
      until FIX_ADDR_TOP is buggy:
      
              for (address = VMALLOC_START & PMD_MASK;
                   address >= TASK_SIZE_MAX && address < FIXADDR_TOP;
                   address += PMD_SIZE) {
                      struct page *page;
      
      Because iterating up to FIXADDR_TOP will involve a lot of non-vmalloc
      address ranges:
      
      	VMALLOC -> PKMAP -> LDT -> CPU_ENTRY_AREA -> FIX_ADDR
      
      This is mostly harmless for the FIX_ADDR and CPU_ENTRY_AREA ranges
      that don't clear their pmds, but it's lethal for the LDT range,
      which relies on having different mappings in different processes,
      and 'synchronizing' them in the vmalloc sense corrupts those
      pagetable entries (clearing them).
      
      This got particularly prominent with PTI, which turns SHARED_KERNEL_PMD
      off and makes this the dominant mapping mode on 32-bit.
      
      To make LDT working again vmalloc_sync_all() must only iterate over
      the volatile parts of the kernel address range that are identical
      between all processes.
      
      So the correct check in vmalloc_sync_all() is "address < VMALLOC_END"
      to make sure the VMALLOC areas are synchronized and the LDT
      mapping is not falsely overwritten.
      
      The CPU_ENTRY_AREA and the FIXMAP area are no longer synced either,
      but this is not really a proplem since their PMDs get established
      during bootup and never change.
      
      This change fixes the ldt_gdt selftest in my setup.
      
      [ mingo: Fixed up the changelog to explain the logic and modified the
               copying to only happen up until VMALLOC_END. ]
      Reported-by: default avatarBorislav Petkov <bp@suse.de>
      Tested-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      Cc: <stable@vger.kernel.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: hpa@zytor.com
      Fixes: 7757d607: ("x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32")
      Link: https://lkml.kernel.org/r/20191126111119.GA110513@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9a62d200
    • Ingo Molnar's avatar
      x86/iopl: Make 'struct tss_struct' constant size again · 0bcd7762
      Ingo Molnar authored
      After the following commit:
      
        05b042a1: ("x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise")
      
      'struct cpu_entry_area' has to be Kconfig invariant, so that we always
      have a matching CPU_ENTRY_AREA_PAGES size.
      
      This commit added a CONFIG_X86_IOPL_IOPERM dependency to tss_struct:
      
        111e7b15: ("x86/ioperm: Extend IOPL config to control ioperm() as well")
      
      Which, if CONFIG_X86_IOPL_IOPERM is turned off, reduces the size of
      cpu_entry_area by two pages, triggering the assert:
      
        ./include/linux/compiler.h:391:38: error: call to ‘__compiletime_assert_202’ declared with attribute error: BUILD_BUG_ON failed: (CPU_ENTRY_AREA_PAGES+1)*PAGE_SIZE != CPU_ENTRY_AREA_MAP_SIZE
      
      Simplify the Kconfig dependencies and make cpu_entry_area constant
      size on 32-bit kernels again.
      
      Fixes: 05b042a1: ("x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise")
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0bcd7762
    • Linus Torvalds's avatar
      Revert "vfs: properly and reliably lock f_pos in fdget_pos()" · 2be7d348
      Linus Torvalds authored
      This reverts commit 0be0ee71.
      
      I was hoping it would be benign to switch over entirely to FMODE_STREAM,
      and we'd have just a couple of small fixups we'd need, but it looks like
      we're not quite there yet.
      
      While it worked fine on both my desktop and laptop, they are fairly
      similar in other respects, and run mostly the same loads.  Kenneth
      Crudup reports that it seems to break both his vmware installation and
      the KDE upower service.  In both cases apparently leading to timeouts
      due to waitinmg for the f_pos lock.
      
      There are a number of character devices in particular that definitely
      want stream-like behavior, but that currently don't get marked as
      streams, and as a result get the exclusion between concurrent
      read()/write() on the same file descriptor.  Which doesn't work well for
      them.
      
      The most obvious example if this is /dev/console and /dev/tty, which use
      console_fops and tty_fops respectively (and ptmx_fops for the pty master
      side).  It may be that it's just this that causes problems, but we
      clearly weren't ready yet.
      
      Because there's a number of other likely common cases that don't have
      llseek implementations and would seem to act as stream devices:
      
        /dev/fuse		(fuse_dev_operations)
        /dev/mcelog		(mce_chrdev_ops)
        /dev/mei0		(mei_fops)
        /dev/net/tun		(tun_fops)
        /dev/nvme0		(nvme_dev_fops)
        /dev/tpm0		(tpm_fops)
        /proc/self/ns/mnt	(ns_file_operations)
        /dev/snd/pcm*		(snd_pcm_f_ops[])
      
      and while some of these could be trivially automatically detected by the
      vfs layer when the character device is opened by just noticing that they
      have no read or write operations either, it often isn't that obvious.
      
      Some character devices most definitely do use the file position, even if
      they don't allow seeking: the firmware update code, for example, uses
      simple_read_from_buffer() that does use f_pos, but doesn't allow seeking
      back and forth.
      
      We'll revisit this when there's a better way to detect the problem and
      fix it (possibly with a coccinelle script to do more of the FMODE_STREAM
      annotations).
      Reported-by: default avatarKenneth R. Crudup <kenny@panix.com>
      Cc: Kirill Smelkov <kirr@nexedi.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2be7d348
    • Linus Torvalds's avatar
      Merge branch 'x86-iopl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ab851d49
      Linus Torvalds authored
      Pull x86 iopl updates from Ingo Molnar:
       "This implements a nice simplification of the iopl and ioperm code that
        Thomas Gleixner discovered: we can implement the IO privilege features
        of the iopl system call by using the IO permission bitmap in
        permissive mode, while trapping CLI/STI/POPF/PUSHF uses in user-space
        if they change the interrupt flag.
      
        This implements that feature, with testing facilities and related
        cleanups"
      
      [ "Simplification" may be an over-statement. The main goal is to avoid
        the cli/sti of iopl by effectively implementing the IO port access
        parts of iopl in terms of ioperm.
      
        This may end up not workign well in case people actually depend on
        cli/sti being available, or if there are mixed uses of iopl and
        ioperm. We will see..       - Linus ]
      
      * 'x86-iopl-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
        x86/ioperm: Fix use of deprecated config option
        x86/entry/32: Clarify register saving in __switch_to_asm()
        selftests/x86/iopl: Extend test to cover IOPL emulation
        x86/ioperm: Extend IOPL config to control ioperm() as well
        x86/iopl: Remove legacy IOPL option
        x86/iopl: Restrict iopl() permission scope
        x86/iopl: Fixup misleading comment
        selftests/x86/ioperm: Extend testing so the shared bitmap is exercised
        x86/ioperm: Share I/O bitmap if identical
        x86/ioperm: Remove bitmap if all permissions dropped
        x86/ioperm: Move TSS bitmap update to exit to user work
        x86/ioperm: Add bitmap sequence number
        x86/ioperm: Move iobitmap data into a struct
        x86/tss: Move I/O bitmap data into a seperate struct
        x86/io: Speedup schedule out of I/O bitmap user
        x86/ioperm: Avoid bitmap allocation if no permissions are set
        x86/ioperm: Simplify first ioperm() invocation logic
        x86/iopl: Cleanup include maze
        x86/tss: Fix and move VMX BUILD_BUG_ON()
        x86/cpu: Unify cpu_init()
        ...
      ab851d49
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1d872004
      Linus Torvalds authored
      Pull x86 asm updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Cross-arch changes to move the linker sections for NOTES and
           EXCEPTION_TABLE into the RO_DATA area, where they belong on most
           architectures. (Kees Cook)
      
         - Switch the x86 linker fill byte from x90 (NOP) to 0xcc (INT3), to
           trap jumps into the middle of those padding areas instead of
           sliding execution. (Kees Cook)
      
         - A thorough cleanup of symbol definitions within x86 assembler code.
           The rather randomly named macros got streamlined around a
           (hopefully) straightforward naming scheme:
      
              SYM_START(name, linkage, align...)
              SYM_END(name, sym_type)
      
              SYM_FUNC_START(name)
              SYM_FUNC_END(name)
      
              SYM_CODE_START(name)
              SYM_CODE_END(name)
      
              SYM_DATA_START(name)
              SYM_DATA_END(name)
      
           etc - with about three times of these basic primitives with some
           label, local symbol or attribute variant, expressed via postfixes.
      
           No change in functionality intended. (Jiri Slaby)
      
         - Misc other changes, cleanups and smaller fixes"
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits)
        x86/entry/64: Remove pointless jump in paranoid_exit
        x86/entry/32: Remove unused resume_userspace label
        x86/build/vdso: Remove meaningless CFLAGS_REMOVE_*.o
        m68k: Convert missed RODATA to RO_DATA
        x86/vmlinux: Use INT3 instead of NOP for linker fill bytes
        x86/mm: Report actual image regions in /proc/iomem
        x86/mm: Report which part of kernel image is freed
        x86/mm: Remove redundant address-of operators on addresses
        xtensa: Move EXCEPTION_TABLE to RO_DATA segment
        powerpc: Move EXCEPTION_TABLE to RO_DATA segment
        parisc: Move EXCEPTION_TABLE to RO_DATA segment
        microblaze: Move EXCEPTION_TABLE to RO_DATA segment
        ia64: Move EXCEPTION_TABLE to RO_DATA segment
        h8300: Move EXCEPTION_TABLE to RO_DATA segment
        c6x: Move EXCEPTION_TABLE to RO_DATA segment
        arm64: Move EXCEPTION_TABLE to RO_DATA segment
        alpha: Move EXCEPTION_TABLE to RO_DATA segment
        x86/vmlinux: Move EXCEPTION_TABLE to RO_DATA segment
        x86/vmlinux: Actually use _etext for the end of the text segment
        vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA
        ...
      1d872004
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5c4a1c09
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "These are the fixes left over from the v5.4 cycle:
      
         - Various low level 32-bit entry code fixes and improvements by Andy
           Lutomirski, Peter Zijlstra and Thomas Gleixner.
      
         - Fix 32-bit Xen PV breakage, by Jan Beulich"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/entry/32: Fix FIXUP_ESPFIX_STACK with user CR3
        x86/pti/32: Calculate the various PTI cpu_entry_area sizes correctly, make the CPU_ENTRY_AREA_PAGES assert precise
        selftests/x86/sigreturn/32: Invalidate DS and ES when abusing the kernel
        selftests/x86/mov_ss_trap: Fix the SYSENTER test
        x86/entry/32: Fix NMI vs ESPFIX
        x86/entry/32: Unwind the ESPFIX stack earlier on exception entry
        x86/entry/32: Move FIXUP_FRAME after pushing %fs in SAVE_ALL
        x86/entry/32: Use %ss segment where required
        x86/entry/32: Fix IRET exception
        x86/cpu_entry_area: Add guard page for entry stack on 32bit
        x86/pti/32: Size initial_page_table correctly
        x86/doublefault/32: Fix stack canaries in the double fault handler
        x86/xen/32: Simplify ring check in xen_iret_crit_fixup()
        x86/xen/32: Make xen_iret_crit_fixup() independent of frame layout
        x86/stackframe/32: Repair 32-bit Xen PV
      5c4a1c09
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 53a07a14
      Linus Torvalds authored
      Pull x86 PTI updates from Ingo Molnar:
       "Fix reporting bugs of the MDS and TAA mitigation status, if one or
        both are set via a boot option.
      
        No change to mitigation behavior intended"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation: Fix redundant MDS mitigation message
        x86/speculation: Fix incorrect MDS/TAA mitigation status
      53a07a14
    • Linus Torvalds's avatar
      Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · da42761d
      Linus Torvalds authored
      Pull x86 platform updates from Ingo Molnar:
       "UV platform updates (with a 'hubless' variant) and Jailhouse updates
        for better UART support"
      
      * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/jailhouse: Only enable platform UARTs if available
        x86/jailhouse: Improve setup data version comparison
        x86/platform/uv: Account for UV Hubless in is_uvX_hub Ops
        x86/platform/uv: Check EFI Boot to set reboot type
        x86/platform/uv: Decode UVsystab Info
        x86/platform/uv: Add UV Hubbed/Hubless Proc FS Files
        x86/platform/uv: Setup UV functions for Hubless UV Systems
        x86/platform/uv: Add return code to UV BIOS Init function
        x86/platform/uv: Return UV Hubless System Type
        x86/platform/uv: Save OEM_ID from ACPI MADT probe
      da42761d
    • Linus Torvalds's avatar
      Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1c134b19
      Linus Torvalds authored
      Pull x86 mm updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - A PAT series from Davidlohr Bueso, which simplifies the memtype
           rbtree by using the interval tree helpers. (There's more cleanups
           in this area queued up, but they didn't make the merge window.)
      
         - Also flip over CONFIG_X86_5LEVEL to default-y. This might draw in a
           few more testers, as all the major distros are going to have
           5-level paging enabled by default in their next iterations.
      
         - Misc cleanups"
      
      * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm/pat: Rename pat_rbtree.c to pat_interval.c
        x86/mm/pat: Drop the rbt_ prefix from external memtype calls
        x86/mm/pat: Do not pass 'rb_root' down the memtype tree helper functions
        x86/mm/pat: Convert the PAT tree to a generic interval tree
        x86/mm: Clean up the pmd_read_atomic() comments
        x86/mm: Fix function name typo in pmd_read_atomic() comment
        x86/cpu: Clean up intel_tlb_table[]
        x86/mm: Enable 5-level paging support by default
      1c134b19
    • Linus Torvalds's avatar
      Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 24ee25a6
      Linus Torvalds authored
      Pull x86 kdump updates from Ingo Molnar:
       "This solves a kdump artifact where encrypted memory contents are
        dumped, instead of unencrypted ones.
      
        The solution also happens to simplify the kdump code, to everyone's
        delight"
      
      * 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/crash: Align function arguments on opening braces
        x86/kdump: Remove the backup region handling
        x86/kdump: Always reserve the low 1M when the crashkernel option is specified
        x86/crash: Add a forward declaration of struct kimage
      24ee25a6
    • Linus Torvalds's avatar
      Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 64d6a120
      Linus Torvalds authored
      Pull x86 hyperv updates from Ingo Molnar:
       "Misc updates to the hyperv guest code:
      
         - Rework clockevents initialization to better support hibernation
      
         - Allow guests to enable InvariantTSC
      
         - Micro-optimize send_ipi_one"
      
      * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/hyperv: Initialize clockevents earlier in CPU onlining
        x86/hyperv: Allow guests to enable InvariantTSC
        x86/hyperv: Micro-optimize send_ipi_one()
      64d6a120
    • Linus Torvalds's avatar
      Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cd4771f7
      Linus Torvalds authored
      Pull x86 syscall entry updates from Ingo Molnar:
       "These changes relate to the preparatory cleanup of syscall function
        type signatures - to fix indirect call mismatches with Control-Flow
        Integrity (CFI) checking.
      
        No change in behavior intended"
      
      * 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Use the correct function type for native_set_fixmap()
        syscalls/x86: Fix function types in COND_SYSCALL
        syscalls/x86: Use the correct function type for sys_ni_syscall
        syscalls/x86: Use COMPAT_SYSCALL_DEFINE0 for IA32 (rt_)sigreturn
        syscalls/x86: Wire up COMPAT_SYSCALL_DEFINE0
        syscalls/x86: Use the correct function type in SYSCALL_DEFINE0
      cd4771f7
    • Linus Torvalds's avatar
      Merge branches 'x86-cpu-for-linus' and 'x86-fpu-for-linus' of... · a25bbc26
      Linus Torvalds authored
      Merge branches 'x86-cpu-for-linus' and 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull x86 cpu and fpu updates from Ingo Molnar:
      
       - math-emu fixes
      
       - CPUID updates
      
       - sanity-check RDRAND output to see whether the CPU at least pretends
         to produce random data
      
       - various unaligned-access across cachelines fixes in preparation of
         hardware level split-lock detection
      
       - fix MAXSMP constraints to not allow !CPUMASK_OFFSTACK kernels with
         larger than 512 NR_CPUS
      
       - misc FPU related cleanups
      
      * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Align the x86_capability array to size of unsigned long
        x86/cpu: Align cpu_caps_cleared and cpu_caps_set to unsigned long
        x86/umip: Make the comments vendor-agnostic
        x86/Kconfig: Rename UMIP config parameter
        x86/Kconfig: Enforce limit of 512 CPUs with MAXSMP and no CPUMASK_OFFSTACK
        x86/cpufeatures: Add feature bit RDPRU on AMD
        x86/math-emu: Limit MATH_EMULATION to 486SX compatibles
        x86/math-emu: Check __copy_from_user() result
        x86/rdrand: Sanity-check RDRAND output
      
      * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu: Use XFEATURE_FP/SSE enum values instead of hardcoded numbers
        x86/fpu: Shrink space allocated for xstate_comp_offsets
        x86/fpu: Update stale variable name in comment
      a25bbc26
    • Linus Torvalds's avatar
      Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 85fbf15b
      Linus Torvalds authored
      Pull x86 boot updates from Ingo Molnar:
       "The main changes were:
      
         - Extend the boot protocol to allow future extensions without hitting
           the setup_header size limit.
      
         - Add quirk to devicetree systems to disable the RTC unless it's
           listed as a supported device.
      
         - Fix ld.lld linker pedantry"
      
      * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Introduce setup_indirect
        x86/boot: Introduce kernel_info.setup_type_max
        x86/boot: Introduce kernel_info
        x86/init: Allow DT configured systems to disable RTC at boot time
        x86/realmode: Explicitly set entry point via ENTRY in linker script
      85fbf15b
    • Linus Torvalds's avatar
      Merge branches 'core-objtool-for-linus', 'x86-cleanups-for-linus' and... · fd261590
      Linus Torvalds authored
      Merge branches 'core-objtool-for-linus', 'x86-cleanups-for-linus' and 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull x86 objtool, cleanup, and apic updates from Ingo Molnar:
       "Objtool:
      
         - Fix a gawk 5.0 incompatibility in gen-insn-attr-x86.awk. Most
           distros are still on gawk 4.2.x.
      
        Cleanup:
      
         - Misc cleanups, plus the removal of obsolete code such as Calgary
           IOMMU support, which code hasn't seen any real testing in a long
           time and there's no known users left.
      
        apic:
      
         - Two changes: a cleanup and a fix for an (old) race for oneshot
           threaded IRQ handlers"
      
      * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/insn: Fix awk regexp warnings
      
      * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Remove unused asm/rio.h
        x86: Fix typos in comments
        x86/pci: Remove #ifdef __KERNEL__ guard from <asm/pci.h>
        x86/pci: Remove pci_64.h
        x86: Remove the calgary IOMMU driver
        x86/apic, x86/uprobes: Correct parameter names in kernel-doc comments
        x86/kdump: Remove the unused crash_copy_backup_region()
        x86/nmi: Remove stale EDAC include leftover
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/ioapic: Rename misnamed functions
        x86/ioapic: Prevent inconsistent state when moving an interrupt
      fd261590
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.5-1' of git://github.com/cminyard/linux-ipmi · be2eca94
      Linus Torvalds authored
      Pull IPMI updates from Corey Minyard:
       "Some small fixes accumulated for IPMI, nothing major"
      
      * tag 'for-linus-5.5-1' of git://github.com/cminyard/linux-ipmi:
        ipmi: fix ipmb_poll()'s return type
        ipmi: kill off 'timespec' usage again
        drivers: ipmi: Support for both IPMB Req and Resp
        ipmi: Fix memory leak in __ipmi_bmc_register
        ipmi: bt-bmc: use devm_platform_ioremap_resource() to simplify code
        ipmi: use %*ph to print small buffer
        ipmi: Don't allow device module unload when in use
      be2eca94
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · a11b6969
      Linus Torvalds authored
      Pull i3c updates from Boris Brezillon:
       "Minor fixes and MAINTAINERS updates"
      
      * tag 'i3c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        MAINTAINERS: add myself as maintainer of Cadence I3C master controller driver
        MAINTAINERS: Mark linux-i3c mailing list moderated
        i3c: Spelling s/dicovered/discovered/
        i3c: master: use i3c_dev_get_master()
      a11b6969
    • Linus Torvalds's avatar
      Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux · ae2dc032
      Linus Torvalds authored
      Pull pcmcia updates from Dominik Brodowski:
       "Just a few odd fixes and improvements to the PCMCIA core"
      
      * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
        pcmcia: remove unused dprintk definition
        pcmcia: include <pcmcia/ds.h> for pcmcia_parse_tuple
        pcmcia: include cs_internal.h for missing declarations
        pcmcia: Use dev_get_drvdata where possible
        pcmcia: clean an indentation issues, remove extraneous spaces
      ae2dc032
    • Linus Torvalds's avatar
      Merge tag 'spi-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · a86f69d3
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "Lots of stuff going on in the core for SPI this time around, the two
        big changes both being around time in different forms:
      
         - A rework of delay times from Alexandru Ardelean which makes the
           ways in which they are specified more consistent between drivers so
           that what's available to clients is less dependent on the hardware
           implementation.
      
         - Support for PTP timestamping of transfers from Vladimir Oltean,
           useful for use with precision clocks with SPI control interfaces.
      
         - Big cleanups for the Atmel, PXA2xx and Zynq QSPI drivers"
      
      * tag 'spi-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (119 commits)
        dt-bindings: spi: Convert stm32 QSPI bindings to json-schema
        spi: pic32: Retire dma_request_slave_channel_compat()
        spi: Fix Kconfig indentation
        spi: mediatek: add SPI_CS_HIGH support
        spi: st-ssc4: add missed pm_runtime_disable
        spi: tegra20-slink: add missed clk_unprepare
        spi: tegra20-slink: Use dma_request_chan() directly for channel request
        spi: tegra114: Use dma_request_chan() directly for channel request
        spi: s3c64xx: Use dma_request_chan() directly for channel request
        spi: qup: Use dma_request_chan() directly for channel request
        spi: pl022: Use dma_request_chan() directly for channel request
        spi: imx: Use dma_request_chan() directly for channel request
        spi: fsl-lpspi: Use dma_request_chan() directly for channel request
        spi: atmel: Use dma_request_chan() directly for channel request
        spi: at91-usart: Use dma_request_chan() directly for channel request
        spi: fsl-cpm: Correct the free:ing
        spi: Fix regression to return zero on success instead of positive value
        spi: pxa2xx: Add missed security checks
        spi: nxp-fspi: Use devm API to fix missed unregistration of controller
        spi: omap2-mcspi: Remove redundant checks
        ...
      a86f69d3
    • Linus Torvalds's avatar
      Merge tag 'regulator-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · d873a0cd
      Linus Torvalds authored
      Pull regulator updates from Mark Brown:
       "Another fairly quiet release for the regulator API, some work all
        around including some core work but mostly in specialist or driver
        specific code:
      
         - Fix for powering off boot-on regulators
      
         - Enhancements to the coupled regulator support introduced in the
           last release
      
         - Conversion of a bunch of drivers to the fwnode API for GPIOs
      
         - Mode support for DA9062
      
         - New device support for Qualcomm PM1650, PM8004 and PM895 and
           Silergy SR83X
      
         - Removal of obsolete AB8505 support"
      
      * tag 'regulator-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (49 commits)
        regulator: da9062: Return REGULATOR_MODE_INVALID for invalid mode
        regulator: Fix Kconfig indentation
        regulator: tps6105x: add optional devicetree support
        tps6105x: add optional devicetree support
        regulator: rn5t618: fix rc5t619 ldo10 enable
        regulator: vexpress: Use PTR_ERR_OR_ZERO() to simplify code
        dt-bindings: mfd: da9062: describe buck modes
        regulator: da9062: add of_map_mode support for bucks
        regulator: da9062: refactor buck modes into header
        regulator: stpmic1: Set a default ramp delay value
        regulator: core: Let boot-on regulators be powered off
        regulator: core: Don't try to remove device links if add failed
        regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id
        regulator: ab8500: Remove AB8505 USB regulator
        regulator: fan53555: add chip id for Silergy SYR83X
        regulator: fixed: add off-on-delay
        dt-bindings: regulator: fixed: add off-on-delay-us property
        regulator: core: Allow generic coupling only for always-on regulators
        regulator: core: Release coupled_rdevs on regulator_init_coupling() error
        regulator: bd70528: Add MODULE_ALIAS to allow module auto loading
        ...
      d873a0cd
    • Linus Torvalds's avatar
      Merge tag 'regmap-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 3b397c7c
      Linus Torvalds authored
      Pull regmap update from Mark Brown:
       "Just one patch for this release removing some dead code"
      
      * tag 'regmap-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: regmap-w1: Drop unreachable code
      3b397c7c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 386403a1
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Another merge window, another pull full of stuff:
      
         1) Support alternative names for network devices, from Jiri Pirko.
      
         2) Introduce per-netns netdev notifiers, also from Jiri Pirko.
      
         3) Support MSG_PEEK in vsock/virtio, from Matias Ezequiel Vara
            Larsen.
      
         4) Allow compiling out the TLS TOE code, from Jakub Kicinski.
      
         5) Add several new tracepoints to the kTLS code, also from Jakub.
      
         6) Support set channels ethtool callback in ena driver, from Sameeh
            Jubran.
      
         7) New SCTP events SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED,
            SCTP_ADDR_MADE_PRIM, and SCTP_SEND_FAILED_EVENT. From Xin Long.
      
         8) Add XDP support to mvneta driver, from Lorenzo Bianconi.
      
         9) Lots of netfilter hw offload fixes, cleanups and enhancements,
            from Pablo Neira Ayuso.
      
        10) PTP support for aquantia chips, from Egor Pomozov.
      
        11) Add UDP segmentation offload support to igb, ixgbe, and i40e. From
            Josh Hunt.
      
        12) Add smart nagle to tipc, from Jon Maloy.
      
        13) Support L2 field rewrite by TC offloads in bnxt_en, from Venkat
            Duvvuru.
      
        14) Add a flow mask cache to OVS, from Tonghao Zhang.
      
        15) Add XDP support to ice driver, from Maciej Fijalkowski.
      
        16) Add AF_XDP support to ice driver, from Krzysztof Kazimierczak.
      
        17) Support UDP GSO offload in atlantic driver, from Igor Russkikh.
      
        18) Support it in stmmac driver too, from Jose Abreu.
      
        19) Support TIPC encryption and auth, from Tuong Lien.
      
        20) Introduce BPF trampolines, from Alexei Starovoitov.
      
        21) Make page_pool API more numa friendly, from Saeed Mahameed.
      
        22) Introduce route hints to ipv4 and ipv6, from Paolo Abeni.
      
        23) Add UDP segmentation offload to cxgb4, Rahul Lakkireddy"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1857 commits)
        libbpf: Fix usage of u32 in userspace code
        mm: Implement no-MMU variant of vmalloc_user_node_flags
        slip: Fix use-after-free Read in slip_open
        net: dsa: sja1105: fix sja1105_parse_rgmii_delays()
        macvlan: schedule bc_work even if error
        enetc: add support Credit Based Shaper(CBS) for hardware offload
        net: phy: add helpers phy_(un)lock_mdio_bus
        mdio_bus: don't use managed reset-controller
        ax88179_178a: add ethtool_op_get_ts_info()
        mlxsw: spectrum_router: Fix use of uninitialized adjacency index
        mlxsw: spectrum_router: After underlay moves, demote conflicting tunnels
        bpf: Simplify __bpf_arch_text_poke poke type handling
        bpf: Introduce BPF_TRACE_x helper for the tracing tests
        bpf: Add bpf_jit_blinding_enabled for !CONFIG_BPF_JIT
        bpf, testing: Add various tail call test cases
        bpf, x86: Emit patchable direct jump as tail call
        bpf: Constant map key tracking for prog array pokes
        bpf: Add poke dependency tracking for prog array maps
        bpf: Add initial poke descriptor table for jit images
        bpf: Move owner type, jited info into array auxiliary data
        ...
      386403a1
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 642356cb
      Linus Torvalds authored
      Pull crypto updates from Herbert Xu:
       "API:
         - Add library interfaces of certain crypto algorithms for WireGuard
         - Remove the obsolete ablkcipher and blkcipher interfaces
         - Move add_early_randomness() out of rng_mutex
      
        Algorithms:
         - Add blake2b shash algorithm
         - Add blake2s shash algorithm
         - Add curve25519 kpp algorithm
         - Implement 4 way interleave in arm64/gcm-ce
         - Implement ciphertext stealing in powerpc/spe-xts
         - Add Eric Biggers's scalar accelerated ChaCha code for ARM
         - Add accelerated 32r2 code from Zinc for MIPS
         - Add OpenSSL/CRYPTOGRAMS poly1305 implementation for ARM and MIPS
      
        Drivers:
         - Fix entropy reading failures in ks-sa
         - Add support for sam9x60 in atmel
         - Add crypto accelerator for amlogic GXL
         - Add sun8i-ce Crypto Engine
         - Add sun8i-ss cryptographic offloader
         - Add a host of algorithms to inside-secure
         - Add NPCM RNG driver
         - add HiSilicon HPRE accelerator
         - Add HiSilicon TRNG driver"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (285 commits)
        crypto: vmx - Avoid weird build failures
        crypto: lib/chacha20poly1305 - use chacha20_crypt()
        crypto: x86/chacha - only unregister algorithms if registered
        crypto: chacha_generic - remove unnecessary setkey() functions
        crypto: amlogic - enable working on big endian kernel
        crypto: sun8i-ce - enable working on big endian
        crypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER
        hwrng: ks-sa - Enable COMPILE_TEST
        crypto: essiv - remove redundant null pointer check before kfree
        crypto: atmel-aes - Change data type for "lastc" buffer
        crypto: atmel-tdes - Set the IV after {en,de}crypt
        crypto: sun4i-ss - fix big endian issues
        crypto: sun4i-ss - hide the Invalid keylen message
        crypto: sun4i-ss - use crypto_ahash_digestsize
        crypto: sun4i-ss - remove dependency on not 64BIT
        crypto: sun4i-ss - Fix 64-bit size_t warnings on sun4i-ss-hash.c
        MAINTAINERS: Add maintainer for HiSilicon SEC V2 driver
        crypto: hisilicon - add DebugFS for HiSilicon SEC
        Documentation: add DebugFS doc for HiSilicon SEC
        crypto: hisilicon - add SRIOV for HiSilicon SEC
        ...
      642356cb
    • Linus Torvalds's avatar
      Merge tag 'livepatching-for-5.5' of... · f8387675
      Linus Torvalds authored
      Merge tag 'livepatching-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
      
      Pull livepatching updates from Petr Mladek:
      
       - New API to track system state changes done be livepatch callbacks. It
         helps to maintain compatibility between livepatches.
      
       - Update Kconfig help text. ORC is another reliable unwinder.
      
       - Disable generic selftest timeout. Livepatch selftests have their own
         per-operation fine-grained timeouts.
      
      * tag 'livepatching-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
        x86/stacktrace: update kconfig help text for reliable unwinders
        livepatch: Selftests of the API for tracking system state changes
        livepatch: Documentation of the new API for tracking system state changes
        livepatch: Allow to distinguish different version of system state changes
        livepatch: Basic API to track system state changes
        livepatch: Keep replaced patches until post_patch callback is called
        selftests/livepatch: Disable the timeout
      f8387675
    • Linus Torvalds's avatar
      Merge tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk · 436b2a80
      Linus Torvalds authored
      Pull printk updates from Petr Mladek:
      
       - Allow to print symbolic error names via new %pe modifier.
      
       - Use pr_warn() instead of the remaining pr_warning() calls. Fix
         formatting of the related lines.
      
       - Add VSPRINTF entry to MAINTAINERS.
      
      * tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits)
        checkpatch: don't warn about new vsprintf pointer extension '%pe'
        MAINTAINERS: Add VSPRINTF
        tools lib api: Renaming pr_warning to pr_warn
        ASoC: samsung: Use pr_warn instead of pr_warning
        lib: cpu_rmap: Use pr_warn instead of pr_warning
        trace: Use pr_warn instead of pr_warning
        dma-debug: Use pr_warn instead of pr_warning
        vgacon: Use pr_warn instead of pr_warning
        fs: afs: Use pr_warn instead of pr_warning
        sh/intc: Use pr_warn instead of pr_warning
        scsi: Use pr_warn instead of pr_warning
        platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
        platform/x86: asus-laptop: Use pr_warn instead of pr_warning
        platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning
        oprofile: Use pr_warn instead of pr_warning
        of: Use pr_warn instead of pr_warning
        macintosh: Use pr_warn instead of pr_warning
        idsn: Use pr_warn instead of pr_warning
        ide: Use pr_warn instead of pr_warning
        crypto: n2: Use pr_warn instead of pr_warning
        ...
      436b2a80
    • Linus Torvalds's avatar
      Merge branch 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 1b96a41b
      Linus Torvalds authored
      Pull cgroup updates from Tejun Heo:
       "There are several notable changes here:
      
         - Single thread migrating itself has been optimized so that it
           doesn't need threadgroup rwsem anymore.
      
         - Freezer optimization to avoid unnecessary frozen state changes.
      
         - cgroup ID unification so that cgroup fs ino is the only unique ID
           used for the cgroup and can be used to directly look up live
           cgroups through filehandle interface on 64bit ino archs. On 32bit
           archs, cgroup fs ino is still the only ID in use but it is only
           unique when combined with gen.
      
         - selftest and other changes"
      
      * 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (24 commits)
        writeback: fix -Wformat compilation warnings
        docs: cgroup: mm: Fix spelling of "list"
        cgroup: fix incorrect WARN_ON_ONCE() in cgroup_setup_root()
        cgroup: use cgrp->kn->id as the cgroup ID
        kernfs: use 64bit inos if ino_t is 64bit
        kernfs: implement custom exportfs ops and fid type
        kernfs: combine ino/id lookup functions into kernfs_find_and_get_node_by_id()
        kernfs: convert kernfs_node->id from union kernfs_node_id to u64
        kernfs: kernfs_find_and_get_node_by_ino() should only look up activated nodes
        kernfs: use dumber locking for kernfs_find_and_get_node_by_ino()
        netprio: use css ID instead of cgroup ID
        writeback: use ino_t for inodes in tracepoints
        kernfs: fix ino wrap-around detection
        kselftests: cgroup: Avoid the reuse of fd after it is deallocated
        cgroup: freezer: don't change task and cgroups status unnecessarily
        cgroup: use cgroup->last_bstat instead of cgroup->bstat_pending for consistency
        cgroup: remove cgroup_enable_task_cg_lists() optimization
        cgroup: pids: use atomic64_t for pids->limit
        selftests: cgroup: Run test_core under interfering stress
        selftests: cgroup: Add task migration tests
        ...
      1b96a41b
    • Linus Torvalds's avatar
      Merge branch 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 9391edee
      Linus Torvalds authored
      Pull workqueue updates from Tejun Heo:
       "There have been sporadic reports of sanity checks in
        destroy_workqueue() failing spuriously over the years. This contains
        the fix and its follow-up changes / fixes.
      
        There's also a RCU annotation improvement"
      
      * 'for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Add RCU annotation for pwq list walk
        workqueue: Fix pwq ref leak in rescuer_thread()
        workqueue: more destroy_workqueue() fixes
        workqueue: Minor follow-ups to the rescuer destruction change
        workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
        workqueue: Fix spurious sanity check failures in destroy_workqueue()
      9391edee