18 Apr, 2019

8 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
    Signed-off-by: Vipul Kumar

    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
    (TODO: checkpatch warnings)
    Signed-off-by: Vipul Kumar

    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)
    Signed-off-by: Vipul Kumar

    Peng Fan
     
  • Add ocotp support for i.MX6ULL.

    Signed-off-by: Peng Fan
    Signed-off-by: Vipul Kumar

    Peng Fan
     
  • 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
    (Vipul: Fixed merge conflicts)
    Signed-off-by: Vipul Kumar

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

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

    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
    (Vipul: Fixed merge conflicts)
    TODO: checkpatch warnings
    Signed-off-by: Vipul Kumar

    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
    [Arul: Fix merge conflicts]
    Signed-off-by: Arulpandiyan Vadivel

    Anson Huang
     

17 Apr, 2019

1 commit

  • commit c7084edc3f6d67750f50d4183134c4fb5712a5c8 upstream.

    The n_r3964 line discipline driver was written in a different time, when
    SMP machines were rare, and users were trusted to do the right thing.
    Since then, the world has moved on but not this code, it has stayed
    rooted in the past with its lovely hand-crafted list structures and
    loads of "interesting" race conditions all over the place.

    After attempting to clean up most of the issues, I just gave up and am
    now marking the driver as BROKEN so that hopefully someone who has this
    hardware will show up out of the woodwork (I know you are out there!)
    and will help with debugging a raft of changes that I had laying around
    for the code, but was too afraid to commit as odds are they would break
    things.

    Many thanks to Jann and Linus for pointing out the initial problems in
    this codebase, as well as many reviews of my attempts to fix the issues.
    It was a case of whack-a-mole, and as you can see, the mole won.

    Reported-by: Jann Horn
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Greg Kroah-Hartman
     

06 Apr, 2019

2 commits

  • [ Upstream commit 24d48a61f2666630da130cc2ec2e526eacf229e3 ]

    Commit '3d035f580699 ("drivers/char/hpet.c: allow user controlled mmap for
    user processes")' introduced a new kernel command line parameter hpet_mmap,
    that is required to expose the memory map of the HPET registers to
    user-space. Unfortunately the kernel command line parameter 'hpet_mmap' is
    broken and never takes effect due to missing '=' character in the __setup()
    code of hpet_mmap_enable.

    Before this patch:

    dmesg output with the kernel command line parameter hpet_mmap=1

    [ 0.204152] HPET mmap disabled

    dmesg output with the kernel command line parameter hpet_mmap=0

    [ 0.204192] HPET mmap disabled

    After this patch:

    dmesg output with the kernel command line parameter hpet_mmap=1

    [ 0.203945] HPET mmap enabled

    dmesg output with the kernel command line parameter hpet_mmap=0

    [ 0.204652] HPET mmap disabled

    Fixes: 3d035f580699 ("drivers/char/hpet.c: allow user controlled mmap for user processes")
    Signed-off-by: Buland Singh
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Sasha Levin

    Buland Singh
     
  • [ Upstream commit aef027db48da56b6f25d0e54c07c8401ada6ce21 ]

    The virtio-rng driver uses a completion called have_data to wait for a
    virtio read to be fulfilled by the hypervisor. The completion is reset
    before placing a buffer on the virtio queue and completed by the virtio
    callback once data has been written into the buffer.

    Prior to this commit, the driver called init_completion on this
    completion both during probe as well as when registering virtio buffers
    as part of a hwrng read operation. The second of these init_completion
    calls should instead be reinit_completion because the have_data
    completion has already been inited by probe. As described in
    Documentation/scheduler/completion.txt, "Calling init_completion() twice
    on the same completion object is most likely a bug".

    This bug was present in the initial implementation of virtio-rng in
    f7f510ec1957 ("virtio: An entropy device, as suggested by hpa"). Back
    then the have_data completion was a single static completion rather than
    a member of one of potentially multiple virtrng_info structs as
    implemented later by 08e53fbdb85c ("virtio-rng: support multiple
    virtio-rng devices"). The original driver incorrectly used
    init_completion rather than INIT_COMPLETION to reset have_data during
    read.

    Tested by running `head -c48 /dev/random | hexdump` within crosvm, the
    Chrome OS virtual machine monitor, and confirming that the virtio-rng
    driver successfully produces random bytes from the host.

    Signed-off-by: David Tolnay
    Tested-by: David Tolnay
    Signed-off-by: Herbert Xu
    Signed-off-by: Sasha Levin

    David Tolnay
     

03 Apr, 2019

1 commit

  • Backport from 41b766d661bf94a364960862cfc248a78313dbd3

    When excuting a command like:
    modprobe ipmi_si ports=0xffc0e3 type=bt
    The system would get an oops.

    The trouble here is that ipmi_si_hardcode_find_bmc() is called before
    ipmi_si_platform_init(), but initialization of the hard-coded device
    creates an IPMI platform device, which won't be initialized yet.

    The real trouble is that hard-coded devices aren't created with
    any device, and the fixup is done later. So do it right, create the
    hard-coded devices as normal platform devices.

    This required adding some new resource types to the IPMI platform
    code for passing information required by the hard-coded device
    and adding some code to remove the hard-coded platform devices
    on module removal.

    To enforce the "hard-coded devices passed by the user take priority
    over firmware devices" rule, some special code was added to check
    and see if a hard-coded device already exists.

    The backport required some minor fixups and adding the device
    id table that had been added in another change and was used
    in this one.

    Reported-by: Yang Yingliang
    Cc: stable@vger.kernel.org # v4.15+
    Signed-off-by: Corey Minyard
    Tested-by: Yang Yingliang
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Corey Minyard
     

24 Mar, 2019

3 commits

  • commit f5595f5baa30e009bf54d0d7653a9a0cc465be60 upstream.

    The send() callback should never return length as it does not in every
    driver except tpm_crb in the success case. The reason is that the main
    transmit functionality only cares about whether the transmit was
    successful or not and ignores the count completely.

    Suggested-by: Stefan Berger
    Cc: stable@vger.kernel.org
    Signed-off-by: Jarkko Sakkinen
    Reviewed-by: Stefan Berger
    Reviewed-by: Jerry Snitselaar
    Tested-by: Alexander Steffen
    Signed-off-by: Greg Kroah-Hartman

    Jarkko Sakkinen
     
  • commit 3d7a850fdc1a2e4d2adbc95cc0fc962974725e88 upstream.

    The current approach to read first 6 bytes from the response and then tail
    of the response, can cause the 2nd memcpy_fromio() to do an unaligned read
    (e.g. read 32-bit word from address aligned to a 16-bits), depending on how
    memcpy_fromio() is implemented. If this happens, the read will fail and the
    memory controller will fill the read with 1's.

    This was triggered by 170d13ca3a2f, which should be probably refined to
    check and react to the address alignment. Before that commit, on x86
    memcpy_fromio() turned out to be memcpy(). By a luck GCC has done the right
    thing (from tpm_crb's perspective) for us so far, but we should not rely on
    that. Thus, it makes sense to fix this also in tpm_crb, not least because
    the fix can be then backported to stable kernels and make them more robust
    when compiled in differing environments.

    Cc: stable@vger.kernel.org
    Cc: James Morris
    Cc: Tomas Winkler
    Cc: Jerry Snitselaar
    Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface")
    Signed-off-by: Jarkko Sakkinen
    Reviewed-by: Jerry Snitselaar
    Acked-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    Jarkko Sakkinen
     
  • commit 401e7e88d4ef80188ffa07095ac00456f901b8c4 upstream.

    When we excute the following commands, we got oops
    rmmod ipmi_si
    cat /proc/ioports

    [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
    [ 1623.482382] Mem abort info:
    [ 1623.482383] ESR = 0x96000007
    [ 1623.482385] Exception class = DABT (current EL), IL = 32 bits
    [ 1623.482386] SET = 0, FnV = 0
    [ 1623.482387] EA = 0, S1PTW = 0
    [ 1623.482388] Data abort info:
    [ 1623.482389] ISV = 0, ISS = 0x00000007
    [ 1623.482390] CM = 0, WnR = 0
    [ 1623.482393] swapper pgtable: 4k pages, 48-bit VAs, pgdp = 00000000d7d94a66
    [ 1623.482395] [ffff00000901d478] pgd=000000dffbfff003, pud=000000dffbffe003, pmd=0000003f5d06e003, pte=0000000000000000
    [ 1623.482399] Internal error: Oops: 96000007 [#1] SMP
    [ 1623.487407] Modules linked in: ipmi_si(E) nls_utf8 isofs rpcrdma ib_iser ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib rdma_ucm ib_umad rdma_cm ib_cm dm_mirror dm_region_hash dm_log iw_cm dm_mod aes_ce_blk crypto_simd cryptd aes_ce_cipher ses ghash_ce sha2_ce enclosure sha256_arm64 sg sha1_ce hisi_sas_v2_hw hibmc_drm sbsa_gwdt hisi_sas_main ip_tables mlx5_ib ib_uverbs marvell ib_core mlx5_core ixgbe mdio hns_dsaf ipmi_devintf hns_enet_drv ipmi_msghandler hns_mdio [last unloaded: ipmi_si]
    [ 1623.532410] CPU: 30 PID: 11438 Comm: cat Kdump: loaded Tainted: G E 5.0.0-rc3+ #168
    [ 1623.541498] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.37 11/21/2017
    [ 1623.548822] pstate: a0000005 (NzCv daif -PAN -UAO)
    [ 1623.553684] pc : string+0x28/0x98
    [ 1623.557040] lr : vsnprintf+0x368/0x5e8
    [ 1623.560837] sp : ffff000013213a80
    [ 1623.564191] x29: ffff000013213a80 x28: ffff00001138abb5
    [ 1623.569577] x27: ffff000013213c18 x26: ffff805f67d06049
    [ 1623.574963] x25: 0000000000000000 x24: ffff00001138abb5
    [ 1623.580349] x23: 0000000000000fb7 x22: ffff0000117ed000
    [ 1623.585734] x21: ffff000011188fd8 x20: ffff805f67d07000
    [ 1623.591119] x19: ffff805f67d06061 x18: ffffffffffffffff
    [ 1623.596505] x17: 0000000000000200 x16: 0000000000000000
    [ 1623.601890] x15: ffff0000117ed748 x14: ffff805f67d07000
    [ 1623.607276] x13: ffff805f67d0605e x12: 0000000000000000
    [ 1623.612661] x11: 0000000000000000 x10: 0000000000000000
    [ 1623.618046] x9 : 0000000000000000 x8 : 000000000000000f
    [ 1623.623432] x7 : ffff805f67d06061 x6 : fffffffffffffffe
    [ 1623.628817] x5 : 0000000000000012 x4 : ffff00000901d478
    [ 1623.634203] x3 : ffff0a00ffffff04 x2 : ffff805f67d07000
    [ 1623.639588] x1 : ffff805f67d07000 x0 : ffffffffffffffff
    [ 1623.644974] Process cat (pid: 11438, stack limit = 0x000000008d4cbc10)
    [ 1623.651592] Call trace:
    [ 1623.654068] string+0x28/0x98
    [ 1623.657071] vsnprintf+0x368/0x5e8
    [ 1623.660517] seq_vprintf+0x70/0x98
    [ 1623.668009] seq_printf+0x7c/0xa0
    [ 1623.675530] r_show+0xc8/0xf8
    [ 1623.682558] seq_read+0x330/0x440
    [ 1623.689877] proc_reg_read+0x78/0xd0
    [ 1623.697346] __vfs_read+0x60/0x1a0
    [ 1623.704564] vfs_read+0x94/0x150
    [ 1623.711339] ksys_read+0x6c/0xd8
    [ 1623.717939] __arm64_sys_read+0x24/0x30
    [ 1623.725077] el0_svc_common+0x120/0x148
    [ 1623.732035] el0_svc_handler+0x30/0x40
    [ 1623.738757] el0_svc+0x8/0xc
    [ 1623.744520] Code: d1000406 aa0103e2 54000149 b4000080 (39400085)
    [ 1623.753441] ---[ end trace f91b6a4937de9835 ]---
    [ 1623.760871] Kernel panic - not syncing: Fatal exception
    [ 1623.768935] SMP: stopping secondary CPUs
    [ 1623.775718] Kernel Offset: disabled
    [ 1623.781998] CPU features: 0x002,21006008
    [ 1623.788777] Memory Limit: none
    [ 1623.798329] Starting crashdump kernel...
    [ 1623.805202] Bye!

    If io_setup is called successful in try_smi_init() but try_smi_init()
    goes out_err before calling ipmi_register_smi(), so ipmi_unregister_smi()
    will not be called while removing module. It leads to the resource that
    allocated in io_setup() can not be freed, but the name(DEVICE_NAME) of
    resource is freed while removing the module. It causes use-after-free
    when cat /proc/ioports.

    Fix this by calling io_cleanup() while try_smi_init() goes to out_err.
    and don't call io_cleanup() until io_setup() returns successful to avoid
    warning prints.

    Fixes: 93c303d2045b ("ipmi_si: Clean up shutdown a bit")
    Cc: stable@vger.kernel.org
    Reported-by: NuoHan Qiao
    Suggested-by: Corey Minyard
    Signed-off-by: Yang Yingliang
    Signed-off-by: Corey Minyard
    Signed-off-by: Greg Kroah-Hartman

    Yang Yingliang
     

10 Mar, 2019

1 commit

  • commit d7ac3c6ef5d8ce14b6381d52eb7adafdd6c8bb3c upstream.

    IndexCard is indirectly controlled by user-space, hence leading to
    a potential exploitation of the Spectre variant 1 vulnerability.

    This issue was detected with the help of Smatch:

    drivers/char/applicom.c:418 ac_write() warn: potential spectre issue 'apbs' [r]
    drivers/char/applicom.c:728 ac_ioctl() warn: potential spectre issue 'apbs' [r] (local cap)

    Fix this by sanitizing IndexCard before using it to index apbs.

    Notice that given that speculation windows are large, the policy is
    to kill the speculation on the first load and not worry if it can be
    completed with a dependent load/store [1].

    [1] https://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/

    Cc: stable@vger.kernel.org
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     

31 Jan, 2019

1 commit

  • commit 701956d4018e5d5438570e39e8bda47edd32c489 upstream.

    ipcnum is indirectly controlled by user-space, hence leading to
    a potential exploitation of the Spectre variant 1 vulnerability.

    This issue was detected with the help of Smatch:

    drivers/char/mwave/mwavedd.c:299 mwave_ioctl() warn: potential spectre issue 'pDrvData->IPCs' [w] (local cap)

    Fix this by sanitizing ipcnum before using it to index pDrvData->IPCs.

    Notice that given that speculation windows are large, the policy is
    to kill the speculation on the first load and not worry if it can be
    completed with a dependent load/store [1].

    [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

    Cc: stable@vger.kernel.org
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     

26 Jan, 2019

5 commits

  • commit 913a89f009d98c85a902d718cd54bb32ab11d167 upstream.

    The IPMI driver was recently modified to use SRCU, but it turns out
    this uses a chunk of percpu memory, even if IPMI is never used.

    So modify thing to on initialize on the first use. There was already
    code to sort of handle this for handling init races, so piggy back
    on top of that, and simplify it in the process.

    Signed-off-by: Corey Minyard
    Reported-by: Tejun Heo
    Cc: Paul E. McKenney
    Reviewed-by: Paul E. McKenney
    Cc: stable@vger.kernel.org # 4.18
    Signed-off-by: Greg Kroah-Hartman

    Corey Minyard
     
  • commit 7d6380cd40f7993f75c4bde5b36f6019237e8719 upstream.

    The block number was not being compared right, it was off by one
    when checking the response.

    Some statistics wouldn't be incremented properly in some cases.

    Check to see if that middle-part messages always have 31 bytes of
    data.

    Signed-off-by: Corey Minyard
    Cc: stable@vger.kernel.org # 4.4
    Signed-off-by: Greg Kroah-Hartman

    Corey Minyard
     
  • commit 479d6b39b9e0d2de648ebf146f23a1e40962068f upstream.

    Some IPMI modules (e.g. ibmpex_msg_handler()) will have ipmi_usr_hdlr
    handlers that call ipmi_free_recv_msg() directly. This will essentially
    kfree(msg), leading to use-after-free.

    This does not happen in the ipmi_devintf module, which will queue the
    message and run ipmi_free_recv_msg() later.

    BUG: KASAN: use-after-free in deliver_response+0x12f/0x1b0
    Read of size 8 at addr ffff888a7bf20018 by task ksoftirqd/3/27
    CPU: 3 PID: 27 Comm: ksoftirqd/3 Tainted: G O 4.19.11-amd64-ani99-debug #12.0.1.601133+pv
    Hardware name: AppNeta r1000/X11SPW-TF, BIOS 2.1a-AP 09/17/2018
    Call Trace:
    dump_stack+0x92/0xeb
    print_address_description+0x73/0x290
    kasan_report+0x258/0x380
    deliver_response+0x12f/0x1b0
    ? ipmi_free_recv_msg+0x50/0x50
    deliver_local_response+0xe/0x50
    handle_one_recv_msg+0x37a/0x21d0
    handle_new_recv_msgs+0x1ce/0x440
    ...

    Allocated by task 9885:
    kasan_kmalloc+0xa0/0xd0
    kmem_cache_alloc_trace+0x116/0x290
    ipmi_alloc_recv_msg+0x28/0x70
    i_ipmi_request+0xb4a/0x1640
    ipmi_request_settime+0x1b8/0x1e0
    ...

    Freed by task 27:
    __kasan_slab_free+0x12e/0x180
    kfree+0xe9/0x280
    deliver_response+0x122/0x1b0
    deliver_local_response+0xe/0x50
    handle_one_recv_msg+0x37a/0x21d0
    handle_new_recv_msgs+0x1ce/0x440
    tasklet_action_common.isra.19+0xc4/0x250
    __do_softirq+0x11f/0x51f

    Fixes: e86ee2d44b44 ("ipmi: Rework locking and shutdown for hot remove")
    Cc: stable@vger.kernel.org # 4.18
    Signed-off-by: Fred Klassen
    Signed-off-by: Corey Minyard
    Signed-off-by: Greg Kroah-Hartman

    Fred Klassen
     
  • commit a7102c7461794a5bb31af24b08e9e0f50038897a upstream.

    channel and addr->channel are indirectly controlled by user-space,
    hence leading to a potential exploitation of the Spectre variant 1
    vulnerability.

    These issues were detected with the help of Smatch:

    drivers/char/ipmi/ipmi_msghandler.c:1381 ipmi_set_my_address() warn: potential spectre issue 'user->intf->addrinfo' [w] (local cap)
    drivers/char/ipmi/ipmi_msghandler.c:1401 ipmi_get_my_address() warn: potential spectre issue 'user->intf->addrinfo' [r] (local cap)
    drivers/char/ipmi/ipmi_msghandler.c:1421 ipmi_set_my_LUN() warn: potential spectre issue 'user->intf->addrinfo' [w] (local cap)
    drivers/char/ipmi/ipmi_msghandler.c:1441 ipmi_get_my_LUN() warn: potential spectre issue 'user->intf->addrinfo' [r] (local cap)
    drivers/char/ipmi/ipmi_msghandler.c:2260 check_addr() warn: potential spectre issue 'intf->addrinfo' [r] (local cap)

    Fix this by sanitizing channel and addr->channel before using them to
    index user->intf->addrinfo and intf->addrinfo, correspondingly.

    Notice that given that speculation windows are large, the policy is
    to kill the speculation on the first load and not worry if it can be
    completed with a dependent load/store [1].

    [1] https://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/

    Cc: stable@vger.kernel.org
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Corey Minyard
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     
  • commit 77f8269606bf95fcb232ee86f6da80886f1dfae8 upstream.

    When we do the following test, we got oops in ipmi_msghandler driver
    while((1))
    do
    service ipmievd restart & service ipmievd restart
    done

    ---------------------------------------------------------------
    [ 294.230186] Unable to handle kernel paging request at virtual address 0000803fea6ea008
    [ 294.230188] Mem abort info:
    [ 294.230190] ESR = 0x96000004
    [ 294.230191] Exception class = DABT (current EL), IL = 32 bits
    [ 294.230193] SET = 0, FnV = 0
    [ 294.230194] EA = 0, S1PTW = 0
    [ 294.230195] Data abort info:
    [ 294.230196] ISV = 0, ISS = 0x00000004
    [ 294.230197] CM = 0, WnR = 0
    [ 294.230199] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000a1c1b75a
    [ 294.230201] [0000803fea6ea008] pgd=0000000000000000
    [ 294.230204] Internal error: Oops: 96000004 [#1] SMP
    [ 294.235211] Modules linked in: nls_utf8 isofs rpcrdma ib_iser ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib rdma_ucm ib_umad rdma_cm ib_cm iw_cm dm_mirror dm_region_hash dm_log dm_mod aes_ce_blk crypto_simd cryptd aes_ce_cipher ghash_ce sha2_ce ses sha256_arm64 sha1_ce hibmc_drm hisi_sas_v2_hw enclosure sg hisi_sas_main sbsa_gwdt ip_tables mlx5_ib ib_uverbs marvell ib_core mlx5_core ixgbe ipmi_si mdio hns_dsaf ipmi_devintf ipmi_msghandler hns_enet_drv hns_mdio
    [ 294.277745] CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Not tainted 5.0.0-rc2+ #113
    [ 294.285511] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.37 11/21/2017
    [ 294.292835] pstate: 80000005 (Nzcv daif -PAN -UAO)
    [ 294.297695] pc : __srcu_read_lock+0x38/0x58
    [ 294.301940] lr : acquire_ipmi_user+0x2c/0x70 [ipmi_msghandler]
    [ 294.307853] sp : ffff00001001bc80
    [ 294.311208] x29: ffff00001001bc80 x28: ffff0000117e5000
    [ 294.316594] x27: 0000000000000000 x26: dead000000000100
    [ 294.321980] x25: dead000000000200 x24: ffff803f6bd06800
    [ 294.327366] x23: 0000000000000000 x22: 0000000000000000
    [ 294.332752] x21: ffff00001001bd04 x20: ffff80df33d19018
    [ 294.338137] x19: ffff80df33d19018 x18: 0000000000000000
    [ 294.343523] x17: 0000000000000000 x16: 0000000000000000
    [ 294.348908] x15: 0000000000000000 x14: 0000000000000002
    [ 294.354293] x13: 0000000000000000 x12: 0000000000000000
    [ 294.359679] x11: 0000000000000000 x10: 0000000000100000
    [ 294.365065] x9 : 0000000000000000 x8 : 0000000000000004
    [ 294.370451] x7 : 0000000000000000 x6 : ffff80df34558678
    [ 294.375836] x5 : 000000000000000c x4 : 0000000000000000
    [ 294.381221] x3 : 0000000000000001 x2 : 0000803fea6ea000
    [ 294.386607] x1 : 0000803fea6ea008 x0 : 0000000000000001
    [ 294.391994] Process swapper/3 (pid: 0, stack limit = 0x0000000083087293)
    [ 294.398791] Call trace:
    [ 294.401266] __srcu_read_lock+0x38/0x58
    [ 294.405154] acquire_ipmi_user+0x2c/0x70 [ipmi_msghandler]
    [ 294.410716] deliver_response+0x80/0xf8 [ipmi_msghandler]
    [ 294.416189] deliver_local_response+0x28/0x68 [ipmi_msghandler]
    [ 294.422193] handle_one_recv_msg+0x158/0xcf8 [ipmi_msghandler]
    [ 294.432050] handle_new_recv_msgs+0xc0/0x210 [ipmi_msghandler]
    [ 294.441984] smi_recv_tasklet+0x8c/0x158 [ipmi_msghandler]
    [ 294.451618] tasklet_action_common.isra.5+0x88/0x138
    [ 294.460661] tasklet_action+0x2c/0x38
    [ 294.468191] __do_softirq+0x120/0x2f8
    [ 294.475561] irq_exit+0x134/0x140
    [ 294.482445] __handle_domain_irq+0x6c/0xc0
    [ 294.489954] gic_handle_irq+0xb8/0x178
    [ 294.497037] el1_irq+0xb0/0x140
    [ 294.503381] arch_cpu_idle+0x34/0x1a8
    [ 294.510096] do_idle+0x1d4/0x290
    [ 294.516322] cpu_startup_entry+0x28/0x30
    [ 294.523230] secondary_start_kernel+0x184/0x1d0
    [ 294.530657] Code: d538d082 d2800023 8b010c81 8b020021 (c85f7c25)
    [ 294.539746] ---[ end trace 8a7a880dee570b29 ]---
    [ 294.547341] Kernel panic - not syncing: Fatal exception in interrupt
    [ 294.556837] SMP: stopping secondary CPUs
    [ 294.563996] Kernel Offset: disabled
    [ 294.570515] CPU features: 0x002,21006008
    [ 294.577638] Memory Limit: none
    [ 294.587178] Starting crashdump kernel...
    [ 294.594314] Bye!

    Because the user->release_barrier.rda is freed in ipmi_destroy_user(), but
    the refcount is not zero, when acquire_ipmi_user() uses user->release_barrier.rda
    in __srcu_read_lock(), it causes oops.
    Fix this by calling cleanup_srcu_struct() when the refcount is zero.

    Fixes: e86ee2d44b44 ("ipmi: Rework locking and shutdown for hot remove")
    Cc: stable@vger.kernel.org # 4.18
    Signed-off-by: Yang Yingliang
    Signed-off-by: Corey Minyard
    Signed-off-by: Greg Kroah-Hartman

    Yang Yingliang
     

10 Jan, 2019

2 commits

  • commit 2ba5780ce30549cf57929b01d8cba6fe656e31c5 upstream.

    tpm_i2c_nuvoton calculated commands duration using TPM 1.x
    values via tpm_calc_ordinal_duration() also for TPM 2.x chips.
    Call tpm2_calc_ordinal_duration() for retrieving ordinal
    duration for TPM 2.X chips.

    Cc: stable@vger.kernel.org
    Cc: Nayna Jain
    Signed-off-by: Tomas Winkler
    Reviewed-by: Nayna Jain
    Tested-by: Nayna Jain (For TPM 2.0)
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Greg Kroah-Hartman

    Tomas Winkler
     
  • commit 01f54664a4db0d612de0ece8e0022f21f9374e9b upstream.

    First, rename out_no_locality to out_locality for bailing out on
    both tpm_cmd_ready() and tpm_request_locality() failure.
    Second, ignore the return value of go_to_idle() as it may override
    the return value of the actual tpm operation, the go_to_idle() error
    will be caught on any consequent command.
    Last, fix the wrong 'goto out', that jumped back instead of forward.

    Cc: stable@vger.kernel.org
    Fixes: 627448e85c76 ("tpm: separate cmd_ready/go_idle from runtime_pm")
    Signed-off-by: Tomas Winkler
    Reviewed-by: Jarkko Sakkinen
    Tested-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Greg Kroah-Hartman

    Tomas Winkler
     

14 Nov, 2018

4 commits

  • commit 84b59f6487d82d3ab4247a099aba66d4d17e8b08 upstream.

    When checking whether the response is large enough to be able to contain
    the received random bytes in tpm_get_random() and tpm2_get_random(),
    they fail to take account the header size, which should be added to the
    minimum size. This commit fixes this issue.

    Cc: stable@vger.kernel.org
    Fixes: c659af78eb7b ("tpm: Check size of response before accessing data")
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Greg Kroah-Hartman

    Jarkko Sakkinen
     
  • commit e487a0f52301293152a6f8c4e217f2a11dd808e3 upstream.

    Functionality of the xen-tpmfront driver was lost secondary to
    the introduction of xenbus multi-page support in commit ccc9d90a9a8b
    ("xenbus_client: Extend interface to support multi-page ring").

    In this commit pointer to location of where the shared page address
    is stored was being passed to the xenbus_grant_ring() function rather
    then the address of the shared page itself. This resulted in a situation
    where the driver would attach to the vtpm-stubdom but any attempt
    to send a command to the stub domain would timeout.

    A diagnostic finding for this regression is the following error
    message being generated when the xen-tpmfront driver probes for a
    device:

    vtpm vtpm-0: tpm_transmit: tpm_send: error -62

    vtpm vtpm-0: A TPM error (-62) occurred attempting to determine
    the timeouts

    This fix is relevant to all kernels from 4.1 forward which is the
    release in which multi-page xenbus support was introduced.

    Daniel De Graaf formulated the fix by code inspection after the
    regression point was located.

    Fixes: ccc9d90a9a8b ("xenbus_client: Extend interface to support multi-page ring")
    Signed-off-by: Dr. Greg Wettstein
    Signed-off-by: Greg Kroah-Hartman

    [boris: Updated commit message, added Fixes tag]
    Signed-off-by: Boris Ostrovsky
    Cc: stable@vger.kernel.org # v4.1+
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen

    Dr. Greg Wettstein
     
  • [ Upstream commit 0d6d0d62d9505a9816716aa484ebd0b04c795063 ]

    For TPM 1.2 chips the system setup utility allows to set the TPM device in
    one of the following states:

    * Active: Security chip is functional
    * Inactive: Security chip is visible, but is not functional
    * Disabled: Security chip is hidden and is not functional

    When choosing the "Inactive" state, the TPM 1.2 device is enumerated and
    registered, but sending TPM commands fail with either TPM_DEACTIVATED or
    TPM_DISABLED depending if the firmware deactivated or disabled the TPM.

    Since these TPM 1.2 error codes don't have special treatment, inactivating
    the TPM leads to a very noisy kernel log buffer that shows messages like
    the following:

    tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
    tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
    tpm tpm0: TPM is disabled/deactivated (0x6)
    tpm tpm0: A TPM error (6) occurred attempting get random
    tpm tpm0: A TPM error (6) occurred attempting to read a pcr value
    ima: No TPM chip found, activating TPM-bypass! (rc=6)
    tpm tpm0: A TPM error (6) occurred attempting get random
    tpm tpm0: A TPM error (6) occurred attempting get random
    tpm tpm0: A TPM error (6) occurred attempting get random
    tpm tpm0: A TPM error (6) occurred attempting get random

    Let's just suppress error log messages for the TPM_{DEACTIVATED,DISABLED}
    return codes, since this is expected when the TPM 1.2 is set to Inactive.

    In that case the kernel log is cleaner and less confusing for users, i.e:

    tpm_tis 00:05: 1.2 TPM (device-id 0x0, rev-id 78)
    tpm tpm0: TPM is disabled/deactivated (0x6)
    ima: No TPM chip found, activating TPM-bypass! (rc=6)

    Reported-by: Hans de Goede
    Signed-off-by: Javier Martinez Canillas
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Javier Martinez Canillas
     
  • commit 0711e8c1b4572d076264e71b0002d223f2666ed7 upstream.

    Please note that below oops is from an older kernel, but the same
    race seems to be present in the upstream kernel too.

    ---8
    Cc: # 3.19
    Signed-off-by: Corey Minyard
    Signed-off-by: Greg Kroah-Hartman

    Jan Glauber
     

13 Sep, 2018

1 commit

  • Pull IPMI bugfixes from Corey Minyard:
    "A few fixes that came around or after the merge window, except for
    commit cd2315d471f4 ("ipmi: kcs_bmc: don't change device name") which
    is for a driver that very few people use, and those people need the
    change"

    * tag 'for-linus-4.19' of git://github.com/cminyard/linux-ipmi:
    ipmi: Fix NULL pointer dereference in ssif_probe
    ipmi: Fix I2C client removal in the SSIF driver
    ipmi: Move BT capabilities detection to the detect call
    ipmi: Rework SMI registration failure
    ipmi: kcs_bmc: don't change device name

    Linus Torvalds
     

09 Sep, 2018

1 commit


02 Sep, 2018

1 commit

  • Instead of forcing a distro or other system builder to choose
    at build time whether the CPU is trusted for CRNG seeding via
    CONFIG_RANDOM_TRUST_CPU, provide a boot-time parameter for end users to
    control the choice. The CONFIG will set the default state instead.

    Signed-off-by: Kees Cook
    Signed-off-by: Theodore Ts'o

    Kees Cook
     

01 Sep, 2018

1 commit

  • There is a potential execution path in which function ssif_info_find()
    returns NULL, hence there is a NULL pointer dereference when accessing
    pointer *addr_info*

    Fix this by null checking *addr_info* before dereferencing it.

    Addresses-Coverity-ID: 1473145 ("Explicit null dereferenced")
    Fixes: e333054a91d1 ("ipmi: Fix I2C client removal in the SSIF driver")
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Corey Minyard

    Gustavo A. R. Silva
     

31 Aug, 2018

4 commits

  • The SSIF driver was removing any client that came in through the
    platform interface, but it should only remove clients that it
    added. On a failure in the probe function, this could result
    in the following oops when the driver is removed and the
    client gets unregistered twice:

    CPU: 107 PID: 30266 Comm: rmmod Not tainted 4.18.0+ #80
    Hardware name: Cavium Inc. Saber/Saber, BIOS Cavium reference firmware version 7.0 08/04/2018
    pstate: 60400009 (nZCv daif +PAN -UAO)
    pc : kernfs_find_ns+0x28/0x120
    lr : kernfs_find_and_get_ns+0x40/0x60
    sp : ffff00002310fb50
    x29: ffff00002310fb50 x28: ffff800a8240f800
    x27: 0000000000000000 x26: 0000000000000000
    x25: 0000000056000000 x24: ffff000009073000
    x23: ffff000008998b38 x22: 0000000000000000
    x21: ffff800ed86de820 x20: 0000000000000000
    x19: ffff00000913a1d8 x18: 0000000000000000
    x17: 0000000000000000 x16: 0000000000000000
    x15: 0000000000000000 x14: 5300737265766972
    x13: 643d4d4554535953 x12: 0000000000000030
    x11: 0000000000000030 x10: 0101010101010101
    x9 : ffff800ea06cc3f9 x8 : 0000000000000000
    x7 : 0000000000000141 x6 : ffff000009073000
    x5 : ffff800adb706b00 x4 : 0000000000000000
    x3 : 00000000ffffffff x2 : 0000000000000000
    x1 : ffff000008998b38 x0 : ffff000008356760
    Process rmmod (pid: 30266, stack limit = 0x00000000e218418d)
    Call trace:
    kernfs_find_ns+0x28/0x120
    kernfs_find_and_get_ns+0x40/0x60
    sysfs_unmerge_group+0x2c/0x6c
    dpm_sysfs_remove+0x34/0x70
    device_del+0x58/0x30c
    device_unregister+0x30/0x7c
    i2c_unregister_device+0x84/0x90 [i2c_core]
    ssif_platform_remove+0x38/0x98 [ipmi_ssif]
    platform_drv_remove+0x2c/0x6c
    device_release_driver_internal+0x168/0x1f8
    driver_detach+0x50/0xbc
    bus_remove_driver+0x74/0xe8
    driver_unregister+0x34/0x5c
    platform_driver_unregister+0x20/0x2c
    cleanup_ipmi_ssif+0x50/0xd82c [ipmi_ssif]
    __arm64_sys_delete_module+0x1b4/0x220
    el0_svc_handler+0x104/0x160
    el0_svc+0x8/0xc
    Code: aa1e03e0 aa0203f6 aa0103f7 d503201f (7940e280)
    ---[ end trace 09f0e34cce8e2d8c ]---
    Kernel panic - not syncing: Fatal exception
    SMP: stopping secondary CPUs
    Kernel Offset: disabled
    CPU features: 0x23800c38

    So track the clients that the SSIF driver adds and only remove
    those.

    Reported-by: George Cherian
    Signed-off-by: Corey Minyard
    Tested-by: George Cherian
    Cc: # 4.14.x

    Corey Minyard
     
  • The capabilities detection was being done as part of the normal
    state machine, but it was possible for it to be running while
    the upper layers of the IPMI driver were initializing the
    device, resulting in error and failure to initialize.

    Move the capabilities detection to the the detect function,
    so it's done before anything else runs on the device. This also
    simplifies the state machine and removes some code, as a bonus.

    Signed-off-by: Corey Minyard
    Reported-by: Andrew Banman
    Tested-by: Andrew Banman
    Cc:

    Corey Minyard
     
  • There were certain situations where ipmi_register_smi() would
    return a failure, but the interface would still be registered
    and would need to be unregistered. This is obviously a bad
    design and resulted in an oops in certain failure cases.

    If the interface is started up in ipmi_register_smi(), then
    an error occurs, shut down the interface there so the
    cleanup can be done properly.

    Fix the various smi users, too.

    Signed-off-by: Corey Minyard
    Reported-by: Justin Ernst
    Tested-by: Justin Ernst
    Cc: Andrew Banman
    Cc: Russ Anderson
    Cc: # 4.18.x

    Corey Minyard
     
  • kcs_bmc_alloc(...) calls dev_set_name(...) which is incorrect as most
    bus driver frameworks, platform_driver in particular, assume that they
    are able to set the device name themselves.

    Signed-off-by: Benjamin Fair
    Signed-off-by: Corey Minyard

    Benjamin Fair
     

21 Aug, 2018

1 commit

  • Pull RTC updates from Alexandre Belloni:
    "It is now possible to add custom sysfs attributes while avoiding a
    possible race condition. Unused code has been removed resulting in a
    nice reduction of the code base. And more drivers have been switched
    to SPDX by their maintainers.

    Summary:

    Subsystem:
    - new helpers to add custom sysfs attributes
    - struct rtc_task removal along with rtc_irq_[un]register()
    - rtc_irq_set_state and rtc_irq_set_freq are not exported anymore

    Drivers:
    - armada38x: reset after rtc power loss
    - ds1307: now supports m41t11
    - isl1208: now supports isl1219 and tamper detection
    - pcf2127: internal SRAM support"

    * tag 'rtc-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (34 commits)
    rtc: ds1307: simplify hwmon config
    rtc: s5m: Add SPDX license identifier
    rtc: maxim: Add SPDX license identifiers
    rtc: isl1219: add device tree documentation
    rtc: isl1208: set ev-evienb bit from device tree
    rtc: isl1208: Add "evdet" interrupt source for isl1219
    rtc: isl1208: add support for isl1219 with tamper detection
    rtc: sysfs: facilitate attribute add to rtc device
    rtc: remove struct rtc_task
    char: rtc: remove task handling
    rtc: pcf85063: preserve control register value between stop and start
    rtc: sh: remove unused variable rtc_dev
    rtc: unexport rtc_irq_set_*
    rtc: simplify rtc_irq_set_state/rtc_irq_set_freq
    rtc: remove irq_task and irq_task_lock
    rtc: remove rtc_irq_register/rtc_irq_unregister
    rtc: sh: remove dead code
    rtc: sa1100: don't set PIE frequency
    rtc: ds1307: support m41t11 variant
    rtc: ds1307: fix data pointer to m41t0
    ...

    Linus Torvalds
     

19 Aug, 2018

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the bit set of char/misc drivers for 4.19-rc1

    There is a lot here, much more than normal, seems like everyone is
    writing new driver subsystems these days... Anyway, major things here
    are:

    - new FSI driver subsystem, yet-another-powerpc low-level hardware
    bus

    - gnss, finally an in-kernel GPS subsystem to try to tame all of the
    crazy out-of-tree drivers that have been floating around for years,
    combined with some really hacky userspace implementations. This is
    only for GNSS receivers, but you have to start somewhere, and this
    is great to see.

    Other than that, there are new slimbus drivers, new coresight drivers,
    new fpga drivers, and loads of DT bindings for all of these and
    existing drivers.

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

    * tag 'char-misc-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (255 commits)
    android: binder: Rate-limit debug and userspace triggered err msgs
    fsi: sbefifo: Bump max command length
    fsi: scom: Fix NULL dereference
    misc: mic: SCIF Fix scif_get_new_port() error handling
    misc: cxl: changed asterisk position
    genwqe: card_base: Use true and false for boolean values
    misc: eeprom: assignment outside the if statement
    uio: potential double frees if __uio_register_device() fails
    eeprom: idt_89hpesx: clean up an error pointer vs NULL inconsistency
    misc: ti-st: Fix memory leak in the error path of probe()
    android: binder: Show extra_buffers_size in trace
    firmware: vpd: Fix section enabled flag on vpd_section_destroy
    platform: goldfish: Retire pdev_bus
    goldfish: Use dedicated macros instead of manual bit shifting
    goldfish: Add missing includes to goldfish.h
    mux: adgs1408: new driver for Analog Devices ADGS1408/1409 mux
    dt-bindings: mux: add adi,adgs1408
    Drivers: hv: vmbus: Cleanup synic memory free path
    Drivers: hv: vmbus: Remove use of slow_virt_to_phys()
    Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
    ...

    Linus Torvalds
     

16 Aug, 2018

2 commits

  • Pull TPM updates from James Morris:

    - Migrate away from PM runtime as explicit cmdReady/goIdle transactions
    for every command is a spec requirement. PM runtime adds only a layer
    of complexity on our case.

    - tpm_tis drivers can now specify the hwrng quality.

    - TPM 2.0 code uses now tpm_buf for constructing messages. Jarkko
    thinks Tomas Winkler has done the same for TPM 1.2, and will start
    digging those changes from the patchwork in the near future.

    - Bug fixes and clean ups

    * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    ima: Get rid of ima_used_chip and use ima_tpm_chip != NULL instead
    ima: Use tpm_default_chip() and call TPM functions with a tpm_chip
    tpm: replace TPM_TRANSMIT_RAW with TPM_TRANSMIT_NESTED
    tpm: Convert tpm_find_get_ops() to use tpm_default_chip()
    tpm: Implement tpm_default_chip() to find a TPM chip
    tpm: rename tpm_chip_find_get() to tpm_find_get_ops()
    tpm: Allow tpm_tis drivers to set hwrng quality.
    tpm: Return the actual size when receiving an unsupported command
    tpm: separate cmd_ready/go_idle from runtime_pm
    tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
    tpm_tis_spi: Pass the SPI IRQ down to the driver
    tpm: migrate tpm2_get_random() to use struct tpm_buf
    tpm: migrate tpm2_get_tpm_pt() to use struct tpm_buf
    tpm: migrate tpm2_probe() to use struct tpm_buf
    tpm: migrate tpm2_shutdown() to use struct tpm_buf

    Linus Torvalds
     
  • Pull random updates from Ted Ts'o:
    "Some changes to trust cpu-based hwrng (such as RDRAND) for
    initializing hashed pointers and (optionally, controlled by a config
    option) to initialize the CRNG to avoid boot hangs"

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
    random: Make crng state queryable
    random: remove preempt disabled region
    random: add a config option to trust the CPU's hwrng
    vsprintf: Add command line option debug_boot_weak_hash
    vsprintf: Use hw RNG for ptr_key
    random: Return nbytes filled from hw RNG
    random: Fix whitespace pre random-bytes work

    Linus Torvalds