Received: by 10.213.65.68 with SMTP id h4csp1302941imn; Sun, 18 Mar 2018 23:42:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELv4O/HL1soVAdp8MMAdpxnmR0/8GSEFPIHB78BQRoAyoiDW+MnLRqMzHp37Wyym8ZlJuwEQ X-Received: by 2002:a17:902:7c84:: with SMTP id y4-v6mr11279489pll.305.1521441759602; Sun, 18 Mar 2018 23:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521441759; cv=none; d=google.com; s=arc-20160816; b=Xzsm6o3L6GzVETeK8LsywCWIQE45VcnCL5Ipapj019C+JWB5OHFLPy3Az9Dgb3DWNw m8o2MplrZjyhVbV4o+SQjQD+m+z3mBv1jZKJwtzbVw8fefY1NbSW9rsY8S/ntKSO7VmI ocuvSpvkGdoqRR6UWp+JVTi1pb/I/9C9PP+zQHTp4zMAzAj3WVzIKah62uWlbTsvypmd WT5YYzesCKrVCpJKH2KNmiCAxwY2PSc+9C3L1kPOHDWowA4guoLnBJgnabsJit39zPuc WTfc1qV34TTS2xyj8thxIP3Wz/XVw9THDrGyCV3XSme1mnu7piX/U8rX8mjqFmdW/wpw y/sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=I43ayK+AyDqrC+eCkS9ZuC8sQ2y1b9Tn+2EEoosDWxU=; b=kmG6oricNzJj1gMBzOHVqmfc3rDAuHAESh8/xM5HFHVESqoo0uyo8Hc3cC/qBAcKTT Zi7jLSB8t7K/p70TZ0+CBkdsFRQE4DgjuWtEp4FLwJ53lZKpXK6DOpWGl8qLTTCmubQ/ LTBoTez3GS7ds7F531lOxRkfqp9dFUOIuotYtpj5mARhoDNdqEELYWIrfh/k6QzabwkP G25KCl7uprNm2/+R4EGxojupnzBciLacScLjYZ9IRnIkmUW/3RO44cdlc7wb0cjkaag6 mTuxFR5AQbVi5uOMPNMFpORad3dIhUoAYIVI/PU8+TBcz2SW1M7/IT/p9ut7jVEQaM5b FM7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=d9bDcTsy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f64-v6si11970746plf.624.2018.03.18.23.42.25; Sun, 18 Mar 2018 23:42:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=d9bDcTsy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755333AbeCSGjz (ORCPT + 99 others); Mon, 19 Mar 2018 02:39:55 -0400 Received: from mail-db5eur01on0072.outbound.protection.outlook.com ([104.47.2.72]:54720 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755169AbeCSGjw (ORCPT ); Mon, 19 Mar 2018 02:39:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=I43ayK+AyDqrC+eCkS9ZuC8sQ2y1b9Tn+2EEoosDWxU=; b=d9bDcTsyhCr38tyrGpJ7v3z3Od1G+vyVp3JIePDfby4b1OpuwfrxgRk0uR9nTQiPGLdHRJQa1RQfki2iJjTQar9lf7N/6UW61qF6bYbeFQGCfNWv3reX5ScIBABWrX47ArThKKufnDxXoiSS3sf82P0yql+qwHwOGdK/3ajmcQ4= Received: from AM3PR04MB452.eurprd04.prod.outlook.com (10.242.110.155) by AM3PR04MB1233.eurprd04.prod.outlook.com (10.163.6.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.588.14; Mon, 19 Mar 2018 06:39:49 +0000 Received: from AM3PR04MB452.eurprd04.prod.outlook.com ([fe80::5833:9128:f42a:7e20]) by AM3PR04MB452.eurprd04.prod.outlook.com ([fe80::5833:9128:f42a:7e20%16]) with mapi id 15.20.0548.021; Mon, 19 Mar 2018 06:39:50 +0000 From: =?iso-8859-2?Q?Horia_Geant=E3?= To: Herbert Xu CC: "David S. Miller" , Jonathan Corbet , "linux-crypto@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] crypto: doc - clarify hash callbacks state machine Thread-Topic: [PATCH] crypto: doc - clarify hash callbacks state machine Thread-Index: AQHTvTnS8kcR1bt5RUucTQuU3LKxuQ== Date: Mon, 19 Mar 2018 06:39:50 +0000 Message-ID: References: <20180305103945.3517-1-horia.geanta@nxp.com> <20180316151642.GA6606@gondor.apana.org.au> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=horia.geanta@nxp.com; x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM3PR04MB1233;7:Jz14F1wBmg5NmHW2V2AGfGy2RO0yNHPEgdULdCyH+uGxLmqSdcY98aqSI96zIcPBISloDg85w4i0XLUR6PDnCnxTtQ3kIDMaK4A9FnAqNcTLPSmDDq2O3aCYVuQCAYrgENtQcoZEaac7Wn6EAUYnl4z6T5lWXbKVATeu2jPURQ2PB+lI8l8bjgpX/CgBVl8ysN8A/lvkfqY0JNE5cL/hOU2UnO8U9CVgi1VRyd6uGq27CkPj2FVelzHDQxna89Su x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fb205a07-f7c5-435b-33a7-08d58d643715 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:AM3PR04MB1233; x-ms-traffictypediagnostic: AM3PR04MB1233: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:AM3PR04MB1233;BCL:0;PCL:0;RULEID:;SRVR:AM3PR04MB1233; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(39380400002)(376002)(366004)(346002)(199004)(189003)(76176011)(102836004)(53936002)(6116002)(316002)(2900100001)(81156014)(7696005)(4326008)(6506007)(54906003)(97736004)(81166006)(55016002)(6246003)(33656002)(3846002)(229853002)(8936002)(9686003)(7736002)(86362001)(53546011)(5250100002)(5660300001)(74316002)(478600001)(8676002)(106356001)(66066001)(14454004)(3660700001)(59450400001)(186003)(25786009)(26005)(6916009)(6436002)(99286004)(3280700002)(68736007)(105586002)(2906002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR04MB1233;H:AM3PR04MB452.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 29TpFIFqb2QKjWOvzN3xqZ4hliU5v/Wi03Thb6MG4xgrnUEk74XYEfspwlF8bfM4P9HSG/oK/sJkIUHgqQUs6wUnZp5xV4Oiktywc6UHAttzjNENhEE/ehkkAVh1RHFOBdZAJT8m0K/vb2LmiQCHd+gGc6A+RQ8FVvuW++LahNaFvZqQ6YyjzV6dt9KJaNQborNFNN5WyYC4tV2w3NpUcYhx3/6ZfLYI1TRjJtCNm5akLNNIF4qtz086xJ/pTG3ACDvATUWDRT7QO1T+wK8sm19VCyW0s3D02dA2TLVva3ZENo8cWh8YdY0ZETr2jqfDUxAvqQGsHDnjCsDGYYUU/w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb205a07-f7c5-435b-33a7-08d58d643715 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 06:39:50.1769 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB1233 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/16/2018 5:16 PM, Herbert Xu wrote:=0A= > On Mon, Mar 05, 2018 at 12:39:45PM +0200, Horia Geant=E3 wrote:=0A= >> Even though it doesn't make too much sense, it is perfectly legal to:=0A= >> - call .init() and then (as many times) .update()=0A= >> - subseqently _not_ call any of .final(), .finup() or .export()=0A= > =0A= > Actually it makes perfect sense, because there can be an arbitrary=0A= > number of requests for a given tfm. There is no requirement that=0A= > you must finalise the first request before submitting new ones.=0A= > =0A= > IOW there can be an arbitrary number of outstanding requests even=0A= > without the user intentionally abandoning any hash request.=0A= > =0A= The fact that there can be multiple requests in parallel (for a given tfm) = is a=0A= different topic.=0A= Each request object has its state in its own state machine, independent fro= m the=0A= other request objects.=0A= I assume this is clear enough.=0A= =0A= Why I wanted to underline is that "abandoning" a hash request is allowed (e= ven=0A= though doing this is at least questionable), thus implementations must take= =0A= special care not to leak resources in this case.=0A= =0A= If you think the commit message should be updated, then probably so should = the=0A= documentation update.=0A= =0A= Thanks,=0A= Horia=0A=