Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp484138pxb; Thu, 7 Apr 2022 10:27:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJKYbkJGLGXYvX/L4AyFo8r9QHp4mSLK36jx411jvixmpJENM/R0qaOAmyf7SbIn0iEJGO X-Received: by 2002:a05:6402:e99:b0:41d:11f2:85e0 with SMTP id h25-20020a0564020e9900b0041d11f285e0mr2438825eda.339.1649352421851; Thu, 07 Apr 2022 10:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649352421; cv=none; d=google.com; s=arc-20160816; b=Qkj/JVgNbCQjTw14BvBajd8R/A3ptHD+m2QbDx8rdwoZSXUp+GIk6lVAfLgdEWokSZ xzEw9MxwlQS1VFFleb+Hd7nfdaS17FKoyLkDA7FKpWCWqWJOYhOmQBlrcyr03s+u1BPG RknMMPa5VZTE9bJTluQxK21hWu0xvAjs9HAvkt5n4qzzljhSg8TVEIxOJKy0ZreLS5T5 8nbenFi2SgqiCh8qEkcReN2/gfyRBfcWeDRFL+y3ncQLikw+ERK/T7REcfKMOAZFzvRW ScshMin9OyHb3vUn1WT0+ii3AtmoyExCgnXYMkc8AGRSpzt0QAhMDdb9BnwhoqpyHkPm Qq7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AuNIzrk+NzvDPLpm8l70XAVcbluUigjEU3iDXE4kDRs=; b=VBQ0JrWlCPVFSoTPFvkBQyxCiHRUPiPRqZvpjQ5iWgBv0OI2RGwK0R4yISxGdASs8X DLbv27afRiwWzfiOl9MJriM7iXkwmFwZO8i/9i3znAf69yKOTg8tmsawip9X/SsRAjBL yiZNqquz8Q7EKX7Y5kXVxZtSVhjv32M8qDH1UGJha+rKVxTNiSpCWpXacAi0u/XCVUML MPQmpmmIfFjS0fuYoaDoYQgCtcjn7ynydwee3NFSysJzxoiVxllU1B6jyFqx/aBG0XoT gbdyZOdF52yKziX6fwB4zY982DNuhNyWbGhoY1YXSbmL3kESkF/nKgBuKwFfXQZWHdwY 1GIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o1fvYK4+; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky2-20020a170907778200b006df8b578025si14247004ejc.876.2022.04.07.10.25.15; Thu, 07 Apr 2022 10:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o1fvYK4+; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234383AbiDGIfi (ORCPT + 99 others); Thu, 7 Apr 2022 04:35:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234459AbiDGIfh (ORCPT ); Thu, 7 Apr 2022 04:35:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B9B11B9884 for ; Thu, 7 Apr 2022 01:33:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13E546187F for ; Thu, 7 Apr 2022 08:33:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3105AC385A0 for ; Thu, 7 Apr 2022 08:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649320417; bh=+Goi38y8epY8BN4u8isck26NnJ+QBzQRnMhu5NnKrVE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=o1fvYK4+asGnNwfzVoQpYeIuICeXy1yy1LOno1snx5tza58sjBx8jDYsD7iHZvS+E pi8/eU6OUdwm224F8c3GFy6Z40m7ZUrXYh4Vu6nhgcY34Yt+wI6hZEKkogXbQ8AjpB kljpPy1yUlk7hCe6i/k5g3nVpVmWF6PUaDn2slf0vEMMtbm/AQZysa33RrVDMKXxnH 7YlWQplpExR8u2eFwQLRFi7/a+suLMrFbH7cZC6W5Axf1ldFA3q1RvurcmZ+uwI5/y snm216BpwxmedRDw+hJe/ejd/ZVF+K6U3+c/BAJPBVkERuUlRTXE9e9JulBy4rf4V/ S1mFJsCudUFNg== Received: by mail-oi1-f180.google.com with SMTP id q129so4955412oif.4 for ; Thu, 07 Apr 2022 01:33:37 -0700 (PDT) X-Gm-Message-State: AOAM532tkSVQrKcBZ6qdaTWoEYl/5fqr/ID0tZ/kPTd04UTCZomghT1y Me+UiSwUOYo2Xt4l4zKAAQN2irE6XVqNSQqMxCI= X-Received: by 2002:a05:6808:1596:b0:2f7:5d89:eec7 with SMTP id t22-20020a056808159600b002f75d89eec7mr5411000oiw.228.1649320416369; Thu, 07 Apr 2022 01:33:36 -0700 (PDT) MIME-Version: 1.0 References: <20220406142715.2270256-1-ardb@kernel.org> <20220406142715.2270256-3-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Thu, 7 Apr 2022 10:33:25 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/8] crypto: safexcel - take request size after setting TFM To: Herbert Xu Cc: linux-crypto@vger.kernel.org, keescook@chromium.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 7 Apr 2022 at 10:32, Ard Biesheuvel wrote: > > On Thu, 7 Apr 2022 at 06:32, Herbert Xu wrote: > > > > On Wed, Apr 06, 2022 at 04:27:09PM +0200, Ard Biesheuvel wrote: > > > > > > +#define EIP197_SKCIPHER_REQ_SIZE (ALIGN(sizeof(struct skcipher_request), \ > > > + CRYPTO_MINALIGN) + \ > > > > The whole point of CRYPTO_MINALIGN is that it comes for free > > via kmalloc. > > > BTW the definition above is only used for request allocations on the stack.