1. 23 2月, 2011 7 次提交
    • A
      ALSA: hdspm - prevent reading unitialized stack memory · 4ab69a2b
      Adrian Knoth 提交于
      Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit
      e68d3b31. I'm copying his text here:
      
      The SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO ioctl in hdspm.c allow unprivileged
      users to read uninitialized kernel stack memory, because several fields
      of the hdspm_config struct declared on the stack are not altered
      or zeroed before being copied back to the user.  This patch takes care
      of it.
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4ab69a2b
    • A
      ALSA: hdspm - fix sync check on AES32 · 7c4a95b5
      Adrian Knoth 提交于
      Fredrik Lingvall <fredrik.lingvall@gmail.com> has discovered wrong
      frequency and sync detection on AES32. According to him, the provided
      patch fixes these issues.
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7c4a95b5
    • A
      ALSA: hdspm - Remove input selector on MADIface · f6ea805f
      Adrian Knoth 提交于
      In contrast to the RME MADI card, coax/optical selection on the MADIface
      is done via a physical switch located at the breakout box. Obviously,
      the driver cannot switch ports in software.
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f6ea805f
    • A
      ALSA: hdspm - Fix DS/QS output channel mappings on RME MADI/MADIface · 01e96078
      Adrian Knoth 提交于
      Caused by two typos, no output channel mappings were assigned for
      MADI/MADIface at double/quad speed.
      
      The channel mapping is indeed identical to the single speed mapping, the
      cards will simply use the first N channels.
      Signed-off-by: NFlorian Faber <faber@faberman.de>
      Signed-off-by: NFredrik Lingvall <fredrik.lingvall@gmail.com>
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      01e96078
    • A
      ALSA: hdspm - Restrict channel count on RME AES/AES32 · 88fabbfc
      Adrian Knoth 提交于
      Without calling an appropriate rule, AES/AES32 cards would announce a
      theoretical channel count of 64 (HDSPM_MAX_CHANNELS), leading to the
      already known bug:
      
      [37422.640481] ------------[ cut here ]------------
      [37422.640487] WARNING: at sound/pci/rme9652/hdspm.c:5449
      snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm]()
      [37422.640489] Hardware name: PRIMERGY RX100 S6
      [37422.640490] BUG? (info->channel >= hdspm->max_channels_in)
      [37422.640492] Modules linked in: snd_hdspm snd_seq_midi ipmi_watchdog
      ipmi_poweroff ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 e1000e
      snd_rawmidi power_meter [last unloaded: snd_hdspm]
      [37422.640501] Pid: 22231, comm: jackd Tainted: G      D W
      2.6.36-gentoo-r5 #5
      [37422.640502] Call Trace:
      [37422.640508]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
      [37422.640511]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
      [37422.640514]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
      [37422.640518]  [<ffffffffa0055763>] snd_hdspm_ioctl+0x18f/0x202
      [snd_hdspm]
      [37422.640522]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
      [37422.640525]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
      [37422.640527]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
      [37422.640531]  [<ffffffff8105be6c>] ? __srcu_read_unlock+0x3b/0x59
      [37422.640533]  [<ffffffff81400bce>] snd_pcm_capture_ioctl1+0x20a/0x227
      [37422.640537]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
      [37422.640540]  [<ffffffff81400c15>] snd_pcm_capture_ioctl+0x2a/0x2e
      [37422.640543]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
      [37422.640546]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
      [37422.640549]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
      [37422.640552] ---[ end trace 0cd919cd68118082 ]---
      
      We already have all the right values in place, we simply have to inform
      the upper layers about this restriction.
      
      Note that snd_hdspm_hw_rule_rate_out_channels and
      snd_hdspm_hw_rule_rate_in_channels must not be called on AES32, because
      the channel count is always 16, no matter of the samplerate in use.
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      88fabbfc
    • A
      ALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32) · 483cee77
      Adrian Knoth 提交于
      Only RayDAT and AIO provide sane buffer pointers that can be used with
      HDSPM_BufferPositionMask, on all other cards, this would result in a
      wrong HW pointer leading to xruns and these messages:
      
      [260808.916788] BUG: pcmC0D0p:0, pos = 2976, buffer size = 1024, period size = 512
      [260808.961124] BUG: pcmC0D0c:0, pos = 4944, buffer size = 1024, period size = 512
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      483cee77
    • A
      ALSA: hpdsm - RME AES(32): Fix missing channel mappings · 432d2500
      Adrian Knoth 提交于
      On RME AES and AES(32), none of the required information
      (max_channels_in, max_channels_out, channel mappings, port names) was
      set, leading to the BUG below.
      
      This patch adds the missing bits, thus fixing the bug.
      
      125.058768] ------------[ cut here ]------------
      [  125.058773] WARNING: at sound/pci/rme9652/hdspm.c:5389
      snd_hdspm_ioctl+0x10c/0x1d8 [snd_hdspm]()
      [  125.058775] Hardware name: PRIMERGY RX100 S6
      [  125.058777] BUG? (info->channel >= hdspm->max_channels_out)
      [  125.058778] Modules linked in: ipmi_watchdog ipmi_poweroff ipmi_si
      ipmi_devintf ipmi_msghandler snd_hdspm power_meter e1000e snd_rawmidi
      i2c_i801
      [  125.058787] Pid: 3652, comm: audacity Tainted: G        W
      2.6.36-gentoo-r5 #5
      [  125.058788] Call Trace:
      [  125.058792]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
      [  125.058796]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
      [  125.058800]  [<ffffffffa006761a>] snd_hdspm_ioctl+0x10c/0x1d8
      [snd_hdspm]
      [  125.058803]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
      [  125.058806]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
      [  125.058809]  [<ffffffff810c604c>] ? __do_fault+0x361/0x3a6
      [  125.058812]  [<ffffffff81400e23>] snd_pcm_playback_ioctl1+0x20a/0x227
      [  125.058815]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
      [  125.058818]  [<ffffffff81400e6a>] snd_pcm_playback_ioctl+0x2a/0x2e
      [  125.058821]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
      [  125.058824]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
      [  125.058827]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
      [  125.058830] ---[ end trace 5bddb08e5d4cbeb1 ]---
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NFlorian Faber <faber@faberman.de>
      Signed-off-by: NFredrik Lingvall <fredrik.lingvall@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      432d2500
  2. 27 1月, 2011 3 次提交
  3. 02 11月, 2010 1 次提交
  4. 25 9月, 2010 1 次提交
  5. 09 2月, 2010 2 次提交
  6. 04 12月, 2009 1 次提交
  7. 05 6月, 2009 1 次提交
  8. 05 2月, 2009 1 次提交
  9. 12 1月, 2009 1 次提交
  10. 18 12月, 2008 1 次提交
  11. 13 11月, 2008 1 次提交
  12. 25 8月, 2008 1 次提交
  13. 13 8月, 2008 1 次提交
  14. 24 4月, 2008 2 次提交
  15. 01 2月, 2008 2 次提交
  16. 16 10月, 2007 3 次提交
  17. 11 5月, 2007 2 次提交
  18. 06 3月, 2007 1 次提交
  19. 09 2月, 2007 2 次提交
  20. 20 12月, 2006 1 次提交
  21. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  22. 03 7月, 2006 1 次提交
  23. 23 6月, 2006 1 次提交
  24. 28 4月, 2006 1 次提交
  25. 29 3月, 2006 1 次提交