09 May, 2019

2 commits

  • Pull IPMI updates from Corey Minyard:
    "Some minor cleanups for the IPMI driver"

    * tag 'for-linus-5.2' of git://github.com/cminyard/linux-ipmi:
    ipmi: Remove warning if no slave address is present
    ipmi:ssif: Only unregister the platform driver if it was registered
    ipmi:ssif: compare block number correctly for multi-part return messages
    ipmi: Add the i2c-addr property for SSIF interfaces
    char/ipmi: fix spelling mistake "receieved_messages" -> "received_messages"
    ipmi: avoid atomic_inc in exit function
    ipmi: Remove file from ipmi_file_private
    ipmi_si: remove an unused variable in try_smi_init()
    ipmi: Make ipmi_interfaces_srcu variable static

    Linus Torvalds
     
  • Pull tty/serial updates from Greg KH:
    "Here is the "big" set of tty/serial driver patches for 5.2-rc1.

    It's really pretty small, not much happening in this portion of the
    kernel at the moment. When the "highlight" is the movement of the
    documentation from .txt to .rst files, it's a good merge window.

    There's a number of small fixes and updates over the various serial
    drivers, and a new "tty null" driver for those embedded systems that
    like to make things even smaller and not break things.

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

    * tag 'tty-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (45 commits)
    tty: serial: add driver for the SiFive UART
    dt-bindings: serial: add documentation for the SiFive UART driver
    serial: uartps: Add support for cts-override
    dt-bindings: xilinx-uartps: Add support for cts-override
    serial: milbeaut_usio: Fix error handling in probe and remove
    tty: rocket: deprecate the rp_ioctl
    tty: rocket: Remove RCPK_GET_STRUCT ioctl
    tty: update obsolete termios comment
    tty: serial_core: fix error code returned by uart_register_driver()
    serial: 8250-mtk: modify baudrate setting
    serial: 8250-mtk: add follow control
    docs: serial: convert docs to ReST and rename to *.rst
    serial: 8250_exar: Adjust IOT2000 matching
    TTY: serial_core, add ->install
    serial: Fix using plain integer instead of Null pointer
    tty:serial_core: Spelling mistake
    tty: Add NULL TTY driver
    tty: vt: keyboard: Allow Unicode compose base char
    Revert "tty: fix NULL pointer issue when tty_port ops is not set"
    serial: Add Milbeaut serial control
    ...

    Linus Torvalds
     

08 May, 2019

4 commits

  • Pull randomness updates from Ted Ts'o:

    - initialize the random driver earler

    - fix CRNG initialization when we trust the CPU's RNG on NUMA systems

    - other miscellaneous cleanups and fixes.

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
    random: add a spinlock_t to struct batched_entropy
    random: document get_random_int() family
    random: fix CRNG initialization when random.trust_cpu=1
    random: move rand_initialize() earlier
    random: only read from /dev/random after its pool has received 128 bits
    drivers/char/random.c: make primary_crng static
    drivers/char/random.c: remove unused stuct poolinfo::poolbits
    drivers/char/random.c: constify poolinfo_table

    Linus Torvalds
     
  • …/git/gregkh/char-misc

    Pull char/misc update part 2 from Greg KH:
    "Here is the "real" big set of char/misc driver patches for 5.2-rc1

    Loads of different driver subsystem stuff in here, all over the places:
    - thunderbolt driver updates
    - habanalabs driver updates
    - nvmem driver updates
    - extcon driver updates
    - intel_th driver updates
    - mei driver updates
    - coresight driver updates
    - soundwire driver cleanups and updates
    - fastrpc driver updates
    - other minor driver updates
    - chardev minor fixups

    Feels like this tree is getting to be a dumping ground of "small
    driver subsystems" these days. Which is fine with me, if it makes
    things easier for those subsystem maintainers.

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

    * tag 'char-misc-5.2-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (255 commits)
    intel_th: msu: Add current window tracking
    intel_th: msu: Add a sysfs attribute to trigger window switch
    intel_th: msu: Correct the block wrap detection
    intel_th: Add switch triggering support
    intel_th: gth: Factor out trace start/stop
    intel_th: msu: Factor out pipeline draining
    intel_th: msu: Switch over to scatterlist
    intel_th: msu: Replace open-coded list_{first,last,next}_entry variants
    intel_th: Only report useful IRQs to subdevices
    intel_th: msu: Start handling IRQs
    intel_th: pci: Use MSI interrupt signalling
    intel_th: Communicate IRQ via resource
    intel_th: Add "rtit" source device
    intel_th: Skip subdevices if their MMIO is missing
    intel_th: Rework resource passing between glue layers and core
    intel_th: SPDX-ify the documentation
    intel_th: msu: Fix single mode with IOMMU
    coresight: funnel: Support static funnel
    dt-bindings: arm: coresight: Unify funnel DT binding
    coresight: replicator: Add new device id for static replicator
    ...

    Linus Torvalds
     
  • Pull pidfd updates from Christian Brauner:
    "This patchset makes it possible to retrieve pidfds at process creation
    time by introducing the new flag CLONE_PIDFD to the clone() system
    call. Linus originally suggested to implement this as a new flag to
    clone() instead of making it a separate system call.

    After a thorough review from Oleg CLONE_PIDFD returns pidfds in the
    parent_tidptr argument. This means we can give back the associated pid
    and the pidfd at the same time. Access to process metadata information
    thus becomes rather trivial.

    As has been agreed, CLONE_PIDFD creates file descriptors based on
    anonymous inodes similar to the new mount api. They are made
    unconditional by this patchset as they are now needed by core kernel
    code (vfs, pidfd) even more than they already were before (timerfd,
    signalfd, io_uring, epoll etc.). The core patchset is rather small.
    The bulky looking changelist is caused by David's very simple changes
    to Kconfig to make anon inodes unconditional.

    A pidfd comes with additional information in fdinfo if the kernel
    supports procfs. The fdinfo file contains the pid of the process in
    the callers pid namespace in the same format as the procfs status
    file, i.e. "Pid:\t%d".

    To remove worries about missing metadata access this patchset comes
    with a sample/test program that illustrates how a combination of
    CLONE_PIDFD and pidfd_send_signal() can be used to gain race-free
    access to process metadata through /proc/.

    Further work based on this patchset has been done by Joel. His work
    makes pidfds pollable. It finished too late for this merge window. I
    would prefer to have it sitting in linux-next for a while and send it
    for inclusion during the 5.3 merge window"

    * tag 'pidfd-v5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
    samples: show race-free pidfd metadata access
    signal: support CLONE_PIDFD with pidfd_send_signal
    clone: add CLONE_PIDFD
    Make anon_inodes unconditional

    Linus Torvalds
     
  • Pull stream_open conversion from Kirill Smelkov:

    - remove unnecessary double nonseekable_open from drivers/char/dtlk.c
    as noticed by Pavel Machek while reviewing nonseekable_open ->
    stream_open mass conversion.

    - the mass conversion patch promised in commit 10dce8af3422 ("fs:
    stream_open - opener for stream-like files so that read and write can
    run simultaneously without deadlock") and is automatically generated
    by running

    $ make coccicheck MODE=patch COCCI=scripts/coccinelle/api/stream_open.cocci

    I've verified each generated change manually - that it is correct to
    convert - and each other nonseekable_open instance left - that it is
    either not correct to convert there, or that it is not converted due
    to current stream_open.cocci limitations. More details on this in the
    patch.

    - finally, change VFS to pass ppos=NULL into .read/.write for files
    that declare themselves streams. It was suggested by Rasmus Villemoes
    and makes sure that if ppos starts to be erroneously used in a stream
    file, such bug won't go unnoticed and will produce an oops instead of
    creating illusion of position change being taken into account.

    Note: this patch does not conflict with "fuse: Add FOPEN_STREAM to
    use stream_open()" that will be hopefully coming via FUSE tree,
    because fs/fuse/ uses new-style .read_iter/.write_iter, and for these
    accessors position is still passed as non-pointer kiocb.ki_pos .

    * tag 'stream_open-5.2' of https://lab.nexedi.com/kirr/linux:
    vfs: pass ppos=NULL to .read()/.write() of FMODE_STREAM files
    *: convert stream-like files from nonseekable_open -> stream_open
    dtlk: remove double call to nonseekable_open

    Linus Torvalds
     

07 May, 2019

1 commit

  • Pull crypto update from Herbert Xu:
    "API:
    - Add support for AEAD in simd
    - Add fuzz testing to testmgr
    - Add panic_on_fail module parameter to testmgr
    - Use per-CPU struct instead multiple variables in scompress
    - Change verify API for akcipher

    Algorithms:
    - Convert x86 AEAD algorithms over to simd
    - Forbid 2-key 3DES in FIPS mode
    - Add EC-RDSA (GOST 34.10) algorithm

    Drivers:
    - Set output IV with ctr-aes in crypto4xx
    - Set output IV in rockchip
    - Fix potential length overflow with hashing in sun4i-ss
    - Fix computation error with ctr in vmx
    - Add SM4 protected keys support in ccree
    - Remove long-broken mxc-scc driver
    - Add rfc4106(gcm(aes)) cipher support in cavium/nitrox"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (179 commits)
    crypto: ccree - use a proper le32 type for le32 val
    crypto: ccree - remove set but not used variable 'du_size'
    crypto: ccree - Make cc_sec_disable static
    crypto: ccree - fix spelling mistake "protedcted" -> "protected"
    crypto: caam/qi2 - generate hash keys in-place
    crypto: caam/qi2 - fix DMA mapping of stack memory
    crypto: caam/qi2 - fix zero-length buffer DMA mapping
    crypto: stm32/cryp - update to return iv_out
    crypto: stm32/cryp - remove request mutex protection
    crypto: stm32/cryp - add weak key check for DES
    crypto: atmel - remove set but not used variable 'alg_name'
    crypto: picoxcell - Use dev_get_drvdata()
    crypto: crypto4xx - get rid of redundant using_sd variable
    crypto: crypto4xx - use sync skcipher for fallback
    crypto: crypto4xx - fix cfb and ofb "overran dst buffer" issues
    crypto: crypto4xx - fix ctr-aes missing output IV
    crypto: ecrdsa - select ASN1 and OID_REGISTRY for EC-RDSA
    crypto: ux500 - use ccflags-y instead of CFLAGS_.o
    crypto: ccree - handle tee fips error during power management resume
    crypto: ccree - add function to handle cryptocell tee fips error
    ...

    Linus Torvalds
     

06 May, 2019

2 commits

  • Using scripts/coccinelle/api/stream_open.cocci added in 10dce8af3422
    ("fs: stream_open - opener for stream-like files so that read and write
    can run simultaneously without deadlock"), search and convert to
    stream_open all in-kernel nonseekable_open users for which read and
    write actually do not depend on ppos and where there is no other methods
    in file_operations which assume @offset access.

    I've verified each generated change manually - that it is correct to convert -
    and each other nonseekable_open instance left - that it is either not correct
    to convert there, or that it is not converted due to current stream_open.cocci
    limitations. The script also does not convert files that should be valid to
    convert, but that currently have .llseek = noop_llseek or generic_file_llseek
    for unknown reason despite file being opened with nonseekable_open (e.g.
    drivers/input/mousedev.c)

    Among cases converted 14 were potentially vulnerable to read vs write deadlock
    (see details in 10dce8af3422):

    drivers/char/pcmcia/cm4000_cs.c:1685:7-23: ERROR: cm4000_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/gnss/core.c:45:1-17: ERROR: gnss_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/hid/uhid.c:635:1-17: ERROR: uhid_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/infiniband/core/user_mad.c:988:1-17: ERROR: umad_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/input/evdev.c:527:1-17: ERROR: evdev_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/input/misc/uinput.c:401:1-17: ERROR: uinput_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/isdn/capi/capi.c:963:8-24: ERROR: capi_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/leds/uleds.c:77:1-17: ERROR: uleds_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/media/rc/lirc_dev.c:198:1-17: ERROR: lirc_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/s390/char/fs3270.c:488:1-17: ERROR: fs3270_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/usb/misc/ldusb.c:310:1-17: ERROR: ld_usb_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    drivers/xen/evtchn.c:667:8-24: ERROR: evtchn_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    net/batman-adv/icmp_socket.c:80:1-17: ERROR: batadv_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.
    net/rfkill/core.c:1146:8-24: ERROR: rfkill_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix.

    and the rest were just safe to convert to stream_open because their read and
    write do not use ppos at all and corresponding file_operations do not
    have methods that assume @offset file access(*):

    arch/powerpc/platforms/52xx/mpc52xx_gpt.c:631:8-24: WARNING: mpc52xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_ibox_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_ibox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_mbox_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_mbox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_wbox_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/powerpc/platforms/cell/spufs/file.c:591:8-24: WARNING: spufs_wbox_stat_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/um/drivers/harddog_kern.c:88:8-24: WARNING: harddog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    arch/x86/kernel/cpu/microcode/core.c:430:33-49: WARNING: microcode_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/ds1620.c:215:8-24: WARNING: ds1620_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/dtlk.c:301:1-17: WARNING: dtlk_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/ipmi/ipmi_watchdog.c:840:9-25: WARNING: ipmi_wdog_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/pcmcia/scr24x_cs.c:95:8-24: WARNING: scr24x_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/char/tb0219.c:246:9-25: WARNING: tb0219_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/firewire/nosy.c:306:8-24: WARNING: nosy_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/hwmon/fschmd.c:840:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/hwmon/w83793.c:1344:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/infiniband/core/ucma.c:1747:8-24: WARNING: ucma_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/infiniband/core/ucm.c:1178:8-24: WARNING: ucm_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/infiniband/core/uverbs_main.c:1086:8-24: WARNING: uverbs_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/input/joydev.c:282:1-17: WARNING: joydev_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/pci/switch/switchtec.c:393:1-17: WARNING: switchtec_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/platform/chrome/cros_ec_debugfs.c:135:8-24: WARNING: cros_ec_console_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/rtc/rtc-ds1374.c:470:9-25: WARNING: ds1374_wdt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/rtc/rtc-m41t80.c:805:9-25: WARNING: wdt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/s390/char/tape_char.c:293:2-18: WARNING: tape_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/s390/char/zcore.c:194:8-24: WARNING: zcore_reipl_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/s390/crypto/zcrypt_api.c:528:8-24: WARNING: zcrypt_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/spi/spidev.c:594:1-17: WARNING: spidev_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/staging/pi433/pi433_if.c:974:1-17: WARNING: pi433_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/acquirewdt.c:203:8-24: WARNING: acq_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/advantechwdt.c:202:8-24: WARNING: advwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/alim1535_wdt.c:252:8-24: WARNING: ali_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/alim7101_wdt.c:217:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ar7_wdt.c:166:8-24: WARNING: ar7_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/at91rm9200_wdt.c:113:8-24: WARNING: at91wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ath79_wdt.c:135:8-24: WARNING: ath79_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/bcm63xx_wdt.c:119:8-24: WARNING: bcm63xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/cpu5wdt.c:143:8-24: WARNING: cpu5wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/cpwd.c:397:8-24: WARNING: cpwd_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/eurotechwdt.c:319:8-24: WARNING: eurwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/f71808e_wdt.c:528:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/gef_wdt.c:232:8-24: WARNING: gef_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/geodewdt.c:95:8-24: WARNING: geodewdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ib700wdt.c:241:8-24: WARNING: ibwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ibmasr.c:326:8-24: WARNING: asr_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/indydog.c:80:8-24: WARNING: indydog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/intel_scu_watchdog.c:307:8-24: WARNING: intel_scu_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/iop_wdt.c:104:8-24: WARNING: iop_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/it8712f_wdt.c:330:8-24: WARNING: it8712f_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ixp4xx_wdt.c:68:8-24: WARNING: ixp4xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/ks8695_wdt.c:145:8-24: WARNING: ks8695wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/m54xx_wdt.c:88:8-24: WARNING: m54xx_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/machzwd.c:336:8-24: WARNING: zf_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/mixcomwd.c:153:8-24: WARNING: mixcomwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/mtx-1_wdt.c:121:8-24: WARNING: mtx1_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/mv64x60_wdt.c:136:8-24: WARNING: mv64x60_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/nuc900_wdt.c:134:8-24: WARNING: nuc900wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/nv_tco.c:164:8-24: WARNING: nv_tco_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pc87413_wdt.c:289:8-24: WARNING: pc87413_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd.c:698:8-24: WARNING: pcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd.c:737:8-24: WARNING: pcwd_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_pci.c:581:8-24: WARNING: pcipcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_pci.c:623:8-24: WARNING: pcipcwd_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_usb.c:488:8-24: WARNING: usb_pcwd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pcwd_usb.c:527:8-24: WARNING: usb_pcwd_temperature_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pika_wdt.c:121:8-24: WARNING: pikawdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/pnx833x_wdt.c:119:8-24: WARNING: pnx833x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/rc32434_wdt.c:153:8-24: WARNING: rc32434_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/rdc321x_wdt.c:145:8-24: WARNING: rdc321x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/riowd.c:79:1-17: WARNING: riowd_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sa1100_wdt.c:62:8-24: WARNING: sa1100dog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc60xxwdt.c:211:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc7240_wdt.c:139:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc8360.c:274:8-24: WARNING: sbc8360_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc_epx_c3.c:81:8-24: WARNING: epx_c3_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sbc_fitpc2_wdt.c:78:8-24: WARNING: fitpc2_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sb_wdog.c:108:1-17: WARNING: sbwdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sc1200wdt.c:181:8-24: WARNING: sc1200wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sc520_wdt.c:261:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/sch311x_wdt.c:319:8-24: WARNING: sch311x_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/scx200_wdt.c:105:8-24: WARNING: scx200_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/smsc37b787_wdt.c:369:8-24: WARNING: wb_smsc_wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/w83877f_wdt.c:227:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/w83977f_wdt.c:301:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wafer5823wdt.c:200:8-24: WARNING: wafwdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/watchdog_dev.c:828:8-24: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdrtas.c:379:8-24: WARNING: wdrtas_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdrtas.c:445:8-24: WARNING: wdrtas_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt285.c:104:1-17: WARNING: watchdog_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt977.c:276:8-24: WARNING: wdt977_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt.c:424:8-24: WARNING: wdt_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt.c:484:8-24: WARNING: wdt_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt_pci.c:464:8-24: WARNING: wdtpci_fops: .write() has stream semantic; safe to change nonseekable_open -> stream_open.
    drivers/watchdog/wdt_pci.c:527:8-24: WARNING: wdtpci_temp_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    net/batman-adv/log.c:105:1-17: WARNING: batadv_log_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/control.c:57:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/rawmidi.c:385:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/seq/seq_clientmgr.c:310:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open.
    sound/core/timer.c:1428:7-23: WARNING: snd_timer_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.

    One can also recheck/review the patch via generating it with explanation comments included via

    $ make coccicheck MODE=patch COCCI=scripts/coccinelle/api/stream_open.cocci SPFLAGS="-D explain"

    (*) This second group also contains cases with read/write deadlocks that
    stream_open.cocci don't yet detect, but which are still valid to convert to
    stream_open since ppos is not used. For example drivers/pci/switch/switchtec.c
    calls wait_for_completion_interruptible() in its .read, but stream_open.cocci
    currently detects only "wait_event*" as blocking.

    Cc: Michael Kerrisk
    Cc: Yongzhi Pan
    Cc: Jonathan Corbet
    Cc: David Vrabel
    Cc: Juergen Gross
    Cc: Miklos Szeredi
    Cc: Tejun Heo
    Cc: Kirill Tkhai
    Cc: Arnd Bergmann
    Cc: Christoph Hellwig
    Cc: Greg Kroah-Hartman
    Cc: Julia Lawall
    Cc: Nikolaus Rath
    Cc: Han-Wen Nienhuys
    Cc: Anatolij Gustschin
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Anton Ivanov
    Cc: Borislav Petkov
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "James R. Van Zandt"
    Cc: Corey Minyard
    Cc: Harald Welte
    Acked-by: Lubomir Rintel [scr24x_cs]
    Cc: Stefan Richter
    Cc: Johan Hovold
    Cc: David Herrmann
    Cc: Jiri Kosina
    Cc: Benjamin Tissoires
    Cc: Jean Delvare
    Acked-by: Guenter Roeck [watchdog/* hwmon/*]
    Cc: Rudolf Marek
    Cc: Dmitry Torokhov
    Cc: Karsten Keil
    Cc: Jacek Anaszewski
    Cc: Pavel Machek
    Cc: Mauro Carvalho Chehab
    Cc: Kurt Schwemmer
    Acked-by: Logan Gunthorpe [drivers/pci/switch/switchtec]
    Acked-by: Bjorn Helgaas [drivers/pci/switch/switchtec]
    Cc: Benson Leung
    Acked-by: Enric Balletbo i Serra [platform/chrome]
    Cc: Alessandro Zummo
    Acked-by: Alexandre Belloni [rtc/*]
    Cc: Mark Brown
    Cc: Wim Van Sebroeck
    Cc: Florian Fainelli
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: Wan ZongShun
    Cc: Zwane Mwaikambo
    Cc: Marek Lindner
    Cc: Simon Wunderlich
    Cc: Antonio Quartulli
    Cc: "David S. Miller"
    Cc: Johannes Berg
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Kirill Smelkov

    Kirill Smelkov
     
  • dtlk_open currently has 2 calls to nonseekable_open which are both
    executed on success path. It was not hurting to make the extra call as
    nonseekable_open is only changing file->f_flags in idempotent way.
    However the first nonseekable_open is indeed both unneeded and looks
    suspicious.

    The first nonseekable_open was added in 6244f13c51 ("Fix up a couple of
    drivers - notable sg - for nonseekability."; 2004-Aug-7). The second
    nonseekable_open call was introduced in dc5c724584 ("Remove ESPIPE logic
    from drivers, letting the VFS layer handle it instead.; 2004-Aug-8). The
    latter patch being mass change probably missed to remove
    nonseekable_open that was introduced into dtlk_open the day before.

    Fix it: remove the extra/unneeded nonseekable_open call and leave the
    call to nonseekable_open only on the path where we are actually opening
    the file.

    Suggested-by: Pavel Machek
    Signed-off-by: Kirill Smelkov

    Kirill Smelkov
     

25 Apr, 2019

2 commits


24 Apr, 2019

2 commits

  • According to ipmi spec, block number is a number that is incremented,
    starting with 0, for each new block of message data returned using the
    middle transaction.

    Here, the 'blocknum' is data[0] which always starts from zero(0) and
    'ssif_info->multi_pos' starts from 1.
    So, we need to add +1 to blocknum while comparing with multi_pos.

    Fixes: 7d6380cd40f79 ("ipmi:ssif: Fix handling of multi-part return messages").
    Reported-by: Kiran Kolukuluru
    Signed-off-by: Kamlakant Patel
    Message-Id:
    [Also added a debug log if the block numbers don't match.]
    Signed-off-by: Corey Minyard
    Cc: stable@vger.kernel.org # 4.4

    Kamlakant Patel
     
  • This is required for SSIF to work.

    There was no way to know if the interface being added was SI
    or SSIF from the platform data, but that was required so the
    i2c-addr is only added for SSIF interfaces. So add a field
    for that.

    Also rework the logic a bit so that ipmi-type is not set
    for SSIF interfaces, as it is not necessary for that.

    Fixes: 3cd83bac481d ("ipmi: Consolidate the adding of platform devices")
    Reported-by: Kamlakant Patel
    Signed-off-by: Corey Minyard
    Cc: stable@vger.kernel.org # 5.1

    Corey Minyard
     

22 Apr, 2019

2 commits


20 Apr, 2019

4 commits

  • The per-CPU variable batched_entropy_uXX is protected by get_cpu_var().
    This is just a preempt_disable() which ensures that the variable is only
    from the local CPU. It does not protect against users on the same CPU
    from another context. It is possible that a preemptible context reads
    slot 0 and then an interrupt occurs and the same value is read again.

    The above scenario is confirmed by lockdep if we add a spinlock:
    | ================================
    | WARNING: inconsistent lock state
    | 5.1.0-rc3+ #42 Not tainted
    | --------------------------------
    | inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
    | ksoftirqd/9/56 [HC0[0]:SC1[1]:HE0:SE0] takes:
    | (____ptrval____) (batched_entropy_u32.lock){+.?.}, at: get_random_u32+0x3e/0xe0
    | {SOFTIRQ-ON-W} state was registered at:
    | _raw_spin_lock+0x2a/0x40
    | get_random_u32+0x3e/0xe0
    | new_slab+0x15c/0x7b0
    | ___slab_alloc+0x492/0x620
    | __slab_alloc.isra.73+0x53/0xa0
    | kmem_cache_alloc_node+0xaf/0x2a0
    | copy_process.part.41+0x1e1/0x2370
    | _do_fork+0xdb/0x6d0
    | kernel_thread+0x20/0x30
    | kthreadd+0x1ba/0x220
    | ret_from_fork+0x3a/0x50

    | other info that might help us debug this:
    | Possible unsafe locking scenario:
    |
    | CPU0
    | ----
    | lock(batched_entropy_u32.lock);
    |
    | lock(batched_entropy_u32.lock);
    |
    | *** DEADLOCK ***
    |
    | stack backtrace:
    | Call Trace:

    | kmem_cache_alloc_trace+0x20e/0x270
    | ipmi_alloc_recv_msg+0x16/0x40

    | __do_softirq+0xec/0x48d
    | run_ksoftirqd+0x37/0x60
    | smpboot_thread_fn+0x191/0x290
    | kthread+0xfe/0x130
    | ret_from_fork+0x3a/0x50

    Add a spinlock_t to the batched_entropy data structure and acquire the
    lock while accessing it. Acquire the lock with disabled interrupts
    because this function may be used from interrupt context.

    Remove the batched_entropy_reset_lock lock. Now that we have a lock for
    the data scructure, we can access it from a remote CPU.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Theodore Ts'o

    Sebastian Andrzej Siewior
     
  • Explain what these functions are for and when they offer
    an advantage over get_random_bytes().

    (We still need documentation on rng_is_initialized(), the
    random_ready_callback system, and early boot in general.)

    Signed-off-by: George Spelvin
    Signed-off-by: Theodore Ts'o

    George Spelvin
     
  • When the system boots with random.trust_cpu=1 it doesn't initialize the
    per-NUMA CRNGs because it skips the rest of the CRNG startup code. This
    means that the code from 1e7f583af67b ("random: make /dev/urandom scalable
    for silly userspace programs") is not used when random.trust_cpu=1.

    crash> dmesg | grep random:
    [ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x530 with crng_init=0
    [ 0.314029] random: crng done (trusting CPU's manufacturer)
    crash> print crng_node_pool
    $6 = (struct crng_state **) 0x0

    After adding the missing call to numa_crng_init() the per-NUMA CRNGs are
    initialized again:

    crash> dmesg | grep random:
    [ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x530 with crng_init=0
    [ 0.314031] random: crng done (trusting CPU's manufacturer)
    crash> print crng_node_pool
    $1 = (struct crng_state **) 0xffff9a915f4014a0

    The call to invalidate_batched_entropy() was also missing. This is
    important for architectures like PPC and S390 which only have the
    arch_get_random_seed_* functions.

    Fixes: 39a8883a2b98 ("random: add a config option to trust the CPU's hwrng")
    Signed-off-by: Jon DeVree
    Signed-off-by: Theodore Ts'o

    Jon DeVree
     
  • Right now rand_initialize() is run as an early_initcall(), but it only
    depends on timekeeping_init() (for mixing ktime_get_real() into the
    pools). However, the call to boot_init_stack_canary() for stack canary
    initialization runs earlier, which triggers a warning at boot:

    random: get_random_bytes called from start_kernel+0x357/0x548 with crng_init=0

    Instead, this moves rand_initialize() to after timekeeping_init(), and moves
    canary initialization here as well.

    Note that this warning may still remain for machines that do not have
    UEFI RNG support (which initializes the RNG pools during setup_arch()),
    or for x86 machines without RDRAND (or booting without "random.trust=on"
    or CONFIG_RANDOM_TRUST_CPU=y).

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

    Kees Cook
     

19 Apr, 2019

1 commit

  • Make the anon_inodes facility unconditional so that it can be used by core
    VFS code and pidfd code.

    Signed-off-by: David Howells
    Signed-off-by: Al Viro
    [christian@brauner.io: adapt commit message to mention pidfds]
    Signed-off-by: Christian Brauner

    David Howells
     

18 Apr, 2019

4 commits

  • This causes a link failure on ARM in certain configurations,
    when we reference each atomic operation from .alt.smp.init in
    order to patch out atomics on non-SMP systems:

    `.exit.text' referenced in section `.alt.smp.init' of drivers/char/ipmi/ipmi_msghandler.o: defined in discarded section `.exit.text' of drivers/char/ipmi/ipmi_msghandler.o

    In this case, we can trivially replace the atomic_inc() with
    an atomic_set() that has the same effect and does not require
    a fixup.

    Signed-off-by: Arnd Bergmann
    Message-Id:
    Signed-off-by: Corey Minyard

    Arnd Bergmann
     
  • It's not used by anything, so just get rid of it.

    Reported-by: Al Viro
    Signed-off-by: Corey Minyard

    Corey Minyard
     
  • The "init_name" variable isn't used any more after commit 90b2d4f15ff7
    ("ipmi_si: Remove hacks for adding a dummy platform devices").

    Signed-off-by: Dan Carpenter
    Message-Id:
    Signed-off-by: Corey Minyard

    Dan Carpenter
     
  • Fix sparse warning:

    drivers/char/ipmi/ipmi_msghandler.c:635:20: warning:
    symbol 'ipmi_interfaces_srcu' was not declared. Should it be static?

    Signed-off-by: YueHaibing
    Message-Id:
    Signed-off-by: Corey Minyard

    YueHaibing
     

17 Apr, 2019

7 commits

  • free_user() could be called in atomic context.

    This patch pushed the free operation off into a workqueue.

    Example:

    BUG: sleeping function called from invalid context at kernel/workqueue.c:2856
    in_atomic(): 1, irqs_disabled(): 0, pid: 177, name: ksoftirqd/27
    CPU: 27 PID: 177 Comm: ksoftirqd/27 Not tainted 4.19.25-3 #1
    Hardware name: AIC 1S-HV26-08/MB-DPSB04-06, BIOS IVYBV060 10/21/2015
    Call Trace:
    dump_stack+0x5c/0x7b
    ___might_sleep+0xec/0x110
    __flush_work+0x48/0x1f0
    ? try_to_del_timer_sync+0x4d/0x80
    _cleanup_srcu_struct+0x104/0x140
    free_user+0x18/0x30 [ipmi_msghandler]
    ipmi_free_recv_msg+0x3a/0x50 [ipmi_msghandler]
    deliver_response+0xbd/0xd0 [ipmi_msghandler]
    deliver_local_response+0xe/0x30 [ipmi_msghandler]
    handle_one_recv_msg+0x163/0xc80 [ipmi_msghandler]
    ? dequeue_entity+0xa0/0x960
    handle_new_recv_msgs+0x15c/0x1f0 [ipmi_msghandler]
    tasklet_action_common.isra.22+0x103/0x120
    __do_softirq+0xf8/0x2d7
    run_ksoftirqd+0x26/0x50
    smpboot_thread_fn+0x11d/0x1e0
    kthread+0x103/0x140
    ? sort_range+0x20/0x20
    ? kthread_destroy_worker+0x40/0x40
    ret_from_fork+0x1f/0x40

    Fixes: 77f8269606bf ("ipmi: fix use-after-free of user->release_barrier.rda")

    Reported-by: Konstantin Khlebnikov
    Signed-off-by: Corey Minyard
    Cc: stable@vger.kernel.org # 5.0
    Cc: Yang Yingliang

    Corey Minyard
     
  • Immediately after boot, we allow reads from /dev/random before its
    entropy pool has been fully initialized. Fix this so that we don't
    allow this until the blocking pool has received 128 bits.

    We do this by repurposing the initialized flag in the entropy pool
    struct, and use the initialized flag in the blocking pool to indicate
    whether it is safe to pull from the blocking pool.

    To do this, we needed to rework when we decide to push entropy from the
    input pool to the blocking pool, since the initialized flag for the
    input pool was used for this purpose. To simplify things, we no
    longer use the initialized flag for that purpose, nor do we use the
    entropy_total field any more.

    Signed-off-by: Theodore Ts'o

    Theodore Ts'o
     
  • Since the definition of struct crng_state is private to random.c, and
    primary_crng is neither declared or used elsewhere, there's no reason
    for that symbol to have external linkage.

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Theodore Ts'o

    Rasmus Villemoes
     
  • This field is never used, might as well remove it.

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Theodore Ts'o

    Rasmus Villemoes
     
  • Never modified, might as well be put in .rodata.

    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Theodore Ts'o

    Rasmus Villemoes
     
  • The intended behavior of function ipmi_hardcode_init_one() is to default
    to kcs interface when no type argument is presented when initializing
    ipmi with hard coded addresses.

    However, the array of char pointers allocated on the stack by function
    ipmi_hardcode_init() was not inited to zeroes, so it contained stack
    debris.

    Consequently, passing the cruft stored in this array to function
    ipmi_hardcode_init_one() caused a crash when it was unable to detect
    that the char * being passed was nonsense and tried to access the
    address specified by the bogus pointer.

    The fix is simply to initialize the si_type array to zeroes, so if
    there were no type argument given to at the command line, function
    ipmi_hardcode_init_one() could properly default to the kcs interface.

    Signed-off-by: Tony Camuso
    Message-Id:
    Signed-off-by: Corey Minyard

    Tony Camuso
     
  • An extra memset was put into a place that cleared the interface
    type.

    Reported-by: Tony Camuso
    Fixes: 3cd83bac481dc4 ("ipmi: Consolidate the adding of platform devices")
    Signed-off-by: Corey Minyard

    Corey Minyard
     

15 Apr, 2019

2 commits


09 Apr, 2019

3 commits

  • calc_tpm2_event_size() has an invalid signature because
    it returns a 'size_t' where as its signature says that
    it returns 'int'.

    Cc:
    Fixes: 4d23cc323cdb ("tpm: add securityfs support for TPM 2.0 firmware event log")
    Suggested-by: Jarkko Sakkinen
    Signed-off-by: Yue Haibing
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: James Morris

    Yue Haibing
     
  • The poll condition should only check response_length,
    because reads should only be issued if there is data to read.
    The response_read flag only prevents double writes.
    The problem was that the write set the response_read to false,
    enqued a tpm job, and returned. Then application called poll
    which checked the response_read flag and returned EPOLLIN.
    Then the application called read, but got nothing.
    After all that the async_work kicked in.
    Added also mutex_lock around the poll check to prevent
    other possible race conditions.

    Fixes: 9488585b21bef0df12 ("tpm: add support for partial reads")
    Reported-by: Mantas Mikulėnas
    Tested-by: Mantas Mikulėnas
    Signed-off-by: Tadeusz Struk
    Reviewed-by: Jarkko Sakkinen
    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: James Morris

    Tadeusz Struk
     
  • tpm_chip_start/stop() should be also called for TPM 1.x devices on
    suspend. Add that functionality back. Do not lock the chip because
    it is unnecessary as there are no multiple threads using it when
    doing the suspend.

    Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()")
    Reported-by: Paul Zimmerman
    Signed-off-by: Jarkko Sakkinen
    Tested-by: Domenico Andreoli
    Signed-off-by: James Morris

    Jarkko Sakkinen
     

05 Apr, 2019

1 commit

  • 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
     

28 Mar, 2019

2 commits

  • Check if ioremap fails, and if so, return AE_ERROR.

    Signed-off-by: Kangjie Lu
    Signed-off-by: Greg Kroah-Hartman

    Kangjie Lu
     
  • For regular serial ports we do not initialize value of vtermno
    variable. A garbage value is assigned for non console ports.
    The value can be observed as a random integer with [1].

    [1] vim /sys/kernel/debug/virtio-ports/vport*p*

    This patch initialize the value of vtermno for console serial
    ports to '1' and regular serial ports are initiaized to '0'.

    Reported-by: siliu@redhat.com
    Signed-off-by: Pankaj Gupta
    Signed-off-by: Greg Kroah-Hartman

    Pankaj Gupta
     

22 Mar, 2019

1 commit

  • Newer combinations of the glibc, kernel and openssh can result in long initial
    startup times on OMAP devices:

    [ 6.671425] systemd-rc-once[102]: Creating ED25519 key; this may take some time ...
    [ 142.652491] systemd-rc-once[102]: Creating ED25519 key; done.

    due to the blocking getrandom(2) system call:

    [ 142.610335] random: crng init done

    Set the quality level for the omap hwrng driver allowing the kernel to use the
    hwrng as an entropy source at boot.

    Signed-off-by: Rouven Czerwinski
    Signed-off-by: Herbert Xu

    Rouven Czerwinski