27 Jul, 2010

1 commit

  • The _ADR object is used to provide OSPM with the address of one device on its
    parent bus. In course of finding ACPI handle for the corresponding PCI device,
    we will firstly evaluate the _ADR object and then compare the two addresses to
    see whether it is the target ACPI device. But for one PCI device(0000:00:00.0)
    under the PCI root bridge, the corresponding address will be constructed as
    zero.In such case maybe the ACPI device without _ADR object will be misdetected
    and then be used to create the relationship between PCI device and ACPI device.

    https://bugzilla.kernel.org/show_bug.cgi?id=16422

    Signed-off-by: Zhao Yakui
    Signed-off-by: Len Brown

    Zhao Yakui
     

26 Jul, 2010

4 commits

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI / Sleep: Allow the NVS saving to be skipped during suspend to RAM
    ACPI: create "processor.bm_check_disable" boot param
    ACPI: skip checking BM_STS if the BIOS doesn't ask for it
    ACPI: fix unused function warning
    ACPI: processor: fix processor_physically_present on UP
    ACPI video: fix string mismatch for Sony SR290 laptop
    ACPI battery: don't invoke power_supply_changed twice when battery is hot-added
    ACPI: handle systems which asynchoronously enable ACPI mode

    Linus Torvalds
     
  • This fixes the regression in 2.6.35-rcX where bluetooth network devices
    would fail to be deleted from sysfs, causing their destruction and
    recreation to fail. In addition this fixes the mac80211_hwsim driver
    where it would leave around sysfs files when the driver was removed.

    This problem is discussed at
    https://bugzilla.kernel.org/show_bug.cgi?id=16257

    The reason for the regression is that the network namespace support
    added to sysfs expects and requires that network devices be put in
    directories that can contain only network devices.

    Today get_device_parent almost provides that guarantee for all class
    devices, except for a specific exception when the parent of a class
    devices is a class device. It would be nice to simply remove that
    arguably incorrect special case, but apparently the input devices depend
    on it being there. So I have only removed it for class devices with
    network namespace support. Which today are the network devices.

    It has been suggested that a better fix would be to change the parent
    device from a class device to a bus device, which in the case of the
    bluetooth driver would change /sys/class/bluetooth to /sys/bus/bluetoth,
    I can not see how we would avoid significant userspace breakage if we
    were to make that change.

    Adding an extra directory in the path to the device will also be
    userspace visible but it is much less likely to break things.
    Everything is still accessible from /sys/class (for example), and it
    fixes two bugs. Adding an extra directory fixes a 3 year old regression
    introduced with the new sysfs layout that makes it impossible to rename
    bnep0 network devices to names that conflict with hci device attributes
    like hci_revsion. Adding an additional directory removes the new
    failure modes introduced by the network namespace code.

    If it weren't for the regession in the renaming of network devices I
    would figure out how to just make the sysfs code deal with this
    configuration of devices.

    In summary this patch fixes regressions by changing:
    "/sys/class/bluetooth/hci0/bnep0" to "/sys/class/bluetooth/hci0/net/bnep0".

    Reported-by: Johannes Berg
    Reported-by: Janusz Krzysztofik
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • virtio ring was changed to return an error code on OOM,
    but one caller was missed and still checks for vq->vring.num.
    The fix is just to check for
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell
    Tested-by: Chris Mason
    Cc: stable@kernel.org # .34.x
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin
     
  • Commit 3fea60261e73 ("Input: twl40300-keypad - fix handling of "all
    ground" rows") broke compilation as I managed to use non-existent
    keycodes.

    Reported-by: Arjan van de Ven
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

25 Jul, 2010

2 commits

  • Len Brown
     
  • Commit 2a6b69765ad794389f2fc3e14a0afa1a995221c2
    (ACPI: Store NVS state even when entering suspend to RAM) caused the
    ACPI suspend code save the NVS area during suspend and restore it
    during resume unconditionally, although it is known that some systems
    need to use acpi_sleep=s4_nonvs for hibernation to work. To allow
    the affected systems to avoid saving and restoring the NVS area
    during suspend to RAM and resume, introduce kernel command line
    option acpi_sleep=nonvs and make acpi_sleep=s4_nonvs work as its
    alias temporarily (add acpi_sleep=s4_nonvs to the feature removal
    file).

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16396 .

    Signed-off-by: Rafael J. Wysocki
    Reported-and-tested-by: tomas m
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     

24 Jul, 2010

3 commits


23 Jul, 2010

26 commits

  • nconfig segfaults when help text contains the character '%'. For a quick
    example, navigate to the kernel compression options and get the help for
    bzip2. Doing so triggers a call to mvwprintw() with a string containing
    '%' and no extra arguments to fill in the specifier's value. Fix this
    case by printing the literal string retrieved from the kconfig.

    #0 0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
    #1 0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
    #2 0x00002b52b623991b in _nc_printf_string () from
    /lib/libncursesw.so.5
    #3 0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
    #4 0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
    #5 0x00000000004151d8 in fill_window (win=0x21b64c0,
    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
    speed is intermediate.\nDecompression speed is slowest among the
    three. The kernel\nsize is about 10% smaller with bzip2, in
    comparison to gzip.\nBzip2 us"...)
    at scripts/kconfig/nconf.gui.c:229
    #6 0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
    title=0x157fa30 "Bzip2",
    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
    ratio and speed is intermediate.\nDecompression speed is
    slowest among the three. The kernel\nsize is about 10%
    smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
    at scripts/kconfig/nconf.gui.c:535
    #7 0x00000000004055b2 in show_help (menu=0x157f9d0)
    at scripts/kconfig/nconf.c:1257
    #8 0x0000000000405897 in conf_choice (menu=0x157f130)
    at scripts/kconfig/nconf.c:1321
    #9 0x0000000000405326 in conf (menu=0x157d130) at
    scripts/kconfig/nconf.c:1208
    #10 0x00000000004052e8 in conf (menu=0xb434a0) at
    scripts/kconfig/nconf.c:1203
    #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)

    Cc: Michal Marek
    Cc: Nir Tzachar
    Signed-off-by: Stephen Boyd
    Signed-off-by: Michal Marek

    Stephen Boyd
     
  • Benjamin Herrenschmidt
     
  • The .data..init_task output section was missing
    a load offset causing a popwerpc target to fail to boot.

    Sean MacLennan tracked it down to the definition of
    INIT_TASK_DATA_SECTION().

    There are only two users of INIT_TASK_DATA_SECTION()
    in the kernel today: cris and popwerpc.
    cris do not support relocatable kernels and is thus not
    impacted by this change.

    Fix INIT_TASK_DATA_SECTION() to specify load offset like
    all other output sections.

    Reported-by: Sean MacLennan
    Signed-off-by: Sam Ravnborg
    Signed-off-by: Benjamin Herrenschmidt

    Sam Ravnborg
     
  • Oooops... we missed these. We incorrectly converted strings
    used when parsing the device-tree on pseries, thus breaking
    access to drconf memory and hotplug memory.

    While at it, also revert some variable names that represent
    something the FW calls "lmb" and thus don't need to be converted
    to "memblock".

    Signed-off-by: Benjamin Herrenschmidt
    ---

    Benjamin Herrenschmidt
     
  • This adds some debug output to our MMU hash code to print out some
    useful debug data if the hypervisor refuses the insertion (which
    should normally never happen).

    Signed-off-by: Benjamin Herrenschmidt
    ---

    Benjamin Herrenschmidt
     
  • There's a couple of nasty bugs lurking in our huge page hashing code.

    First, we don't check the access permission atomically with setting
    the _PAGE_BUSY bit, which means that the PTE value we end up using
    for the hashing might be different than the one we have checked
    the access permissions for.

    We've seen cases where that leads us to try to use an invalidated
    PTE for hashing, causing all sort of "interesting" issues.

    Then, we also failed to set _PAGE_DIRTY on a write access.

    Finally, a minor tweak but we should return 0 when we find the
    PTE busy, in order to just re-execute the access, rather than 1
    which means going to do_page_fault().

    Signed-off-by: Benjamin Herrenschmidt
    ---

    Benjamin Herrenschmidt
     
  • Instead of adding _PAGE_PRESENT to the access permission mask
    in each low level routine independently, we add it once from
    hash_page().

    We also move the preliminary access check (the racy one before
    the PTE is locked) up so it applies to the huge page case. This
    duplicates code in __hash_page_huge() which we'll remove in a
    subsequent patch to fix a race in there.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • If the hypervisor gives us an error on a hugepage insert we panic. The
    normal page code already handles this by returning an error instead and we end
    calling low_hash_fault which will just kill the task if possible.

    The patch below does a similar thing for the hugepage case.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • Len Brown
     
  • processor.bm_check_disable=1" prevents Linux from checking BM_STS
    before entering C3-type cpu power states.

    This may be useful for a system running acpi_idle
    where the BIOS exports FADT C-states, _CST IO C-states,
    or _CST FFH C-states with the BM_STS bit set;
    while configuring the chipset to set BM_STS
    more frequently than perhaps is optimal.

    Note that such systems may have been developed
    using a tickful OS that would quickly clear BM_STS,
    rather than a tickless OS that may go for some time
    between checking and clearing BM_STS.

    Note also that an alternative for newer systems
    is to use the intel_idle driver, which always
    ignores BM_STS, relying Linux device drivers
    to register constraints explicitly via PM_QOS.

    https://bugzilla.kernel.org/show_bug.cgi?id=15886

    Signed-off-by: Len Brown

    Len Brown
     
  • It turns out that there is a bit in the _CST for Intel FFH C3
    that tells the OS if we should be checking BM_STS or not.

    Linux has been unconditionally checking BM_STS.
    If the chip-set is configured to enable BM_STS,
    it can retard or completely prevent entry into
    deep C-states -- as illustrated by turbostat:

    http://userweb.kernel.org/~lenb/acpi/utils/pmtools/turbostat/

    ref: Intel Processor Vendor-Specific ACPI Interface Specification
    table 4 "_CST FFH GAS Field Encoding"
    Bit 1: Set to 1 if OSPM should use Bus Master avoidance for this C-state

    https://bugzilla.kernel.org/show_bug.cgi?id=15886

    Signed-off-by: Len Brown

    Len Brown
     
  • make version 3.80 doesn't support "else ifdef" on the same line, also it
    doesn't support unindented nested constructs.

    Build fails with:
    Makefile:608: Extraneous text after `else' directive
    Makefile:611: *** only one `else' per conditional. Stop.

    This patch fixes the build for make 3.80.

    Cc: Ingo Molnar ,
    Cc: Borislav Petkov
    LKML-Reference:
    Signed-off-by: Conny Seidel
    Signed-off-by: Arnaldo Carvalho de Melo

    Conny Seidel
     
  • Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: synaptics - relax capability ID checks on newer hardware
    Input: twl40300-keypad - fix handling of "all ground" rows
    Input: gamecon - reference correct pad in gc_psx_command()
    Input: gamecon - reference correct input device in NES mode
    Input: w90p910_keypad - change platfrom driver name to 'nuc900-kpi'
    Input: i8042 - add Gigabyte Spring Peak to dmi_noloop_table
    Input: qt2160 - rename kconfig symbol name

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon/kms: add quirk to make HP DV5000 laptop resume
    drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl
    Fix ttm_page_alloc.c build breakage
    drm/radeon/kms: fix legacy LVDS dpms sequence
    drm/radeon/kms: drop taking lock around crtc lookup.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: talitos - fix bug in sg_copy_end_to_buffer

    Linus Torvalds
     
  • …/frob/linux-2.6-roland

    * 'x86/auditsyscall' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland:
    x86: auditsyscall: fix fastpath return value after reschedule

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    sysrq,kdb: Use __handle_sysrq() for kdb's sysrq function
    debug_core,kdb: fix kgdb_connected bit set in the wrong place
    Fix merge regression from external kdb to upstream kdb
    repair gdbstub to match the gdbserial protocol specification
    kdb: break out of kdb_ll() when command is terminated

    Linus Torvalds
     
  • The KEXEC_*_MEMORY_LIMITs are inclusive addresses. We define them as
    2Gs as that is what we allow mapping via TLBs. However, this should be
    2G - 1 to be inclusive, otherwise if we have >2G of memory in a system
    we fail to boot properly via kexec.

    Signed-off-by: Kumar Gala

    Kumar Gala
     
  • When parsing the objdump disassembly output we can have goto labels that
    are valid hex numbers and thus get confused with lines with machine
    code.

    Handle the common case of a label that has nothing after it and other
    cases where there is just source code by validating the resulting "ip".

    It is still possible that we find goto labels that are in the function
    address range, but only if they are located before the real address we
    should be OK.

    A change in the objdump output to have a clear marker separating
    addresses from the disassembly would come handy, but we would still have
    to deal with older versions.

    Reported-by: Gleb Natapov
    Cc: Frederic Weisbecker
    Cc: Gleb Natapov
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Fix the security problem in the CIFS filesystem DNS lookup code in which a
    malicious redirect could be installed by a random user by simply adding a
    result record into one of their keyrings with add_key() and then invoking a
    CIFS CFS lookup [CVE-2010-2524].

    This is done by creating an internal keyring specifically for the caching of
    DNS lookups. To enforce the use of this keyring, the module init routine
    creates a set of override credentials with the keyring installed as the thread
    keyring and instructs request_key() to only install lookup result keys in that
    keyring.

    The override is then applied around the call to request_key().

    This has some additional benefits when a kernel service uses this module to
    request a key:

    (1) The result keys are owned by root, not the user that caused the lookup.

    (2) The result keys don't pop up in the user's keyrings.

    (3) The result keys don't come out of the quota of the user that caused the
    lookup.

    The keyring can be viewed as root by doing cat /proc/keys:

    2a0ca6c3 I----- 1 perm 1f030000 0 0 keyring .dns_resolver: 1/4

    It can then be listed with 'keyctl list' by root.

    # keyctl list 0x2a0ca6c3
    1 key in keyring:
    726766307: --alswrv 0 0 dns_resolver: foo.bar.com

    Signed-off-by: David Howells
    Reviewed-and-Tested-by: Jeff Layton
    Acked-by: Steve French
    Signed-off-by: Linus Torvalds

    David Howells
     

22 Jul, 2010

4 commits