From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C66B1C3A589 for ; Thu, 15 Aug 2019 16:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 994FA206C1 for ; Thu, 15 Aug 2019 16:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730084AbfHOQCz (ORCPT ); Thu, 15 Aug 2019 12:02:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726616AbfHOQCz (ORCPT ); Thu, 15 Aug 2019 12:02:55 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3DF1630253A9; Thu, 15 Aug 2019 16:02:55 +0000 (UTC) Received: from mob-31-157-107-94.net.vodafone.it.com (ovpn-204-48.brq.redhat.com [10.40.204.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCF673796; Thu, 15 Aug 2019 16:02:52 +0000 (UTC) From: Davide Caratti To: Boris Pismenny , Jakub Kicinski , John Fastabend , Dave Watson , Aviad Yehezkel , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH net-next 0/3] net: tls: add socket diag Date: Thu, 15 Aug 2019 18:00:41 +0200 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 15 Aug 2019 16:02:55 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The current kernel does not provide any diagnostic tool, except getsockopt(TCP_ULP), to know more about TCP sockets that have an upper layer protocol (ULP) on top of them. This series extends the set of information exported by INET_DIAG_INFO, to include data that are specific to the ULP (and that might be meaningful for debug/testing purposes). patch 1/3 ensures that the control plane reads/updates ULP specific data using RCU. patch 2/3 extends INET_DIAG_INFO and allows knowing the ULP name for each TCP socket that has done setsockopt(TCP_ULP) successfully. patch 3/3 extends kTLS to let programs like 'ss' know the protocol version and the cipher in use. Changes since RFC: - some coding style fixes, thanks to Jakub Kicinski - add X_UNSPEC as lowest value of uAPI enums, thanks to Jakub Kicinski - fix assignment of struct nlattr *start, thanks to Jakub Kicinski - let tls dump RXCONF and TXCONF, suggested by Jakub Kicinski - don't dump anything if TLS version or cipher are 0 (but still return a constant size in get_aux_size()), thanks to Boris Pismenny - constify first argument of get_info() and get_size() - use RCU to access access ulp_ops, like it's done for ca_ops - add patch 1/3, from Jakub Kicinski Davide Caratti (2): tcp: ulp: add functions to dump ulp-specific information net: tls: export protocol version, cipher, tx_conf/rx_conf to socket diag Jakub Kicinski (1): net/tls: use RCU protection on icsk->icsk_ulp_data include/net/inet_connection_sock.h | 2 +- include/net/tcp.h | 3 ++ include/net/tls.h | 28 +++++++++- include/uapi/linux/inet_diag.h | 9 ++++ include/uapi/linux/tls.h | 15 ++++++ net/core/sock_map.c | 2 +- net/ipv4/tcp_diag.c | 56 ++++++++++++++++++- net/tls/tls_device.c | 2 +- net/tls/tls_main.c | 87 +++++++++++++++++++++++++++--- 9 files changed, 191 insertions(+), 13 deletions(-) -- 2.20.1