17 Oct, 2020

2 commits

  • Pull s390 updates from Vasily Gorbik:

    - Remove address space overrides using set_fs()

    - Convert to generic vDSO

    - Convert to generic page table dumper

    - Add ARCH_HAS_DEBUG_WX support

    - Add leap seconds handling support

    - Add NVMe firmware-assisted kernel dump support

    - Extend NVMe boot support with memory clearing control and addition of
    kernel parameters

    - AP bus and zcrypt api code rework. Add adapter configure/deconfigure
    interface. Extend debug features. Add failure injection support

    - Add ECC secure private keys support

    - Add KASan support for running protected virtualization host with
    4-level paging

    - Utilize destroy page ultravisor call to speed up secure guests
    shutdown

    - Implement ioremap_wc() and ioremap_prot() with MIO in PCI code

    - Various checksum improvements

    - Other small various fixes and improvements all over the code

    * tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (85 commits)
    s390/uaccess: fix indentation
    s390/uaccess: add default cases for __put_user_fn()/__get_user_fn()
    s390/zcrypt: fix wrong format specifications
    s390/kprobes: move insn_page to text segment
    s390/sie: fix typo in SIGP code description
    s390/lib: fix kernel doc for memcmp()
    s390/zcrypt: Introduce Failure Injection feature
    s390/zcrypt: move ap_msg param one level up the call chain
    s390/ap/zcrypt: revisit ap and zcrypt error handling
    s390/ap: Support AP card SCLP config and deconfig operations
    s390/sclp: Add support for SCLP AP adapter config/deconfig
    s390/ap: add card/queue deconfig state
    s390/ap: add error response code field for ap queue devices
    s390/ap: split ap queue state machine state from device state
    s390/zcrypt: New config switch CONFIG_ZCRYPT_DEBUG
    s390/zcrypt: introduce msg tracking in zcrypt functions
    s390/startup: correct early pgm check info formatting
    s390: remove orphaned extern variables declarations
    s390/kasan: make sure int handler always run with DAT on
    s390/ipl: add support to control memory clearing for nvme re-IPL
    ...

    Linus Torvalds
     
  • We soon want to pass flags, e.g., to mark added System RAM resources.
    mergeable. Prepare for that.

    This patch is based on a similar patch by Oscar Salvador:

    https://lkml.kernel.org/r/20190625075227.15193-3-osalvador@suse.de

    Signed-off-by: David Hildenbrand
    Signed-off-by: Andrew Morton
    Reviewed-by: Juergen Gross # Xen related part
    Reviewed-by: Pankaj Gupta
    Acked-by: Wei Liu
    Cc: Michal Hocko
    Cc: Dan Williams
    Cc: Jason Gunthorpe
    Cc: Baoquan He
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "Rafael J. Wysocki"
    Cc: Len Brown
    Cc: Greg Kroah-Hartman
    Cc: Vishal Verma
    Cc: Dave Jiang
    Cc: "K. Y. Srinivasan"
    Cc: Haiyang Zhang
    Cc: Stephen Hemminger
    Cc: Wei Liu
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Cc: Christian Borntraeger
    Cc: David Hildenbrand
    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Cc: Boris Ostrovsky
    Cc: Stefano Stabellini
    Cc: "Oliver O'Halloran"
    Cc: Pingfan Liu
    Cc: Nathan Lynch
    Cc: Libor Pechacek
    Cc: Anton Blanchard
    Cc: Leonardo Bras
    Cc: Ard Biesheuvel
    Cc: Eric Biederman
    Cc: Julien Grall
    Cc: Kees Cook
    Cc: Roger Pau Monné
    Cc: Thomas Gleixner
    Cc: Wei Yang
    Link: https://lkml.kernel.org/r/20200911103459.10306-5-david@redhat.com
    Signed-off-by: Linus Torvalds

    David Hildenbrand
     

08 Oct, 2020

1 commit

  • Add support for AP bus adapter config and deconfig to the sclp
    core code. The code is statically build into the kernel when
    ZCRYPT is configured either as module or with static support.

    This is the base functionality for having configure/deconfigure
    support in the AP bus and card code. Another patch will exploit
    this soon.

    Signed-off-by: Harald Freudenberger
    Suggested-by: Pierre Morel
    Signed-off-by: Vasily Gorbik

    Harald Freudenberger
     

02 Oct, 2020

1 commit


30 Sep, 2020

3 commits

  • arch/s390/pci/pci_bus.h: zpci_bus_init - only declaration left after
    commit 05bc1be6db4b ("s390/pci: create zPCI bus")

    arch/s390/include/asm/gmap.h: gmap_pte_notify - only declaration left
    after commit 4be130a08420 ("s390/mm: add shadow gmap support")

    arch/s390/include/asm/pgalloc.h: rcu_table_freelist_finish - only
    declaration left after commit 36409f6353fc ("[S390] use generic RCU
    page-table freeing code")

    arch/s390/include/asm/tlbflush.h: smp_ptlb_all - only declaration left
    after commit 5a79859ae0f3 ("s390: remove 31 bit support")

    arch/s390/include/asm/vtimer.h: init_cpu_vtimer - only declaration left
    after commit b5f87f15e200 ("s390/idle: consolidate idle functions and
    definitions")

    arch/s390/include/asm/pci.h: zpci_debug_info - only declaration left
    after commit 386aa051fb4b ("s390/pci: remove per device debug attribute")

    arch/s390/include/asm/vdso.h: vdso_alloc_boot_cpu - only declaration
    left after commit 4bff8cb54502 ("s390: convert to GENERIC_VDSO")

    arch/s390/include/asm/smp.h: smp_vcpu_scheduled - only declaration left
    after commit 67626fadd269 ("s390: enforce CONFIG_SMP")

    arch/s390/kernel/entry.h: restart_call_handler - only declaration left
    after commit 8b646bd75908 ("[S390] rework smp code")

    arch/s390/kernel/entry.h: startup_init_nobss - only declaration left
    after commit 2e83e0eb85ca ("s390: clean .bss before running uncompressed
    kernel")

    arch/s390/kernel/entry.h: s390_early_resume - only declaration left after
    commit 394216275c7d ("s390: remove broken hibernate / power management
    support")

    drivers/s390/char/raw3270.h: raw3270_request_alloc_bootmem - only
    declaration left after commit 33403dcfcdfd ("[S390] 3270 console:
    convert from bootmem to slab")

    drivers/s390/cio/device.h: ccw_device_schedule_sch_unregister - only
    declaration left after commit 37de53bb5290 ("[S390] cio: introduce ccw
    device todos")

    drivers/s390/char/tape.h: tape_hotplug_event - has only declaration
    since recorded git history.

    drivers/s390/char/tape.h: tape_oper_handler - has only declaration since
    recorded git history.

    drivers/s390/char/tape.h: tape_noper_handler - has only declaration
    since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_check_locate - only declaration
    left after commit 161beff8f40d ("s390/tape: remove tape block leftovers")

    drivers/s390/char/tape_std.h: tape_std_default_handler - has only
    declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_unexpect_uchk_handler - has only
    declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_irq - has only declaration since
    recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery - has only
    declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_has_failed -
    has only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_succeded - has
    only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_do_retry - has
    only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_read_opposite -
    has only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_HWBUG - has only
    declaration since recorded git history.

    Reviewed-by: Sven Schnelle
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     
  • sclp_set_columns and sclp_set_htab are leftovers since commit 095761d28ae4
    ("[S390] sclp_tty: remove ioctl interface."), remove them as a dead code.

    Reviewed-by: Sven Schnelle
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     
  • sclp_sdias cannot be built as a module, CRASH_DUMP option is a bool not a
    tristate. zcore_exit() has already been removed with commit cbe62fac178c
    ("s390: char: make zcore explicitly non-modular"). Remove orphaned
    sclp_sdias_exit for consistency as well.

    Reviewed-by: Sven Schnelle
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     

29 Sep, 2020

1 commit


21 Sep, 2020

2 commits

  • This reverts commit 55a5542a5462 ("s390/hibernate: fix error handling when
    suspend cpu != resume cpu"). It added sclp_early_printk_force() which
    is no longer used since commit 394216275c7d ("s390: remove broken
    hibernate / power management support"). No hibernate - no problem.

    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     
  • Since commit 980d5f9ab36b ("s390/boot: enable .bss section for compressed
    kernel") .bss section usage is no longer restricted. .bss section is a
    part of the decompressor's image and is zeroed by the linker. For that
    reason clean up now unneeded .data section usage.

    Reviewed-by: Alexander Egorenkov
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     

02 Jul, 2020

1 commit

  • In an effort to enable -Wcast-function-type in the top-level Makefile to
    support Control Flow Integrity builds, remove all the function callback
    casts.

    To do this modify the function prototypes accordingly.

    Signed-off-by: Oscar Carter
    Message-Id:
    Reviewed-by: Kees Cook
    [heiko.carstens@de.ibm.com: coding style changes]
    Signed-off-by: Heiko Carstens

    Oscar Carter
     

29 Jun, 2020

1 commit

  • Remove unused /sys/kernel/debug/zcore/memmap device.
    Since at least version 1.24.0 of s390-tools zfcpdump no longer
    needs it and reads /proc/vmcore instead.

    Signed-off-by: Alexander Egorenkov
    Reviewed-by: Philipp Rudo
    Signed-off-by: Heiko Carstens

    Alexander Egorenkov
     

25 Mar, 2020

1 commit

  • Convert the various uses of fallthrough comments to fallthrough;

    Done via script
    Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/

    Signed-off-by: Joe Perches
    Signed-off-by: Heiko Carstens
    Signed-off-by: Vasily Gorbik

    Joe Perches
     

27 Feb, 2020

2 commits

  • It turned out that fake numa support is rather useless on s390, since
    there are no scenarios where there is any performance or other benefit
    when used.

    However it does provide maintenance cost and breaks from time to time.
    Therefore remove it.

    CONFIG_NUMA is still supported with a very small backend and only one
    node. This way userspace applications which require NUMA interfaces
    continue to work.

    Note that NODES_SHIFT is set to 1 (= 2 nodes) instead of 0 (= 1 node),
    since there is quite a bit of kernel code which assumes that more than
    one node is possible if CONFIG_NUMA is enabled.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Vasily Gorbik

    Heiko Carstens
     
  • The current codebase makes use of the zero-length array language
    extension to the C90 standard, but the preferred mechanism to declare
    variable-length types such as these ones is a flexible array member[1][2],
    introduced in C99:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertently introduced[3] to the codebase from now on.

    Also, notice that, dynamic memory allocations won't be affected by
    this change:

    "Flexible array members have incomplete type, and so the sizeof operator
    may not be applied. As a quirk of the original implementation of
    zero-length arrays, sizeof evaluates to zero."[1]

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

    Link: https://lkml.kernel.org/r/20200221150612.GA9717@embeddedor
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Vasily Gorbik

    Gustavo A. R. Silva
     

23 Oct, 2019

1 commit

  • MTIOCPOS and MTIOCGET are incompatible between 32-bit and 64-bit user
    space, and traditionally have been translated in fs/compat_ioctl.c.

    To get rid of that translation handler, move a corresponding
    implementation into each of the four drivers implementing those commands.

    The interesting part of that is now in a new linux/mtio.h header that
    wraps the existing uapi/linux/mtio.h header and provides an abstraction
    to let drivers handle both cases easily. Using an in_compat_syscall()
    check, the caller does not have to keep track of whether this was
    called through .unlocked_ioctl() or .compat_ioctl().

    Acked-by: Heiko Carstens
    Cc: "Kai Mäkisara"
    Cc: linux-scsi@vger.kernel.org
    Cc: "James E.J. Bottomley"
    Cc: "Martin K. Petersen"
    Cc: "David S. Miller"
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

18 Sep, 2019

1 commit

  • Pull s390 updates from Vasily Gorbik:

    - Add support for IBM z15 machines.

    - Add SHA3 and CCA AES cipher key support in zcrypt and pkey
    refactoring.

    - Move to arch_stack_walk infrastructure for the stack unwinder.

    - Various kasan fixes and improvements.

    - Various command line parsing fixes.

    - Improve decompressor phase debuggability.

    - Lift no bss usage restriction for the early code.

    - Use refcount_t for reference counters for couple of places in mm
    code.

    - Logging improvements and return code fix in vfio-ccw code.

    - Couple of zpci fixes and minor refactoring.

    - Remove some outdated documentation.

    - Fix secure boot detection.

    - Other various minor code clean ups.

    * tag 's390-5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits)
    s390: remove pointless drivers-y in drivers/s390/Makefile
    s390/cpum_sf: Fix line length and format string
    s390/pci: fix MSI message data
    s390: add support for IBM z15 machines
    s390/crypto: Support for SHA3 via CPACF (MSA6)
    s390/startup: add pgm check info printing
    s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding
    vfio-ccw: fix error return code in vfio_ccw_sch_init()
    s390: vfio-ap: fix warning reset not completed
    s390/base: remove unused s390_base_mcck_handler
    s390/sclp: Fix bit checked for has_sipl
    s390/zcrypt: fix wrong handling of cca cipher keygenflags
    s390/kasan: add kdump support
    s390/setup: avoid using strncmp with hardcoded length
    s390/sclp: avoid using strncmp with hardcoded length
    s390/module: avoid using strncmp with hardcoded length
    s390/pci: avoid using strncmp with hardcoded length
    s390/kaslr: reserve memory for kasan usage
    s390/mem_detect: provide single get_mem_detect_end
    s390/cmma: reuse kstrtobool for option value parsing
    ...

    Linus Torvalds
     

03 Sep, 2019

1 commit


26 Aug, 2019

1 commit


21 Aug, 2019

1 commit

  • Clean uncompressed kernel .bss section in the startup code before
    the uncompressed kernel is executed. At this point of time initrd and
    certificates have been already rescued. Uncompressed kernel .bss size
    is known from vmlinux_info. It is also taken into consideration during
    uncompressed kernel positioning by kaslr (so it is safe to clean it).

    With that uncompressed kernel is starting with .bss section zeroed and
    no .bss section usage restrictions apply. Which makes chkbss checks for
    uncompressed kernel objects obsolete and they can be removed.

    early_nobss.c is also not needed anymore. Parts of it which are still
    relevant are moved to early.c. Kasan initialization code is now called
    directly from head64 (early.c is instrumented and should not be
    executed before kasan shadow memory is set up).

    Reviewed-by: Philipp Rudo
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     

30 Jul, 2019

2 commits


12 Jul, 2019

1 commit

  • Use the correct bit for detection of the machine capability associated
    with the has_secure attribute. It is expected that the underlying
    platform (including hypervisors) unsets the bit when they don't provide
    secure ipl for their guests.

    Fixes: c9896acc7851 ("s390/ipl: Provide has_secure sysfs attribute")
    Cc: stable@vger.kernel.org # 5.2
    Signed-off-by: Philipp Rudo
    Reviewed-by: Christian Borntraeger
    Reviewed-by: Peter Oberparleiter
    Signed-off-by: Vasily Gorbik

    Philipp Rudo
     

19 Jun, 2019

1 commit


11 Jun, 2019

1 commit

  • Convert all text files with s390 documentation to ReST format.

    Tried to preserve as much as possible the original document
    format. Still, some of the files required some work in order
    for it to be visible on both plain text and after converted
    to html.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Heiko Carstens

    Mauro Carvalho Chehab
     

04 Jun, 2019

1 commit


08 May, 2019

1 commit

  • 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 s390 updates from Martin Schwidefsky:

    - Support for kernel address space layout randomization

    - Add support for kernel image signature verification

    - Convert s390 to the generic get_user_pages_fast code

    - Convert s390 to the stack unwind API analog to x86

    - Add support for CPU directed interrupts for PCI devices

    - Provide support for MIO instructions to the PCI base layer, this will
    allow the use of direct PCI mappings in user space code

    - Add the basic KVM guest ultravisor interface for protected VMs

    - Add AT_HWCAP bits for several new hardware capabilities

    - Update the CPU measurement facility counter definitions to SVN 6

    - Arnds cleanup patches for his quest to get LLVM compiles working

    - A vfio-ccw update with bug fixes and support for halt and clear

    - Improvements for the hardware TRNG code

    - Another round of cleanup for the QDIO layer

    - Numerous cleanups and bug fixes

    * tag 's390-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (98 commits)
    s390/vdso: drop unnecessary cc-ldoption
    s390: fix clang -Wpointer-sign warnigns in boot code
    s390: drop CONFIG_VIRT_TO_BUS
    s390: boot, purgatory: pass $(CLANG_FLAGS) where needed
    s390: only build for new CPUs with clang
    s390: simplify disabled_wait
    s390/ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
    s390/unwind: introduce stack unwind API
    s390/opcodes: add missing instructions to the disassembler
    s390/bug: add entry size to the __bug_table section
    s390: use proper expoline sections for .dma code
    s390/nospec: rename assembler generated expoline thunks
    s390: add missing ENDPROC statements to assembler functions
    locking/lockdep: check for freed initmem in static_obj()
    s390/kernel: add support for kernel address space layout randomization (KASLR)
    s390/kernel: introduce .dma sections
    s390/sclp: do not use static sccbs
    s390/kprobes: use static buffer for insn_page
    s390/kernel: convert SYSCALL and PGM_CHECK handlers to .quad
    s390/kernel: build a relocatable kernel
    ...

    Linus Torvalds
     

06 May, 2019

1 commit

  • 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
     

03 May, 2019

1 commit

  • The arch/s390/boot directory is built with its own set of compiler
    options that does not include -Wno-pointer-sign like the rest of
    the kernel does, this causes a lot of harmless but correct warnings
    when building with clang.

    For the atomics, we can add type casts to avoid the warnings, for
    everything else the easiest way is to slightly adapt the types
    to be more consistent.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Nick Desaulniers
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Arnd Bergmann
     

29 Apr, 2019

3 commits

  • The sccbs for init/read/sdias/early have to be located below 2 GB, and
    they are currently defined as a static buffer.

    With a relocatable kernel that could reside at any place in memory, this
    will no longer guarantee the location below 2 GB, so use a dynamic
    GFP_DMA allocation instead.

    The sclp_early_sccb buffer needs special handling, as it can be used
    very early, and by both the decompressor and also the decompressed
    kernel. Therefore, a fixed 4 KB buffer is introduced at 0x11000, the
    former PARMAREA_END. The new PARMAREA_END is now 0x12000, and it is
    renamed to HEAD_END, as it is rather the end of head.S and not the end
    of the parmarea.

    Signed-off-by: Gerald Schaefer
    Reviewed-by: Philipp Rudo
    Signed-off-by: Martin Schwidefsky

    Gerald Schaefer
     
  • Detect the adapter CPU directed interruption facility.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Provide an interface for userspace so it can find out if a machine is
    capeable of doing secure boot. The interface is, for example, needed for
    zipl so it can find out which file format it can/should write to disk.

    Signed-off-by: Philipp Rudo
    Signed-off-by: Martin Schwidefsky

    Philipp Rudo
     

26 Apr, 2019

1 commit

  • With git commit 1e941d39493f1820475d80729a03cd7ab8c3c86d
    "s390: move ipl block to .boot.preserved.data section" the earl_ipl_block
    got renamed to ipl_block and became publicly available via boot_data.h.
    This might cause problems with zcore, which has it's own ipl_block
    variable. Thus rename the ipl_block in zcore to prevent name collision
    and highlight that it's only used locally.

    Signed-off-by: Philipp Rudo
    Fixes: 1e941d39493f ("s390: move ipl block to .boot.preserved.data section")
    Signed-off-by: Martin Schwidefsky

    Philipp Rudo
     

10 Apr, 2019

1 commit

  • The spinlock in the raw3270_view structure is used by con3270, tty3270
    and fs3270 in different ways. For con3270 the lock can be acquired in
    irq context, for tty3270 and fs3270 the highest context is bh.

    Lockdep sees the view->lock as a single class and if the 3270 driver
    is used for the console the following message is generated:

    WARNING: inconsistent lock state
    5.1.0-rc3-05157-g5c168033979d #12 Not tainted
    --------------------------------
    inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
    swapper/0/1 [HC0[0]:SC1[1]:HE1:SE0] takes:
    (____ptrval____) (&(&view->lock)->rlock){?.-.}, at: tty3270_update+0x7c/0x330

    Introduce a lockdep subclass for the view lock to distinguish bh from
    irq locks.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

06 Mar, 2019

1 commit

  • Pull s390 updates from Martin Schwidefsky:

    - A copy of Arnds compat wrapper generation series

    - Pass information about the KVM guest to the host in form the control
    program code and the control program version code

    - Map IOV resources to support PCI physical functions on s390

    - Add vector load and store alignment hints to improve performance

    - Use the "jdd" constraint with gcc 9 to make jump labels working again

    - Remove amode workaround for old z/VM releases from the DCSS code

    - Add support for in-kernel performance measurements using the CPU
    measurement counter facility

    - Introduce a new PMU device cpum_cf_diag to capture counters and store
    thenn as event raw data.

    - Bug fixes and cleanups

    * tag 's390-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (54 commits)
    Revert "s390/cpum_cf: Add kernel message exaplanations"
    s390/dasd: fix read device characteristic with CONFIG_VMAP_STACK=y
    s390/suspend: fix prefix register reset in swsusp_arch_resume
    s390: warn about clearing als implied facilities
    s390: allow overriding facilities via command line
    s390: clean up redundant facilities list setup
    s390/als: remove duplicated in-place implementation of stfle
    s390/cio: Use cpa range elsewhere within vfio-ccw
    s390/cio: Fix vfio-ccw handling of recursive TICs
    s390: vfio_ap: link the vfio_ap devices to the vfio_ap bus subsystem
    s390/cpum_cf: Handle EBUSY return code from CPU counter facility reservation
    s390/cpum_cf: Add kernel message exaplanations
    s390/cpum_cf_diag: Add support for s390 counter facility diagnostic trace
    s390/cpum_cf: add ctr_stcctm() function
    s390/cpum_cf: move common functions into a separate file
    s390/cpum_cf: introduce kernel_cpumcf_avail() function
    s390/cpu_mf: replace stcctm5() with the stcctm() function
    s390/cpu_mf: add store cpu counter multiple instruction support
    s390/cpum_cf: Add minimal in-kernel interface for counter measurements
    s390/cpum_cf: introduce kernel_cpumcf_alert() to obtain measurement alerts
    ...

    Linus Torvalds
     

28 Jan, 2019

1 commit

  • The s390x diagnose 318 instruction sets the control program name code (CPNC)
    and control program version code (CPVC) to provide useful information
    regarding the OS during debugging. The CPNC is explicitly set to 4 to
    indicate a Linux/KVM environment.

    The CPVC is a 7-byte value containing:

    - 3-byte Linux version code, currently set to 0
    - 3-byte unique value, currently set to 0
    - 1-byte trailing null

    Signed-off-by: Collin Walling
    Acked-by: Janosch Frank
    Acked-by: Heiko Carstens
    Reviewed-by: David Hildenbrand
    Reviewed-by: Cornelia Huck
    Message-Id:
    [set version code to 0 until the structure is fully defined]
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Collin Walling
     

12 Jan, 2019

1 commit

  • smp_rescan_cpus() is called without the device_hotplug_lock, which can lead
    to a dedlock when a new CPU is found and immediately set online by a udev
    rule.

    This was observed on an older kernel version, where the cpu_hotplug_begin()
    loop was still present, and it resulted in hanging chcpu and systemd-udev
    processes. This specific deadlock will not show on current kernels. However,
    there may be other possible deadlocks, and since smp_rescan_cpus() can still
    trigger a CPU hotplug operation, the device_hotplug_lock should be held.

    For reference, this was the deadlock with the old cpu_hotplug_begin() loop:

    chcpu (rescan) systemd-udevd

    echo 1 > /sys/../rescan
    -> smp_rescan_cpus()
    -> (*) get_online_cpus()
    (increases refcount)
    -> smp_add_present_cpu()
    (new CPU found)
    -> register_cpu()
    -> device_add()
    -> udev "add" event triggered -----------> udev rule sets CPU online
    -> echo 1 > /sys/.../online
    -> lock_device_hotplug_sysfs()
    (this is missing in rescan path)
    -> device_online()
    -> (**) device_lock(new CPU dev)
    -> cpu_up()
    -> cpu_hotplug_begin()
    (loops until refcount == 0)
    -> deadlock with (*)
    -> bus_probe_device()
    -> device_attach()
    -> device_lock(new CPU dev)
    -> deadlock with (**)

    Fix this by taking the device_hotplug_lock in the CPU rescan path.

    Cc:
    Signed-off-by: Gerald Schaefer
    Signed-off-by: Martin Schwidefsky

    Gerald Schaefer
     

13 Dec, 2018

1 commit


31 Oct, 2018

1 commit

  • Move remaining definitions and declarations from include/linux/bootmem.h
    into include/linux/memblock.h and remove the redundant header.

    The includes were replaced with the semantic patch below and then
    semi-automated removal of duplicated '#include

    @@
    @@
    - #include
    + #include

    [sfr@canb.auug.org.au: dma-direct: fix up for the removal of linux/bootmem.h]
    Link: http://lkml.kernel.org/r/20181002185342.133d1680@canb.auug.org.au
    [sfr@canb.auug.org.au: powerpc: fix up for removal of linux/bootmem.h]
    Link: http://lkml.kernel.org/r/20181005161406.73ef8727@canb.auug.org.au
    [sfr@canb.auug.org.au: x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal]
    Link: http://lkml.kernel.org/r/20181008190341.5e396491@canb.auug.org.au
    Link: http://lkml.kernel.org/r/1536927045-23536-30-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Stephen Rothwell
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport