24 Nov, 2017

2 commits

  • With gcc-4.1.2:

    net/smc/smc_core.c: In function ‘__smc_buf_create’:
    net/smc/smc_core.c:567: warning: ‘bufsize’ may be used uninitialized in this function

    Indeed, if the for-loop is never executed, bufsize is used
    uninitialized. In addition, buf_desc is stored for later use, while it
    is still a NULL pointer.

    Before, error handling was done by checking if buf_desc is non-NULL.
    The cleanup changed this to an error check, but forgot to update the
    preinitialization of buf_desc to an error pointer.

    Update the preinitializatin of buf_desc to fix this.

    Fixes: b33982c3a6838d13 ("net/smc: cleanup function __smc_buf_create()")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Ursula Braun
    Acked-by: Arnd Bergmann
    Signed-off-by: David S. Miller

    Geert Uytterhoeven
     
  • Commit 3e034725c0d8 ("net/smc: common functions for RMBs and send buffers")
    merged handling of SMC receive and send buffers. It introduced sk_buf_size
    as merged start value for size determination. But since sk_buf_size is not
    used at all, sk_sndbuf is erroneously used as start for rmb creation.
    This patch makes sure, sk_buf_size is really used as intended, and
    sk_rcvbuf is used as start value for rmb creation.

    Fixes: 3e034725c0d8 ("net/smc: common functions for RMBs and send buffers")
    Signed-off-by: Ursula Braun
    Reviewed-by: Hans Wippel
    Signed-off-by: David S. Miller

    Ursula Braun
     

04 Nov, 2017

1 commit


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

26 Oct, 2017

2 commits

  • The SMC protocol [1] uses a rendezvous protocol to negotiate SMC
    capability between peers. The current Linux implementation does not yet
    use this rendezvous protocol and, thus, is not compliant to RFC7609 and
    incompatible with other SMC implementations like in zOS.
    This patch adds support for the SMC rendezvous protocol. It uses a new
    TCP experimental option. With this option, SMC capabilities are
    exchanged between the peers during the TCP three way handshake.

    [1] SMC-R Informational RFC: http://www.rfc-editor.org/info/rfc7609

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • Link group creation is synchronized with the smc_create_lgr_pending
    lock. In smc_listen_work() this mutex is sometimes unlocked, even
    though it has not been locked before. This issue will surface in
    presence of the SMC rendezvous code.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

24 Oct, 2017

1 commit


13 Oct, 2017

2 commits


24 Sep, 2017

1 commit


22 Sep, 2017

10 commits

  • Use the smc_connection as first parameter with smc_cdc_get_free_slot().
    This is just a small code cleanup, no functional change.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • Usually socket closing is delayed if there is still data available in
    the send buffer to be transmitted. If a process is killed, the delay
    should be avoided.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • The number of outstanding work requests is limited. If all work
    requests are in use, tx processing is postponed to another scheduling
    of the tx worker. Switch to a delayed worker to have a gap for tx
    completion queue events before the next retry.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • An out-of-sync condition can just be detected by the client.
    If the server receives a CLC DECLINE message indicating an out-of-sync
    condition for the link groups, the server must clean up the out-of-sync
    link group.
    There is no need for an extra third parameter in smc_clc_send_decline().

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • Client link group creation always follows the server linkgroup creation.
    If peer creates a new server link group, client has to create a new
    client link group. If peer reuses a server link group for a new
    connection, client has to reuse its client link group as well. This
    patch introduces a longer delay for client link group removal to make
    sure this link group still exists, once the peer decides to reuse a
    server link group. This avoids out-of-sync conditions for link groups.
    If already scheduled, modify the delay.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • The solicited flag is meaningful for the receive completion queue.
    Ask for next work completion of any type on the send queue.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • smc_pnet_fill_entry() uses dev_get_by_name() adding a refcount to ndev.
    The following smc_pnet_enter() has to reduce the refcount if the entry
    to be added exists already in the pnet table.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • smc_netinfo_by_tcpsk() looks up the routing cache. Such a lookup requires
    protection by an RCU read lock.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     
  • The SMC receive function currently lacks a timeout check under the
    condition that no data were received and no data are available. This
    patch adds such a check.

    Signed-off-by: Hans Wippel
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Hans Wippel
     
  • In the infiniband part, SMC currently uses get_netdev which calls
    dev_hold on the returned net device. However, the SMC code never calls
    dev_put on that net device resulting in a wrong reference count.

    This patch adds a dev_put after the usage of the net device to fix the
    issue.

    Signed-off-by: Hans Wippel
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Hans Wippel
     

30 Jul, 2017

10 commits


17 May, 2017

2 commits

  • The driver explicitly bypasses APIs to register all memory once a
    connection is made, and thus allows remote access to memory.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Leon Romanovsky
    Acked-by: Ursula Braun
    Signed-off-by: David S. Miller

    Christoph Hellwig
     
  • Currently, SMC enables remote access to physical memory when a user
    has successfully configured and established an SMC-connection until ten
    minutes after the last SMC connection is closed. Because this is considered
    a security risk, drivers are supposed to use IB_PD_UNSAFE_GLOBAL_RKEY in
    such a case.

    This patch changes the current SMC code to use IB_PD_UNSAFE_GLOBAL_RKEY.
    This improves user awareness, but does not remove the security risk itself.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

11 May, 2017

1 commit

  • Pull RCU updates from Ingo Molnar:
    "The main changes are:

    - Debloat RCU headers

    - Parallelize SRCU callback handling (plus overlapping patches)

    - Improve the performance of Tree SRCU on a CPU-hotplug stress test

    - Documentation updates

    - Miscellaneous fixes"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (74 commits)
    rcu: Open-code the rcu_cblist_n_lazy_cbs() function
    rcu: Open-code the rcu_cblist_n_cbs() function
    rcu: Open-code the rcu_cblist_empty() function
    rcu: Separately compile large rcu_segcblist functions
    srcu: Debloat the header
    srcu: Adjust default auto-expediting holdoff
    srcu: Specify auto-expedite holdoff time
    srcu: Expedite first synchronize_srcu() when idle
    srcu: Expedited grace periods with reduced memory contention
    srcu: Make rcutorture writer stalls print SRCU GP state
    srcu: Exact tracking of srcu_data structures containing callbacks
    srcu: Make SRCU be built by default
    srcu: Fix Kconfig botch when SRCU not selected
    rcu: Make non-preemptive schedule be Tasks RCU quiescent state
    srcu: Expedite srcu_schedule_cbs_snp() callback invocation
    srcu: Parallelize callback handling
    kvm: Move srcu_struct fields to end of struct kvm
    rcu: Fix typo in PER_RCU_NODE_PERIOD header comment
    rcu: Use true/false in assignment to bool
    rcu: Use bool value directly
    ...

    Linus Torvalds
     

02 May, 2017

2 commits

  • rdma_ah_attr can now be either ib or roce allowing
    core components to use one type or the other and also
    to define attributes unique to a specific type. struct
    ib_ah is also initialized with the type when its first
    created. This ensures that calls such as modify_ah
    dont modify the type of the address handle attribute.

    Reviewed-by: Ira Weiny
    Reviewed-by: Don Hiatt
    Reviewed-by: Sean Hefty
    Reviewed-by: Niranjana Vishwanathapura
    Signed-off-by: Dasaratharaman Chandramouli
    Signed-off-by: Doug Ledford

    Dasaratharaman Chandramouli
     
  • Modify core and driver components to use accessor functions
    introduced to access individual fields of rdma_ah_attr

    Reviewed-by: Ira Weiny
    Reviewed-by: Don Hiatt
    Reviewed-by: Sean Hefty
    Reviewed-by: Niranjana Vishwanathapura
    Signed-off-by: Dasaratharaman Chandramouli
    Signed-off-by: Doug Ledford

    Dasaratharaman Chandramouli
     

23 Apr, 2017

1 commit


19 Apr, 2017

1 commit

  • A group of Linux kernel hackers reported chasing a bug that resulted
    from their assumption that SLAB_DESTROY_BY_RCU provided an existence
    guarantee, that is, that no block from such a slab would be reallocated
    during an RCU read-side critical section. Of course, that is not the
    case. Instead, SLAB_DESTROY_BY_RCU only prevents freeing of an entire
    slab of blocks.

    However, there is a phrase for this, namely "type safety". This commit
    therefore renames SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU in order
    to avoid future instances of this sort of confusion.

    Signed-off-by: Paul E. McKenney
    Cc: Christoph Lameter
    Cc: Pekka Enberg
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: Andrew Morton
    Cc:
    Acked-by: Johannes Weiner
    Acked-by: Vlastimil Babka
    [ paulmck: Add comments mentioning the old name, as requested by Eric
    Dumazet, in order to help people familiar with the old name find
    the new one. ]
    Acked-by: David Rientjes

    Paul E. McKenney
     

12 Apr, 2017

3 commits