09 Jan, 2017

1 commit

  • commit 5457e03de918f7a3e294eb9d26a608ab8a579976 upstream.

    The buffer for iucv_message_receive() needs to be below 2 GB. In
    __iucv_message_receive(), the buffer address is casted to an u32, which
    would result in either memory corruption or an addressing exception when
    using addresses >= 2 GB.

    Fix this by using GFP_DMA for the buffer allocation.

    Signed-off-by: Gerald Schaefer
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Greg Kroah-Hartman

    Gerald Schaefer
     

05 Oct, 2016

1 commit

  • Pull s390 updates from Martin Schwidefsky:
    "The new features and main improvements in this merge for v4.9

    - Support for the UBSAN sanitizer

    - Set HAVE_EFFICIENT_UNALIGNED_ACCESS, it improves the code in some
    places

    - Improvements for the in-kernel fpu code, in particular the overhead
    for multiple consecutive in kernel fpu users is recuded

    - Add a SIMD implementation for the RAID6 gen and xor operations

    - Add RAID6 recovery based on the XC instruction

    - The PCI DMA flush logic has been improved to increase the speed of
    the map / unmap operations

    - The time synchronization code has seen some updates

    And bug fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits)
    s390/con3270: fix insufficient space padding
    s390/con3270: fix use of uninitialised data
    MAINTAINERS: update DASD maintainer
    s390/cio: fix accidental interrupt enabling during resume
    s390/dasd: add missing \n to end of dev_err messages
    s390/config: Enable config options for Docker
    s390/dasd: make query host access interruptible
    s390/dasd: fix panic during offline processing
    s390/dasd: fix hanging offline processing
    s390/pci_dma: improve lazy flush for unmap
    s390/pci_dma: split dma_update_trans
    s390/pci_dma: improve map_sg
    s390/pci_dma: simplify dma address calculation
    s390/pci_dma: remove dma address range check
    iommu/s390: simplify registration of I/O address translation parameters
    s390: migrate exception table users off module.h and onto extable.h
    s390: export header for CLP ioctl
    s390/vmur: fix irq pointer dereference in int handler
    s390/dasd: add missing KOBJ_CHANGE event for unformatted devices
    s390: enable UBSAN
    ...

    Linus Torvalds
     

30 Sep, 2016

2 commits

  • con3270 contains an optimisation that reduces the amount of data to be
    transmitted to the 3270 terminal by putting a Repeat to Address (RA)
    order into the data stream. The RA order itself takes up space, so
    con3270 only uses it if there's enough space left in the line
    buffer. Otherwise it just pads out the line manually.

    For lines that were _just_ short enough that the RA order still fit in
    the line buffer, the line was instead padded with an insufficient
    amount of spaces. This was caused by examining the size of the
    allocated line buffer rather than the length of the string to be
    displayed.

    For con3270_cline_end(), we just compare against the line length. For
    con3270_update_string() however that isn't available anymore, so we
    check whether the Repeat to Address order is present.

    Fixes: f51320a5 ("[PATCH] s390: new 3270 driver.") (tglx/history.git)
    Tested-by: Jing Liu
    Tested-by: Yang Chen
    Signed-off-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Sascha Silbe
     
  • con3270 contains an optimisation that reduces the amount of data to be
    transmitted to the 3270 terminal by putting a Repeat to Address (RA)
    order into the data stream. The RA order itself takes up space, so
    con3270 only uses it if there's enough space left in the line
    buffer. Otherwise it just pads out the line manually.

    For lines too long to include the RA order, one byte was left
    uninitialised. This was caused by an off-by-one bug in the loop that
    pads out the line. Since the buffer is allocated from a common pool,
    the single byte left uninitialised contained some previous buffer
    content. Usually this was just a space or some character (which can
    result in clutter but is otherwise harmless). Sometimes, however, it
    was a Repeat to Address order, messing up the entire screen layout and
    causing the display to send the entire buffer content on every
    keystroke.

    Fixes: f51320a5 ("[PATCH] s390: new 3270 driver.") (tglx/history.git)
    Reported-by: Liu Jing
    Tested-by: Jing Liu
    Tested-by: Yang Chen
    Signed-off-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Sascha Silbe
     

20 Sep, 2016

1 commit


31 Aug, 2016

1 commit

  • Many modules call misc_register and misc_deregister in its module init
    and exit methods without any additional code. This ends up being
    boilerplate. This patch adds helper macro module_misc_device(), that
    replaces module_init()/ module_exit() with template functions.

    This patch also converts drivers to use new macro.

    Change since v1:
    Add device.h include in miscdevice.h as module_driver macro was not
    available from other include files in some architectures.

    Signed-off-by: PrasannaKumar Muralidharan
    Signed-off-by: Greg Kroah-Hartman

    PrasannaKumar Muralidharan
     

24 Aug, 2016

1 commit


03 Aug, 2016

1 commit

  • Pull KVM updates from Paolo Bonzini:

    - ARM: GICv3 ITS emulation and various fixes. Removal of the
    old VGIC implementation.

    - s390: support for trapping software breakpoints, nested
    virtualization (vSIE), the STHYI opcode, initial extensions
    for CPU model support.

    - MIPS: support for MIPS64 hosts (32-bit guests only) and lots
    of cleanups, preliminary to this and the upcoming support for
    hardware virtualization extensions.

    - x86: support for execute-only mappings in nested EPT; reduced
    vmexit latency for TSC deadline timer (by about 30%) on Intel
    hosts; support for more than 255 vCPUs.

    - PPC: bugfixes.

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (302 commits)
    KVM: PPC: Introduce KVM_CAP_PPC_HTM
    MIPS: Select HAVE_KVM for MIPS64_R{2,6}
    MIPS: KVM: Reset CP0_PageMask during host TLB flush
    MIPS: KVM: Fix ptr->int cast via KVM_GUEST_KSEGX()
    MIPS: KVM: Sign extend MFC0/RDHWR results
    MIPS: KVM: Fix 64-bit big endian dynamic translation
    MIPS: KVM: Fail if ebase doesn't fit in CP0_EBase
    MIPS: KVM: Use 64-bit CP0_EBase when appropriate
    MIPS: KVM: Set CP0_Status.KX on MIPS64
    MIPS: KVM: Make entry code MIPS64 friendly
    MIPS: KVM: Use kmap instead of CKSEG0ADDR()
    MIPS: KVM: Use virt_to_phys() to get commpage PFN
    MIPS: Fix definition of KSEGX() for 64-bit
    KVM: VMX: Add VMCS to CPU's loaded VMCSs before VMPTRLD
    kvm: x86: nVMX: maintain internal copy of current VMCS
    KVM: PPC: Book3S HV: Save/restore TM state in H_CEDE
    KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures
    KVM: arm64: vgic-its: Simplify MAPI error handling
    KVM: arm64: vgic-its: Make vgic_its_cmd_handle_mapi similar to other handlers
    KVM: arm64: vgic-its: Turn device_id validation into generic ID validation
    ...

    Linus Torvalds
     

13 Jul, 2016

1 commit

  • Use the same code structure when determining preferred consoles for
    Linux running as KVM guest as with Linux running in LPAR and z/VM
    guest:

    - Extend the console_mode variable to cover vt220 and hvc consoles
    - Determine sensible console defaults in conmode_default()
    - Remove KVM-special handling in set_preferred_console()

    Ensure that the sclp line mode console is also registered when the
    vt220 console was selected to not change existing behavior that
    someone might be relying on.

    As an externally visible change, KVM guest users can now select
    the 3270 or 3215 console devices using the conmode= kernel parameter,
    provided that support for the corresponding driver was compiled into
    the kernel.

    Signed-off-by: Peter Oberparleiter
    Signed-off-by: Jing Liu
    Reviewed-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky

    Peter Oberparleiter
     

13 Jun, 2016

3 commits

  • Rename DIAG308_IPL and DIAG308_DUMP to DIAG308_LOAD_CLEAR and
    DIAG308_LOAD_NORMAL_DUMP to better reflect the associated IPL
    functions.

    Suggested-by: Cornelia Huck
    Suggested-by: Christian Borntraeger
    Signed-off-by: Heiko Carstens
    Acked-by: Michael Holzheu
    Reviewed-by: Peter Oberparleiter
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Show the dynamic and static cpu mhz of each cpu. Since these values
    are per cpu this requires a fundamental extension of the format of
    /proc/cpuinfo.

    Historically we had only a single line per cpu and a summary at the
    top of the file. This format is hardly extendible if we want to add
    more per cpu information.

    Therefore this patch adds per cpu blocks at the end of /proc/cpuinfo:

    cpu : 0
    cpu Mhz dynamic : 5504
    cpu Mhz static : 5504

    cpu : 1
    cpu Mhz dynamic : 5504
    cpu Mhz static : 5504

    cpu : 2
    cpu Mhz dynamic : 5504
    cpu Mhz static : 5504

    cpu : 3
    cpu Mhz dynamic : 5504
    cpu Mhz static : 5504

    Right now each block contains only the dynamic and static cpu mhz,
    but it can be easily extended like on every other architecture.

    This extension is supposed to be compatible with the old format.

    Signed-off-by: Heiko Carstens
    Acked-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Use memdup_user_nul to duplicate a memory region from user-space
    to kernel-space and terminate with a NULL, instead of open coding
    using kmalloc + copy_from_user and explicitly NULL terminating.

    Signed-off-by: Muhammad Falak R Wani
    [heiko.carstens@de.ibm.com: remove comment]
    Signed-off-by: Heiko Carstens

    Signed-off-by: Martin Schwidefsky

    Muhammad Falak R Wani
     

10 Jun, 2016

10 commits


21 May, 2016

1 commit

  • Pull tty and serial driver updates from Greg KH:
    "Here's the large TTY and Serial driver update for 4.7-rc1.

    A few new serial drivers are added here, and Peter has fixed a bunch
    of long-standing bugs in the tty layer and serial drivers as normal.
    Full details in the shortlog.

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

    * tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (88 commits)
    MAINTAINERS: 8250: remove website reference
    serial: core: Fix port mutex assert if lockdep disabled
    serial: 8250_dw: fix wrong logic in dw8250_check_lcr()
    tty: vt, finish looping on duplicate
    tty: vt, return error when con_startup fails
    QE-UART: add "fsl,t1040-ucc-uart" to of_device_id
    serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios
    serial: 8250dw: Add device HID for future AMD UART controller
    Fix OpenSSH pty regression on close
    serial: mctrl_gpio: add IRQ locking
    serial: 8250: Integrate Fintek into 8250_base
    serial: mps2-uart: add support for early console
    serial: mps2-uart: add MPS2 UART driver
    dt-bindings: document the MPS2 UART bindings
    serial: sirf: Use generic uart-has-rtscts DT property
    serial: sirf: Introduce helper variable struct device_node *np
    serial: mxs-auart: Use generic uart-has-rtscts DT property
    serial: imx: Use generic uart-has-rtscts DT property
    doc: DT: Add Generic Serial Device Tree Bindings
    serial: 8250: of: Make tegra_serial_handle_break() static
    ...

    Linus Torvalds
     

20 May, 2016

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "Small release overall.

    x86:
    - miscellaneous fixes
    - AVIC support (local APIC virtualization, AMD version)

    s390:
    - polling for interrupts after a VCPU goes to halted state is now
    enabled for s390
    - use hardware provided information about facility bits that do not
    need any hypervisor activity, and other fixes for cpu models and
    facilities
    - improve perf output
    - floating interrupt controller improvements.

    MIPS:
    - miscellaneous fixes

    PPC:
    - bugfixes only

    ARM:
    - 16K page size support
    - generic firmware probing layer for timer and GIC

    Christoffer Dall (KVM-ARM maintainer) says:
    "There are a few changes in this pull request touching things
    outside KVM, but they should all carry the necessary acks and it
    made the merge process much easier to do it this way."

    though actually the irqchip maintainers' acks didn't make it into the
    patches. Marc Zyngier, who is both irqchip and KVM-ARM maintainer,
    later acked at http://mid.gmane.org/573351D1.4060303@arm.com ('more
    formally and for documentation purposes')"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (82 commits)
    KVM: MTRR: remove MSR 0x2f8
    KVM: x86: make hwapic_isr_update and hwapic_irr_update look the same
    svm: Manage vcpu load/unload when enable AVIC
    svm: Do not intercept CR8 when enable AVIC
    svm: Do not expose x2APIC when enable AVIC
    KVM: x86: Introducing kvm_x86_ops.apicv_post_state_restore
    svm: Add VMEXIT handlers for AVIC
    svm: Add interrupt injection via AVIC
    KVM: x86: Detect and Initialize AVIC support
    svm: Introduce new AVIC VMCB registers
    KVM: split kvm_vcpu_wake_up from kvm_vcpu_kick
    KVM: x86: Introducing kvm_x86_ops VCPU blocking/unblocking hooks
    KVM: x86: Introducing kvm_x86_ops VM init/destroy hooks
    KVM: x86: Rename kvm_apic_get_reg to kvm_lapic_get_reg
    KVM: x86: Misc LAPIC changes to expose helper functions
    KVM: shrink halt polling even more for invalid wakeups
    KVM: s390: set halt polling to 80 microseconds
    KVM: halt_polling: provide a way to qualify wakeups during poll
    KVM: PPC: Book3S HV: Re-enable XICS fast path for irqfd-generated interrupts
    kvm: Conditionally register IRQ bypass consumer
    ...

    Linus Torvalds
     

19 May, 2016

1 commit

  • Pull s390 updates from Martin Schwidefsky:
    "The s390 patches for the 4.7 merge window have the usual bug fixes and
    cleanups, and the following new features:

    - An interface for dasd driver to query if a volume is online to
    another operating system

    - A new ioctl for the dasd driver to verify the format for a range of
    tracks

    - Following the example of x86 the struct fpu is now allocated with
    the task_struct

    - The 'report_error' interface for the PCI bus to send an
    adapter-error notification from user space to the service element
    of the machine"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (29 commits)
    s390/vmem: remove unused function parameter
    s390/vmem: fix identity mapping
    s390: add missing include statements
    s390: add missing declarations
    s390: make couple of variables and functions static
    s390/cache: remove superfluous locking
    s390/cpuinfo: simplify locking and skip offline cpus early
    s390/3270: hangup the 3270 tty after a disconnect
    s390/3270: handle reconnect of a tty with a different size
    s390/3270: avoid endless I/O loop with disconnected 3270 terminals
    s390/3270: fix garbled output on 3270 tty view
    s390/3270: fix view reference counting
    s390/3270: add missing tty_kref_put
    s390/dumpstack: implement and use return_address()
    s390/cpum_sf: Remove superfluous SMP function call
    s390/cpum_cf: Remove superfluous SMP function call
    s390/Kconfig: make z196 the default processor type
    s390/sclp: avoid compile warning in sclp_pci_report
    s390/fpu: allocate 'struct fpu' with the task_struct
    s390/crypto: cleanup and move the header with the cpacf definitions
    ...

    Linus Torvalds
     

10 May, 2016

2 commits


09 May, 2016

2 commits


04 May, 2016

4 commits

  • If a 3270 terminal is disconnected while the tty view is active
    the 3270 driver goes into an endless loop of failed I/O requests
    until the terminal is connected again.

    Add code to the raw3270 interrupt handler to check for unit checks
    due to failed I/O requests and put the device to sleep with the
    RAW3270_FLAGS_BUSY flag until a unsolicited device end interrupt
    indicates that the device can be used again. while we are at it
    simplify the 3270 irq handling and remove unnecessary code.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The tty3270_update function tries to optimize the output stream by
    skipping the TO_SBA command to position the output offset if the
    TO_RA command of the previous line ended at the same offset.
    But some lines do not have the TO_RA at the end, namely those
    with a length equal to the number of columns.

    Make sure there is a TO_RA at the end of the previous line to avoid
    funny looking output.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The tty3270_close function set tty->driver_data to NULL after the
    open count dropped to zero but tty3270_cleanup still needs the
    pointer to the tty3270 view to drop the reference count.

    Move the clearing of tty->driver_data to tty3270_cleanup and
    drop the unnecessary tty_port_tty_set calls in tty3270_install.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The tty3270_resize_work functions acquires a reference to the tty
    to call tty_do_resize but fails to release the reference again.
    Add the missing tty_kref_put.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

01 May, 2016

3 commits

  • Replace ASYNC_INITIALIZED bit in the tty_port::flags field with
    TTY_PORT_INITIALIZED bit in the tty_port::iflags field. Introduce helpers
    tty_port_set_initialized() and tty_port_initialized() to abstract
    atomic bit ops.

    Note: the transforms for test_and_set_bit() and test_and_clear_bit()
    are unnecessary as the state transitions are already mutually exclusive;
    the tty lock prevents concurrent open/close/hangup.

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

    Peter Hurley
     
  • Replace ASYNC_SUSPENDED bit in the tty_port::flags field with
    TTY_PORT_SUSPENDED bit in the tty_port::iflags field. Introduce helpers
    tty_port_set_suspended() and tty_port_suspended() to abstract
    atomic bit ops.

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

    Peter Hurley
     
  • Abstract TTY_IO_ERROR status test treewide with tty_io_error().
    NB: tty->flags uses atomic bit ops; replace non-atomic bit test
    with test_bit().

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

    Peter Hurley
     

27 Apr, 2016

1 commit

  • The sclp_ctl_ioctl_sccb function uses two copy_from_user calls to
    retrieve the sclp request from user space. The first copy_from_user
    fetches the length of the request which is stored in the first two
    bytes of the request. The second copy_from_user gets the complete
    sclp request, but this copies the length field a second time.
    A malicious user may have changed the length in the meantime.

    Reported-by: Pengfei Wang
    Reviewed-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

21 Apr, 2016

1 commit

  • Fix the initialization of a local variable to remove this warning:

    All warnings (new ones prefixed by >>):

    drivers/s390/char/sclp_pci.c: In function 'sclp_pci_report':
    >> drivers/s390/char/sclp_pci.c:127:9: warning: missing braces around initializer [-Wmissing-braces]
    struct sclp_req req = {0};
    ^
    drivers/s390/char/sclp_pci.c:127:9: warning: (near initialization for 'req.list') [-Wmissing-braces]

    Fixes: 12283a4035691697 "s390/sclp: add error notification command"
    Reported-by: kbuild test robot
    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     

16 Apr, 2016

2 commits