Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1072573pxb; Thu, 24 Mar 2022 12:11:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeNpWHzL36gdn7+5MhW7TrUc67aX4Rq0HToSAh19oSZBIfZQ2acyGTMDyu59UfxUolrR+Z X-Received: by 2002:a05:6402:34c1:b0:419:585a:f383 with SMTP id w1-20020a05640234c100b00419585af383mr8355806edc.65.1648149076005; Thu, 24 Mar 2022 12:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648149075; cv=none; d=google.com; s=arc-20160816; b=cT92ZZohklI6B0NXbzLBEzLprsJacqLPYb+NgSMFOnf2f9KuPsdzw3imNI/LYSDZEa dTPj1zuJnM9AA9CAxgrGySSz1AMmp1IgXaIYRP1vWIIlWEdNMLPCBj9vq5YclfzygpxI ppNiemQ+ZR+bBeQakNOAY9YMyno3phCTo/j1PopAPqauyxE/grgztwIAngPBFnJft30h wN7O9MbmKGSnInIrkLCPpIGpV4/Hawgv1T4h/nc8j4bcuggldPOruMKHMAR64hjnmHNS KhXDxirmpTBAqlrdFZn85vizMawAf+89jAQ3tSblf5rpQlWEouHGiPAUqU2hp/M8PvKN er9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=J3WQCwe7ajlSATSZEmaKyLjosnMRNlf+nQ2bSIs59d4=; b=pUf7Dp6sMcm1SF7DFO+jrO3RIEttJQ9I8mwi9tyr6EeBWhO9ikqu5wu9dq45Vg6ffa TfPrinR2A0GMQPu0CKMPMNq+vI+gOgCR4SLXA4FtXpgGstvQnugUJQOIK/AND+1jXiNx xhbhBHyRoCSA2MzEvGgJBd+LN/mXcblY9YBnsW66pyz/yrk+/5urYl2/41h69Mr1B7iI NMSMvnvKrlkwtJnKTxy7V66lQHnOKTwgpMwvuKT4pAWhFt7EbKhWyi3DXwDh4RX1yy37 nRFrt1whj+Ipm3ZXHK2+ehnuYzZhsldM4pFVMFnGvK1eInbIJAawgJvTt3BfYEmJZQiR yLgw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi24-20020a1709073ad800b006df76385dadsi201974ejc.589.2022.03.24.12.10.38; Thu, 24 Mar 2022 12:11:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344509AbiCXKMN (ORCPT + 99 others); Thu, 24 Mar 2022 06:12:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349367AbiCXKMN (ORCPT ); Thu, 24 Mar 2022 06:12:13 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADB5BA0BD1 for ; Thu, 24 Mar 2022 03:10:41 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nXKQ1-0008Dj-FI; Thu, 24 Mar 2022 11:10:13 +0100 Message-ID: Date: Thu, 24 Mar 2022 11:10:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [EXT] [PATCH v6 3/4] crypto: caam - add in-kernel interface for blob generator Content-Language: en-US To: Pankaj Gupta , Horia Geanta , Herbert Xu , "David S. Miller" Cc: "linux-security-module@vger.kernel.org" , Eric Biggers , David Gstir , Matthias Schiffer , Sumit Garg , Jan Luebbe , Richard Weinberger , "tharvey@gateworks.com" , Franck Lenormand , James Morris , Mimi Zohar , "linux-kernel@vger.kernel.org" , David Howells , Jarkko Sakkinen , "keyrings@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "kernel@pengutronix.de" , "linux-integrity@vger.kernel.org" , James Bottomley , "Serge E. Hallyn" References: <20220316164335.1720255-1-a.fatoum@pengutronix.de> <20220316164335.1720255-4-a.fatoum@pengutronix.de> From: Ahmad Fatoum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hello Pankaj, On 24.03.22 10:55, Pankaj Gupta wrote: > Hi Ahmad, > > Please find the comments in-line. Thanks for you review. > Suggest to continue to use two separate descriptor-creation-function for 'encap' and 'decap'. > This will help these API(s) to be maintained easily going forward. We can still split them up in future once there is a real need. But currently they are exactly the same, except for input/output length, so I think it's correct to not introduce duplication unless needed. >> - use append_seq_(in|out)_ptr_intlen for both encap/decap as a result Case in point. The intlen omission was because the two functions are largely identical and I only fixed up one of them. This is prone to repeat when we go back to have identical code with minor differences. > In continuation to the previous comment, there is another suggestion: > > Either: > struct keyblob_info { > void *key; > size_t key_len; > > void *blob; > size_t blob_len; > > size_t key_mod_len; > const void *key_mod; > }; I can do that. Whats your opinion on the desc size computation? Comment the macro or add the static inline helper? Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |