08 Aug, 2017

1 commit

  • On L3, the qeth_hdr struct needs to be filled with the next-hop
    IP address.
    The current code accesses rtable->rt_gateway without checking that
    rtable is a valid address. The accidental access to a lowcore area
    results in a random next-hop address in the qeth_hdr.
    rtable (or more precisely, skb_dst(skb)) can be NULL in rare cases
    (for instance together with AF_PACKET sockets).
    This patch adds the missing NULL-ptr checks.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Ursula Braun
    Fixes: 87e7597b5a3 qeth: Move away from using neighbour entries in qeth_l3_fill_header()
    Signed-off-by: David S. Miller

    Julian Wiedmann
     

25 Jul, 2017

1 commit


13 Jul, 2017

3 commits

  • When channel path is identified as the report source code (RSC)
    of a CRW, and initialized (CRW_ERC_INIT) is recognized as the
    error recovery code (ERC) by the channel subsystem, it indicates
    a "path has come" event.

    Let's handle this case in chp_process_crw().

    Reviewed-by: Sebastian Ott
    Signed-off-by: Dong Jia Shi
    Signed-off-by: Martin Schwidefsky

    Dong Jia Shi
     
  • Make the code like the rest of the kernel.

    Link: http://lkml.kernel.org/r/3f980cd89084ae09716353aba3171e4b3815e690.1499284835.git.joe@perches.com
    Signed-off-by: Joe Perches
    Cc: Julian Wiedmann
    Cc: Ursula Braun
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • __GFP_REPEAT was designed to allow retry-but-eventually-fail semantic to
    the page allocator. This has been true but only for allocations
    requests larger than PAGE_ALLOC_COSTLY_ORDER. It has been always
    ignored for smaller sizes. This is a bit unfortunate because there is
    no way to express the same semantic for those requests and they are
    considered too important to fail so they might end up looping in the
    page allocator for ever, similarly to GFP_NOFAIL requests.

    Now that the whole tree has been cleaned up and accidental or misled
    usage of __GFP_REPEAT flag has been removed for !costly requests we can
    give the original flag a better name and more importantly a more useful
    semantic. Let's rename it to __GFP_RETRY_MAYFAIL which tells the user
    that the allocator would try really hard but there is no promise of a
    success. This will work independent of the order and overrides the
    default allocator behavior. Page allocator users have several levels of
    guarantee vs. cost options (take GFP_KERNEL as an example)

    - GFP_KERNEL & ~__GFP_RECLAIM - optimistic allocation without _any_
    attempt to free memory at all. The most light weight mode which even
    doesn't kick the background reclaim. Should be used carefully because
    it might deplete the memory and the next user might hit the more
    aggressive reclaim

    - GFP_KERNEL & ~__GFP_DIRECT_RECLAIM (or GFP_NOWAIT)- optimistic
    allocation without any attempt to free memory from the current
    context but can wake kswapd to reclaim memory if the zone is below
    the low watermark. Can be used from either atomic contexts or when
    the request is a performance optimization and there is another
    fallback for a slow path.

    - (GFP_KERNEL|__GFP_HIGH) & ~__GFP_DIRECT_RECLAIM (aka GFP_ATOMIC) -
    non sleeping allocation with an expensive fallback so it can access
    some portion of memory reserves. Usually used from interrupt/bh
    context with an expensive slow path fallback.

    - GFP_KERNEL - both background and direct reclaim are allowed and the
    _default_ page allocator behavior is used. That means that !costly
    allocation requests are basically nofail but there is no guarantee of
    that behavior so failures have to be checked properly by callers
    (e.g. OOM killer victim is allowed to fail currently).

    - GFP_KERNEL | __GFP_NORETRY - overrides the default allocator behavior
    and all allocation requests fail early rather than cause disruptive
    reclaim (one round of reclaim in this implementation). The OOM killer
    is not invoked.

    - GFP_KERNEL | __GFP_RETRY_MAYFAIL - overrides the default allocator
    behavior and all allocation requests try really hard. The request
    will fail if the reclaim cannot make any progress. The OOM killer
    won't be triggered.

    - GFP_KERNEL | __GFP_NOFAIL - overrides the default allocator behavior
    and all allocation requests will loop endlessly until they succeed.
    This might be really dangerous especially for larger orders.

    Existing users of __GFP_REPEAT are changed to __GFP_RETRY_MAYFAIL
    because they already had their semantic. No new users are added.
    __alloc_pages_slowpath is changed to bail out for __GFP_RETRY_MAYFAIL if
    there is no progress and we have already passed the OOM point.

    This means that all the reclaim opportunities have been exhausted except
    the most disruptive one (the OOM killer) and a user defined fallback
    behavior is more sensible than keep retrying in the page allocator.

    [akpm@linux-foundation.org: fix arch/sparc/kernel/mdesc.c]
    [mhocko@suse.com: semantic fix]
    Link: http://lkml.kernel.org/r/20170626123847.GM11534@dhcp22.suse.cz
    [mhocko@kernel.org: address other thing spotted by Vlastimil]
    Link: http://lkml.kernel.org/r/20170626124233.GN11534@dhcp22.suse.cz
    Link: http://lkml.kernel.org/r/20170623085345.11304-3-mhocko@kernel.org
    Signed-off-by: Michal Hocko
    Acked-by: Vlastimil Babka
    Cc: Alex Belits
    Cc: Chris Wilson
    Cc: Christoph Hellwig
    Cc: Darrick J. Wong
    Cc: David Daney
    Cc: Johannes Weiner
    Cc: Mel Gorman
    Cc: NeilBrown
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     

08 Jul, 2017

1 commit

  • Pull libnvdimm updates from Dan Williams:
    "libnvdimm updates for the latest ACPI and UEFI specifications. This
    pull request also includes new 'struct dax_operations' enabling to
    undo the abuse of copy_user_nocache() for copy operations to pmem.

    The dax work originally missed 4.12 to address concerns raised by Al.

    Summary:

    - Introduce the _flushcache() family of memory copy helpers and use
    them for persistent memory write operations on x86. The
    _flushcache() semantic indicates that the cache is either bypassed
    for the copy operation (movnt) or any lines dirtied by the copy
    operation are written back (clwb, clflushopt, or clflush).

    - Extend dax_operations with ->copy_from_iter() and ->flush()
    operations. These operations and other infrastructure updates allow
    all persistent memory specific dax functionality to be pushed into
    libnvdimm and the pmem driver directly. It also allows dax-specific
    sysfs attributes to be linked to a host device, for example:
    /sys/block/pmem0/dax/write_cache

    - Add support for the new NVDIMM platform/firmware mechanisms
    introduced in ACPI 6.2 and UEFI 2.7. This support includes the v1.2
    namespace label format, extensions to the address-range-scrub
    command set, new error injection commands, and a new BTT
    (block-translation-table) layout. These updates support inter-OS
    and pre-OS compatibility.

    - Fix a longstanding memory corruption bug in nfit_test.

    - Make the pmem and nvdimm-region 'badblocks' sysfs files poll(2)
    capable.

    - Miscellaneous fixes and small updates across libnvdimm and the nfit
    driver.

    Acknowledgements that came after the branch was pushed: commit
    6aa734a2f38e ("libnvdimm, region, pmem: fix 'badblocks'
    sysfs_get_dirent() reference lifetime") was reviewed by Toshi Kani
    "

    * tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (42 commits)
    libnvdimm, namespace: record 'lbasize' for pmem namespaces
    acpi/nfit: Issue Start ARS to retrieve existing records
    libnvdimm: New ACPI 6.2 DSM functions
    acpi, nfit: Show bus_dsm_mask in sysfs
    libnvdimm, acpi, nfit: Add bus level dsm mask for pass thru.
    acpi, nfit: Enable DSM pass thru for root functions.
    libnvdimm: passthru functions clear to send
    libnvdimm, btt: convert some info messages to warn/err
    libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime
    libnvdimm: fix the clear-error check in nsio_rw_bytes
    libnvdimm, btt: fix btt_rw_page not returning errors
    acpi, nfit: quiet invalid block-aperture-region warnings
    libnvdimm, btt: BTT updates for UEFI 2.7 format
    acpi, nfit: constify *_attribute_group
    libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region
    libnvdimm, pmem, dax: export a cache control attribute
    dax: convert to bitmask for flags
    dax: remove default copy_from_iter fallback
    libnvdimm, nfit: enable support for volatile ranges
    libnvdimm, pmem: fix persistence warning
    ...

    Linus Torvalds
     

07 Jul, 2017

2 commits

  • Pull user access str* updates from Al Viro:
    "uaccess str...() dead code removal"

    * 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    s390 keyboard.c: don't open-code strndup_user()
    mips: get rid of unused __strnlen_user()
    get rid of unused __strncpy_from_user() instances
    kill strlen_user()

    Linus Torvalds
     
  • Pull more s390 updates from Martin Schwidefsky:

    - The fixup for the blk-mq clash with the scm driver

    - An improvement for the dasd driver in regard to raw I/O

    - Bug fixes and cleanup

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    Update my email address
    s390/syscalls: Fix out of bounds arguments access
    s390/vfio_ccw: remove unused variable
    s390/dasd: remove unneeded code
    s390/crash: Remove unused KEXEC_NOTE_BYTES
    s390/zcrypt: Fix missing newlines at some debug feature messages.
    s390/dasd: Make raw I/O usable without prefix support
    s390/dasd: Rename dasd_raw_build_cp()
    s390/dasd: Refactor prefix_LRE() and related functions
    s390: fix up for "blk-mq: switch ->queue_rq return value to blk_status_t"

    Linus Torvalds
     

06 Jul, 2017

1 commit

  • Pull networking updates from David Miller:
    "Reasonably busy this cycle, but perhaps not as busy as in the 4.12
    merge window:

    1) Several optimizations for UDP processing under high load from
    Paolo Abeni.

    2) Support pacing internally in TCP when using the sch_fq packet
    scheduler for this is not practical. From Eric Dumazet.

    3) Support mutliple filter chains per qdisc, from Jiri Pirko.

    4) Move to 1ms TCP timestamp clock, from Eric Dumazet.

    5) Add batch dequeueing to vhost_net, from Jason Wang.

    6) Flesh out more completely SCTP checksum offload support, from
    Davide Caratti.

    7) More plumbing of extended netlink ACKs, from David Ahern, Pablo
    Neira Ayuso, and Matthias Schiffer.

    8) Add devlink support to nfp driver, from Simon Horman.

    9) Add RTM_F_FIB_MATCH flag to RTM_GETROUTE queries, from Roopa
    Prabhu.

    10) Add stack depth tracking to BPF verifier and use this information
    in the various eBPF JITs. From Alexei Starovoitov.

    11) Support XDP on qed device VFs, from Yuval Mintz.

    12) Introduce BPF PROG ID for better introspection of installed BPF
    programs. From Martin KaFai Lau.

    13) Add bpf_set_hash helper for TC bpf programs, from Daniel Borkmann.

    14) For loads, allow narrower accesses in bpf verifier checking, from
    Yonghong Song.

    15) Support MIPS in the BPF selftests and samples infrastructure, the
    MIPS eBPF JIT will be merged in via the MIPS GIT tree. From David
    Daney.

    16) Support kernel based TLS, from Dave Watson and others.

    17) Remove completely DST garbage collection, from Wei Wang.

    18) Allow installing TCP MD5 rules using prefixes, from Ivan
    Delalande.

    19) Add XDP support to Intel i40e driver, from Björn Töpel

    20) Add support for TC flower offload in nfp driver, from Simon
    Horman, Pieter Jansen van Vuuren, Benjamin LaHaise, Jakub
    Kicinski, and Bert van Leeuwen.

    21) IPSEC offloading support in mlx5, from Ilan Tayari.

    22) Add HW PTP support to macb driver, from Rafal Ozieblo.

    23) Networking refcount_t conversions, From Elena Reshetova.

    24) Add sock_ops support to BPF, from Lawrence Brako. This is useful
    for tuning the TCP sockopt settings of a group of applications,
    currently via CGROUPs"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1899 commits)
    net: phy: dp83867: add workaround for incorrect RX_CTRL pin strap
    dt-bindings: phy: dp83867: provide a workaround for incorrect RX_CTRL pin strap
    cxgb4: Support for get_ts_info ethtool method
    cxgb4: Add PTP Hardware Clock (PHC) support
    cxgb4: time stamping interface for PTP
    nfp: default to chained metadata prepend format
    nfp: remove legacy MAC address lookup
    nfp: improve order of interfaces in breakout mode
    net: macb: remove extraneous return when MACB_EXT_DESC is defined
    bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case
    bpf: fix return in load_bpf_file
    mpls: fix rtm policy in mpls_getroute
    net, ax25: convert ax25_cb.refcount from atomic_t to refcount_t
    net, ax25: convert ax25_route.refcount from atomic_t to refcount_t
    net, ax25: convert ax25_uid_assoc.refcount from atomic_t to refcount_t
    net, sctp: convert sctp_ep_common.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_transport.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_chunk.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_datamsg.refcnt from atomic_t to refcount_t
    net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t
    ...

    Linus Torvalds
     

05 Jul, 2017

7 commits

  • Fix this set but not used warning:

    drivers/s390/cio/vfio_ccw_drv.c: In function 'vfio_ccw_sch_io_todo':
    drivers/s390/cio/vfio_ccw_drv.c:72:21: warning: variable 'sch' set but not used [-Wunused-but-set-variable]
    struct subchannel *sch;
    ^

    Signed-off-by: Sebastian Ott
    Reviewed-by: Dong Jia Shi
    Acked-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • Fix these set but not used warnings:

    drivers/s390/block/dasd.c:3933:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
    drivers/s390/block/dasd_alias.c:757:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]

    In addition to that remove the test if an unsigned is < 0:

    drivers/s390/block/dasd_devmap.c:153:11: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

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

    Sebastian Ott
     
  • On some debug feature invocations the newline was missing.

    Signed-off-by: Harald Freudenberger
    Signed-off-by: Martin Schwidefsky

    Harald Freudenberger
     
  • The Prefix CCW is not mandatory and raw I/O can also be issued without
    it. Check whether the Prefix CCW is supported and if not use the
    combination of Define Extent and Locate Record Extended instead.

    While at it, sort the variable declarations, replace the gotos with
    early exits, and remove an error check at the end which is irrelevant.
    Also, remove the XRC check as it is not relevant for raw I/O.

    Reviewed-by: Stefan Haberland
    Signed-off-by: Jan Höppner
    Signed-off-by: Martin Schwidefsky

    Jan Höppner
     
  • Rename dasd_raw_build_cp() to dasd_eckd_build_cp_raw() to fit the
    scheme.

    Reviewed-by: Stefan Haberland
    Signed-off-by: Jan Höppner
    Signed-off-by: Martin Schwidefsky

    Jan Höppner
     
  • We already have define_extent() that prepares necessary data for the
    Define Extent CCW. The exact same thing is done in prefix_LRE().

    Remove the duplicate code and move commands that were only used in
    combination with the Prefix command to define_extent(). One of these
    commands needs the blocksize to be specified. Add the blksize parameter
    to define_extent() to account for that.

    In addition, the check_XRC() function can be made more generic. Do this
    and remove the Prefix-specific check_XRC_on_prefix() function.

    Furthermore, prefix_LRE() uses fill_LRE_data() to prepare Locate Record
    Extended data. Rename the function to fit the scheme better and make it
    usable outside of the Prefix context by adding the corresponding CCW
    command.

    Reviewed-by: Stefan Haberland
    Signed-off-by: Jan Höppner
    Signed-off-by: Martin Schwidefsky

    Jan Höppner
     
  • Signed-off-by: Stephen Rothwell
    Signed-off-by: Martin Schwidefsky

    Stephen Rothwell
     

04 Jul, 2017

3 commits

  • Pull driver core updates from Greg KH:
    "Here is the big driver core update for 4.13-rc1.

    The large majority of this is a lot of cleanup of old fields in the
    driver core structures and their remaining usages in random drivers.
    All of those fixes have been reviewed by the various subsystem
    maintainers. There's also some small firmware updates in here, a new
    kobject uevent api interface that makes userspace interaction easier,
    and a few other minor things.

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

    * tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (56 commits)
    arm: mach-rpc: ecard: fix build error
    zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()
    driver-core: remove struct bus_type.dev_attrs
    powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type
    powerpc: vio: use dev_groups and not dev_attrs for bus_type
    USB: usbip: convert to use DRIVER_ATTR_RW
    s390: drivers: convert to use DRIVER_ATTR_RO/WO
    platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW
    pcmcia: ds: convert to use DRIVER_ATTR_RO
    wireless: ipw2x00: convert to use DRIVER_ATTR_RW
    net: ehea: convert to use DRIVER_ATTR_RO
    net: caif: convert to use DRIVER_ATTR_RO
    TTY: hvc: convert to use DRIVER_ATTR_RW
    PCI: pci-driver: convert to use DRIVER_ATTR_WO
    IB: nes: convert to use DRIVER_ATTR_RW
    HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups
    arm: ecard: fix dev_groups patch typo
    tty: serdev: use dev_groups and not dev_attrs for bus_type
    sparc: vio: use dev_groups and not dev_attrs for bus_type
    hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type
    ...

    Linus Torvalds
     
  • Pull s390 updates from Martin Schwidefsky:
    "The bulk of the s390 patches for 4.13. Some new things but mostly bug
    fixes and cleanups. Noteworthy changes:

    - The SCM block driver is converted to blk-mq

    - Switch s390 to 5 level page tables. The virtual address space for a
    user space process can now have up to 16EB-4KB.

    - Introduce a ELF phdr flag for qemu to avoid the global
    vm.alloc_pgste which forces all processes to large page tables

    - A couple of PCI improvements to improve error recovery

    - Included is the merge of the base support for proper machine checks
    for KVM"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (52 commits)
    s390/dasd: Fix faulty ENODEV for RO sysfs attribute
    s390/pci: recognize name clashes with uids
    s390/pci: provide more debug information
    s390/pci: fix handling of PEC 306
    s390/pci: improve pci hotplug
    s390/pci: introduce clp_get_state
    s390/pci: improve error handling during fmb (de)registration
    s390/pci: improve unreg_ioat error handling
    s390/pci: improve error handling during interrupt deregistration
    s390/pci: don't cleanup in arch_setup_msi_irqs
    KVM: s390: Backup the guest's machine check info
    s390/nmi: s390: New low level handling for machine check happening in guest
    s390/fpu: export save_fpu_regs for all configs
    s390/kvm: avoid global config of vm.alloc_pgste=1
    s390: rename struct psw_bits members
    s390: rename psw_bits enums
    s390/mm: use correct address space when enabling DAT
    s390/cio: introduce io_subchannel_type
    s390/ipl: revert Load Normal semantics for LPAR CCW-type re-IPL
    s390/dumpstack: remove raw stack dump
    ...

    Linus Torvalds
     
  • Pull core block/IO updates from Jens Axboe:
    "This is the main pull request for the block layer for 4.13. Not a huge
    round in terms of features, but there's a lot of churn related to some
    core cleanups.

    Note this depends on the UUID tree pull request, that Christoph
    already sent out.

    This pull request contains:

    - A series from Christoph, unifying the error/stats codes in the
    block layer. We now use blk_status_t everywhere, instead of using
    different schemes for different places.

    - Also from Christoph, some cleanups around request allocation and IO
    scheduler interactions in blk-mq.

    - And yet another series from Christoph, cleaning up how we handle
    and do bounce buffering in the block layer.

    - A blk-mq debugfs series from Bart, further improving on the support
    we have for exporting internal information to aid debugging IO
    hangs or stalls.

    - Also from Bart, a series that cleans up the request initialization
    differences across types of devices.

    - A series from Goldwyn Rodrigues, allowing the block layer to return
    failure if we will block and the user asked for non-blocking.

    - Patch from Hannes for supporting setting loop devices block size to
    that of the underlying device.

    - Two series of patches from Javier, fixing various issues with
    lightnvm, particular around pblk.

    - A series from me, adding support for write hints. This comes with
    NVMe support as well, so applications can help guide data placement
    on flash to improve performance, latencies, and write
    amplification.

    - A series from Ming, improving and hardening blk-mq support for
    stopping/starting and quiescing hardware queues.

    - Two pull requests for NVMe updates. Nothing major on the feature
    side, but lots of cleanups and bug fixes. From the usual crew.

    - A series from Neil Brown, greatly improving the bio rescue set
    support. Most notably, this kills the bio rescue work queues, if we
    don't really need them.

    - Lots of other little bug fixes that are all over the place"

    * 'for-4.13/block' of git://git.kernel.dk/linux-block: (217 commits)
    lightnvm: pblk: set line bitmap check under debug
    lightnvm: pblk: verify that cache read is still valid
    lightnvm: pblk: add initialization check
    lightnvm: pblk: remove target using async. I/Os
    lightnvm: pblk: use vmalloc for GC data buffer
    lightnvm: pblk: use right metadata buffer for recovery
    lightnvm: pblk: schedule if data is not ready
    lightnvm: pblk: remove unused return variable
    lightnvm: pblk: fix double-free on pblk init
    lightnvm: pblk: fix bad le64 assignations
    nvme: Makefile: remove dead build rule
    blk-mq: map all HWQ also in hyperthreaded system
    nvmet-rdma: register ib_client to not deadlock in device removal
    nvme_fc: fix error recovery on link down.
    nvmet_fc: fix crashes on bad opcodes
    nvme_fc: Fix crash when nvme controller connection fails.
    nvme_fc: replace ioabort msleep loop with completion
    nvme_fc: fix double calls to nvme_cleanup_cmd()
    nvme-fabrics: verify that a controller returns the correct NQN
    nvme: simplify nvme_dev_attrs_are_visible
    ...

    Linus Torvalds
     

03 Jul, 2017

1 commit


01 Jul, 2017

1 commit

  • refcount_t type and corresponding API should be
    used instead of atomic_t when the variable is used as
    a reference counter. This allows to avoid accidental
    refcounter overflows that might lead to use-after-free
    situations.

    Signed-off-by: Elena Reshetova
    Signed-off-by: Hans Liljestrand
    Signed-off-by: Kees Cook
    Signed-off-by: David Windsor
    Signed-off-by: David S. Miller

    Reshetova, Elena
     

28 Jun, 2017

2 commits

  • If a device is offline it can still be set to read-only via the bus id
    through sysfs. Only the read-only feature flag for the ccw_device is
    then set. If the device is online the corresponding block device needs
    to be set to read-only as well (via set_disk_ro()).
    The check whether there is a device to do so, however, happens after the
    feature flag was set. This leads to an unnecessary "no such device"
    error in the offline case.

    This bug was introduced by commit 7571cb1c8e3cc ("s390/dasd: Make use of
    dasd_set_feature() more often"). Fix this by simply returning count if
    no device is available.

    Fixes: 7571cb1c8e3cc ("s390/dasd: Make use of dasd_set_feature() more often")
    Reviewed-by: Stefan Haberland
    Signed-off-by: Jan Höppner
    Signed-off-by: Martin Schwidefsky

    Jan Höppner
     
  • Require all dax-drivers to register a ->copy_from_iter() operation so
    that it is clear which dax_operations are optional and which must be
    implemented for filesystem-dax to operate.

    Cc: Gerald Schaefer
    Suggested-by: Christoph Hellwig
    Signed-off-by: Dan Williams

    Dan Williams
     

23 Jun, 2017

1 commit


21 Jun, 2017

3 commits

  • When a s390 guest runs on a z/VM host that's part of a SSI cluster,
    it can be migrated to a different host. In this case, the MAC address
    it originally obtained on the old host may be re-assigned to a new
    guest. This would result in address conflicts between the two guests.

    When running as z/VM guest, use the diag26c MAC Service to obtain
    a hypervisor-managed MAC address. The MAC Service is SSI-aware, and
    won't re-assign the address after the guest is migrated to a new host.

    This patch adds support for the z/VM MAC Service on L2 devices.

    Signed-off-by: Julian Wiedmann
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • There's two spots in qeth_send_packet() where we don't accurately
    account for transmitted packing buffers in qeth's performance
    statistics:

    1) when flushing the current buffer due to insufficient size,
    and the next buffer is not EMPTY, we need to account for that
    flushed buffer.
    2) when synchronizing with the TX completion code, we reset
    flush_count and thus forget to account for any previously
    flushed buffers.

    Reported-by: Nils Hoppmann
    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • add ipa return codes for Bridgeport (HiperSockets and OSA) according to
    system level design.

    Signed-off-by: Kittipon Meesompop
    Reviewed-by: Julian Wiedmann
    Reviewed-by: Ursula Braun
    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Kittipon Meesompop
     

19 Jun, 2017

1 commit

  • blk_queue_split() is always called with the last arg being q->bio_split,
    where 'q' is the first arg.

    Also blk_queue_split() sometimes uses the passed-in 'bs' and sometimes uses
    q->bio_split.

    This is inconsistent and unnecessary. Remove the last arg and always use
    q->bio_split inside blk_queue_split()

    Reviewed-by: Christoph Hellwig
    Reviewed-by: Ming Lei
    Credit-to: Javier González (Noticed that lightnvm was missed)
    Reviewed-by: Javier González
    Tested-by: Javier González
    Signed-off-by: NeilBrown
    Signed-off-by: Jens Axboe

    NeilBrown
     

16 Jun, 2017

2 commits

  • It seems like a historic accident that these return unsigned char *,
    and in many places that means casts are required, more often than not.

    Make these functions return void * and remove all the casts across
    the tree, adding a (u8 *) cast only where the unsigned char pointer
    was used directly, all done with the following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    @@
    expression SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - fn(SKB, LEN)[0]
    + *(u8 *)fn(SKB, LEN)

    Note that the last part there converts from push(...)[0] to the
    more idiomatic *(u8 *)push(...).

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • A common pattern with skb_put() is to just want to memcpy()
    some data into the new space, introduce skb_put_data() for
    this.

    An spatch similar to the one for skb_put_zero() converts many
    of the places using it:

    @@
    identifier p, p2;
    expression len, skb, data;
    type t, t2;
    @@
    (
    -p = skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    |
    -p = (t)skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, len);
    |
    -memcpy(p, data, len);
    )

    @@
    type t, t2;
    identifier p, p2;
    expression skb, data;
    @@
    t *p;
    ...
    (
    -p = skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    |
    -p = (t *)skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, sizeof(*p));
    |
    -memcpy(p, data, sizeof(*p));
    )

    @@
    expression skb, len, data;
    @@
    -memcpy(skb_put(skb, len), data, len);
    +skb_put_data(skb, data, len);

    (again, manually post-processed to retain some comments)

    Reviewed-by: Stephen Hemminger
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

15 Jun, 2017

2 commits

  • The conflicts were two cases of overlapping changes in
    batman-adv and the qed driver.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull networking fixes from David Miller:

    1) The netlink attribute passed in to dev_set_alias() is not
    necessarily NULL terminated, don't use strlcpy() on it. From
    Alexander Potapenko.

    2) Fix implementation of atomics in arm64 bpf JIT, from Daniel
    Borkmann.

    3) Correct the release of netdevs and driver private data in certain
    circumstances.

    4) Sanitize netlink message length properly in decnet, from Mateusz
    Jurczyk.

    5) Don't leak kernel data in rtnl_fill_vfinfo() netlink blobs. From
    Yuval Mintz.

    6) Hash secret is never initialized in ipv6 ILA translation code, from
    Arnd Bergmann. I guess those clang warnings about unused inline
    functions are useful for something!

    7) Fix endian selection in bpf_endian.h, from Daniel Borkmann.

    8) Sanitize sockaddr length before dereferncing any fields in AF_UNIX
    and CAIF. From Mateusz Jurczyk.

    9) Fix timestamping for GMAC3 chips in stmmac driver, from Mario
    Molitor.

    10) Do not leak netdev on dev_alloc_name() errors in mac80211, from
    Johannes Berg.

    11) Fix locking in sctp_for_each_endpoint(), from Xin Long.

    12) Fix wrong memset size on 32-bit in snmp6, from Christian Perle.

    13) Fix use after free in ip_mc_clear_src(), from WANG Cong.

    14) Fix regressions caused by ICMP rate limiting changes in 4.11, from
    Jesper Dangaard Brouer.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (91 commits)
    i40e: Fix a sleep-in-atomic bug
    net: don't global ICMP rate limit packets originating from loopback
    net/act_pedit: fix an error code
    net: update undefined ->ndo_change_mtu() comment
    net_sched: move tcf_lock down after gen_replace_estimator()
    caif: Add sockaddr length check before accessing sa_family in connect handler
    qed: fix dump of context data
    qmi_wwan: new Telewell and Sierra device IDs
    net: phy: Fix MDIO_THUNDER dependencies
    netconsole: Remove duplicate "netconsole: " logging prefix
    igmp: acquire pmc lock for ip_mc_clear_src()
    r8152: give the device version
    net: rps: fix uninitialized symbol warning
    mac80211: don't send SMPS action frame in AP mode when not needed
    mac80211/wpa: use constant time memory comparison for MACs
    mac80211: set bss_info data before configuring the channel
    mac80211: remove 5/10 MHz rate code from station MLME
    mac80211: Fix incorrect condition when checking rx timestamp
    mac80211: don't look at the PM bit of BAR frames
    i40e: fix handling of HW ATR eviction
    ...

    Linus Torvalds
     

12 Jun, 2017

8 commits

  • The sysfs attributes implemented by the vfio_ccw driver are also implemented by
    the io_subchannel driver. Move these into a device_type which is set by the
    css bus.

    Signed-off-by: Sebastian Ott
    Reviewed-by: Dong Jia Shi
    Reviewed-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • The safe offline processing may hang forever because it waits for I/O
    which can not be started because of the offline flag that prevents new
    I/O from being started.

    Allow I/O to be started during safe offline processing because in this
    special case we take care that the queues are empty before throwing away
    the device.

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky

    Stefan Haberland
     
  • The safe offline processing needs, as well as the normal offline
    processing, to be locked against multiple parallel executions. But it
    should be able to be overtaken by a normal offline processing to make sure
    that the device does not wait forever for outstanding I/O if the user
    wants to.

    Unfortunately the parallel processing of safe offline and normal offline
    might lead to a race situation where both threads report successful
    execution to the CIO layer which in turn tries to deregister the kobject
    of the device twice. This leads to a

    refcount_t: underflow; use-after-free.

    error and the device is not able to be set online again afterwards without
    a reboot.

    Correct the locking of the safe offline processing by doing the following:
    - Use the cdev lock to secure all set and test operations to the
    device flags.
    - Two safe offline processes are locked against each other using
    the DASD_FLAG_SAFE_OFFLINE and DASD_FLAG_SAFE_OFFLINE_RUNNING
    device flags.
    The differentiation between offline triggered and offline running
    is needed since the normal offline attribute is owned by CIO and
    we have to pass over control in between.
    - The dasd_generic_set_offline process handles the offline
    processing. It is locked against parallel execution using the
    DASD_FLAG_OFFLINE.
    - Only a running safe offline should be able to be overtaken by a
    single normal offline. This is ensured by clearing the
    DASD_FLAG_SAFE_OFFLINE_RUNNING flag when a normal offline
    overtakes. So this can only happen ones.
    - The safe offline just aborts in this case doing nothing and
    the normal offline processing finishes as usual.

    Signed-off-by: Stefan Haberland
    Signed-off-by: Martin Schwidefsky

    Stefan Haberland
     
  • We have two flags, DASD_FLAG_DEVICE_RO and DASD_FEATURE_READONLY, that
    tell us whether a device is read-only. DASD_FLAG_DEVICE_RO is set when a
    device is attached as read-only to z/VM and DASD_FEATURE_READONLY is set
    when either the corresponding kernel parameter is configured, or the
    read-only state is changed via sysfs.
    This is valuable information in any case. However, only the feature flag
    is being checked at the moment when we display the current state.

    Fix this by checking both flags.

    Reviewed-by: Stefan Haberland
    Signed-off-by: Jan Höppner
    Signed-off-by: Martin Schwidefsky

    Jan Höppner
     
  • Added some dbf debug messages on failure of the most important
    ioctl calls. These messages are only enabled with dbf level
    6 (debug) and so do not affect the normal operating mode which
    uses level 3 (errors and higher).

    Signed-off-by: Harald Freudenberger
    Signed-off-by: Martin Schwidefsky

    Harald Freudenberger
     
  • When a out of range domain parameter was given, the init function
    returned with -EINVAL and the driver was not operational. As the
    driver is statically build into the kernel and is able to work
    with multiple domains anyway the init function should continue.
    Now the user has a chance to write a new default domain value
    via sysfs attribute file. Also added two new dbf debug messages
    related to the domain value handling.

    Signed-off-by: Harald Freudenberger
    Signed-off-by: Martin Schwidefsky

    Harald Freudenberger
     
  • Signed-off-by: Harald Freudenberger
    Signed-off-by: Martin Schwidefsky

    Harald Freudenberger
     
  • The zcrypt code contains a couple of functions which receive a
    "big_endian" argument. All callers naturally pass "1" for big endian,
    since s390 is big endian. Therefore get rid of this argument and also
    get rid of the cpu_to_le()/cpu_to_be() calls.

    This way we get rid of a couple of sparse warnings:

    drivers/s390/crypto/zcrypt_cca_key.h:255:34:
    warning: incorrect type in assignment (different base types)
    expected unsigned short [unsigned] ulen
    got restricted __be16 [usertype]

    Cc: Harald Freudenberger
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens