1. 11 Jan, 2019 5 commits
  2. 10 Jan, 2019 10 commits
  3. 09 Jan, 2019 19 commits
  4. 08 Jan, 2019 6 commits
    • Amadeusz Sławiński's avatar
      ALSA: usb-audio: fix CM6206 register definitions · f5c9571e
      Amadeusz Sławiński authored
      fix typo after a recent commit causing headphones to have no sound
      
      Fixes: ad43d528 (ALSA: usb-audio: Define registers for CM6206)
      Signed-off-by: default avatarAmadeusz Sławiński <amade@asmblr.net>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f5c9571e
    • David Herrmann's avatar
      fork: record start_time late · 7b558513
      David Herrmann authored
      This changes the fork(2) syscall to record the process start_time after
      initializing the basic task structure but still before making the new
      process visible to user-space.
      
      Technically, we could record the start_time anytime during fork(2).  But
      this might lead to scenarios where a start_time is recorded long before
      a process becomes visible to user-space.  For instance, with
      userfaultfd(2) and TLS, user-space can delay the execution of fork(2)
      for an indefinite amount of time (and will, if this causes network
      access, or similar).
      
      By recording the start_time late, it much closer reflects the point in
      time where the process becomes live and can be observed by other
      processes.
      
      Lastly, this makes it much harder for user-space to predict and control
      the start_time they get assigned.  Previously, user-space could fork a
      process and stall it in copy_thread_tls() before its pid is allocated,
      but after its start_time is recorded.  This can be misused to later-on
      cycle through PIDs and resume the stalled fork(2) yielding a process
      that has the same pid and start_time as a process that existed before.
      This can be used to circumvent security systems that identify processes
      by their pid+start_time combination.
      
      Even though user-space was always aware that start_time recording is
      flaky (but several projects are known to still rely on start_time-based
      identification), changing the start_time to be recorded late will help
      mitigate existing attacks and make it much harder for user-space to
      control the start_time a process gets assigned.
      Reported-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarTom Gundersen <teg@jklm.no>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7b558513
    • Alex Williamson's avatar
      vfio/type1: Fix unmap overflow off-by-one · 58fec830
      Alex Williamson authored
      The below referenced commit adds a test for integer overflow, but in
      doing so prevents the unmap ioctl from ever including the last page of
      the address space.  Subtract one to compare to the last address of the
      unmap to avoid the overflow and wrap-around.
      
      Fixes: 71a7d3d7 ("vfio/type1: silence integer overflow warning")
      Link: https://bugzilla.redhat.com/show_bug.cgi?id=1662291
      Cc: stable@vger.kernel.org # v4.15+
      Reported-by: default avatarPei Zhang <pezhang@redhat.com>
      Debugged-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Tested-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      58fec830
    • Guo Ren's avatar
      irqchip/csky: fixup handle_irq_perbit break irq · 56752b21
      Guo Ren authored
      The handle_irq_perbit function loop every bit in hwirq local variable.
      
      handle_irq_perbit(hwirq) {
        for_everyt_bit_in(hwirq) {
      	handle_domain_irq()
      		->irq_exit()
      		->invoke_softirq()
      		->__do_softirq()
      		->local_irq_enable() // Here will cause new interrupt.
        }
      }
      
      When new interrupt coming at local_irq_enable, it will finish another
      interrupt handler and pull down the interrupt source. But hwirq is the
      local variable for handle_irq_perbit(), it can't get new interrupt
      controller pending reg status. So we need update hwirq with pending reg
      in every loop.
      
      Also change write_relax to writel could prevent stw from fast retire.
      When local_irq is enabled, intc regs is really set-in.
      Signed-off-by: default avatarGuo Ren <ren_guo@c-sky.com>
      Cc: Lu Baoquan <lu.baoquan@intellif.com>
      56752b21
    • Guo Ren's avatar
      csky: fixup compile error with pte_alloc · 2a60aa14
      Guo Ren authored
      Commit: 4cf58924 remove the address argument of pte_alloc without
      modify csky related code. linux-5.0-rc1 compile failed with csky.
      
      Remove the unnecessary address testing in pte_alloc().
      Signed-off-by: default avatarGuo Ren <ren_guo@c-sky.com>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      2a60aa14
    • Masahiro Yamada's avatar
      vfio/pci: set TRACE_INCLUDE_PATH to fix the build error · d1fc1176
      Masahiro Yamada authored
      drivers/vfio/pci/vfio_pci_nvlink2.c cannot be compiled for in-tree
      building.
      
          CC      drivers/vfio/pci/vfio_pci_nvlink2.o
        In file included from drivers/vfio/pci/trace.h:102,
                         from drivers/vfio/pci/vfio_pci_nvlink2.c:29:
        ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory
         #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
                                                ^
        compilation terminated.
        make[1]: *** [scripts/Makefile.build;277: drivers/vfio/pci/vfio_pci_nvlink2.o] Error 1
      
      To fix the build error, let's tell include/trace/define_trace.h the
      location of drivers/vfio/pci/trace.h
      
      Fixes: 7f928917 ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")
      Reported-by: default avatarLaura Abbott <labbott@redhat.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      d1fc1176