lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170616135632.67e2bb9b@xeon-e3>
Date:   Fri, 16 Jun 2017 13:56:32 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Dave Watson <davejwatson@...com>
Cc:     Ilya Lesokhin <ilyal@...lanox.com>,
        Aviad Yehezkel <aviadye@...lanox.com>,
        Boris Pismenny <borisp@...lanox.com>,
        Liran Liss <liranl@...lanox.com>,
        Matan Barak <matanb@...lanox.com>,
        David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
        Tom Herbert <tom@...bertland.com>,
        <herbert@...dor.apana.org.au>, <linux-crypto@...r.kernel.org>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        <nmav@...tls.org>, <fridolin.pokorny@...il.com>
Subject: Re: [PATCH v3 net-next 3/4] tls: kernel TLS support

On Wed, 14 Jun 2017 11:37:39 -0700
Dave Watson <davejwatson@...com> wrote:

> +
> +static inline struct tls_context *tls_get_ctx(const struct sock *sk)
> +{
> +	struct inet_connection_sock *icsk = inet_csk(sk);
> +
> +	return icsk->icsk_ulp_data;
> +}
> +
> +static inline struct tls_sw_context *tls_sw_ctx(
> +		const struct tls_context *tls_ctx)
> +{
> +	return (struct tls_sw_context *)tls_ctx->priv_ctx;
> +}
> +
> +static inline struct tls_offload_context *tls_offload_ctx(
> +		const struct tls_context *tls_ctx)
> +{
> +	return (struct tls_offload_context *)tls_ctx->priv_ctx;
> +}
> +

Since priv_ctx is void *, casts here are unnecessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ