17 Jan, 2012

1 commit

  • If there is an architecture-specific random number generator (such as
    RDRAND for Intel architectures), use it to initialize /dev/random's
    entropy stores. Even in the worst case, if RDRAND is something like
    AES(NSA_KEY, counter++), it won't hurt, and it will definitely help
    against any other adversaries.

    Signed-off-by: "Theodore Ts'o"
    Link: http://lkml.kernel.org/r/1324589281-31931-1-git-send-email-tytso@mit.edu
    Signed-off-by: H. Peter Anvin

    Theodore Ts'o
     

30 Dec, 2011

1 commit

  • We still don't use rdrand in /dev/random, which just seems stupid. We
    accept the *cycle*counter* as a random input, but we don't accept
    rdrand? That's just broken.

    Sure, people can do things in user space (write to /dev/random, use
    rdrand in addition to /dev/random themselves etc etc), but that
    *still* seems to be a particularly stupid reason for saying "we
    shouldn't bother to try to do better in /dev/random".

    And even if somebody really doesn't trust rdrand as a source of random
    bytes, it seems singularly stupid to trust the cycle counter *more*.

    So I'd suggest the attached patch. I'm not going to even bother
    arguing that we should add more bits to the entropy estimate, because
    that's not the point - I don't care if /dev/random fills up slowly or
    not, I think it's just stupid to not use the bits we can get from
    rdrand and mix them into the strong randomness pool.

    Link: http://lkml.kernel.org/r/CA%2B55aFwn59N1=m651QAyTy-1gO1noGbK18zwKDwvwqnravA84A@mail.gmail.com
    Acked-by: "David S. Miller"
    Acked-by: "Theodore Ts'o"
    Acked-by: Herbert Xu
    Cc: Matt Mackall
    Cc: Tony Luck
    Cc: Eric Dumazet
    Signed-off-by: H. Peter Anvin

    Linus Torvalds
     

24 Dec, 2011

1 commit


23 Dec, 2011

8 commits

  • * 'for-linus' of git://neil.brown.name/md:
    md/bitmap: It is OK to clear bits during recovery.
    md: don't give up looking for spares on first failure-to-add
    md/raid5: ensure correct assessment of drives during degraded reshape.
    md/linear: fix hot-add of devices to linear arrays.

    Linus Torvalds
     
  • commit d0a4bb492772ce5c4bdfba3744a99ed6f6fb238f introduced a
    regression which is annoying but fairly harmless.

    When writing to an array that is undergoing recovery (a spare
    in being integrated into the array), writing to the array will
    set bits in the bitmap, but they will not be cleared when the
    write completes.

    For bits covering areas that have not been recovered yet this is not a
    problem as the recovery will clear the bits. However bits set in
    already-recovered region will stay set and never be cleared.
    This doesn't risk data integrity. The only negatives are:
    - next time there is a crash, more resyncing than necessary will
    be done.
    - the bitmap doesn't look clean, which is confusing.

    While an array is recovering we don't want to update the
    'events_cleared' setting in the bitmap but we do still want to clear
    bits that have very recently been set - providing they were written to
    the recovering device.

    So split those two needs - which previously both depended on 'success'
    and always clear the bit of the write went to all devices.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Before performing a recovery we try to remove any spares that
    might not be working, then add any that might have become relevant.

    Currently we abort on the first spare that cannot be added.
    This is a false optimisation.
    It is conceivable that - depending on rules in the personality - a
    subsequent spare might be accepted.
    Also the loop does other things like count the available spares and
    reset the 'recovery_offset' value.

    If we abort early these might not happen properly.

    So remove the early abort.

    In particular if you have an array what is undergoing recovery and
    which has extra spares, then the recovery may not restart after as
    reboot as the could of 'spares' might end up as zero.

    Reported-by: Anssi Hannula
    Signed-off-by: NeilBrown

    NeilBrown
     
  • While reshaping a degraded array (as when reshaping a RAID0 by first
    converting it to a degraded RAID4) we currently get confused about
    which devices are in_sync. In most cases we get it right, but in the
    region that is being reshaped we need to treat non-failed devices as
    in-sync when we have the data but haven't actually written it out yet.

    Reported-by: Adam Kwolek
    Signed-off-by: NeilBrown

    NeilBrown
     
  • commit d70ed2e4fafdbef0800e73942482bb075c21578b
    broke hot-add to a linear array.
    After that commit, metadata if not written to devices until they
    have been fully integrated into the array as determined by
    saved_raid_disk. That patch arranged to clear that field after
    a recovery completed.

    However for linear arrays, there is no recovery - the integration is
    instantaneous. So we need to explicitly clear the saved_raid_disk
    field.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: Fix usb/isp1760 build on sparc
    usb: gadget: epautoconf: do not change number of streams
    usb: dwc3: core: fix cached revision on our structure
    usb: musb: fix reset issue with full speed device

    Linus Torvalds
     
  • * 'upstream-linus' of git://github.com/jgarzik/libata-dev:
    pata_of_platform: Add missing CONFIG_OF_IRQ dependency.

    Linus Torvalds
     
  • Signed-off-by: David S. Miller
    Signed-off-by: Jeff Garzik

    David Miller
     

22 Dec, 2011

5 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    net: Add a flow_cache_flush_deferred function
    ipv4: reintroduce route cache garbage collector
    net: have ipconfig not wait if no dev is available
    sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd
    asix: new device id
    davinci-cpdma: fix locking issue in cpdma_chan_stop
    sctp: fix incorrect overflow check on autoclose
    r8169: fix Config2 MSIEnable bit setting.
    llc: llc_cmsg_rcv was getting called after sk_eat_skb.
    net: bpf_jit: fix an off-one bug in x86_64 cond jump target
    iwlwifi: update SCD BC table for all SCD queues
    Revert "Bluetooth: Revert: Fix L2CAP connection establishment"
    Bluetooth: Clear RFCOMM session timer when disconnecting last channel
    Bluetooth: Prevent uninitialized data access in L2CAP configuration
    iwlwifi: allow to switch to HT40 if not associated
    iwlwifi: tx_sync only on PAN context
    mwifiex: avoid double list_del in command cancel path
    ath9k: fix max phy rate at rate control init
    nfc: signedness bug in __nci_request()
    iwlwifi: do not set the sequence control bit is not needed

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
    mfd: Include linux/io.h to jz4740-adc
    mfd: Use request_threaded_irq for twl4030-irq instead of irq_set_chained_handler
    mfd: Base interrupt for twl4030-irq must be one-shot
    mfd: Handle tps65910 clear-mask correctly
    mfd: add #ifdef CONFIG_DEBUG_FS guard for ab8500_debug_resources
    mfd: Fix twl-core oops while calling twl_i2c_* for unbound driver
    mfd: include linux/module.h for ab5500-debugfs
    mfd: Update wm8994 active device checks for WM1811
    mfd: Set tps6586x bits if new value is different from the old one
    mfd: Set da903x bits if new value is different from the old one
    mfd: Set adp5520 bits if new value is different from the old one
    mfd: Add missed free_irq in da903x_remove

    Linus Torvalds
     
  • * 'for-greg' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
    usb: gadget: epautoconf: do not change number of streams
    usb: dwc3: core: fix cached revision on our structure
    usb: musb: fix reset issue with full speed device

    Greg Kroah-Hartman
     
  • This commit:

    commit 8f5d621543cb064d2989fc223d3c2bc61a43981e
    Author: Joachim Foerster
    Date: Mon Oct 10 18:06:54 2011 +0200

    usb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .

    To be able to use the driver on other OF-aware architectures, too.
    And add necessary OF related #includes to fix compilation error.

    Signed-off-by: Joachim Foerster
    Signed-off-by: Greg Kroah-Hartman

    enabled the build on all CONFIG_OF architectures, but it cannot do
    this.

    This driver depends upon CONFIG_OF_IRQ but not all CONFIG_OF platforms
    support that infrastructure, in particular Sparc does not so the
    build fails.

    Please push a patch like the following to Linus so that this code only
    gets built where it actually should.

    --------------------
    usb/isp1760: Add missing CONFIG_OF_IRQ dependency on OF code.

    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    David Miller
     
  • …wireless into for-davem

    John W. Linville
     

21 Dec, 2011

20 commits

  • * git://git.infradead.org/mtd-2.6:
    mtd: plat_ram: call mtd_device_register only if partition data exists
    mtd: pxa2xx-flash.c: It used to fall back to provided table.
    mtd: gpmi: add missing include 'module.h'
    mtd: ndfc: fix typo in structure dereference

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
    mmc: vub300: fix type of firmware_rom_wait_states module parameter
    Revert "mmc: enable runtime PM by default"
    mmc: sdhci: remove "state" argument from sdhci_suspend_host

    Linus Torvalds
     
  • * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    time/clocksource: Fix kernel-doc warnings
    rtc: m41t80: Workaround broken alarm functionality
    rtc: Expire alarms after the time is set.

    Linus Torvalds
     
  • * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    oprofile: Fix uninitialized memory access when writing to writing to oprofilefs

    Linus Torvalds
     
  • …kernel/git/konrad/xen

    * 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"

    Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    vmwgfx: Clip cliprects against screen boundaries in present and dirty
    vmwgfx: Resend the cursor after legacy modeset
    vmwgfx: Do better culling of presents
    vmwgfx: Refactor kms code to use vmw_user_lookup_handle helper
    vmwgfx: Add helper function to get surface or dmabuf
    vmwgfx: Refactor cursor update
    vmwgfx: Remove dmabuf check in present ioctl
    vmwgfx: Use the revised fifo hw version register when present

    Linus Torvalds
     
  • * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (31 commits)
    Revert "[media] af9015: limit I2C access to keep FW happy"
    [media] s5p-fimc: Fix camera input configuration in subdev operations
    [media] m5mols: Fix logic in sanity check
    [media] ati_remote: switch to single-byte scancodes
    [media] V4L: mt9m111: fix uninitialised mutex
    [media] V4L: omap1_camera: fix missing include
    [media] V4L: mt9t112: use after free in mt9t112_probe()
    [media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
    [media] s5p_mfc_enc: fix s/H264/H263/ typo
    [media] omap_vout: Fix compile error in 3.1
    [media] au0828: add missing models 72101, 72201 & 72261 to the model matrix
    [media] au0828: add missing USB ID 2040:7213
    [media] au0828: add missing USB ID 2040:7260
    [media] [trivial] omap24xxcam-dma: Fix logical test
    [media] omap_vout: fix crash if no driver for a display
    [media] media: video: s5p-tv: fix build break
    [media] omap3isp: fix compilation of ispvideo.c
    [media] m5mols: Fix set_fmt to return proper pixel format code
    [media] s5p-fimc: Use correct fourcc for RGB565 colour format
    [media] s5p-fimc: Fail driver probing when sensor configuration is wrong
    ...

    Linus Torvalds
     
  • If the BMC gets reset, it will return 0x80 response errors.

    In less than a week
    # grep "Error 80 on cmd 22" /var/log/kernel |wc -l
    378681

    In this case, it is probably a good idea to restore the IPMI settings.

    Signed-off-by: Corey Minyard
    Tested-by: Arkadiusz Miśkiewicz
    Reported-by: Arkadiusz Miśkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Corey Minyard
     
  • Include linux/io.h to fix below build error:

    CC drivers/mfd/jz4740-adc.o
    drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_irq_demux':
    drivers/mfd/jz4740-adc.c:73: error: implicit declaration of function 'readb'
    drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_set_enabled':
    drivers/mfd/jz4740-adc.c:110: error: implicit declaration of function 'writeb'
    drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_set_config':
    drivers/mfd/jz4740-adc.c:146: error: implicit declaration of function 'readl'
    drivers/mfd/jz4740-adc.c:151: error: implicit declaration of function 'writel'
    drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_probe':
    drivers/mfd/jz4740-adc.c:249: error: implicit declaration of function 'ioremap_nocache'
    drivers/mfd/jz4740-adc.c:249: warning: assignment makes pointer from integer without a cast
    drivers/mfd/jz4740-adc.c:289: warning: passing argument 3 of 'mfd_add_devices' discards qualifiers from pointer target type
    include/linux/mfd/core.h:93: note: expected 'struct mfd_cell *' but argument is of type 'const struct mfd_cell *'
    drivers/mfd/jz4740-adc.c:299: error: implicit declaration of function 'iounmap'
    make[2]: *** [drivers/mfd/jz4740-adc.o] Error 1
    make[1]: *** [drivers/mfd] Error 2
    make: *** [drivers] Error 2

    Signed-off-by: Axel Lin
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • irq_set_chained_handler sets 'desc->handle_irq'.
    However this irq is called by handle_nested_irq from handle_twl4030_pih,
    and that uses action->thread_fn.

    So the handled set with irq_set_chained_handler is never called.

    So change to use request_threaded_irq instead - that sets the correct field.

    Tested on GTA04 Phoenux.

    Signed-off-by: NeilBrown
    Tested-by: Felipe Contreras
    Signed-off-by: Samuel Ortiz

    NeilBrown
     
  • As the interrupt source is only cleared by the threaded interrupt
    service routine, we need to make the base interrupt IRQF_ONESHOT.
    Without this, the first interrupt from the TWL4030 cause the CPU to
    enter an infinite loop trying to handle to interrupt but never
    clearing it.

    Signed-off-by: NeilBrown
    Tested-by: Felipe Contreras
    Signed-off-by: Samuel Ortiz

    NeilBrown
     
  • The function is not actually cleaing the bitmask.

    Signed-off-by: Marcus Folkesson
    Signed-off-by: Samuel Ortiz

    Marcus Folkesson
     
  • Fix below build warning if CONFIG_DEBUG_FS is disabled.

    CC drivers/mfd/ab8500-core.o
    drivers/mfd/ab8500-core.c:623: warning: 'ab8500_debug_resources' defined but not used

    Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • Check inuse variable before trying to access twl_map to prevent
    dereferencing of uninitialized variable.

    Signed-off-by: Ilya Yanok
    Cc: stable@kernel.org
    Signed-off-by: Samuel Ortiz

    Ilya Yanok
     
  • Include linux/module.h to fix below build error:

    CC drivers/mfd/ab5500-debugfs.o
    drivers/mfd/ab5500-debugfs.c:571: error: 'THIS_MODULE' undeclared here (not in a function)
    make[2]: *** [drivers/mfd/ab5500-debugfs.o] Error 1

    Signed-off-by: Axel Lin
    Acked-by: Linus Walleij
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • This didn't go in as part of the original MFD patch for WM1811 due to
    cross tree issues.

    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Mark Brown
     
  • It does not make sense to write new value only when all the bit_mask
    bits are zero.
    We need to write new value if the bit mask fields of new value is
    not equal to old value.

    Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • It does not make sense to write new value only when all the bit_mask
    bits are zero.
    We need to write new value if the bit mask fields of new value is
    not equal to old value.

    Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • Current code checks if all the bit_mask bits are all zero is wrong.
    We need to write new value if the bit mask fields of new value is
    not equal to old value.

    Signed-off-by: Axel Lin
    Acked-by: Michael Hennerich
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • Signed-off-by: Axel Lin
    Acked-by: Eric Miao
    Signed-off-by: Samuel Ortiz

    Axel Lin
     

20 Dec, 2011

4 commits