13 Nov, 2014

4 commits

  • The API function calls exported by the kernel crypto API for RNGs to
    be used by consumers are documented.

    Signed-off-by: Stephan Mueller
    Signed-off-by: Herbert Xu

    Stephan Mueller
     
  • The userspace interface of the kernel crypto API is documented with
    * a general explanation
    * a discussion of the memory in-place operation
    * the description of the message digest API
    * the description of the symmetric cipher API

    The documentation refers to libkcapi as a working example on how to use
    the kernel crypto API from user space.

    Signed-off-by: Stephan Mueller
    Signed-off-by: Herbert Xu

    Stephan Mueller
     
  • Add the crypto API documentation into the DocBook Makefile to allow it
    being compiled

    Signed-off-by: Stephan Mueller
    Signed-off-by: Herbert Xu

    Stephan Mueller
     
  • The design of the kernel crypto API as well as hints to program with
    the kernel crypto API are given.

    The documentation contains:
    * design aspects of crypto API
    * develper specific hints
    * references to the API function description
    * source code examples

    CC: Marek Vasut
    Signed-off-by: Stephan Mueller
    Signed-off-by: Herbert Xu

    Stephan Mueller
     

12 Nov, 2014

4 commits


10 Nov, 2014

12 commits

  • The system PM functions were unused when CONFIG_PM is unset. Let's move
    them inside CONFIG_PM_SLEEP to silence the compiler warning.

    Signed-off-by: Ulf Hansson
    Signed-off-by: Herbert Xu

    Ulf Hansson
     
  • The system PM functions were unused when CONFIG_PM is unset. Let's move
    them inside CONFIG_PM_SLEEP to silence the compiler warning.

    Signed-off-by: Ulf Hansson
    Signed-off-by: Herbert Xu

    Ulf Hansson
     
  • The kernel module drbg.ko is currently not loaded automatically when a
    DRBG is requested by a consumer. This is due to missing MODULE_ALIAS
    flags for each of the implemented DRBG types.

    This patch adds aliases for each of the 22 defined DRBGs.

    Signed-off-by: Stephan Mueller
    Signed-off-by: Herbert Xu

    Stephan Mueller
     
  • Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:
    - enable bpf syscall for compat
    - cpu_suspend fix when checking the idle state type
    - defconfig update

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: defconfig: update defconfig for 3.18
    arm64: compat: Enable bpf syscall
    arm64: psci: fix cpu_suspend to check idle state type for index

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "Another quiet week:

    - a fix to silence edma probe error on non-supported platforms from
    Arnd
    - a fix to enable the PL clock for Parallella, to make mainline
    usable with the SDK.
    - a somewhat verbose fix for the PLL clock tree on VF610
    - enabling of SD/MMC on one of the VF610-based boards (for testing)
    - a fix for i.MX where CONFIG_SPI used to be implicitly enabled and
    now needs to be added to the defconfig instead
    - another maintainer added for bcm2835: Lee Jones"

    * tag 'armsoc-for-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: dts: zynq: Enable PL clocks for Parallella
    dma: edma: move device registration to platform code
    ARM: dts: vf610: add SD node to cosmic dts
    MAINTAINERS: update bcm2835 entry
    ARM: imx: Fix the removal of CONFIG_SPI option
    ARM: imx: clk-vf610: define PLL's clock tree

    Linus Torvalds
     
  • Pull devicetree bugfix from Grant Likely:
    "One buffer overflow bug that shouldn't be left around"

    * 'devicetree/merge' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux:
    of: Fix overflow bug in string property parsing functions

    Linus Torvalds
     
  • Pull btrfs fix from Chris Mason:
    "It's a one liner for an error cleanup path that leads to crashes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup

    Linus Torvalds
     
  • Pull driver core fixes from Greg KH:
    "Here are 3 tiny fixes for 3.18-rc4.

    One fixes up a long-stading race condition in the driver core for
    removing directories in /sys/devices/virtual/ and the other 2 fix up
    the wording of a new Kconfig option that was added in 3.18-rc1"

    * tag 'driver-core-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP
    tiny: reverse logic for DISABLE_DEV_COREDUMP
    sysfs: driver core: Fix glue dir race condition by gdp_mutex

    Linus Torvalds
     
  • Pull staging driver fixes from Greg KH:
    "Here are some staging/iio fixes for 3.18-rc4.

    Nothing major, just a few bugfixes of things that have been reported"

    * tag 'staging-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging:iio:ade7758: Remove "raw" from channel name
    staging:iio:ade7758: Fix check if channels are enabled in prenable
    staging:iio:ade7758: Fix NULL pointer deref when enabling buffer
    iio: as3935: allocate correct iio_device size
    io: accel: kxcjk-1013: Fix iio_event_spec direction
    iio: tsl4531: Fix compiler error when CONFIG_PM_OPS is not defined
    iio: adc: mxs-lradc: Disable the clock on probe failure
    iio: st_sensors: Fix buffer copy
    staging:iio:ad5933: Drop "raw" from channel names
    staging:iio:ad5933: Fix NULL pointer deref when enabling buffer

    Linus Torvalds
     
  • Pull tty/serial fixes from Greg KH:
    "Here are some tiny serial/tty fixes for 3.18-rc4 that resolve some
    reported issues"

    * tag 'tty-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    tty: Fix pty master poll() after slave closes v2
    serial: of-serial: fix uninitialized kmalloc variable
    tty/vt: don't set font mappings on vc not supporting this
    tty: serial: 8250_mtk: Fix quot calculation
    tty: Prevent "read/write wait queue active!" log flooding
    tty: Fix high cpu load if tty is unreleaseable
    serial: Fix divide-by-zero fault in uart_get_divisor()

    Linus Torvalds
     
  • Pull USB fixes from Greg KH:
    "Here are some USB fixes for 3.18-rc4.

    Just a bunch of little fixes resolving reported issues and new device
    ids for existing drivers. Full details are in the shortlog"

    * tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
    USB: Update default usb-storage delay_use value in kernel-parameters.txt
    USB: cdc-acm: add quirk for control-line state requests
    phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
    USB: storage: Fix timeout in usb_stor_euscsi_init() and usb_stor_huawei_e220_init()
    USB: cdc-acm: only raise DTR on transitions from B0
    Revert "storage: Replace magic number with define in usb_stor_euscsi_init()"
    usb: core: notify disconnection when core detects disconnect
    usb: core: need to call usb_phy_notify_connect after device setup
    uas: Add US_FL_NO_ATA_1X quirk for 2 more Seagate models
    xhci: no switching back on non-ULT Haswell
    USB: quirks: enable device-qualifier quirk for yet another Elan touchscreen
    USB: quirks: enable device-qualifier quirk for another Elan touchscreen
    MAINTAINERS: Remove duplicate entry for usbip driver
    usb: storage: fix build warnings !CONFIG_PM
    usb: Remove references to non-existent PLAT_S5P symbol
    uas: Add NO_ATA_1X for VIA VL711 devices
    xhci: Disable streams on Asmedia 1042 xhci controllers
    USB: HWA: fix a warning message
    uas: Add US_FL_NO_ATA_1X quirk for 1 more Seagate model
    usb-storage: handle a skipped data phase
    ...

    Linus Torvalds
     

09 Nov, 2014

4 commits

  • The Parallella board comes with a U-Boot bootloader that loads one of
    two predefined FPGA bitstreams before booting the kernel. Both define an
    AXI interface to the on-board Epiphany processor.

    Enable clocks FCLK0..FCLK3 for the Programmable Logic by default.

    Otherwise accessing, e.g., the ESYSRESET register freezes the board,
    as seen with the Epiphany SDK tools e-reset and e-hw-rev, using /dev/mem.

    Cc: # 3.17.x
    Signed-off-by: Andreas Färber
    Acked-by: Michal Simek
    Signed-off-by: Olof Johansson

    Andreas Färber
     
  • Pull i2c bugfixes from Wolfram Sang:
    "One bigger cleanup (FSF address removal) and two bugfixes for I2C"

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: core: Dispose OF IRQ mapping at client removal time
    i2c: at91: don't account as iowait
    i2c: remove FSF address

    Linus Torvalds
     
  • Pull irq fixes from Thomas Gleixner:
    "Two fixlets for the armada SoC interrupt controller"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip: armada-370-xp: Fix MPIC interrupt handling
    irqchip: armada-370-xp: Fix MSI interrupt handling

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "For:
    - some regression fixes at the Remote Controller core and imon driver
    - a build fix for certain randconfigs with ir-hix5hd2
    - don't feed power to satellite system at ds3000 driver init

    It also contains some fixes for drivers added for Kernel 3.18:
    - some fixes at the new ISDB-S driver, and the corresponding bits to
    fix some descriptors for this Japanese TV standard at the DVB core
    - two warning cleanups for sp2 driver if PM is disabled
    - change the default mode for the new vivid driver"

    * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] sp2: sp2_init() can be static
    [media] dvb:tc90522: fix always-false expression
    [media] dvb-core: set default properties of ISDB-S
    [media] dvb:tc90522: fix stats report
    [media] vivid: default to single planar device instances
    [media] imon: fix other RC type protocol support
    [media] ir-hix5hd2 fix build warning
    [media] ds3000: fix LNB supply voltage on Tevii S480 on initialization
    [media] rc5-decoder: BZ#85721: Fix RC5-SZ decoding
    [media] rc-core: fix protocol_change regression in ir_raw_event_register

    Linus Torvalds
     

08 Nov, 2014

11 commits

  • Pull MIPS updates from Ralf Baechle:
    "This weeks' round of MIPS bug fixes for 3.18:

    - wire up the bpf syscall
    - fix TLB dump output for R3000 class TLBs
    - fix strnlen_user return value if no NUL character was found.
    - fix build with binutils 2.24.51+. While there is no binutils 2.25
    release yet, toolchains derived from binutils 2.24.51+ are already
    in common use.
    - the Octeon GPIO code forgot to offline GPIO IRQs.
    - fix build error for XLP.
    - fix possible BUG assertion with EVA for CMA"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: Fix build with binutils 2.24.51+
    MIPS: R3000: Fix debug output for Virtual page number
    MIPS: Fix strnlen_user() return value in case of overlong strings.
    MIPS: CMA: Do not reserve memory if not required
    MIPS: Wire up bpf syscall.
    MIPS/Xlp: Remove the dead function destroy_irq() to fix build error
    MIPS: Octeon: Make Octeon GPIO IRQ chip CPU hotplug-aware

    Linus Torvalds
     
  • Pull xfs fixes from Dave Chinner:
    "This update fixes a warning in the new pagecache_isize_extended() and
    updates some related comments, another fix for zero-range
    misbehaviour, and an unforntuately large set of fixes for regressions
    in the bulkstat code.

    The bulkstat fixes are large but necessary. I wouldn't normally push
    such a rework for a -rcX update, but right now xfsdump can silently
    create incomplete dumps on 3.17 and it's possible that even xfsrestore
    won't notice that the dumps were incomplete. Hence we need to get
    this update into 3.17-stable kernels ASAP.

    In more detail, the refactoring work I committed in 3.17 has exposed a
    major hole in our QA coverage. With both xfsdump (the major user of
    bulkstat) and xfsrestore silently ignoring missing files in the
    dump/restore process, incomplete dumps were going unnoticed if they
    were being triggered. Many of the dump/restore filesets were so small
    that they didn't evenhave a chance of triggering the loop iteration
    bugs we introduced in 3.17, so we didn't exercise the code
    sufficiently, either.

    We have already taken steps to improve QA coverage in xfstests to
    avoid this happening again, and I've done a lot of manual verification
    of dump/restore on very large data sets (tens of millions of inodes)
    of the past week to verify this patch set results in bulkstat behaving
    the same way as it does on 3.16.

    Unfortunately, the fixes are not exactly simple - in tracking down the
    problem historic API warts were discovered (e.g xfsdump has been
    working around a 20 year old bug in the bulkstat API for the past 10
    years) and so that complicated the process of diagnosing and fixing
    the problems. i.e. we had to fix bugs in the code as well as
    discover and re-introduce the userspace visible API bugs that we
    unwittingly "fixed" in 3.17 that xfsdump relied on to work correctly.

    Summary:

    - incorrect warnings about i_mutex locking in pagecache_isize_extended()
    and updates comments to match expected locking
    - another zero-range bug fix for stray file size updates
    - a bunch of fixes for regression in the bulkstat code introduced in
    3.17"

    * tag 'xfs-for-linus-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
    xfs: track bulkstat progress by agino
    xfs: bulkstat error handling is broken
    xfs: bulkstat main loop logic is a mess
    xfs: bulkstat chunk-formatter has issues
    xfs: bulkstat chunk formatting cursor is broken
    xfs: bulkstat btree walk doesn't terminate
    mm: Fix comment before truncate_setsize()
    xfs: rework zero range to prevent invalid i_size updates
    mm: Remove false WARN_ON from pagecache_isize_extended()
    xfs: Check error during inode btree iteration in xfs_bulkstat()
    xfs: bulkstat doesn't release AGI buffer on error

    Linus Torvalds
     
  • Pull regulator fixes from Mark Brown:
    "More changes than I'd like here, most of them for a single bug
    repeated in a bunch of drivers with data not being initialized
    correctly, plus a fix to lower the severity of a warning introduced in
    the last merge window which can legitimately go off so we don't want
    to alarm users excessively"

    * tag 'regulator-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
    regulator: s2mpa01: zero-initialize regulator match table array
    regulator: max8660: zero-initialize regulator match table array
    regulator: max77802: zero-initialize regulator match table
    regulator: max77686: zero-initialize regulator match table
    regulator: max1586: zero-initialize regulator match table array
    regulator: max77693: Fix use of uninitialized regulator config
    regulator: of: Lower the severity of the error with no container

    Linus Torvalds
     
  • Pull spi bugfixes from Mark Brown:
    "A couple of small driver fixes for v3.18, both quite problematic if
    you hit a use case that's affected"

    * tag 'spi-v3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
    spi: pxa2xx: toggle clocks on suspend if not disabled by runtime PM
    spi: fsl-dspi: Fix CTAR selection

    Linus Torvalds
     
  • The ENABLE_DEV_COREDUMP option is misleading as it implies that
    it gets the framework enabled, this isn't true it just allows it
    to get enabled if a driver needs it.

    Rename it to ALLOW_DEV_COREDUMP to better capture its semantics.

    Signed-off-by: Johannes Berg
    Reviewed-by: Josh Triplett
    Acked-by: Aristeu Rozanski
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • It's desirable for allnconfig and tinyconfig targets to result in the
    least amount of code possible. DISABLE_DEV_COREDUMP exists as a way to
    switch off DEV_COREDUMP regardless if any drivers select
    WANT_DEV_COREDUMP.

    This patch renames the option to ENABLE_DEV_COREDUMP and setting it to
    'n' (as in allnconfig or tinyconfig) will effectively disable device
    coredump.

    Cc: Josh Triplett
    Reviewed-by: Josh Triplett
    Signed-off-by: Aristeu Rozanski
    Reviewed-by: Johannes Berg
    Acked-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Aristeu Rozanski
     
  • Clients instantiated from OF get an IRQ mapping created at device
    registration time. Dispose the mapping when the client is removed.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org

    Laurent Pinchart
     
  • iowait is for blkio [1]. I2C shouldn't use it.

    [1] https://lkml.org/lkml/2014/11/3/317

    Signed-off-by: Wolfram Sang
    Acked-by: Ludovic Desroches
    Cc: stable@kernel.org

    Wolfram Sang
     
  • We have a central copy of the GPL for that. Some addresses were already
    outdated.

    Signed-off-by: Wolfram Sang

    Wolfram Sang
     
  • Back in 2010 the default usb-storage delay_use time was reduced from 5 to 1
    second (commit a4a47bc03fe520e95e0c4212bf97c86545fb14f9), but
    kernel-parameters.txt wasn't updated to reflect that.

    Signed-off-by: Mark Knibbs
    Signed-off-by: Greg Kroah-Hartman

    Mark Knibbs
     
  • There is a race condition when removing glue directory.
    It can be reproduced in following test:

    path 1: Add first child device
    device_add()
    get_device_parent()
    /*find parent from glue_dirs.list*/
    list_for_each_entry(k, &dev->class->p->glue_dirs.list, entry)
    if (k->parent == parent_kobj) {
    kobj = kobject_get(k);
    break;
    }
    ....
    class_dir_create_and_add()

    path2: Remove last child device under glue dir
    device_del()
    cleanup_device_parent()
    cleanup_glue_dir()
    kobject_put(glue_dir);

    If path2 has been called cleanup_glue_dir(), but not
    call kobject_put(glue_dir), the glue dir is still
    in parent's kset list. Meanwhile, path1 find the glue
    dir from the glue_dirs.list. Path2 may release glue dir
    before path1 call kobject_get(). So kernel will report
    the warning and bug_on.

    This is a "classic" problem we have of a kref in a list
    that can be found while the last instance could be removed
    at the same time.

    This patch reuse gdp_mutex to fix this race condition.

    The following calltrace is captured in kernel 3.4, but
    the latest kernel still has this bug.

    -----------------------------------------------------
    [ 3965.441471] WARNING: at ...include/linux/kref.h:41 kobject_get+0x33/0x40()
    [ 3965.441474] Hardware name: Romley
    [ 3965.441475] Modules linked in: isd_iop(O) isd_xda(O)...
    ...
    [ 3965.441605] Call Trace:
    [ 3965.441611] [] warn_slowpath_common+0x7a/0xb0
    [ 3965.441615] [] warn_slowpath_null+0x15/0x20
    [ 3965.441618] [] kobject_get+0x33/0x40
    [ 3965.441624] [] get_device_parent.isra.11+0x135/0x1f0
    [ 3965.441627] [] device_add+0xd4/0x6d0
    [ 3965.441631] [] ? dev_set_name+0x3c/0x40
    ....
    [ 3965.441912] kernel BUG at ..../fs/sysfs/group.c:65!
    [ 3965.441915] invalid opcode: 0000 [#1] SMP
    ...
    [ 3965.686743] [] sysfs_create_group+0xe/0x10
    [ 3965.686748] [] blk_trace_init_sysfs+0x14/0x20
    [ 3965.686753] [] blk_register_queue+0x3b/0x120
    [ 3965.686756] [] add_disk+0x1cc/0x490
    ....
    -------------------------------------------------------

    Signed-off-by: Yijing Wang
    Signed-off-by: Weng Meiling
    Cc: #3.4+
    Signed-off-by: Greg Kroah-Hartman

    Yijing Wang
     

07 Nov, 2014

5 commits

  • Starting with version 2.24.51.20140728 MIPS binutils complain loudly
    about mixing soft-float and hard-float object files, leading to this
    build failure since GCC is invoked with "-msoft-float" on MIPS:

    {standard input}: Warning: .gnu_attribute 4,3 requires `softfloat'
    LD arch/mips/alchemy/common/built-in.o
    mipsel-softfloat-linux-gnu-ld: Warning: arch/mips/alchemy/common/built-in.o
    uses -msoft-float (set by arch/mips/alchemy/common/prom.o),
    arch/mips/alchemy/common/sleeper.o uses -mhard-float

    To fix this, we detect if GAS is new enough to support "-msoft-float" command
    option, and if it does, we can let GCC pass it to GAS; but then we also need
    to sprinkle the files which make use of floating point registers with the
    necessary ".set hardfloat" directives.

    Signed-off-by: Manuel Lauss
    Cc: Linux-MIPS
    Cc: Matthew Fortune
    Cc: Markos Chandras
    Cc: Maciej W. Rozycki
    Patchwork: https://patchwork.linux-mips.org/patch/8355/
    Signed-off-by: Ralf Baechle

    Manuel Lauss
     
  • The bulkstat main loop progress is tracked by the "lastino"
    variable, which is a full 64 bit inode. However, the loop actually
    works on agno/agino pairs, and so there's a significant disconnect
    between the rest of the loop and the main cursor. Convert this to
    use the agino, and pass the agino into the chunk formatting function
    and convert it too.

    This gets rid of the inconsistency in the loop processing, and
    finally makes it simple for us to skip inodes at any point in the
    loop simply by incrementing the agino cursor.

    cc: # 3.17
    Signed-off-by: Dave Chinner
    Reviewed-by: Brian Foster
    Signed-off-by: Dave Chinner

    Dave Chinner
     
  • The error propagation is a horror - xfs_bulkstat() returns
    a rval variable which is only set if there are formatter errors. Any
    sort of btree walk error or corruption will cause the bulkstat walk
    to terminate but will not pass an error back to userspace. Worse
    is the fact that formatter errors will also be ignored if any inodes
    were correctly formatted into the user buffer.

    Hence bulkstat can fail badly yet still report success to userspace.
    This causes significant issues with xfsdump not dumping everything
    in the filesystem yet reporting success. It's not until a restore
    fails that there is any indication that the dump was bad and tha
    bulkstat failed. This patch now triggers xfsdump to fail with
    bulkstat errors rather than silently missing files in the dump.

    This now causes bulkstat to fail when the lastino cookie does not
    fall inside an existing inode chunk. The pre-3.17 code tolerated
    that error by allowing the code to move to the next inode chunk
    as the agino target is guaranteed to fall into the next btree
    record.

    With the fixes up to this point in the series, xfsdump now passes on
    the troublesome filesystem image that exposes all these bugs.

    cc:
    Signed-off-by: Dave Chinner
    Reviewed-by: Brian Foster

    Dave Chinner
     
  • There are a bunch of variables tha tare more wildy scoped than they
    need to be, obfuscated user buffer checks and tortured "next inode"
    tracking. This all needs cleaning up to expose the real issues that
    need fixing.

    cc: # 3.17
    Signed-off-by: Dave Chinner
    Reviewed-by: Brian Foster
    Signed-off-by: Dave Chinner

    Dave Chinner
     
  • The loop construct has issues:
    - clustidx is completely unused, so remove it.
    - the loop tries to be smart by terminating when the
    "freecount" tells it that all inodes are free. Just drop
    it as in most cases we have to scan all inodes in the
    chunk anyway.
    - move the "user buffer left" condition check to the only
    point where we consume space int eh user buffer.
    - move the initialisation of agino out of the loop, leaving
    just a simple loop control logic using the clusteridx.

    Also, double handling of the user buffer variables leads to problems
    tracking the current state - use the cursor variables directly
    rather than keeping local copies and then having to update the
    cursor before returning.

    cc: # 3.17
    Signed-off-by: Dave Chinner
    Reviewed-by: Brian Foster
    Signed-off-by: Dave Chinner

    Dave Chinner