17 Sep, 2010

12 commits


16 Sep, 2010

5 commits


15 Sep, 2010

19 commits

  • Some pcnet_cs compatible cards require an exact 16-lines match
    of the ioport areas specified in CIS, but set the "iolines"
    value in the CIS incorrectly. We can easily work around this
    issue -- same as we do in serial_cs -- by first trying setting
    iolines to the CIS-specified value, and then trying a 16-line
    match.

    Reported-and-tested-by: Wolfram Sang
    Hardware-supplied-by: Jochen Frieling
    CC: netdev@vger.kernel.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • As the iomem / ioport setup differs per device, it is much better
    to print out the device instead of the socket.

    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • We shouldn't overwrite pre-set values, and we should also
    set the port address to the beginning, and not the end of
    the 8-port range.

    CC: linux-serial@vger.kernel.org
    Reported-by: Komuro
    Hardware-supplied-by: Jochen Frieling
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • This cut-and-paste bug was caused by rewriting the register dump
    code to use only a single printk per line of output.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This tripped up a driver (not yet committed to git). Fix it now.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • During context switch, save and restore a couple of additional bits of
    tilegx user state that can be persistently modified by userspace.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Rather than just using pt_regs, it now contains the actual saved
    state explicitly, similar to pt_regs. By doing it this way, we
    provide a cleaner API for userspace (or equivalently, we avoid the
    need for libc to provide its own definition of sigcontext).

    While we're at it, move PT_FLAGS_xxx to where they are not visible
    from userspace. And always pass siginfo and mcontext to signal
    handlers, even if they claim they don't need it, since sometimes
    they actually try to use it anyway in practice.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • The sys_execve() implementation was properly const-ified but not
    the declaration, the syscall wrappers, or the compat version.
    This change completes the constification process.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • The texture base address registers are in units of 256 bytes.
    The original CS checker treated these offsets as bytes, so the
    original check was wrong. I fixed the units in a patch during
    the 2.6.36 cycle, but this ended up breaking some existing
    userspace (probably due to a bug in either userspace texture allocation
    or the drm texture mipmap checker). So for now, until we come
    up with a better fix, just warn if the mipmap size it too large.
    This will keep existing userspace working and it should be just
    as safe as before when we were checking the wrong units. These
    are GPU MC addresses, so if they fall outside of the VRAM or
    GART apertures, they end up at the GPU default page, so this should
    be safe from a security perspective.

    v2: Just disable the warning. It just spams the log and there's
    nothing the user can do about it.

    Signed-off-by: Alex Deucher
    Cc: Jerome Glisse
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • * ssh://master.kernel.org/home/hpa/tree/sec:
    x86-64, compat: Retruncate rax after ia32 syscall entry tracing
    x86-64, compat: Test %rax for the syscall number, not %eax
    compat: Make compat_alloc_user_space() incorporate the access_ok()

    Linus Torvalds
     
  • Fix up the IRQ names for the MN10300 on-chip serial ports in the driver as
    request_interrupt() no longer allows names containing slashes, giving a warning
    like the following if one is encountered:

    ------------[ cut here ]------------
    WARNING: at fs/proc/generic.c:323 __xlate_proc_name+0x62/0x7c()
    name 'ttySM0/Rx'

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • * git://git.infradead.org/mtd-2.6:
    mtd: pxa3xx: fix build error when CONFIG_MTD_PARTITIONS is not defined
    mtd: mxc_nand: configure pages per block for v2 controller
    mtd: OneNAND: Fix loop hang when DMA error at Samsung SoCs
    mtd: OneNAND: Fix 2KiB pagesize handling at Samsung SoCs
    mtd: Blackfin NFC: fix invalid free in remove()
    mtd: Blackfin NFC: fix build error after nand_scan_ident() change
    mxc_nand: Do not do byte accesses to the NFC buffer.

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: fix hiddev's use of usb_find_interface
    HID: fixup blacklist entry for Asus T91MT
    HID: add device ID for new Asus Multitouch Controller
    HID: add no-get quirk for eGalax touch controller
    HID: Add quirk for eGalax touch controler.
    HID: add support for another BTC Emprex remote control
    HID: Set Report ID properly for Output reports on the Control endpoint.
    HID: Kanvus Note A5 tablet needs HID_QUIRK_MULTI_INPUT
    HID: Add support for chicony multitouch screens.

    Linus Torvalds
     
  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    SUNRPC: Fix the NFSv4 and RPCSEC_GSS Kconfig dependencies
    statfs() gives ESTALE error
    NFS: Fix a typo in nfs_sockaddr_match_ipaddr6
    sunrpc: increase MAX_HASHTABLE_BITS to 14
    gss:spkm3 miss returning error to caller when import security context
    gss:krb5 miss returning error to caller when import security context
    Remove incorrect do_vfs_lock message
    SUNRPC: cleanup state-machine ordering
    SUNRPC: Fix a race in rpc_info_open
    SUNRPC: Fix race corrupting rpc upcall
    Fix null dereference in call_allocate

    Linus Torvalds
     
  • Tavis Ormandy pointed out that do_io_submit does not do proper bounds
    checking on the passed-in iocb array:

           if (unlikely(nr < 0))
                   return -EINVAL;

           if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))
                   return -EFAULT;                      ^^^^^^^^^^^^^^^^^^

    The attached patch checks for overflow, and if it is detected, the
    number of iocbs submitted is scaled down to a number that will fit in
    the long.  This is an ok thing to do, as sys_io_submit is documented as
    returning the number of iocbs submitted, so callers should handle a
    return value of less than the 'nr' argument passed in.

    Reported-by: Tavis Ormandy
    Signed-off-by: Jeff Moyer
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • cifs_get_smb_ses must be called on a server pointer on which it holds an
    active reference. It first does a search for an existing SMB session. If
    it finds one, it'll put the server reference and then try to ensure that
    the negprot is done, etc.

    If it encounters an error at that point then it'll return an error.
    There's a potential problem here though. When cifs_get_smb_ses returns
    an error, the caller will also put the TCP server reference leading to a
    double-put.

    Fix this by having cifs_get_smb_ses only put the server reference if
    it found an existing session that it could use and isn't returning an
    error.

    Cc: stable@kernel.org
    Reviewed-by: Suresh Jayaraman
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • In commit d4d6715, we reopened an old hole for a 64-bit ptracer touching a
    32-bit tracee in system call entry. A %rax value set via ptrace at the
    entry tracing stop gets used whole as a 32-bit syscall number, while we
    only check the low 32 bits for validity.

    Fix it by truncating %rax back to 32 bits after syscall_trace_enter,
    in addition to testing the full 64 bits as has already been added.

    Reported-by: Ben Hawkes
    Signed-off-by: Roland McGrath
    Signed-off-by: H. Peter Anvin

    Roland McGrath
     
  • On 64 bits, we always, by necessity, jump through the system call
    table via %rax. For 32-bit system calls, in theory the system call
    number is stored in %eax, and the code was testing %eax for a valid
    system call number. At one point we loaded the stored value back from
    the stack to enforce zero-extension, but that was removed in checkin
    d4d67150165df8bf1cc05e532f6efca96f907cab. An actual 32-bit process
    will not be able to introduce a non-zero-extended number, but it can
    happen via ptrace.

    Instead of re-introducing the zero-extension, test what we are
    actually going to use, i.e. %rax. This only adds a handful of REX
    prefixes to the code.

    Reported-by: Ben Hawkes
    Signed-off-by: H. Peter Anvin
    Cc:
    Cc: Roland McGrath
    Cc: Andrew Morton

    H. Peter Anvin
     
  • compat_alloc_user_space() expects the caller to independently call
    access_ok() to verify the returned area. A missing call could
    introduce problems on some architectures.

    This patch incorporates the access_ok() check into
    compat_alloc_user_space() and also adds a sanity check on the length.
    The existing compat_alloc_user_space() implementations are renamed
    arch_compat_alloc_user_space() and are used as part of the
    implementation of the new global function.

    This patch assumes NULL will cause __get_user()/__put_user() to either
    fail or access userspace on all architectures. This should be
    followed by checking the return value of compat_access_user_space()
    for NULL in the callers, at which time the access_ok() in the callers
    can also be removed.

    Reported-by: Ben Hawkes
    Signed-off-by: H. Peter Anvin
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Acked-by: Tony Luck
    Cc: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Fenghua Yu
    Cc: H. Peter Anvin
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: James Bottomley
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc:

    H. Peter Anvin
     

14 Sep, 2010

4 commits

  • There has been periodic evidence that LVDS, on at least some
    panels, prefers the dividers selected by the legacy pll algo.
    This patch forces the use of the legacy pll algo on RV620
    LVDS panels. The old behavior (new pll algo) can be selected
    by setting the new_pll module parameter to 1.

    Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=30029

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Not 100% sure this is due to BKL removal, its most likely a combination
    of that + userspace timing changes in udev/plymouth. The drm adds the sysfs
    device before the driver has completed internal loading, this causes udev
    to make the node and plymouth to open it before we've completed loading.

    The proper solution is to delay the sysfs manipulation until later in loading
    however this causes knock on issues with sysfs connector nodes, so we can use
    the global mutex to serialise loading and userspace opens.

    Reported-by: Toni Spets (hifi on #radeon)
    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • v2: Julien Cristau pointed out that @nondestructive results in
    double-negatives and confusion when trying to interpret the parameter,
    so use @force instead. Much easier to type as well. ;-)

    And fix the miscompilation of vmgfx reported by Sedat Dilek.

    Signed-off-by: Chris Wilson
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • My macbook infrared remote control was broken by commit
    bd25f4dd6972755579d0ea50d1a5ace2e9b00d1a ("HID: hiddev: use
    usb_find_interface, get rid of BKL").

    This device appears in dmesg as:
    apple 0003:05AC:8242.0001: hiddev0,hidraw0: USB HID v1.11 Device
    [Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.2-1/input0

    It stopped working as lircd was getting ENODEV when opening /dev/usb/hiddev0.

    AFAICS hiddev_driver is a dummy driver so usb_find_interface(&hiddev_driver)
    does not find anything.

    The device is associated with the usbhid driver, so let's do
    usb_find_interface(&hid_driver) instead.

    $ ls -l /sys/devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0/usb/hiddev0/device/driver
    lrwxrwxrwx 1 root root 0 2010-09-12 16:28 /sys/devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0/usb/hiddev0/device/driver -> ../../../../../../bus/usb/drivers/usbhid

    Signed-off-by: Guillaume Chazarain
    Signed-off-by: Jiri Kosina

    Guillaume Chazarain