1. 20 Jun, 2017 2 commits
  2. 19 Jun, 2017 15 commits
    • Linus Torvalds's avatar
      Linux 4.12-rc6 · 41f1830f
      Linus Torvalds authored
      41f1830f
    • Hugh Dickins's avatar
      mm: larger stack guard gap, between vmas · 1be7107f
      Hugh Dickins authored
      Stack guard page is a useful feature to reduce a risk of stack smashing
      into a different mapping. We have been using a single page gap which
      is sufficient to prevent having stack adjacent to a different mapping.
      But this seems to be insufficient in the light of the stack usage in
      userspace. E.g. glibc uses as large as 64kB alloca() in many commonly
      used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX]
      which is 256kB or stack strings with MAX_ARG_STRLEN.
      
      This will become especially dangerous for suid binaries and the default
      no limit for the stack size limit because those applications can be
      tricked to consume a large portion of the stack and a single glibc call
      could jump over the guard page. These attacks are not theoretical,
      unfortunatelly.
      
      Make those attacks less probable by increasing the stack guard gap
      to 1MB (on systems with 4k pages; but make it depend on the page size
      because systems with larger base pages might cap stack allocations in
      the PAGE_SIZE units) which should cover larger alloca() and VLA stack
      allocations. It is obviously not a full fix because the problem is
      somehow inherent, but it should reduce attack space a lot.
      
      One could argue that the gap size should be configurable from userspace,
      but that can be done later when somebody finds that the new 1MB is wrong
      for some special case applications.  For now, add a kernel command line
      option (stack_guard_gap) to specify the stack gap size (in page units).
      
      Implementation wise, first delete all the old code for stack guard page:
      because although we could get away with accounting one extra page in a
      stack vma, accounting a larger gap can break userspace - case in point,
      a program run with "ulimit -S -v 20000" failed when the 1MB gap was
      counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK
      and strict non-overcommit mode.
      
      Instead of keeping gap inside the stack vma, maintain the stack guard
      gap as a gap between vmas: using vm_start_gap() in place of vm_start
      (or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few
      places which need to respect the gap - mainly arch_get_unmapped_area(),
      and and the vma tree's subtree_gap support for that.
      Original-patch-by: default avatarOleg Nesterov <oleg@redhat.com>
      Original-patch-by: default avatarMichal Hocko <mhocko@suse.com>
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Tested-by: Helge Deller <deller@gmx.de> # parisc
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1be7107f
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 1132d5e7
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Stream of fixes has slowed down, only a few this week:
      
         - Some DT fixes for Allwinner platforms, and addition of a clock to
           the R_CCU clock controller that had been missed.
      
         - A couple of small DT fixes for am335x-sl50"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        arm64: allwinner: a64: Add PLL_PERIPH0 clock to the R_CCU
        ARM: sunxi: h3-h5: Add PLL_PERIPH0 clock to the R_CCU
        ARM: dts: am335x-sl50: Fix cannot claim requested pins for spi0
        ARM: dts: am335x-sl50: Fix card detect pin for mmc1
        arm64: allwinner: h5: Remove syslink to shared DTSI
        ARM: sunxi: h3/h5: fix the compatible of R_CCU
      1132d5e7
    • Ruslan Bilovol's avatar
      usb: gadget: add f_uac1 variant based on a new u_audio api · 0591bc23
      Ruslan Bilovol authored
      This patch adds a new function 'f_uac1'
      (f_uac1 with virtual "ALSA card") that
      uses recently created u_audio API. Comparing
      to legacy f_uac1 function implementation it
      doesn't require any real Audio codec to be
      present on the device. In f_uac1 audio
      streams are simply sinked to and sourced
      from a virtual ALSA sound card created
      using u_audio API.
      
      Legacy f_uac1 approach is to write audio
      samples directly to existing ALSA sound
      card
      
      f_uac1 approach is more generic/flexible
      one - create an ALSA sound card that
      represents USB Audio function and allows to
      be used by userspace application that
      may choose to do whatever it wants with the
      data received from the USB Host and choose
      to provide whatever it wants as audio data
      to the USB Host.
      
      f_uac1 also has capture support (gadget->host)
      thanks to easy implementation via u_audio.
      By default, capture interface has 48000kHz/2ch
      configuration, same as playback channel has.
      
      f_uac1 descriptors naming convention
      uses f_uac2 driver naming convention that
      makes it more common and meaningful.
      
      Comparing to f_uac1_legacy, the f_uac1 doesn't
      have volume/mute functionality. This is because
      the f_uac1 volume/mute feature unit was dummy
      implementation since that driver creation (2009)
      and never had any real volume control or mute
      functionality, so there is no any difference
      here.
      
      Since f_uac1 functionality, exposed
      interface to userspace (virtual ALSA card),
      input parameters are so different comparing
      to f_uac1_legacy, that there is no any
      reason to keep them in the same file/module,
      and separate function was created.
      
      g_audio can be built using one of existing
      UAC functions (f_uac1, f_uac1_legacy or f_uac2)
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      0591bc23
    • Ruslan Bilovol's avatar
      usb: gadget: function: make current f_uac1 implementation legacy · d355339e
      Ruslan Bilovol authored
      Before introducing new f_uac1 function (with virtual
      ALSA card) make current implementation legacy.
      
      This includes renaming of existing files, some
      variables, config options and documentation
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      d355339e
    • Ruslan Bilovol's avatar
      usb: gadget: f_uac2: split out audio core · eb9fecb9
      Ruslan Bilovol authored
      Abstract the peripheral side ALSA sound card code from
      the f_uac2 function into a component that can be called
      by various functions, so the various flavors can be split
      apart and selectively reused.
      
      Visible changes:
       - add uac_params structure to pass audio paramteres for
         g_audio_setup
       - make ALSA sound card's name configurable
       - add [in/out]_ep_maxpsize
       - allocate snd_uac_chip structure during g_audio_setup
       - add u_audio_[start/stop]_[capture/playback] functions
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      eb9fecb9
    • Ruslan Bilovol's avatar
      usb: gadget: f_uac2: remove platform driver/device creation · 7158b57a
      Ruslan Bilovol authored
      Simplify f_uac2 by removing platform driver/device
      creation; use composite's usb_gadget device as
      parent for sound card and for debug prints.
      This removes extra layer of code without any functional
      change.
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      7158b57a
    • Ruslan Bilovol's avatar
      usb: gadget: function: f_uac1: implement get_alt() · 1fc4926d
      Ruslan Bilovol authored
      After commit 7e4da3fc ("usb: gadget: composite:
      Test get_alt() presence instead of set_alt()") f_uac1
      function became broken because it doesn't have
      get_alt() callback implementation and composite
      framework never set altsetting 1 for audiostreaming
      interface. On host site it looks like:
      
       [424339.017711] 21:1:1: usb_set_interface failed (-32)
      
      Since host can't set altsetting 1, it can't start
      playing audio.
      
      In order to fix it implemented get_alt along with
      minor improvements (error conditions checking)
      similar to what existing f_uac2 has.
      
      Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      1fc4926d
    • Alexandre Belloni's avatar
      usb: gadget: udc: atmel: Remove unnecessary macros · d423b965
      Alexandre Belloni authored
      commit 46ddd79e ("usb: gadget: udc: atmel: Remove AVR32 bits from the
      driver") left the accessor macros introduced by commit a3dd3bef ("usb:
      gadget: atmel_usba: use endian agnostic IO on ARM"). They can now be
      removed.
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      d423b965
    • Srinath Mannam's avatar
      usb: gadget: bdc: 64-bit pointer capability check · c8e4e5bd
      Srinath Mannam authored
      Corrected the register to check the 64-bit pointer
      capability state. 64-bit pointer implementation capability
      was checking in wrong register, which causes the BDC
      enumeration failure in 64-bit memory address.
      
      Fixes: efed421a ("usb: gadget: Add UDC driver for
      Broadcom USB3.0 device controller IP BDC")
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarSrinath Mannam <srinath.mannam@broadcom.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      c8e4e5bd
    • Olof Johansson's avatar
      Merge tag 'sunxi-fixes-for-4.12' of... · a1858df9
      Olof Johansson authored
      Merge tag 'sunxi-fixes-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes
      
      Allwinner fixes for 4.12
      
      A few fixes around the PRCM support that got in 4.12 with a wrong
      compatible, and a missing clock in the binding.
      
      * tag 'sunxi-fixes-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
        arm64: allwinner: a64: Add PLL_PERIPH0 clock to the R_CCU
        ARM: sunxi: h3-h5: Add PLL_PERIPH0 clock to the R_CCU
        arm64: allwinner: h5: Remove syslink to shared DTSI
        ARM: sunxi: h3/h5: fix the compatible of R_CCU
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      a1858df9
    • Olof Johansson's avatar
      Merge tag 'omap-for-v4.12/fixes-sl50' of... · 51b6e281
      Olof Johansson authored
      Merge tag 'omap-for-v4.12/fixes-sl50' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Two fixes for am335x-sl50 to fix a boot time error
      for claiming SPI pins, and to fix a SDIO card detect
      pin for production version of the device.
      
      * tag 'omap-for-v4.12/fixes-sl50' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: am335x-sl50: Fix cannot claim requested pins for spi0
        ARM: dts: am335x-sl50: Fix card detect pin for mmc1
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      51b6e281
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 3696e4f0
      Linus Torvalds authored
      Pull virtio bugfix from Michael Tsirkin:
       "It turns out balloon does not handle IOMMUs correctly. We should fix
        that at some point, for now let's just disable this configuration"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_balloon: disable VIOMMU support
      3696e4f0
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 7d62d947
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two driver bugfixes"
      
      * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: ismt: fix wrong device address when unmap the data buffer
        i2c: rcar: use correct length when unmapping DMA
      7d62d947
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · b3ee4edd
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
      
       - Three highmem fixes:
          + Fixed mapping initialization
          + Adjust the pkmap location
          + Ensure we use at most one page for PTEs
      
       - Fix makefile dependencies for .its targets to depend on vmlinux
      
       - Fix reversed condition in BNEZC and JIALC software branch emulation
      
       - Only flush initialized flush_insn_slot to avoid NULL pointer
         dereference
      
       - perf: Remove incorrect odd/even counter handling for I6400
      
       - ftrace: Fix init functions tracing
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: .its targets depend on vmlinux
        MIPS: Fix bnezc/jialc return address calculation
        MIPS: kprobes: flush_insn_slot should flush only if probe initialised
        MIPS: ftrace: fix init functions tracing
        MIPS: mm: adjust PKMAP location
        MIPS: highmem: ensure that we don't use more than one page for PTEs
        MIPS: mm: fixed mappings: correct initialisation
        MIPS: perf: Remove incorrect odd/even counter handling for I6400
      b3ee4edd
  3. 18 Jun, 2017 7 commits
  4. 17 Jun, 2017 7 commits
  5. 16 Jun, 2017 9 commits