From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Berg Subject: Re: [PATCH v4] mac80211: move extra crypto data off the stack Date: Mon, 17 Oct 2016 15:16:09 +0200 Message-ID: <1476710169.315.1.camel@sipsolutions.net> References: <1476693195-14071-1-git-send-email-johannes@sipsolutions.net> <1476696226.19992.13.camel@sipsolutions.net> <1476696918.19992.15.camel@sipsolutions.net> <67161BCC-596E-4DDE-A58E-9195BB5570C2@linaro.org> <1476698041.19992.19.camel@sipsolutions.net> <41D0AC2F-E86E-4A98-AD8B-1239D7E6123A@linaro.org> (sfid-20161017_150649_562459_576A0780) Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: "" , Sergey Senozhatsky , "" , Herbert Xu To: Ard Biesheuvel Return-path: Received: from s3.sipsolutions.net ([5.9.151.49]:50405 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753616AbcJQNQQ (ORCPT ); Mon, 17 Oct 2016 09:16:16 -0400 In-Reply-To: (sfid-20161017_150649_562459_576A0780) Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 2016-10-17 at 14:06 +0100, Ard Biesheuvel wrote: >  > Actually, while I think it will be worthwhile going forward to > implement such an 'auxiliary data' feature in a generic way, I still > think we should address the issue at hand without too much > complication. > > If we pedal back to the version of 'mac80211: move struct aead_req > off the stack' that uses kzalloc() instead of aead_request_alloc(), > we can simply add some space for aad[] and/or zero[], and get rid of > the kmem cache entirely. > > If you're past this point already, i won't bother but otherwise I can > rework 'mac80211: move struct aead_req off the stack' so that the > other patch is no longer required (and IIRC, this is actually > something you proposed yourself a couple of iterations ago?) Yes, I did consider that. It makes some sense, and I guess the extra memcpy() would be cheaper than the extra alloc? I'd happily use that instead of the combination of my two patches. The aead_request_alloc() is just a simple inline anyway, so no real problem not using it. johannes