1. 29 6月, 2017 2 次提交
  2. 27 6月, 2017 1 次提交
  3. 23 6月, 2017 1 次提交
  4. 22 6月, 2017 5 次提交
  5. 21 6月, 2017 3 次提交
  6. 20 6月, 2017 6 次提交
  7. 19 6月, 2017 4 次提交
    • H
      mm: larger stack guard gap, between vmas · 1be7107f
      Hugh Dickins 提交于
      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: NOleg Nesterov <oleg@redhat.com>
      Original-patch-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Tested-by: Helge Deller <deller@gmx.de> # parisc
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1be7107f
    • R
      usb: gadget: add f_uac1 variant based on a new u_audio api · 0591bc23
      Ruslan Bilovol 提交于
      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: NRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      0591bc23
    • R
      usb: gadget: function: make current f_uac1 implementation legacy · d355339e
      Ruslan Bilovol 提交于
      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: NRuslan Bilovol <ruslan.bilovol@gmail.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      d355339e
    • N
      block: remove bio_clone() and all references. · 9b10f6a9
      NeilBrown 提交于
      bio_clone() is no longer used.
      Only bio_clone_bioset() or bio_clone_fast().
      This is for the best, as bio_clone() used fs_bio_set,
      and filesystems are unlikely to want to use bio_clone().
      
      So remove bio_clone() and all references.
      This includes a fix to some incorrect documentation.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      9b10f6a9
  8. 16 6月, 2017 3 次提交
  9. 14 6月, 2017 1 次提交
  10. 13 6月, 2017 4 次提交
  11. 12 6月, 2017 2 次提交
  12. 11 6月, 2017 3 次提交
  13. 09 6月, 2017 5 次提交