23 Apr, 2018

1 commit

  • Based on discussion with Kate Stewart this license is not a
    BSD-2-Clause, but is now formally identified as Linux-OpenIB
    by SPDX.

    The key difference between the licenses is in the 'warranty'
    paragraph.

    if_infiniband.h refers to the 'OpenIB.org' license, but
    does not include the text, instead it links to an obsolete
    web site that contains a license that matches the BSD-2-Clause
    SPX. There is no 'three clause' version of the OpenIB.org
    license.

    Signed-off-by: Jason Gunthorpe
    Acked-by: David S. Miller
    Signed-off-by: Doug Ledford

    Jason Gunthorpe
     

24 Mar, 2018

1 commit

  • Add rx path for tls software implementation.

    recvmsg, splice_read, and poll implemented.

    An additional sockopt TLS_RX is added, with the same interface as
    TLS_TX. Either TLX_RX or TLX_TX may be provided separately, or
    together (with two different setsockopt calls with appropriate keys).

    Control messages are passed via CMSG in a similar way to transmit.
    If no cmsg buffer is passed, then only application data records
    will be passed to userspace, and EIO is returned for other types of
    alerts.

    EBADMSG is passed for decryption errors, and EMSGSIZE is passed for
    framing too big, and EBADMSG for framing too small (matching openssl
    semantics). EINVAL is returned for TLS versions that do not match the
    original setsockopt call. All are unrecoverable.

    strparser is used to parse TLS framing. Decryption is done directly
    in to userspace buffers if they are large enough to support it, otherwise
    sk_cow_data is called (similar to ipsec), and buffers are decrypted in
    place and copied. splice_read always decrypts in place, since no
    buffers are provided to decrypt in to.

    sk_poll is overridden, and only returns POLLIN if a full TLS message is
    received. Otherwise we wait for strparser to finish reading a full frame.
    Actual decryption is only done during recvmsg or splice_read calls.

    Signed-off-by: Dave Watson
    Signed-off-by: David S. Miller

    Dave Watson
     

15 Nov, 2017

1 commit

  • Move inclusion of a private kernel header
    from uapi/linux/tls.h to its only user - net/tls.h,
    to fix the following linux/tls.h userspace compilation error:

    /usr/include/linux/tls.h:41:21: fatal error: net/tcp.h: No such file or directory

    As to this point uapi/linux/tls.h was totaly unusuable for userspace,
    cleanup this header file further by moving other redundant includes
    to net/tls.h.

    Fixes: 3c4d7559159b ("tls: kernel TLS support")
    Cc: # v4.13+
    Signed-off-by: Dmitry V. Levin
    Signed-off-by: David S. Miller

    Dmitry V. Levin
     

02 Nov, 2017

1 commit

  • Many user space API headers have licensing information, which is either
    incomplete, badly formatted or just a shorthand for referring to the
    license under which the file is supposed to be. This makes it hard for
    compliance tools to determine the correct license.

    Update these files with an SPDX license identifier. The identifier was
    chosen based on the license information in the file.

    GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license
    identifier with the added 'WITH Linux-syscall-note' exception, which is
    the officially assigned exception identifier for the kernel syscall
    exception:

    NOTE! This copyright does *not* cover user programs that use kernel
    services by normal system calls - this is merely considered normal use
    of the kernel, and does *not* fall under the heading of "derived work".

    This exception makes it possible to include GPL headers into non GPL
    code, without confusing license compliance tools.

    Headers which have either explicit dual licensing or are just licensed
    under a non GPL license are updated with the corresponding SPDX
    identifier and the GPLv2 with syscall exception identifier. The format
    is:
    ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)

    SPDX license identifiers are a legally binding shorthand, which can be
    used instead of the full boiler plate text. The update does not remove
    existing license information as this has to be done on a case by case
    basis and the copyright holders might have to be consulted. This will
    happen in a separate step.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne. See the previous patch in this series for the
    methodology of how this patch was researched.

    Reviewed-by: Kate Stewart
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

16 Jun, 2017

1 commit

  • Software implementation of transport layer security, implemented using ULP
    infrastructure. tcp proto_ops are replaced with tls equivalents of sendmsg and
    sendpage.

    Only symmetric crypto is done in the kernel, keys are passed by setsockopt
    after the handshake is complete. All control messages are supported via CMSG
    data - the actual symmetric encryption is the same, just the message type needs
    to be passed separately.

    For user API, please see Documentation patch.

    Pieces that can be shared between hw and sw implementation
    are in tls_main.c

    Signed-off-by: Boris Pismenny
    Signed-off-by: Ilya Lesokhin
    Signed-off-by: Aviad Yehezkel
    Signed-off-by: Dave Watson
    Signed-off-by: David S. Miller

    Dave Watson