20 Oct, 2012

1 commit


11 Sep, 2012

1 commit


01 Aug, 2012

1 commit

  • Pull random subsystem patches from Ted Ts'o:
    "This patch series contains a major revamp of how we collect entropy
    from interrupts for /dev/random and /dev/urandom.

    The goal is to addresses weaknesses discussed in the paper "Mining
    your Ps and Qs: Detection of Widespread Weak Keys in Network Devices",
    by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman,
    which will be published in the Proceedings of the 21st Usenix Security
    Symposium, August 2012. (See https://factorable.net for more
    information and an extended version of the paper.)"

    Fix up trivial conflicts due to nearby changes in
    drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c}

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits)
    random: mix in architectural randomness in extract_buf()
    dmi: Feed DMI table to /dev/random driver
    random: Add comment to random_initialize()
    random: final removal of IRQF_SAMPLE_RANDOM
    um: remove IRQF_SAMPLE_RANDOM which is now a no-op
    sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op
    board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op
    isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out
    uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op
    drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op
    xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op
    n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op
    i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op
    input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op
    mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op
    ...

    Linus Torvalds
     

31 Jul, 2012

2 commits

  • There are two ways to create /sys/firmware/memmap/X sysfs:

    - firmware_map_add_early
    When the system starts, it is calledd from e820_reserve_resources()
    - firmware_map_add_hotplug
    When the memory is hot plugged, it is called from add_memory()

    But these functions are called without unifying value of end argument as
    below:

    - end argument of firmware_map_add_early() : start + size - 1
    - end argument of firmware_map_add_hogplug() : start + size

    The patch unifies them to "start + size". Even if applying the patch,
    /sys/firmware/memmap/X/end file content does not change.

    [akpm@linux-foundation.org: clarify comments]
    Signed-off-by: Yasuaki Ishimatsu
    Reviewed-by: Dave Hansen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasuaki Ishimatsu
     
  • efi_setup_pcdp_console() is called during boot to parse the HCDP/PCDP
    EFI system table and setup an early console for printk output. The
    routine uses ioremap/iounmap to setup access to the HCDP/PCDP table
    information.

    The call to ioremap is happening early in the boot process which leads
    to a panic on x86_64 systems:

    panic+0x01ca
    do_exit+0x043c
    oops_end+0x00a7
    no_context+0x0119
    __bad_area_nosemaphore+0x0138
    bad_area_nosemaphore+0x000e
    do_page_fault+0x0321
    page_fault+0x0020
    reserve_memtype+0x02a1
    __ioremap_caller+0x0123
    ioremap_nocache+0x0012
    efi_setup_pcdp_console+0x002b
    setup_arch+0x03a9
    start_kernel+0x00d4
    x86_64_start_reservations+0x012c
    x86_64_start_kernel+0x00fe

    This replaces the calls to ioremap/iounmap in efi_setup_pcdp_console()
    with calls to early_ioremap/early_iounmap which can be called during
    early boot.

    This patch was tested on an x86_64 prototype system which uses the
    HCDP/PCDP table for early console setup.

    Signed-off-by: Greg Pearson
    Acked-by: Khalid Aziz
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Pearson
     

25 Jul, 2012

1 commit


04 May, 2012

1 commit

  • Ben Hutchings pointed out that the validation in efivars was inadequate -
    most obviously, an entry with size 0 would server as a DoS against the
    kernel. Improve this based on his suggestions.

    Signed-off-by: Matthew Garrett
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     

01 May, 2012

1 commit

  • A common flaw in UEFI systems is a refusal to POST triggered by a malformed
    boot variable. Once in this state, machines may only be restored by
    reflashing their firmware with an external hardware device. While this is
    obviously a firmware bug, the serious nature of the outcome suggests that
    operating systems should filter their variable writes in order to prevent
    a malicious user from rendering the machine unusable.

    Signed-off-by: Matthew Garrett
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     

13 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
    ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
    ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
    ALSA: usb-audio: add Yamaha MOX6/MOX8 support
    ALSA: virtuoso: add S/PDIF input support for all Xonars
    ALSA: ice1724 - Support for ooAoo SQ210a
    ALSA: ice1724 - Allow card info based on model only
    ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
    ALSA: hdspm - Provide unique driver id based on card serial
    ASoC: Dynamically allocate the rtd device for a non-empty release()
    ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
    ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
    ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
    ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
    ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
    ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
    ALSA: hda/cirrus - support for iMac12,2 model
    ASoC: cx20442: add bias control over a platform provided regulator
    ALSA: usb-audio - Avoid flood of frame-active debug messages
    ALSA: snd-usb-us122l: Delete calls to preempt_disable
    mfd: Put WM8994 into cache only mode when suspending
    ...

    Fix up trivial conflicts in:
    - arch/arm/mach-s3c64xx/mach-crag6410.c:
    renamed speyside_wm8962 to tobermory, added littlemill right
    next to it
    - drivers/base/regmap/{regcache.c,regmap.c}:
    duplicate diff that had already come in with other changes in
    the regmap tree

    Linus Torvalds
     

09 Jan, 2012

1 commit

  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

07 Jan, 2012

2 commits


04 Jan, 2012

1 commit


16 Dec, 2011

1 commit


13 Dec, 2011

2 commits

  • Found one system with UEFI/iBFT, kernel does not detect the iBFT during
    iscsi_ibft module loading.

    Root cause: on x86 (UEFI), we are calling of find_ibft_region() much earlier
    - specifically in setup_arch() before ACPI is enabled.

    Try to split acpi checking code out and call that later

    At that time ACPI iBFT already get permanent mapped with ioremap.
    So isa_virt_to_bus() will get wrong phys from right virt address.
    We could just skip that phys address printing.

    For legacy one, print the found address early.

    -v2: update comments and description according to Konrad.
    -v3: fix problem about module use case that is found by Konrad.
    -v4: use acpi_get_table() instead of acpi_table_parse() to handle module use case that is found by Konrad again..
    Signed-off-by: Yinghai Lu
    Signed-off-by: Konrad Rzeszutek Wilk

    Yinghai Lu
     
  • Mark Brown
     

10 Dec, 2011

1 commit

  • Use min_t() macro instead of min() to fix a build warning:

    CC drivers/firmware/google/gsmi.o
    drivers/firmware/google/gsmi.c: In function ‘gsmi_get_variable’:
    drivers/firmware/google/gsmi.c:348: warning: comparison of distinct
    pointer types lacks a cast

    Signed-off-by: Maxin B. John
    Acked-By: Mike Waychison
    Signed-off-by: Greg Kroah-Hartman

    Maxin B. John
     

03 Dec, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Fix S3/S4 problem on machines with VREF-pin mute-LED
    ALSA: hda_intel - revert a quirk that affect VIA chipsets
    ALSA: hda - Avoid touching mute-VREF pin for IDT codecs
    firmware: Sigma: Fix endianess issues
    firmware: Sigma: Skip header during CRC generation
    firmware: Sigma: Prevent out of bounds memory access
    ALSA: usb-audio - Support for Roland GAIA SH-01 Synthesizer
    ASoC: Supply dcs_codes for newer WM1811 revisions
    ASoC: Error out if we can't generate a LRCLK at all for WM8994
    ASoC: Correct name of Speyside Main Speaker widget
    ASoC: skip resume of soc-audio devices without codecs
    ASoC: cs42l51: Fix off-by-one for reg_cache_size
    ASoC: drop support for PlayPaq with WM8510
    ASoC: mpc8610: tell the CS4270 codec that it's the master
    ASoC: cs4720: use snd_soc_cache_sync()
    ASoC: SAMSUNG: Fix build error
    ASoC: max9877: Update register if either val or val2 is changed
    ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET

    Linus Torvalds
     

29 Nov, 2011

7 commits


18 Nov, 2011

2 commits

  • This allows a backend to filter on the dmesg reason as well as the pstore
    reason. When ramoops is switched to pstore, this is needed since it has
    no interest in storing non-crash dmesg details.

    Drop pstore_write() as it has no users, and handling the "reason" here
    has no obviously correct value.

    Signed-off-by: Kees Cook
    Signed-off-by: Tony Luck

    Kees Cook
     
  • The buf_lock cannot be held while populating the inodes, so make the backend
    pass forward an allocated and filled buffer instead. This solves the following
    backtrace. The effect is that "buf" is only ever used to notify the backends
    that something was written to it, and shouldn't be used in the read path.

    To replace the buf_lock during the read path, isolate the open/read/close
    loop with a separate mutex to maintain serialized access to the backend.

    Note that is is up to the pstore backend to cope if the (*write)() path is
    called in the middle of the read path.

    [ 59.691019] BUG: sleeping function called from invalid context at .../mm/slub.c:847
    [ 59.691019] in_atomic(): 0, irqs_disabled(): 1, pid: 1819, name: mount
    [ 59.691019] Pid: 1819, comm: mount Not tainted 3.0.8 #1
    [ 59.691019] Call Trace:
    [ 59.691019] [] __might_sleep+0xc3/0xca
    [ 59.691019] [] kmem_cache_alloc+0x32/0xf3
    [ 59.691019] [] ? __d_lookup_rcu+0x6f/0xf4
    [ 59.691019] [] alloc_inode+0x2a/0x64
    [ 59.691019] [] new_inode+0x18/0x43
    [ 59.691019] [] pstore_get_inode.isra.1+0x11/0x98
    [ 59.691019] [] pstore_mkfile+0xae/0x26f
    [ 59.691019] [] ? kmem_cache_free+0x19/0xb1
    [ 59.691019] [] ? ida_get_new_above+0x140/0x158
    [ 59.691019] [] ? __init_rwsem+0x1e/0x2c
    [ 59.691019] [] ? inode_init_always+0x111/0x1b0
    [ 59.691019] [] ? should_resched+0xd/0x27
    [ 59.691019] [] ? _cond_resched+0xd/0x21
    [ 59.691019] [] pstore_get_records+0x52/0xa7
    [ 59.691019] [] pstore_fill_super+0x7d/0x91
    [ 59.691019] [] mount_single+0x46/0x82
    [ 59.691019] [] pstore_mount+0x15/0x17
    [ 59.691019] [] ? pstore_get_inode.isra.1+0x98/0x98
    [ 59.691019] [] mount_fs+0x5a/0x12d
    [ 59.691019] [] ? alloc_vfsmnt+0xa4/0x14a
    [ 59.691019] [] vfs_kern_mount+0x4f/0x7d
    [ 59.691019] [] do_kern_mount+0x34/0xb2
    [ 59.691019] [] do_mount+0x5fc/0x64a
    [ 59.691019] [] ? strndup_user+0x2e/0x3f
    [ 59.691019] [] sys_mount+0x66/0x99
    [ 59.691019] [] sysenter_do_call+0x12/0x26

    Signed-off-by: Kees Cook
    Signed-off-by: Tony Luck

    Kees Cook
     

16 Nov, 2011

1 commit

  • The current implementation of dmi_name_in_vendors() is an invitation to
    lazy coding and false positives [1]. Searching for a string in 8 know
    what you're looking for, so you should know where to look. strstr isn't
    fast, especially when it fails, so we should avoid calling it when it
    just can't succeed.

    Looking at the current users of the function, it seems clear to me that
    they are looking for a system or board vendor name, so let's limit
    dmi_name_in_vendors to these two DMI fields. This much better matches
    the function name, BTW.

    [1] We currently have code looking for short names in DMI data, such as
    "IBM", "ASUS" or "Acer". I let you guess what will happen the day other
    vendors ship products named, for example, "SCHREIBMEISTER", "PEGASUS" or
    "Acerola".

    Signed-off-by: Jean Delvare
    Cc: Andi Kleen
    Cc: Jesse Barnes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

06 Nov, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (45 commits)
    [SCSI] Fix block queue and elevator memory leak in scsi_alloc_sdev
    [SCSI] scsi_dh_alua: Fix the time inteval for alua rtpg commands
    [SCSI] scsi_transport_iscsi: Fix documentation os parameter
    [SCSI] mv_sas: OCZ RevoDrive3 & zDrive R4 support
    [SCSI] libfc: improve flogi retries to avoid lport stuck
    [SCSI] libfc: avoid exchanges collision during lport reset
    [SCSI] libfc: fix checking FC_TYPE_BLS
    [SCSI] edd: Treat "XPRS" host bus type the same as "PCI"
    [SCSI] isci: overriding max_concurr_spinup oem parameter by max(oem, user)
    [SCSI] isci: revert bcn filtering
    [SCSI] isci: Fix hard reset timeout conditions.
    [SCSI] isci: No need to manage the pending reset bit on pending requests.
    [SCSI] isci: Remove redundant isci_request.ttype field.
    [SCSI] isci: Fix task management for SMP, SATA and on dev remove.
    [SCSI] isci: No task_done callbacks in error handler paths.
    [SCSI] isci: Handle task request timeouts correctly.
    [SCSI] isci: Fix tag leak in tasks and terminated requests.
    [SCSI] isci: Immediately fail I/O to removed devices.
    [SCSI] isci: Lookup device references through requests in completions.
    [SCSI] ipr: add definitions for additional adapter
    ...

    Linus Torvalds
     

02 Nov, 2011

1 commit


01 Nov, 2011

1 commit


31 Oct, 2011

1 commit

  • PCI Express devices will return "XPRS" host bus type during BIOS EDD
    call. "XPRS" should be treated just like "PCI" so that the proper
    pci_dev symlink will be created. Scripts such as fcoe_edd.sh will
    then work correctly.

    Signed-off-by: Michael Chan
    Reviewed-by: Matt Domsch
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Michael Chan
     

13 Oct, 2011

1 commit


17 Aug, 2011

1 commit

  • pstore was using mutex locking to protect read/write access to the
    backend plug-ins. This causes problems when pstore is executed in
    an NMI context through panic() -> kmsg_dump().

    This patch changes the mutex to a spin_lock_irqsave then also checks to
    see if we are in an NMI context. If we are in an NMI and can't get the
    lock, just print a message stating that and blow by the locking.

    All this is probably a hack around the bigger locking problem but it
    solves my current situation of trying to sleep in an NMI context.

    Tested by loading the lkdtm module and executing a HARDLOCKUP which
    will cause the machine to panic inside the nmi handler.

    Signed-off-by: Don Zickus
    Acked-by: Matthew Garrett
    Signed-off-by: Tony Luck

    Don Zickus
     

09 Aug, 2011

1 commit

  • Modify function parameter type to match expected type. Fixes a
    build warning:

    drivers/firmware/google/gsmi.c:473: warning: initialization from incompatible pointer type

    Signed-off-by: Randy Dunlap
    Cc: Mike Waychison
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

03 Aug, 2011

2 commits


02 Aug, 2011

1 commit

  • * 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    efivars: Introduce PSTORE_EFI_ATTRIBUTES
    efivars: Use string functions in pstore_write
    efivars: introduce utf16_strncmp
    efivars: String functions
    efi: Add support for using efivars as a pstore backend
    pstore: Allow the user to explicitly choose a backend
    pstore: Make "part" unsigned
    pstore: Add extra context for writes and erases
    pstore: Extend API for more flexibility in new backends

    Linus Torvalds