16 Nov, 2015

4 commits

  • In order to allow panic actions to be processed, the ipmi watchdog
    driver sets a new timeout value on panic. The 255s timeout
    was designed to allow kdump and others actions on panic, as in
    http://lkml.iu.edu/hypermail/linux/kernel/0711.3/0258.html

    This is counter-intuitive for a end-user who sets watchdog timeout
    value to something like 30s and who expects BMC to reset the system
    within 30s of a panic.

    This commit allows user to configure the timeout on panic.

    Signed-off-by: Jean-Yves Faye
    Signed-off-by: Corey Minyard

    Jean-Yves Faye
     
  • The policy for drivers is to have MODULE_DEVICE_TABLE() just after the
    struct used in it. For clarity.

    Suggested-by: Corey Minyard
    Signed-off-by: Luis de Bethencourt
    Signed-off-by: Corey Minyard

    Luis de Bethencourt
     
  • The IPMI driver would let the final timeout just happen, but it could
    easily just stop the timer. If the timer stop fails that's ok, that
    should be rare.

    Signed-off-by: Corey Minyard

    Corey Minyard
     
  • The timer and thread were not being started for internal messages,
    so in interrupt mode if something hung the timer would never go
    off and clean things up. Factor out the internal message sending
    and start the timer for those messages, too.

    Signed-off-by: Corey Minyard
    Tested-by: Gouji, Masayuki
    Cc: stable@vger.kernel.org

    Corey Minyard
     

12 Nov, 2015

1 commit


09 Nov, 2015

6 commits

  • __compat_only_sysfs_link_entry_to_kobj() was unconditionally called for
    TPM1 chips, which caused crash on Acer C720 laptop where DSM for the
    ACPI object did not exist.

    There are two reasons for unwanted behavior:

    * The code did not check whether
    __compat_only_sysfs_link_entry_to_kobj() returned -ENOENT. This is
    OK. It just meanst that ppi is not available.
    * The code did not clean up properly. Compat link should added only
    after all other init is done.

    This patch sorts out these issues.

    Fixes: 9b774d5cf2db
    Reported-by: Jeremiah Mahler
    Signed-off-by: Jarkko Sakkinen
    Tested-by: Jeremiah Mahler
    Acked-by: Peter Huewe

    Jarkko Sakkinen
     
  • The 'migratable' flag was not added to the key payload. This patch
    fixes the problem.

    Fixes: 0fe5480303a1 ("keys, trusted: seal/unseal with TPM 2.0 chips")
    Signed-off-by: Jarkko Sakkinen
    Acked-by: Peter Huewe

    Jarkko Sakkinen
     
  • Mimi reported that afb5abc reverts the fix in 398a1e7. This patch
    reverts it back.

    Fixes: afb5abc262e9 ("tpm: two-phase chip management functions")
    Reported-by: Mimi Zohar
    Signed-off-by: Jarkko Sakkinen
    Acked-by: Peter Huewe

    Jarkko Sakkinen
     
  • Reference to the 'np' node is dropped before dereferencing the 'sizep' and
    'basep' pointers, which could by then point to junk if the node has been
    freed.

    Refactor code to call 'of_node_put' later.

    Fixes: c5df39262dd5 ("drivers/char/tpm: Add securityfs support for event log")
    Signed-off-by: Christophe JAILLET
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Acked-by: Peter Huewe

    Christophe JAILLET
     
  • If the probing finishes without success, it will leave the value 15 in
    the TPM_IRQ_VECTOR register. If the driver is unloaded and reloaded, it
    will "think" that the hardware had been programmed with IRQ 15, and will
    not probe again.

    This patch restores the original value in the IO memory if no IRQ is
    probed.

    Signed-off-by: Martin Wilck
    Acked-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Acked-by: Peter Huewe

    Martin Wilck
     
  • Release IRQs used for probing only. Otherwise the TPM will end up
    with all IRQs 3-15 assigned.

    Fixes: afb5abc262e9 ("tpm: two-phase chip management functions")
    Signed-off-by: Martin Wilck
    Reviewed-by: Jarkko Sakkinen
    Tested-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Acked-by: Peter Huewe

    Martin Wilck
     

06 Nov, 2015

3 commits

  • Pull powerpc updates from Michael Ellerman:

    - Kconfig: remove BE-only platforms from LE kernel build from Boqun
    Feng
    - Refresh ps3_defconfig from Geoff Levand
    - Emit GNU & SysV hashes for the vdso from Michael Ellerman
    - Define an enum for the bolted SLB indexes from Anshuman Khandual
    - Use a local to avoid multiple calls to get_slb_shadow() from Michael
    Ellerman
    - Add gettimeofday() benchmark from Michael Neuling
    - Avoid link stack corruption in __get_datapage() from Michael Neuling
    - Add virt_to_pfn and use this instead of opencoding from Aneesh Kumar
    K.V
    - Add ppc64le_defconfig from Michael Ellerman
    - pseries: extract of_helpers module from Andy Shevchenko
    - Correct string length in pseries_of_derive_parent() from Nathan
    Fontenot
    - Free the MSI bitmap if it was slab allocated from Denis Kirjanov
    - Shorten irq_chip name for the SIU from Christophe Leroy
    - Wait 1s for secondaries to enter OPAL during kexec from Samuel
    Mendoza-Jonas
    - Fix _ALIGN_* errors due to type difference, from Aneesh Kumar K.V
    - powerpc/pseries/hvcserver: don't memset pi_buff if it is null from
    Colin Ian King
    - Disable hugepd for 64K page size, from Aneesh Kumar K.V
    - Differentiate between hugetlb and THP during page walk from Aneesh
    Kumar K.V
    - Make PCI non-optional for pseries from Michael Ellerman
    - Individual System V IPC system calls from Sam bobroff
    - Add selftest of unmuxed IPC calls from Michael Ellerman
    - discard .exit.data at runtime from Stephen Rothwell
    - Delete old orphaned PrPMC 280/2800 DTS and boot file, from Paul
    Gortmaker
    - Use of_get_next_parent to simplify code from Christophe Jaillet
    - Paginate some xmon output from Sam bobroff
    - Add some more elements to the xmon PACA dump from Michael Ellerman
    - Allow the tm-syscall selftest to build with old headers from Michael
    Ellerman
    - Run EBB selftests only on POWER8 from Denis Kirjanov
    - Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU from Michael
    Ellerman
    - Avoid reference to potentially freed memory in prom.c from Christophe
    Jaillet
    - Quieten boot wrapper output with run_cmd from Geoff Levand
    - EEH fixes and cleanups from Gavin Shan
    - Fix recursive fenced PHB on Broadcom shiner adapter from Gavin Shan
    - Use of_get_next_parent() in of_get_ibm_chip_id() from Michael
    Ellerman
    - Fix section mismatch warning in msi_bitmap_alloc() from Denis
    Kirjanov
    - Fix ps3-lpm white space from Rudhresh Kumar J
    - Fix ps3-vuart null dereference from Colin King
    - nvram: Add missing kfree in error path from Christophe Jaillet
    - nvram: Fix function name in some errors messages, from Christophe
    Jaillet
    - drivers/macintosh: adb: fix misleading Kconfig help text from Aaro
    Koskinen
    - agp/uninorth: fix a memleak in create_gatt_table from Denis Kirjanov
    - cxl: Free virtual PHB when removing from Andrew Donnellan
    - scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target from
    Michael Ellerman
    - scripts/kconfig/Makefile: Fix KBUILD_DEFCONFIG check when building
    with O= from Michael Ellerman
    - Freescale updates from Scott: Highlights include 64-bit book3e
    kexec/kdump support, a rework of the qoriq clock driver, device tree
    changes including qoriq fman nodes, support for a new 85xx board, and
    some fixes.
    - MPC5xxx updates from Anatolij: Highlights include a driver for
    MPC512x LocalPlus Bus FIFO with its device tree binding
    documentation, mpc512x device tree updates and some minor fixes.

    * tag 'powerpc-4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (106 commits)
    powerpc/msi: Fix section mismatch warning in msi_bitmap_alloc()
    powerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id()
    powerpc/pseries: Correct string length in pseries_of_derive_parent()
    powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry
    powerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s)
    powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan
    powerpc/fsl: Add #clock-cells and clockgen label to clockgen nodes
    powerpc: handle error case in cpm_muram_alloc()
    powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
    powerpc/book3e-64: Enable kexec
    powerpc/book3e-64/kexec: Set "r4 = 0" when entering spinloop
    powerpc/booke: Only use VIRT_PHYS_OFFSET on booke32
    powerpc/book3e-64/kexec: Enable SMP release
    powerpc/book3e-64/kexec: create an identity TLB mapping
    powerpc/book3e-64: Don't limit paca to 256 MiB
    powerpc/book3e/kdump: Enable crash_kexec_wait_realmode
    powerpc/book3e: support CONFIG_RELOCATABLE
    powerpc/booke64: Fix args to copy_and_flush
    powerpc/book3e-64: rename interrupt_end_book3e with __end_interrupts
    powerpc/e6500: kexec: Handle hardware threads
    ...

    Linus Torvalds
     
  • Pull security subsystem update from James Morris:
    "This is mostly maintenance updates across the subsystem, with a
    notable update for TPM 2.0, and addition of Jarkko Sakkinen as a
    maintainer of that"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (40 commits)
    apparmor: clarify CRYPTO dependency
    selinux: Use a kmem_cache for allocation struct file_security_struct
    selinux: ioctl_has_perm should be static
    selinux: use sprintf return value
    selinux: use kstrdup() in security_get_bools()
    selinux: use kmemdup in security_sid_to_context_core()
    selinux: remove pointless cast in selinux_inode_setsecurity()
    selinux: introduce security_context_str_to_sid
    selinux: do not check open perm on ftruncate call
    selinux: change CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE default
    KEYS: Merge the type-specific data with the payload data
    KEYS: Provide a script to extract a module signature
    KEYS: Provide a script to extract the sys cert list from a vmlinux file
    keys: Be more consistent in selection of union members used
    certs: add .gitignore to stop git nagging about x509_certificate_list
    KEYS: use kvfree() in add_key
    Smack: limited capability for changing process label
    TPM: remove unnecessary little endian conversion
    vTPM: support little endian guests
    char: Drop owner assignment from i2c_driver
    ...

    Linus Torvalds
     
  • Pull spi updates from Mark Brown:
    "Quite a lot of activity in SPI this cycle, almost all of it in drivers
    with a few minor improvements and tweaks in the core.

    - Updates to pxa2xx to support Intel Broxton and multiple chip selects.
    - Support for big endian in the bcm63xx driver.
    - Multiple slave support for the mt8173
    - New driver for the auxiliary SPI controller in bcm2835 SoCs.
    - Support for Layerscale SoCs in the Freescale DSPI driver"

    * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
    spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
    spi: pxa2xx: Add support for Intel Broxton
    spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals
    spi: pxa2xx: Add output control for multiple Intel LPSS chip selects
    spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific
    spi: Add DSPI support for layerscape family
    spi: ti-qspi: improve ->remove() callback
    spi/spi-xilinx: Fix race condition on last word read
    spi: Drop owner assignment from spi_drivers
    spi: Add THIS_MODULE to spi_driver in SPI core
    spi: Setup the master controller driver before setting the chipselect
    spi: dw: replace magic constant by DW_SPI_DR
    spi: mediatek: mt8173 spi multiple devices support
    spi: mediatek: handle controller_data in mtk_spi_setup
    spi: mediatek: remove mtk_spi_config
    spi: mediatek: Update document devicetree bindings to support multiple devices
    spi: fix kernel-doc warnings about missing return desc in spi.c
    spi: fix kernel-doc warnings about missing return desc in spi.h
    spi: pxa2xx: Align a few defines
    spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select
    ...

    Linus Torvalds
     

05 Nov, 2015

3 commits

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver update for 4.4-rc1. Lots of
    different driver and subsystem updates, hwtracing being the largest
    with the addition of some new platforms that are now supported. Full
    details in the shortlog.

    All of these have been in linux-next for a long time with no reported
    issues"

    * tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits)
    fpga: socfpga: Fix check of return value of devm_request_irq
    lkdtm: fix ACCESS_USERSPACE test
    mcb: Destroy IDA on module unload
    mcb: Do not return zero on error path in mcb_pci_probe()
    mei: bus: set the device name before running fixup
    mei: bus: use correct lock ordering
    mei: Fix debugfs filename in error output
    char: ipmi: ipmi_ssif: Replace timeval with timespec64
    fpga: zynq-fpga: Fix issue with drvdata being overwritten.
    fpga manager: remove unnecessary null pointer checks
    fpga manager: ensure lifetime with of_fpga_mgr_get
    fpga: zynq-fpga: Change fw format to handle bin instead of bit.
    fpga: zynq-fpga: Fix unbalanced clock handling
    misc: sram: partition base address belongs to __iomem space
    coresight: etm3x: adding documentation for sysFS's cpu interface
    vme: 8-bit status/id takes 256 values, not 255
    fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000
    ARM: zynq: dt: Updated devicetree for Zynq 7000 platform.
    ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager.
    ver_linux: proc/modules, limit text processing to 'sed'
    ...

    Linus Torvalds
     
  • Pull tty/serial driver updates from Greg KH:
    "Here is the big tty and serial driver update for 4.4-rc1.

    Lots of serial driver updates and a few small tty core changes. Full
    details in the shortlog.

    All of these have been in linux-next for a while"

    * tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (148 commits)
    tty: Use unbound workqueue for all input workers
    tty: Abstract tty buffer work
    tty: Prevent tty teardown during tty_write_message()
    tty: core: Use correct spinlock flavor in tiocspgrp()
    tty: Combine SIGTTOU/SIGTTIN handling
    serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
    ttyFDC: Fix build problems due to use of module_{init,exit}
    tty: remove unneeded return statement
    serial: 8250_mid: add support for DMA engine handling from UART MMIO
    dmaengine: hsu: remove platform data
    dmaengine: hsu: introduce stubs for the exported functions
    dmaengine: hsu: make the UART driver in control of selecting this driver
    serial: fix mctrl helper functions
    serial: 8250_pci: Intel MID UART support to its own driver
    serial: fsl_lpuart: add earlycon support
    tty: disable unbind for old 74xx based serial/mpsc console port
    serial: pl011: Spelling s/clocks-names/clock-names/
    n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars
    tty: synclink, fix indentation
    serial: at91, fix rs485 properties
    ...

    Linus Torvalds
     
  • Pull crypto update from Herbert Xu:
    "API:

    - Add support for cipher output IVs in testmgr
    - Add missing crypto_ahash_blocksize helper
    - Mark authenc and des ciphers as not allowed under FIPS.

    Algorithms:

    - Add CRC support to 842 compression
    - Add keywrap algorithm
    - A number of changes to the akcipher interface:
    + Separate functions for setting public/private keys.
    + Use SG lists.

    Drivers:

    - Add Intel SHA Extension optimised SHA1 and SHA256
    - Use dma_map_sg instead of custom functions in crypto drivers
    - Add support for STM32 RNG
    - Add support for ST RNG
    - Add Device Tree support to exynos RNG driver
    - Add support for mxs-dcp crypto device on MX6SL
    - Add xts(aes) support to caam
    - Add ctr(aes) and xts(aes) support to qat
    - A large set of fixes from Russell King for the marvell/cesa driver"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (115 commits)
    crypto: asymmetric_keys - Fix unaligned access in x509_get_sig_params()
    crypto: akcipher - Don't #include crypto/public_key.h as the contents aren't used
    hwrng: exynos - Add Device Tree support
    hwrng: exynos - Fix missing configuration after suspend to RAM
    hwrng: exynos - Add timeout for waiting on init done
    dt-bindings: rng: Describe Exynos4 PRNG bindings
    crypto: marvell/cesa - use __le32 for hardware descriptors
    crypto: marvell/cesa - fix missing cpu_to_le32() in mv_cesa_dma_add_op()
    crypto: marvell/cesa - use memcpy_fromio()/memcpy_toio()
    crypto: marvell/cesa - use gfp_t for gfp flags
    crypto: marvell/cesa - use dma_addr_t for cur_dma
    crypto: marvell/cesa - use readl_relaxed()/writel_relaxed()
    crypto: caam - fix indentation of close braces
    crypto: caam - only export the state we really need to export
    crypto: caam - fix non-block aligned hash calculation
    crypto: caam - avoid needlessly saving and restoring caam_hash_ctx
    crypto: caam - print errno code when hash registration fails
    crypto: marvell/cesa - fix memory leak
    crypto: marvell/cesa - fix first-fragment handling in mv_cesa_ahash_dma_last_req()
    crypto: marvell/cesa - rearrange handling for sw padded hashes
    ...

    Linus Torvalds
     

04 Nov, 2015

1 commit


28 Oct, 2015

1 commit


25 Oct, 2015

1 commit

  • This patch replaces timeval with timespec64 as 32 bit 'struct timeval'
    will not give current time beyond 2038.

    The patch changes the code to use ktime_get_real_ts64() which returns
    a 'struct timespec64' instead of do_gettimeofday() which returns a
    'struct timeval'

    This patch also alters the format string in pr_info() for now.tv_sec
    to incorporate 'long long' on 32 bit architectures.

    Signed-off-by: Amitoj Kaur Chawla
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Amitoj Kaur Chawla
     

20 Oct, 2015

4 commits

  • Add Device Tree support for the driver. The Pseudo Random Number
    Generator module is the same in almost all of Exynos SoCs, since
    Exynos4210 (however the tests were done only on Trats2 board with
    Exynos4412). There are some differences on newer Exynos Octa
    (Exynos542x) SoCs.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Herbert Xu

    Krzysztof Kozlowski
     
  • After suspend to RAM the device stopped to work with ETIMEDOUT error:

    $ dd if=/dev/hwrng of=/dev/null bs=1 count=16
    dd: reading `/dev/hwrng': Connection timed out

    In the STATUS register the bits #5 (PRNG_DONE) and #1
    (SEED_SETTING_DONE) were not set. Instead PRNG_ERROR (seventh bit) was
    high.

    After each system suspend initialize the seed to fix the error.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Herbert Xu

    Krzysztof Kozlowski
     
  • Driver may hang waiting indefinitely for PRNG to finish its
    initialization stage. Instead of stalling return -ETIMEDOUT error.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Herbert Xu

    Krzysztof Kozlowski
     
  • Currently this driver calls pm_runtime_get_sync() rampantly
    but never puts anything back. This makes it impossible for the
    device to autosuspend properly; it will remain fully active
    after the first use.

    Fix in the obvious way.

    Signed-off-by: Daniel Thompson
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Tested-by: Krzysztof Kozlowski
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Herbert Xu

    Daniel Thompson
     

19 Oct, 2015

11 commits

  • The base pointer for the event log is allocated in the local
    kernel (in prom_instantiate_sml()), therefore it is already in
    the host's endian byte order and requires no conversion.

    The content of the 'basep' pointer in read_log() stores the
    base address of the log. This patch ensures that it is correctly
    implemented.

    Signed-off-by: Hon Ching(Vicky) Lo
    Signed-off-by: Joy Latten
    Reviewed-by: Ashley Lai
    Signed-off-by: Peter Huewe

    Hon Ching \(Vicky\) Lo
     
  • This patch makes the code endianness independent. We defined a
    macro do_endian_conversion to apply endianness to raw integers
    in the event entries so that they will be displayed properly.
    tpm_binary_bios_measurements_show() is modified for the display.

    Signed-off-by: Hon Ching(Vicky) Lo
    Signed-off-by: Joy Latten
    Reviewed-by: Ashley Lai
    Reviewed-by: Ashley Lai
    Signed-off-by: Peter Huewe

    Hon Ching \(Vicky\) Lo
     
  • i2c_driver does not need to set an owner because i2c_register_driver()
    will set it.

    Signed-off-by: Krzysztof Kozlowski
    Reviewed-by: Peter Huewe
    Signed-off-by: Peter Huewe

    Krzysztof Kozlowski
     
  • Replace all occurrences of '/ibm,vtpm' with '/vdevice/vtpm',
    as only the latter is guanranteed to be available for the client OS.
    The '/ibm,vtpm' node should only be used by Open Firmware, which
    is susceptible to changes.

    Signed-off-by: Hon Ching(Vicky) Lo
    Signed-off-by: Peter Huewe

    Hon Ching \(Vicky\) Lo
     
  • Added tpm_trusted_seal() and tpm_trusted_unseal() API for sealing
    trusted keys.

    This patch implements basic sealing and unsealing functionality for
    TPM 2.0:

    * Seal with a parent key using a 20 byte auth value.
    * Unseal with a parent key using a 20 byte auth value.

    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Peter Huewe

    Jarkko Sakkinen
     
  • This patch introduces struct tpm_buf that provides a string buffer for
    constructing TPM commands. This allows to construct variable sized TPM
    commands. For the buffer a page is allocated and mapped, which limits
    maximum size to PAGE_SIZE.

    Variable sized TPM commands are needed in order to add algorithmic
    agility.

    Signed-off-by: Jarkko Sakkinen
    Reviewed-by: Peter Huewe
    Signed-off-by: Peter Huewe

    Jarkko Sakkinen
     
  • Moved PPI attributes to the character device directory. This aligns with
    the sysfs guidelines and makes them race free because they are created
    atomically with the character device as part of device_register().The
    character device and the sysfs attributes appear at the same time to the
    user space.

    As part of this change we enable PPI attributes also for TPM 2.0
    devices. In order to retain backwards compatibility with TPM 1.x
    devices, a symlink is created to the platform device directory.

    Signed-off-by: Jarkko Sakkinen
    Reviewed-by: Jason Gunthorpe
    Tested-by: Mimi Zohar (on TPM 1.2)
    Tested-by: Chris J Arges
    Tested-by: Colin Ian King
    Signed-off-by: Peter Huewe

    Jarkko Sakkinen
     
  • Both for FIFO and CRB interface TCG has decided to use the same HID
    MSFT0101. They can be differentiated by looking at the start method from
    TPM2 ACPI table. This patches makes necessary fixes to tpm_tis and
    tpm_crb modules in order to correctly detect, which module should be
    used.

    For MSFT0101 we must use struct acpi_driver because struct pnp_driver
    has a 7 character limitation.

    It turned out that the root cause in b371616b8 was not correct for
    https://bugzilla.kernel.org/show_bug.cgi?id=98181.

    v2:

    * One fixup was missing from v1: is_tpm2_fifo -> is_fifo

    v3:

    * Use pnp_driver for existing HIDs and acpi_driver only for MSFT0101 in
    order ensure backwards compatibility.

    v4:

    * Check for FIFO before doing *anything* in crb_acpi_add().
    * There was return immediately after acpi_bus_unregister_driver() in
    cleanup_tis(). This caused pnp_unregister_driver() not to be called.

    Cc: stable@kernel.org
    Reported-by: Michael Saunders
    Reported-by: Michael Marley
    Reported-by: Jethro Beekman
    Reported-by: Matthew Garrett
    Signed-off-by: Jarkko Sakkinen
    Tested-by: Michael Marley
    Tested-by: Mimi Zohar (on TPM 1.2)
    Reviewed-by: Peter Huewe
    Signed-off-by: Peter Huewe

    Jarkko Sakkinen
     
  • The command buffer address must be read with exactly two 32-bit reads.
    Otherwise, on some HW platforms, it seems that HW will abort the read
    operation, which causes CPU to fill the read bytes with 1's. Therefore,
    we cannot rely on memcpy_fromio() but must call ioread32() two times
    instead.

    Also, this matches the PC Client Platform TPM Profile specification,
    which defines command buffer address with two 32-bit fields.

    Cc: stable@kernel.org
    Signed-off-by: Jarkko Sakkinen
    Reviewed-by: Peter Huewe
    Signed-off-by: Peter Huewe

    Jarkko Sakkinen
     
  • At ibm vtpm initialzation, tpm_ibmvtpm_probe() registers its interrupt
    handler, ibmvtpm_interrupt, which calls ibmvtpm_crq_process to allocate
    memory for rtce buffer. The current code uses 'GFP_KERNEL' as the
    type of kernel memory allocation, which resulted a warning at
    kernel/lockdep.c. This patch uses 'GFP_ATOMIC' instead so that the
    allocation is high-priority and does not sleep.

    Cc: stable@kernel.org
    Signed-off-by: Hon Ching(Vicky) Lo
    Signed-off-by: Peter Huewe

    Hon Ching \(Vicky\) Lo
     
  • The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
    not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
    functionality only, can still be compiled if GPIOLIB is not enabled.

    Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
    appropriate.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Linus Walleij
    Reviewed-by: Peter Huewe
    Signed-off-by: Peter Huewe

    Geert Uytterhoeven
     

18 Oct, 2015

1 commit

  • Since at least before 2.6.30, tty drivers that do not drop the tty lock
    while closing cannot observe ASYNC_CLOSING set while holding the
    tty lock; this includes the tty driver's open() and hangup() methods,
    since the tty core calls these methods holding the tty lock.

    For these drivers, waiting for ASYNC_CLOSING to clear while opening
    is not required, since this condition cannot occur. Similarly, even
    when the open() method drops and reacquires the tty lock after
    blocking, ASYNC_CLOSING cannot be set (again, for drivers that
    do not drop the tty lock while closing).

    Now that tty port drivers no longer drop the tty lock while closing
    (since 'tty: Remove tty_wait_until_sent_from_close()'), the same
    conditions apply: waiting for ASYNC_CLOSING to clear while opening
    is not required, nor is re-checking ASYNC_CLOSING after dropping and
    reacquiring the tty lock while blocking (eg., in *_block_til_ready()).

    Note: The ASYNC_CLOSING flag state is still maintained since several
    bitrotting drivers use it for (dubious) other purposes.

    Signed-off-by: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

15 Oct, 2015

1 commit

  • Commit c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG")
    was inadequately tested (actually it was tested quite hard so
    incompetent would be a better description that inadequate) and does
    not compile on platforms with CONFIG_PM set.

    Fix this.

    Signed-off-by: Daniel Thompson
    Signed-off-by: Herbert Xu

    Daniel Thompson
     

14 Oct, 2015

1 commit

  • Add support for STMicroelectronics STM32 random number generator.

    The config value defaults to N, reflecting the fact that STM32 is a
    very low resource microcontroller platform and unlikely to be targeted
    by any "grown up" defconfigs.

    Signed-off-by: Daniel Thompson
    Reviewed-by: Linus Walleij
    Signed-off-by: Herbert Xu

    Daniel Thompson
     

08 Oct, 2015

2 commits

  • The original representation of FIFO size in the driver coupled with the
    ambiguity in the documentation meant that it was easy to confuse readers.
    This lead to a false positive BUG-find and subsequently time wastage
    debugging this phantom issue.

    Hopefully this patch can prevent future readers from falling into the
    same trap.

    Signed-off-by: Lee Jones
    Signed-off-by: Herbert Xu

    Lee Jones
     
  • Samples are documented to be available every 0.667us, so in theory
    the 8 sample deep FIFO should take 5.336us to fill. However, during
    thorough testing, it became apparent that filling the FIFO actually
    takes closer to 12us.

    Also take into consideration that udelay() can behave oddly i.e. not
    delay for as long as requested.

    Suggested-by: Russell King :

    "IIRC, Linus recommends a x2 factor on delays, especially
    timeouts generated by these functions.

    Signed-off-by: Lee Jones
    Signed-off-by: Herbert Xu

    Lee Jones