1. 13 7月, 2006 9 次提交
    • A
      [PATCH] ide: fix Jmicron support · 15e0c694
      Alan Cox 提交于
      Prior to 2.6.18rc1 you could install with devices on a JMicron chipset
      using the "all-generic-ide" option. As of this kernel the AHCI driver
      grabs the controller and rams it into AHCI mode losing the PATA ports
      and making CD drives and the like vanish. The all-generic-ide option
      fails because the AHCI driver grabbed the PCI device and reconfigured
      it.
      
      To fix this three things are needed.
      
      #1 We must put the chip into dual function mode
      #2 The AHCI driver must grab only function 0 (already in your rc1 tree)
      #3 Something must grab the PATA ports
      
      The attached patch is the minimal risk edition of this. It puts the chip
      into dual function mode so that AHCI will grab the SATA ports without
      losing the PATA ports. To keep the risk as low as possible the third
      patch adds the PCI identifiers for the PATA port and the FN check to the
      ide-generic driver. There is a more featured jmicron driver on its way
      but that adds risk and the ide-generic support is sufficient to install
      and run a system.
      
      The actual chip setup done by the quirk is the precise setup recommended
      by the vendor.
      
      (The JMB368 appears only in the ide-generic entry as it has no AHCI so
      does not need the quirk)
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Acked-by: NJeff Garzik <jgarzik@pobox.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      15e0c694
    • C
      [PATCH] Make cpu_relax() imply barrier() on all arches · f6dc8c5b
      Chase Venters 提交于
      During the recent discussion of taking 'volatile' off of the spinlock, I
      noticed that while most arches #define cpu_relax() such that it implies
      barrier(), some arches define cpu_relax() to be empty.
      
      This patch changes the definition of cpu_relax() for frv, h8300, m68knommu,
      sh, sh64, v850 and xtensa from an empty while(0) to the compiler barrier().
      Signed-off-by: NChase Venters <chase.venters@clientec.com>
      Acked-by: NArjan van de Ven <arjan@Linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f6dc8c5b
    • I
      [PATCH] lockdep: HPET/RTC fix · 0f749646
      Ingo Molnar 提交于
      Joseph Fannin reported that hpet_rtc_interrupt() enables hardirqs
      in irq context:
      
      [   25.628000]  [<c014af4e>] trace_hardirqs_on+0xce/0x200
      [   25.628000]  [<c036cf21>] _spin_unlock_irq+0x31/0x70
      [   25.628000]  [<c0296584>] rtc_get_rtc_time+0x44/0x1a0
      [   25.628000]  [<c01198bb>] hpet_rtc_interrupt+0x21b/0x280
      [   25.628000]  [<c0161141>] handle_IRQ_event+0x31/0x70
      [   25.628000]  [<c0162d37>] handle_edge_irq+0xe7/0x210
      [   25.628000]  [<c0106192>] do_IRQ+0x92/0x120
      [   25.628000]  [<c0104121>] common_interrupt+0x25/0x2c
      
      the call of rtc_get_rtc_time() is highly suspect. At a minimum we
      need the patch below to save/restore hardirq state.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Joseph Fannin <jfannin@gmail.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0f749646
    • A
      [PATCH] alloc_fdtable() expansion fix · a29b0b74
      Andrew Morton 提交于
      We're supposed to go the next power of two if nfds==nr.
      
      Of `nr', not of `nfsd'.
      
      Spotted by Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a29b0b74
    • E
      [PATCH] msi: Only keep one msi_desc in each slab entry. · ec572e3f
      Eric W. Biederman 提交于
      It looks like someone confused kmem_cache_create with a different allocator
      and was attempting to give it knowledge of how many cache entries there
      were.
      
      With the unfortunate result that each slab entry was big enough to hold
      every irq.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ec572e3f
    • A
      [PATCH] /fs/proc/: 'larger than buffer size' memory accessed by clear_user() · 0635170b
      Adam B. Jerome 提交于
      Address a potential 'larger than buffer size' memory access by
      clear_user().  Without this patch, this call to clear_user() can attempt to
      clear too many (tsz) bytes resulting in a wrong (-EFAULT) return code by
      read_kcore().
      Signed-off-by: NAdam B. Jerome <abj@novell.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0635170b
    • A
      [PATCH] lockdep: annotate the sysfs i_mutex to be a separate class · 232ba9db
      Arjan van de Ven 提交于
      sysfs has a different i_mutex lock order behavior for i_mutex than the
      other filesystems; sysfs i_mutex is called in many places with subsystem
      locks held.  At the same time, many of the VFS locking rules do not apply
      to sysfs at all (cross directory rename for example).  To untangle this
      mess (which gives false positives in lockdep), we're giving sysfs inodes
      their own class for i_mutex.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      232ba9db
    • K
      [PATCH] fix fdset leakage · d579091b
      Kirill Korotaev 提交于
      When found, it is obvious.  nfds calculated when allocating fdsets is
      rewritten by calculation of size of fdtable, and when we are unlucky, we
      try to free fdsets of wrong size.
      
      Found due to OpenVZ resource management (User Beancounters).
      Signed-off-by: NAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: NKirill Korotaev <dev@openvz.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d579091b
    • M
      [PATCH] Fix prctl privilege escalation and suid_dumpable (CVE-2006-2451) · abf75a50
      Marcel Holtmann 提交于
      Based on a patch from Ernie Petrides
      
      During security research, Red Hat discovered a behavioral flaw in core
      dump handling. A local user could create a program that would cause a
      core file to be dumped into a directory they would not normally have
      permissions to write to. This could lead to a denial of service (disk
      consumption), or allow the local user to gain root privileges.
      
      The prctl() system call should never allow to set "dumpable" to the
      value 2. Especially not for non-privileged users.
      
      This can be split into three cases:
      
        1) running as root -- then core dumps will already be done as root,
           and so prctl(PR_SET_DUMPABLE, 2) is not useful
      
        2) running as non-root w/setuid-to-root -- this is the debatable case
      
        3) running as non-root w/setuid-to-non-root -- then you definitely
           do NOT want "dumpable" to get set to 2 because you have the
           privilege escalation vulnerability
      
      With case #2, the only potential usefulness is for a program that has
      designed to run with higher privilege (than the user invoking it) that
      wants to be able to create root-owned root-validated core dumps. This
      might be useful as a debugging aid, but would only be safe if the program
      had done a chdir() to a safe directory.
      
      There is no benefit to a production setuid-to-root utility, because it
      shouldn't be dumping core in the first place. If this is true, then the
      same debugging aid could also be accomplished with the "suid_dumpable"
      sysctl.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      abf75a50
  2. 12 7月, 2006 11 次提交
  3. 11 7月, 2006 20 次提交