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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 4D0FDC2D0E4 for ; Mon, 23 Nov 2020 20:26:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F262D206E5 for ; Mon, 23 Nov 2020 20:26:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729838AbgKWUZn (ORCPT ); Mon, 23 Nov 2020 15:25:43 -0500 Received: from smtprelay0097.hostedemail.com ([216.40.44.97]:34720 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728869AbgKWUZn (ORCPT ); Mon, 23 Nov 2020 15:25:43 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 10236100E7B46; Mon, 23 Nov 2020 20:25:42 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: cook74_371674827368 X-Filterd-Recvd-Size: 2017 Received: from XPS-9350.home (unknown [47.151.128.180]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Mon, 23 Nov 2020 20:25:40 +0000 (UTC) Message-ID: Subject: Re: [PATCH net-next 15/17] rxrpc: Organise connection security to use a union From: Joe Perches To: David Howells , netdev@vger.kernel.org Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 23 Nov 2020 12:25:39 -0800 In-Reply-To: <160616230898.830164.7298470680786861832.stgit@warthog.procyon.org.uk> References: <160616220405.830164.2239716599743995145.stgit@warthog.procyon.org.uk> <160616230898.830164.7298470680786861832.stgit@warthog.procyon.org.uk> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-11-23 at 20:11 +0000, David Howells wrote: > Organise the security information in the rxrpc_connection struct to use a > union to allow for different data for different security classes. Is there a known future purpose to this? > diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h > @@ -448,9 +448,15 @@ struct rxrpc_connection { >   struct list_head proc_link; /* link in procfs list */ >   struct list_head link; /* link in master connection list */ >   struct sk_buff_head rx_queue; /* received conn-level packets */ > + >   const struct rxrpc_security *security; /* applied security module */ > - struct crypto_sync_skcipher *cipher; /* encryption handle */ > - struct rxrpc_crypt csum_iv; /* packet checksum base */ > + union { > + struct { > + struct crypto_sync_skcipher *cipher; /* encryption handle */ > + struct rxrpc_crypt csum_iv; /* packet checksum base */ > + u32 nonce; /* response re-use preventer */ > + } rxkad; > + }; It seems no other follow-on patch in the series uses this nameless union.