08 Jun, 2017

4 commits

  • Bank0/Bank1 are not in ECC mode, so no need to check.
    Each bank contains 8 words, so we check (phy_index > 15).

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Add ULP1 OTP support.

    No timing required for ULP1 OTP.
    The CTRL_ADDR is 8 bits width.
    When finished access to OTP, gate the power to OTP memory to save power.

    Fix store, when invalid args, not return 0, but return the error values.
    To ULP, fuse only support being programmed once, so add a check before
    program.

    Test log:
    root@imx6qdlsolo:/sys/fsl_otp# cat HW_OCOTP_GP84
    0x0
    root@imx6qdlsolo:/sys/fsl_otp# echo 1 > HW_OCOTP_GP84
    root@imx6qdlsolo:/sys/fsl_otp# cat HW_OCOTP_GP84
    0x1
    root@imx6qdlsolo:/sys/fsl_otp# echo 1 > HW_OCOTP_GP84
    -sh: echo: write error: Operation not permitted
    root@imx6qdlsolo:/sys/fsl_otp# echo fg > HW_OCOTP_GP84
    -sh: echo: write error: Invalid argument

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Support i.MX6SLL OTP.
    There are 4 works in bank7/bank8.
    When read, use address offset.
    When prog, use bank/index, note that bank7/bank8 we treat
    them a single bank when prog.

    Tested GP41 and GP31 read/write on eng sample chip.

    Signed-off-by: Peng Fan
    (cherry picked from commit f8698b66fcbec7409b738a4c5b05ba87f0342cf8)

    Peng Fan
     
  • Add ocotp support for i.MX6ULL.

    Signed-off-by: Peng Fan

    Peng Fan
     

23 Feb, 2017

4 commits

  • ENGR00292341 imx6sl hwrng

    Add hwrng support for i.MX6SL.

    1. Add RNG driver. This driver originated as fsl-rngc.c. It
    has been modified to support device tree. The name has been
    changed since it supports both b and c variants of RNG.
    2. Added clock and compatible info to the device tree data.
    3. Added the entry in the options in the Kconfig for hwrng.

    (cherry picked from commit 1f3f2c0647b7319c4e23293a61512e4191593513)
    [: Edited to apply to 3.14]

    Signed-off-by: Dan Douglass
    Signed-off-by: Victoria Milhoan

    Dan Douglass
     
  • Fix the out of bounds write, and the dereference before
    null check.

    Signed-off-by: Richard Zhu
    (cherry picked from commit 775ff0727166535e9b1ba1f70167e6a33fee5f13)

    Richard Zhu
     
  • This is porting of fsl_otp driver from imx_3.14.y to imx_4.1.y.

    This patch mainly from the following:

    commit:292eff6d2c9064ecf15ed457140c1d743c2ead67
    "ENGR00269945: char: add fsl_otp deivce driver"
    This is a porting of fsl_otp driver from 3.0.35 kernel to 3.10. It
    cleans up the driver a little bit and adds device tree probe support.

    shawn.guo: cherry-pick commit 850237dccde7 from imx_3.10.y.

    commit:057a50039fac872fd19fe6c129a94face4231ae8
    "MLK-10979-4 imx: ocotp add i.MX7D support and fix hole"
    1. Add i.MX7D support
    2. Fix hole addressing.
    There is a hole in shadow registers address map of size 0x100
    between bank 5 and bank 6 on iMX6QP, iMX6DQ, iMX6SDL, iMX6SX and
    iMX6UL. Bank 5 ends at 0x6F0 and Bank 6 starts at 0x800. When reading
    the fuses, should account for this hole in address space.

    Similar hole exists between bank 14 and bank 15 of size 0x80 on
    iMX6QP, iMX6DQ, iMX6SDL and iMX6SX.
    Note: iMX6SL has only 0-7 banks and there is no hole.
    Note: iMX6UL doesn't have this one.

    When reading, the hole need to be considered to calculated the physical
    address offset.
    When writing, since only word index for i.MX6 and bank
    index for i.MX7, there is no need to take the hole into consideration,
    still use the bank/word index from fuse map.
    3. Add i.MX6SL i.MX6UL fuse map table.
    4. Tested read/write on mx6ul-14x14-ddr3-arm2 and mx7d-12x12-lpddr3-arm2 board.
    Tested read on mx6sxsabresd board.

    Signed-off-by: Shawn Guo
    Signed-off-by: Peng Fan

    Peng Fan
     
  • - add linux sema4 driver.
    - use volatile types in sema4 structure.
    - align the port definiton a9 is 1, m4 is 2.

    Signed-off-by: Anson Huang
    Signed-off-by: Richard Zhu

    Anson Huang
     

20 Jan, 2017

1 commit

  • commit 488debb9971bc7d0edd6d8080ba78ca02a04f6c4 upstream.

    When borrowing the pfn_valid() check from mmap_kmem(), somebody managed
    to get physical and virtual addresses spectacularly muddled up, such
    that we've ended up with checks for one being the other. Whilst this
    does indeed prevent out-of-bounds accesses crashing, on most systems
    it also prevents the more desirable use-case of working at all ever.

    Check the *virtual* offset correctly for what it is. Furthermore, do
    so in the right place - a read or write may span multiple pages, so a
    single up-front check is insufficient. High memory accesses already
    have a similar validity check just before the copy_to_user() call, so
    just make the low memory path fully consistent with that.

    Reported-by: Jason A. Donenfeld
    Fixes: 148a1bc84398 ("drivers: char: mem: Check {read,write}_kmem() addresses")
    Signed-off-by: Robin Murphy
    Signed-off-by: Greg Kroah-Hartman

    Robin Murphy
     

12 Jan, 2017

1 commit

  • commit 26a137e31ffe6fbfdb008554a8d9b3d55bd5c86e upstream.

    If the TPM we're connecting to uses a static burst count, it will report
    a burst count of zero throughout the response read. However, get_burstcount
    assumes that a response of zero indicates that the TPM is not ready to
    receive more data. In this case, it returns a negative error code, which
    is passed on to tpm_tis_{write,read}_bytes as a u16, causing
    them to read/write far too many bytes.

    This patch checks for negative return codes and bails out from recv_data
    and tpm_tis_send_data.

    Fixes: 1107d065fdf1 (tpm_tis: Introduce intermediate layer for TPM access)
    Signed-off-by: Josh Zimmerman
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Greg Kroah-Hartman

    Josh Zimmerman
     

06 Jan, 2017

1 commit

  • commit 1f0f30e404b3d8f4597a2d9b77fba55452f8fd0e upstream.

    tpm_chip_unregister can only be called after tpm_chip_register.
    devm manages the allocation so no unwind is needed here.

    Fixes: afb5abc262e96 ("tpm: two-phase chip management functions")
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Greg Kroah-Hartman

    Jason Gunthorpe
     

18 Nov, 2016

1 commit

  • The Aspeed SoCs have two BT interfaces : one is IPMI compliant and the
    other is H8S/2168 compliant.

    The current ipmi/bt-bmc driver implements the IPMI version and we
    should reflect its nature in the compatible node name using
    'aspeed,ast2400-ibt-bmc' instead of 'aspeed,ast2400-bt-bmc'. The
    latter should be used for a H8S interface driver if it is implemented
    one day.

    Signed-off-by: Cédric Le Goater
    Signed-off-by: Olof Johansson

    Cédric Le Goater
     

14 Nov, 2016

1 commit

  • Pull char/misc fixes from Greg KH:
    "Here are three small driver fixes for some reported issues for
    4.9-rc5.

    One for the hyper-v subsystem, fixing up a naming issue that showed up
    in 4.9-rc1, one mei driver fix, and one fix for parallel ports,
    resolving a reported regression.

    All have been in linux-next with no reported issues"

    * tag 'char-misc-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    ppdev: fix double-free of pp->pdev->name
    vmbus: make sysfs names consistent with PCI
    mei: bus: fix received data size check in NFC fixup

    Linus Torvalds
     

10 Nov, 2016

1 commit

  • free_pardevice() is called by parport_unregister_device() and already frees
    pp->pdev->name, don't try to do it again.

    This bug causes kernel crashes.

    I found and verified this with KASAN and some added pr_emerg()s:

    [ 60.316568] pp_release: pp->pdev->name == ffff88039cb264c0
    [ 60.316692] free_pardevice: freeing par_dev->name at ffff88039cb264c0
    [ 60.316706] pp_release: kfree(ffff88039cb264c0)
    [ 60.316714] ==========================================================
    [ 60.316722] BUG: Double free or freeing an invalid pointer
    [ 60.316731] Unexpected shadow byte: 0xFB
    [ 60.316801] Object at ffff88039cb264c0, in cache kmalloc-32 size: 32
    [ 60.316813] Allocated:
    [ 60.316824] PID = 1695
    [ 60.316869] Freed:
    [ 60.316880] PID = 1695
    [ 60.316935] ==========================================================

    Signed-off-by: Jann Horn
    Acked-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Jann Horn
     

02 Nov, 2016

1 commit

  • Pull virtio updates from Michael Tsirkin:
    "Tests, fixes and cleanups.

    Just minor tweaks, there's nothing major in this cycle"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio_ring: mark vring_dma_dev inline
    virtio/vhost: add Jason to list of maintainers
    virtio_blk: Delete an unnecessary initialisation in init_vq()
    virtio_blk: Use kmalloc_array() in init_vq()
    virtio: remove config.c
    virtio: console: Unlock vqs while freeing buffers
    ringtest: poll for new buffers once before updating event index
    ringtest: commonize implementation of poll_avail/poll_used
    ringtest: use link-time optimization
    virtio: update balloon size in balloon "probe"
    virtio_ring: Make interrupt suppression spec compliant
    virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices

    Linus Torvalds
     

31 Oct, 2016

2 commits

  • Removal of this check was not properly amended to the original commit.

    Cc: stable@vger.kernel.org
    Fixes: 0c541332231e ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()")
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: James Morris

    Jarkko Sakkinen
     
  • Commit c6017e793b93 ("virtio: console: add locks around buffer removal
    in port unplug path") added locking around the freeing of buffers in the
    vq. However, when free_buf() is called with can_sleep = true and rproc
    is enabled, it calls dma_free_coherent() directly, requiring interrupts
    to be enabled. Currently a WARNING is triggered due to the spin locking
    around free_buf, with a call stack like this:

    WARNING: CPU: 3 PID: 121 at ./include/linux/dma-mapping.h:433
    free_buf+0x1a8/0x288
    Call Trace:
    [] show_stack+0x74/0xc0
    [] dump_stack+0xd0/0x110
    [] __warn+0xfc/0x130
    [] warn_slowpath_null+0x2c/0x3c
    [] free_buf+0x1a8/0x288
    [] remove_port_data+0x50/0xac
    [] unplug_port+0xb4/0x1bc
    [] virtcons_remove+0xb0/0xfc
    [] virtio_dev_remove+0x58/0xc0
    [] __device_release_driver+0xac/0x134
    [] device_release_driver+0x38/0x50
    [] bus_remove_device+0xfc/0x130
    [] device_del+0x17c/0x21c
    [] device_unregister+0x24/0x38
    [] unregister_virtio_device+0x28/0x44

    Fix this by restructuring the loops to allow the locks to only be taken
    where it is necessary to protect the vqs, and release it while the
    buffer is being freed.

    Fixes: c6017e793b93 ("virtio: console: add locks around buffer removal in port unplug path")
    Cc: stable@vger.kernel.org
    Signed-off-by: Matt Redfearn
    Signed-off-by: Michael S. Tsirkin

    Matt Redfearn
     

25 Oct, 2016

1 commit


24 Oct, 2016

1 commit

  • Pull IPMI updates from Corey Minyard:
    "A small bug fix and a new driver for acting as an IPMI device.

    I was on vacation during the merge window (a long vacation) but this
    is a bug fix that should go in and a new driver that shouldn't hurt
    anything.

    This has been in linux-next for a month or so"

    * tag 'for-linus-4.9-2' of git://git.code.sf.net/p/openipmi/linux-ipmi:
    ipmi: fix crash on reading version from proc after unregisted bmc
    ipmi/bt-bmc: remove redundant return value check of platform_get_resource()
    ipmi/bt-bmc: add a dependency on ARCH_ASPEED
    ipmi: Fix ioremap error handling in bt-bmc
    ipmi: add an Aspeed BT IPMI BMC driver

    Linus Torvalds
     

19 Oct, 2016

1 commit


16 Oct, 2016

1 commit

  • Pull gcc plugins update from Kees Cook:
    "This adds a new gcc plugin named "latent_entropy". It is designed to
    extract as much possible uncertainty from a running system at boot
    time as possible, hoping to capitalize on any possible variation in
    CPU operation (due to runtime data differences, hardware differences,
    SMP ordering, thermal timing variation, cache behavior, etc).

    At the very least, this plugin is a much more comprehensive example
    for how to manipulate kernel code using the gcc plugin internals"

    * tag 'gcc-plugins-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    latent_entropy: Mark functions with __latent_entropy
    gcc-plugins: Add latent_entropy plugin

    Linus Torvalds
     

12 Oct, 2016

5 commits

  • Pull uaccess.h prepwork from Al Viro:
    "Preparations to tree-wide switch to use of linux/uaccess.h (which,
    obviously, will allow to start unifying stuff for real). The last step
    there, ie

    PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
    sed -i -e "s!$PATT!#include !" \
    `git grep -l "$PATT"|grep -v ^include/linux/uaccess.h`

    is not taken here - I would prefer to do it once just before or just
    after -rc1. However, everything should be ready for it"

    * 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    remove a stray reference to asm/uaccess.h in docs
    sparc64: separate extable_64.h, switch elf_64.h to it
    score: separate extable.h, switch module.h to it
    mips: separate extable.h, switch module.h to it
    x86: separate extable.h, switch sections.h to it
    remove stray include of asm/uaccess.h from cacheflush.h
    mn10300: remove a bogus processor.h->uaccess.h include
    xtensa: split uaccess.h into C and asm sides
    bonding: quit messing with IOCTL
    kill __kernel_ds_p off
    mn10300: finish verify_area() off
    frv: move HAVE_ARCH_UNMAPPED_AREA to pgtable.h
    exceptions: detritus removal

    Linus Torvalds
     
  • Pull drm updates from Dave Airlie:
    "Core:
    - Fence destaging work
    - DRIVER_LEGACY to split off legacy drm drivers
    - drm_mm refactoring
    - Splitting drm_crtc.c into chunks and documenting better
    - Display info fixes
    - rbtree support for prime buffer lookup
    - Simple VGA DAC driver

    Panel:
    - Add Nexus 7 panel
    - More simple panels

    i915:
    - Refactoring GEM naming
    - Refactored vma/active tracking
    - Lockless request lookups
    - Better stolen memory support
    - FBC fixes
    - SKL watermark fixes
    - VGPU improvements
    - dma-buf fencing support
    - Better DP dongle support

    amdgpu:
    - Powerplay for Iceland asics
    - Improved GPU reset support
    - UVD/VEC powergating support for CZ/ST
    - Preinitialised VRAM buffer support
    - Virtual display support
    - Initial SI support
    - GTT rework
    - PCI shutdown callback support
    - HPD IRQ storm fixes

    amdkfd:
    - bugfixes

    tilcdc:
    - Atomic modesetting support

    mediatek:
    - AAL + GAMMA engine support
    - Hook up gamma LUT
    - Temporal dithering support

    imx:
    - Pixel clock from devicetree
    - drm bridge support for LVDS bridges
    - active plane reconfiguration
    - VDIC deinterlacer support
    - Frame synchronisation unit support
    - Color space conversion support

    analogix:
    - PSR support
    - Better panel on/off support

    rockchip:
    - rk3399 vop/crtc support
    - PSR support

    vc4:
    - Interlaced vblank timing
    - 3D rendering CPU overhead reduction
    - HDMI output fixes

    tda998x:
    - HDMI audio ASoC support

    sunxi:
    - Allwinner A33 support
    - better TCON support

    msm:
    - DT binding cleanups
    - Explicit fence-fd support

    sti:
    - remove sti415/416 support

    etnaviv:
    - MMUv2 refactoring
    - GC3000 support

    exynos:
    - Refactoring HDMI DCC/PHY
    - G2D pm regression fix
    - Page fault issues with wait for vblank

    There is no nouveau work in this tree, as Ben didn't get a pull
    request in, and he was fighting moving to atomic and adding mst
    support, so maybe best it waits for a cycle"

    * tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux: (1412 commits)
    drm/crtc: constify drm_crtc_index parameter
    drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next
    drm/i915/guc: Unwind GuC workqueue reservation if request construction fails
    drm/i915: Reset the breadcrumbs IRQ more carefully
    drm/i915: Force relocations via cpu if we run out of idle aperture
    drm/i915: Distinguish last emitted request from last submitted request
    drm/i915: Allow DP to work w/o EDID
    drm/i915: Move long hpd handling into the hotplug work
    drm/i915/execlists: Reinitialise context image after GPU hang
    drm/i915: Use correct index for backtracking HUNG semaphores
    drm/i915: Unalias obj->phys_handle and obj->userptr
    drm/i915: Just clear the mmiodebug before a register access
    drm/i915/gen9: only add the planes actually affected by ddb changes
    drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED
    drm/i915/bxt: Fix HDMI DPLL configuration
    drm/i915/gen9: fix the watermark res_blocks value
    drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations
    drm/i915/gen9: minimum scanlines for Y tile is not always 4
    drm/i915/gen9: fix the WaWmMemoryReadLatency implementation
    drm/i915/kbl: KBL also needs to run the SAGV code
    ...

    Linus Torvalds
     
  • Kernel source files need not include explicitly
    because the top Makefile forces to include it with:

    -include $(srctree)/include/linux/kconfig.h

    This commit removes explicit includes except the following:

    * arch/s390/include/asm/facilities_src.h
    * tools/testing/radix-tree/linux/kernel.h

    These two are used for host programs.

    Link: http://lkml.kernel.org/r/1473656164-11929-1-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • All call sites for randomize_range have been updated to use the much
    simpler and more robust randomize_addr(). Remove the now unnecessary
    code.

    Link: http://lkml.kernel.org/r/20160803233913.32511-8-jason@lakedaemon.net
    Signed-off-by: Jason Cooper
    Acked-by: Kees Cook
    Cc: "Theodore Ts'o"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     
  • To date, all callers of randomize_range() have set the length to 0, and
    check for a zero return value. For the current callers, the only way to
    get zero returned is if end
    Cc: Nick Kralevich
    Cc: Jeffrey Vander Stoep
    Cc: Daniel Cashman
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Cooper
     

11 Oct, 2016

3 commits

  • Pull more vfs updates from Al Viro:
    ">rename2() work from Miklos + current_time() from Deepa"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: Replace current_fs_time() with current_time()
    fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps
    fs: Replace CURRENT_TIME with current_time() for inode timestamps
    fs: proc: Delete inode time initializations in proc_alloc_inode()
    vfs: Add current_time() api
    vfs: add note about i_op->rename changes to porting
    fs: rename "rename2" i_op to "rename"
    vfs: remove unused i_op->rename
    fs: make remaining filesystems use .rename2
    libfs: support RENAME_NOREPLACE in simple_rename()
    fs: support RENAME_NOREPLACE for local filesystems
    ncpfs: fix unused variable warning

    Linus Torvalds
     
  • The __latent_entropy gcc attribute can be used only on functions and
    variables. If it is on a function then the plugin will instrument it for
    gathering control-flow entropy. If the attribute is on a variable then
    the plugin will initialize it with random contents. The variable must
    be an integer, an integer array type or a structure with integer fields.

    These specific functions have been selected because they are init
    functions (to help gather boot-time entropy), are called at unpredictable
    times, or they have variable loops, each of which provide some level of
    latent entropy.

    Signed-off-by: Emese Revfy
    [kees: expanded commit message]
    Signed-off-by: Kees Cook

    Emese Revfy
     
  • Pull crypto updates from Herbert Xu:
    "Here is the crypto update for 4.9:

    API:
    - The crypto engine code now supports hashes.

    Algorithms:
    - Allow keys >= 2048 bits in FIPS mode for RSA.

    Drivers:
    - Memory overwrite fix for vmx ghash.
    - Add support for building ARM sha1-neon in Thumb2 mode.
    - Reenable ARM ghash-ce code by adding import/export.
    - Reenable img-hash by adding import/export.
    - Add support for multiple cores in omap-aes.
    - Add little-endian support for sha1-powerpc.
    - Add Cavium HWRNG driver for ThunderX SoC"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (137 commits)
    crypto: caam - treat SGT address pointer as u64
    crypto: ccp - Make syslog errors human-readable
    crypto: ccp - clean up data structure
    crypto: vmx - Ensure ghash-generic is enabled
    crypto: testmgr - add guard to dst buffer for ahash_export
    crypto: caam - Unmap region obtained by of_iomap
    crypto: sha1-powerpc - little-endian support
    crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
    crypto: vmx - Fix memory corruption caused by p8_ghash
    crypto: ghash-generic - move common definitions to a new header file
    crypto: caam - fix sg dump
    hwrng: omap - Only fail if pm_runtime_get_sync returns < 0
    crypto: omap-sham - shrink the internal buffer size
    crypto: omap-sham - add support for export/import
    crypto: omap-sham - convert driver logic to use sgs for data xmit
    crypto: omap-sham - change the DMA threshold value to a define
    crypto: omap-sham - add support functions for sg based data handling
    crypto: omap-sham - rename sgl to sgl_tmp for deprecation
    crypto: omap-sham - align algorithms on word offset
    crypto: omap-sham - add context export/import stubs
    ...

    Linus Torvalds
     

10 Oct, 2016

1 commit


08 Oct, 2016

2 commits

  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - Major rework of Book3S 64-bit exception vectors (Nicholas Piggin)
    - Use gas sections for arranging exception vectors et. al.
    - Large set of TM cleanups and selftests (Cyril Bur)
    - Enable transactional memory (TM) lazily for userspace (Cyril Bur)
    - Support for XZ compression in the zImage wrapper (Oliver
    O'Halloran)
    - Add support for bpf constant blinding (Naveen N. Rao)
    - Beginnings of upstream support for PA Semi Nemo motherboards
    (Darren Stevens)

    Fixes:
    - Ensure .mem(init|exit).text are within _stext/_etext (Michael
    Ellerman)
    - xmon: Don't use ld on 32-bit (Michael Ellerman)
    - vdso64: Use double word compare on pointers (Anton Blanchard)
    - powerpc/nvram: Fix an incorrect partition merge (Pan Xinhui)
    - powerpc: Fix usage of _PAGE_RO in hugepage (Christophe Leroy)
    - powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K
    (Aneesh Kumar K.V)
    - Fix memory leak in queue_hotplug_event() error path (Andrew
    Donnellan)
    - Replay hypervisor maintenance interrupt first (Nicholas Piggin)

    Various performance optimisations (Anton Blanchard):
    - Align hot loops of memset() and backwards_memcpy()
    - During context switch, check before setting mm_cpumask
    - Remove static branch prediction in atomic{, 64}_add_unless
    - Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little
    endian
    - Set default CPU type to POWER8 for little endian builds

    Cleanups & features:
    - Sparse fixes/cleanups (Daniel Axtens)
    - Preserve CFAR value on SLB miss caused by access to bogus address
    (Paul Mackerras)
    - Radix MMU fixups for POWER9 (Aneesh Kumar K.V)
    - Support for setting used_(vsr|vr|spe) in sigreturn path (for CRIU)
    (Simon Guo)
    - Optimise syscall entry for virtual, relocatable case (Nicholas
    Piggin)
    - Optimise MSR handling in exception handling (Nicholas Piggin)
    - Support for kexec with Radix MMU (Benjamin Herrenschmidt)
    - powernv EEH fixes (Russell Currey)
    - Suprise PCI hotplug support for powernv (Gavin Shan)
    - Endian/sparse fixes for powernv PCI (Gavin Shan)
    - Defconfig updates (Anton Blanchard)
    - KVM: PPC: Book3S HV: Migrate pinned pages out of CMA (Balbir Singh)
    - cxl: Flush PSL cache before resetting the adapter (Frederic Barrat)
    - cxl: replace loop with for_each_child_of_node(), remove unneeded
    of_node_put() (Andrew Donnellan)
    - Fix HV facility unavailable to use correct handler (Nicholas
    Piggin)
    - Remove unnecessary syscall trampoline (Nicholas Piggin)
    - fadump: Fix build break when CONFIG_PROC_VMCORE=n (Michael
    Ellerman)
    - Quieten EEH message when no adapters are found (Anton Blanchard)
    - powernv: Add PHB register dump debugfs handle (Russell Currey)
    - Use kprobe blacklist for exception handlers & asm functions
    (Nicholas Piggin)
    - Document the syscall ABI (Nicholas Piggin)
    - MAINTAINERS: Update cxl maintainers (Michael Neuling)
    - powerpc: Remove all usages of NO_IRQ (Michael Ellerman)

    Minor cleanups:
    - Andrew Donnellan, Christophe Leroy, Colin Ian King, Cyril Bur,
    Frederic Barrat, Pan Xinhui, PrasannaKumar Muralidharan, Rui Teng,
    Simon Guo"

    * tag 'powerpc-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits)
    powerpc/bpf: Add support for bpf constant blinding
    powerpc/bpf: Implement support for tail calls
    powerpc/bpf: Introduce accessors for using the tmp local stack space
    powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n
    powerpc: tm: Enable transactional memory (TM) lazily for userspace
    powerpc/tm: Add TM Unavailable Exception
    powerpc: Remove do_load_up_transact_{fpu,altivec}
    powerpc: tm: Rename transct_(*) to ck(\1)_state
    powerpc: tm: Always use fp_state and vr_state to store live registers
    selftests/powerpc: Add checks for transactional VSXs in signal contexts
    selftests/powerpc: Add checks for transactional VMXs in signal contexts
    selftests/powerpc: Add checks for transactional FPUs in signal contexts
    selftests/powerpc: Add checks for transactional GPRs in signal contexts
    selftests/powerpc: Check that signals always get delivered
    selftests/powerpc: Add TM tcheck helpers in C
    selftests/powerpc: Allow tests to extend their kill timeout
    selftests/powerpc: Introduce GPR asm helper header file
    selftests/powerpc: Move VMX stack frame macros to header file
    selftests/powerpc: Rework FPU stack placement macros and move to header file
    selftests/powerpc: Check for VSX preservation across userspace preemption
    ...

    Linus Torvalds
     
  • Pull VFS splice updates from Al Viro:
    "There's a bunch of branches this cycle, both mine and from other folks
    and I'd rather send pull requests separately.

    This one is the conversion of ->splice_read() to ITER_PIPE iov_iter
    (and introduction of such). Gets rid of a lot of code in fs/splice.c
    and elsewhere; there will be followups, but these are for the next
    cycle... Some pipe/splice-related cleanups from Miklos in the same
    branch as well"

    * 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    pipe: fix comment in pipe_buf_operations
    pipe: add pipe_buf_steal() helper
    pipe: add pipe_buf_confirm() helper
    pipe: add pipe_buf_release() helper
    pipe: add pipe_buf_get() helper
    relay: simplify relay_file_read()
    switch default_file_splice_read() to use of pipe-backed iov_iter
    switch generic_file_splice_read() to use of ->read_iter()
    new iov_iter flavour: pipe-backed
    fuse_dev_splice_read(): switch to add_to_pipe()
    skb_splice_bits(): get rid of callback
    new helper: add_to_pipe()
    splice: lift pipe_lock out of splice_to_pipe()
    splice: switch get_iovec_page_array() to iov_iter
    splice_to_pipe(): don't open-code wakeup_pipe_readers()
    consistent treatment of EFAULT on O_DIRECT read/write

    Linus Torvalds
     

06 Oct, 2016

2 commits


05 Oct, 2016

1 commit

  • Pull security subsystem updates from James Morris:

    SELinux/LSM:
    - overlayfs support, necessary for container filesystems

    LSM:
    - finally remove the kernel_module_from_file hook

    Smack:
    - treat signal delivery as an 'append' operation

    TPM:
    - lots of bugfixes & updates

    Audit:
    - new audit data type: LSM_AUDIT_DATA_FILE

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (47 commits)
    Revert "tpm/tpm_crb: implement tpm crb idle state"
    Revert "tmp/tpm_crb: fix Intel PTT hw bug during idle state"
    Revert "tpm/tpm_crb: open code the crb_init into acpi_add"
    Revert "tmp/tpm_crb: implement runtime pm for tpm_crb"
    lsm,audit,selinux: Introduce a new audit data type LSM_AUDIT_DATA_FILE
    tmp/tpm_crb: implement runtime pm for tpm_crb
    tpm/tpm_crb: open code the crb_init into acpi_add
    tmp/tpm_crb: fix Intel PTT hw bug during idle state
    tpm/tpm_crb: implement tpm crb idle state
    tpm: add check for minimum buffer size in tpm_transmit()
    tpm: constify TPM 1.x header structures
    tpm/tpm_crb: fix the over 80 characters checkpatch warring
    tpm/tpm_crb: drop useless cpu_to_le32 when writing to registers
    tpm/tpm_crb: cache cmd_size register value.
    tmp/tpm_crb: drop include to platform_device
    tpm/tpm_tis: remove unused itpm variable
    tpm_crb: fix incorrect values of cmdReady and goIdle bits
    tpm_crb: refine the naming of constants
    tpm_crb: remove wmb()'s
    tpm_crb: fix crb_req_canceled behavior
    ...

    Linus Torvalds
     

04 Oct, 2016

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the "big" char and misc driver update for 4.9-rc1.

    Lots of little things here, all over the driver tree for subsystems
    that flow through me. Nothing major that I can discern, full details
    are in the shortlog.

    All have been in the linux-next tree with no reported issues"

    * tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (144 commits)
    drivers/misc/hpilo: Changes to support new security states in iLO5 FW
    at25: fix debug and error messaging
    misc/genwqe: ensure zero initialization
    vme: fake: remove unexpected unlock in fake_master_set()
    vme: fake: mark symbols static where possible
    spmi: pmic-arb: Return an error code if sanity check fails
    Drivers: hv: get rid of id in struct vmbus_channel
    Drivers: hv: make VMBus bus ids persistent
    mcb: Add a dma_device to mcb_device
    mcb: Enable PCI bus mastering by default
    mei: stop the stall timer worker if not needed
    clk: probe common clock drivers earlier
    vme: fake: fix build for 64-bit dma_addr_t
    ttyprintk: Neaten and simplify printing
    mei: me: add kaby point device ids
    coresight: tmc: mark symbols static where possible
    coresight: perf: deal with error condition properly
    Drivers: hv: hv_util: Avoid dynamic allocation in time synch
    fpga manager: Add hardware dependency to Zynq driver
    Drivers: hv: utils: Support TimeSync version 4.0 protocol samples.
    ...

    Linus Torvalds
     

03 Oct, 2016

1 commit

  • I meet a crash, which could be reproduce:
    1) while true; do cat /proc/ipmi/0/version; done
    2) modprobe -rv ipmi_si ipmi_msghandler ipmi_devintf

    [82761.021137] IPMI BT: req2rsp=5 secs retries=2
    [82761.034524] ipmi device interface
    [82761.222218] ipmi_si ipmi_si.0: Found new BMC (man_id: 0x0007db, prod_id: 0x0001, dev_id: 0x01)
    [82761.222230] ipmi_si ipmi_si.0: IPMI bt interface initialized
    [82903.922740] BUG: unable to handle kernel NULL pointer dereference at 00000000000002d4
    [82903.930952] IP: [] smi_version_proc_show+0x18/0x40 [ipmi_msghandler]
    [82903.939220] PGD 86693a067 PUD 865304067 PMD 0
    [82903.943893] Thread overran stack, or stack corrupted
    [82903.949034] Oops: 0000 [#1] SMP
    [82903.983091] Modules linked in: ipmi_si(-) ipmi_msghandler binfmt_misc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter
    ...
    [82904.057285] pps_core scsi_transport_sas dm_mod vfio_iommu_type1 vfio xt_sctp nf_conntrack_proto_sctp nf_nat_proto_sctp
    nf_nat nf_conntrack sctp libcrc32c [last unloaded: ipmi_devintf]
    [82904.073169] CPU: 37 PID: 28089 Comm: cat Tainted: GF O ---- ------- 3.10.0-327.28.3.el7.x86_64 #1
    [82904.083373] Hardware name: Huawei RH2288H V3/BC11HGSA0, BIOS 3.22 05/16/2016
    [82904.090592] task: ffff880101cc2e00 ti: ffff880369c54000 task.ti: ffff880369c54000
    [82904.098414] RIP: 0010:[] [] smi_version_proc_show+0x18/0x40 [ipmi_msghandler]
    [82904.109124] RSP: 0018:ffff880369c57e70 EFLAGS: 00010203
    [82904.114608] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000024688470
    [82904.121912] RDX: fffffffffffffff4 RSI: ffffffffa0313404 RDI: ffff8808670ce200
    [82904.129218] RBP: ffff880369c57e70 R08: 0000000000019720 R09: ffffffff81204a27
    [82904.136521] R10: ffff88046f803300 R11: 0000000000000246 R12: ffff880662399700
    [82904.143828] R13: 0000000000000001 R14: ffff880369c57f48 R15: ffff8808670ce200
    [82904.151128] FS: 00007fb70c9ca740(0000) GS:ffff88086e340000(0000) knlGS:0000000000000000
    [82904.159557] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [82904.165473] CR2: 00000000000002d4 CR3: 0000000864c0c000 CR4: 00000000003407e0
    [82904.172778] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [82904.180084] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [82904.187385] Stack:
    [82904.189573] ffff880369c57ee0 ffffffff81204f1a 00000000122a2427 0000000001426000
    [82904.197392] ffff8808670ce238 0000000000010000 0000000000000000 0000000000000fff
    [82904.205198] 00000000122a2427 ffff880862079600 0000000001426000 ffff880369c57f48
    [82904.212962] Call Trace:
    [82904.219667] [] seq_read+0xfa/0x3a0
    [82904.224893] [] proc_reg_read+0x3d/0x80
    [82904.230468] [] vfs_read+0x9c/0x170
    [82904.235689] [] SyS_read+0x7f/0xe0
    [82904.240816] [] system_call_fastpath+0x16/0x1b
    [82904.246991] Code: 30 a0 e8 0c 6f ef e0 5b 5d c3 66 0f 1f 84 00 00 00 00 00 0f 1f
    44 00 00 48 8b 47 78 55 48 c7 c6 04 34 31 a0 48 89 e5 48 8b 40 50
    b6 90 d4 02 00 00 31 c0 89 d1 83 e2 0f c0 e9 04 0f b6 c9 e8
    [82904.267710] RIP [] smi_version_proc_show+0x18/0x40 [ipmi_msghandler]
    [82904.276079] RSP
    [82904.279734] CR2: 00000000000002d4
    [82904.283731] ---[ end trace a69e4328b49dd7c4 ]---
    [82904.328118] Kernel panic - not syncing: Fatal exception

    Reading versin from /proc need bmc device struct available. So in this patch
    we move add/remove_proc_entries between ipmi_bmc_register and ipmi_bmc_unregister.

    Cc: Kefeng Wang
    Signed-off-by: Xie XiuQi
    Signed-off-by: Corey Minyard

    Xie XiuQi
     

30 Sep, 2016

3 commits