Received: by 10.213.65.68 with SMTP id h4csp202083imn; Tue, 20 Mar 2018 00:57:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELskZWWmhbWeDFTrHst/53tz1lDZFiddDoPCyfRIlLUNT/BZcnw5OneadxvacKj506oLC2z/ X-Received: by 10.99.100.6 with SMTP id y6mr11353587pgb.254.1521532673754; Tue, 20 Mar 2018 00:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521532673; cv=none; d=google.com; s=arc-20160816; b=uvpiWOWNxamNHfqhfHuWGsSlbhFMptU6K14qW3ngHOm4gxMFBu3eH8V2cTNY9H/aGU DUe78krD6fLqOkXUuc5kzNQGgvS9D7RaTfk/8BUulfJpyRcFRIWhdkYLvP1FjEEiWVLt pXyybj9uTAsoeTNerxLOl3injxY0i0PxDu2mX6DyhtdoZUMBdF/SAwdtjm319kMC+aSj 5Sq8VdoKk5LGl58yc3J2iSD2wvS/sxgb4q48ou/XiRomxNvq3XNaiqH6DvFtuv63bzXV yET+fXnp+a0HypTar8/sk9sSFk8wsvAKBvH/jeSDSuSBb3nG7g6fxuboOZNgL0UBboi8 eWQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=S2g5e3Vn8Pe9EikCcIDZudjqrhw0M6vL+SCXxw75hRU=; b=mapsoAmMJchjeevEtQogXXxCadTJE/TDj4RHQnbJq+yrn+/SoZ5Q2wC/ZTDlWtIiS8 ut6RmWRqJjBtoiV6eZnl5RiPQ1B0SiP9QSwgsmg16FJfaTj3qjt4bR2TZw6GG3nAF832 Rj9bKrPFlGJY94nC6q7CT6ErIAidyxm7sce6lKsfDcrG2d20N5SXPwLhLj5I1CVeleg8 X6wh8o2ARU0f81DXNGaA7jm+Zcsv2NDqbLOCaS4eucRyO7J7ysD/tUijS3wKGqoRSTZt TmyL1HBvRb1Pa31eL3ZuGL5tZLJDod1EFakYDtSLOTwUIfE2jHhC4wPA5bhiuaHgEH/5 uaxg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 bd3-v6si1213552plb.392.2018.03.20.00.57.40; Tue, 20 Mar 2018 00:57:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbeCTH4h (ORCPT + 99 others); Tue, 20 Mar 2018 03:56:37 -0400 Received: from mail-cys01nam02on0070.outbound.protection.outlook.com ([104.47.37.70]:43872 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751524AbeCTH4f (ORCPT ); Tue, 20 Mar 2018 03:56:35 -0400 Received: from BLUPR0301CA0041.namprd03.prod.outlook.com (10.162.113.179) by BY2PR03MB348.namprd03.prod.outlook.com (10.141.139.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 07:56:33 +0000 Received: from BN1AFFO11FD013.protection.gbl (2a01:111:f400:7c10::103) by BLUPR0301CA0041.outlook.office365.com (2a01:111:e400:5259::51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.588.14 via Frontend Transport; Tue, 20 Mar 2018 07:56:32 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD013.mail.protection.outlook.com (10.58.52.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.527.18 via Frontend Transport; Tue, 20 Mar 2018 07:56:32 +0000 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.81.110]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w2K7uS5h013219; Tue, 20 Mar 2018 00:56:29 -0700 From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Herbert Xu , "David S. Miller" , Jonathan Corbet CC: , , Subject: [PATCH v2] crypto: doc - clarify hash callbacks state machine Date: Tue, 20 Mar 2018 09:56:12 +0200 Message-ID: <20180320075612.22719-1-horia.geanta@nxp.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180305103945.3517-1-horia.geanta@nxp.com> References: <20180305103945.3517-1-horia.geanta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131660061923510352;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(39380400002)(346002)(39860400002)(396003)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(336012)(498600001)(85426001)(77096007)(54906003)(105606002)(110136005)(97736004)(68736007)(26826003)(76176011)(104016004)(26005)(316002)(59450400001)(356003)(305945005)(50466002)(86362001)(966005)(23676004)(2906002)(5820100001)(8936002)(1076002)(2950100002)(6666003)(81166006)(2870700001)(5660300001)(81156014)(53936002)(450100002)(4326008)(36756003)(106466001)(50226002)(8676002)(6306002)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR03MB348;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD013;1:tbkRgldIi3WNdgcbBJVYHuZvtOYPvpSmlT9m5lWEiBx9FCdNNAAQpslxTFNqBiip7RW3XnO0a8/1CFgbCamBvyWA0l+04tP8I/0vj7duOEzmjs6L4abnPxqKWbKLcLw3 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45988dc6-e3d3-47a2-8850-08d58e381885 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(5600026)(4604075)(2017052603328);SRVR:BY2PR03MB348; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB348;3:9rKoaIxmwrnsNfU8XEy7afGITonOqtSK7Qhyz59Eixji43bMnIPLWKPI9hQLUlUc0Ww9nuirF5YTpSCIiYhxf+Q1uTG8mH6o7Ig4yXSpp1MGVMkicB2hZPdo95DAWivoqnCxsGhi92DF0WjoIidiIfxjdkNvJYaRfgzl/wBpZbQqhOFJUqtdLLt1YR0BMa/mWe8zm3JHeL6bUE9kVAzj/I4X7MXTWrYi4dYpSy/K8nQAKVYLPSvFgg2GIIq1edGxXWYIGLjqQkyp73EaPSH5MXeWYtxqIV7l/kIIf0cczI2RZNAn5EYHDDfTtB9fKc+bgBi0fFyYX+SebQPqGkkLs1BbJdMl6FnJaBaWoP/g1+0=;25:B8RFd1QAnbKwhoU3agjnCKb3J2rXSqprT4xutXkxqjjVBFmZOvTVTlv0RbTLXWMfmPZ5JDUBD9bp1TgPi6I4osNfaJm50gOJEYg3xUB994A0fXCcv0ZPzPo3UlnhU/Wf+Jpu6cu66cfnux8VheZ5/n6hgjXHw6A71B54Dye+jtTe4bCD7Afx6C2dRJbwv71lzcGdVAvdMgY9Ne61bQA1dHykhqZ7KZ5UCFRVFdpJVxxYqgmJ25fdpt0F+muJF+58lejcq0edRjUmftwdU6XGWZLD63S6i+DyRHIgUKMOvqfcjoboImbM8ugh2cqH5KnixOCoG71I8E695hQGalGnYg== X-MS-TrafficTypeDiagnostic: BY2PR03MB348: X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB348;31:IXYt5wyMu8nJ5/BSrw/fvSm7VF1b68fY2TSds8YPhV4fCaFvN6zx06QVwsmu5RVT7DOt+HTvekHAyGYwtXF9+0Nnj0oiusp7hcSDbtHC/iHQNMlOS4fsFlUUp4vooPLrXY6LUHRX6DvmbStzzsKTCRi48GWdXICNTMllch/XhjtOTLcsw5wWBEMLxqymqoC5QgHnIAnqAWeLqOv8mKUleFliqKBhvZI0tpzr4KSPn7M=;4:fmwX2XKY4gzoOled1GSSCQjA6367DeAgu11ihiZOZEU30qAh8GV7B5yagsL4D2+QKcAbh2s0vI9Axt3+vGM1jErYKPFyISGXFqKPnX6//CxbE4ZA+SBoGbSiNPQz9tri90tY3b1aHvtayEppBDJlSPVYt2b8CHslQHZZSXQj63ZIs5vDkQWrYcY1IMJH+UeRj5TBnqgR2oWA/U3pAwziMuDqzPZHUF9nw3yadcPluqHYKx7YK/GeLHRgTYbrFW6yIHEOqLiFihhzOgePaZmrcsW2R6n7XaVwVLvIccp3+4h0I0v8UXG5rPxqHq59Ng7fjoJR+eXPwmOHTf0fyMm4UpQvHxB9ZYgT4HZ64jaqrbQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(42068640409301); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501244)(52105095)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123563025)(20161123565025)(20161123556025)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123561025)(201708071742011);SRVR:BY2PR03MB348;BCL:0;PCL:0;RULEID:(400006);SRVR:BY2PR03MB348; X-Forefront-PRVS: 061725F016 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjAzTUIzNDg7MjM6elgwbXpYMUhVMExOK3Y0K3Fhb3c4S2IwYW9u?= =?utf-8?B?UFJ5YmsvVjA2VnNNLzgrVzZCUE9qUnk1TFBxRDVjOVRiZzlEdkdYclJKekd4?= =?utf-8?B?c1pmaHdQdzFvc2xqSWtZdmhsQVN1Wmh1UTFNSUNNUmhaamRjZ25QTG9VdjZM?= =?utf-8?B?UDRLd1poT3lzMHRLS1J3NlE1dnZ5RE9RZnJENE84MlFrUFc1eWdodVpnVms0?= =?utf-8?B?MnMyc2NkV1d4VzluNEVENGYvMVFsK1pvRlJVWkp4NW1heHZlRnBPaEJaUWkw?= =?utf-8?B?OXdvZGJnSEdqbDJTdk9YMndTM3N3L3JLVGVzVlNJcWFkVWNlaU1XaC9qKzdY?= =?utf-8?B?Y25vNURIL1FheFRteVlkVkJrcVVHVDlqdEpXRnRxUU44dENIU2kwOXJCK2Jo?= =?utf-8?B?MTQwME5OczFrTUNaQ0pGY204SnpGYnZ3V3RZTWlLMDkveHh6RGhVOThpT09W?= =?utf-8?B?NmVvNk9pckFabUdHREZvL1B6K2RDRUl4U0Y3elpFSkhHSXlRZVRRNWZoOTNH?= =?utf-8?B?UkdBaVhVMTNDaTVZSzFGOGJLdGNIdWRJdis1cmlXeWtJV1hHWHd5SFdMdGhq?= =?utf-8?B?d1UyQk5qbGxCRkdXM3ltK1o3TlZ2enhGRjdYWWpITC9SMTlLaUFqTEtwL3lB?= =?utf-8?B?QjBCbUd1WW5IY3JyelBETDVZVzNjNGhtN2cyc2lpaFdxT3RqNkhIVkl3NjNV?= =?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p9s34F8ZYeNW34fdDJ73+xK+WD6S3QMCSAZ3Vdgif07jeUcPKp49AVyDI0wXQA+9U+eq8ke27pj+4cEc0Jbs1Lef6oI+KxftpUsc/pZEhzwqOICIUyjL8EGZa SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2018 07:56:32.1794 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45988dc6-e3d3-47a2-8850-08d58e381885 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB348 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a note that it is perfectly legal to "abandon" a request object: - call .init() and then (as many times) .update() - _not_ call any of .final(), .finup() or .export() at any point in future Link: https://lkml.kernel.org/r/20180222114741.GA27631@gondor.apana.org.au Signed-off-by: Horia Geantă --- Documentation/crypto/devel-algos.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/crypto/devel-algos.rst b/Documentation/crypto/devel-algos.rst index 66f50d32dcec..c45c6f400dbd 100644 --- a/Documentation/crypto/devel-algos.rst +++ b/Documentation/crypto/devel-algos.rst @@ -236,6 +236,14 @@ when used from another part of the kernel. | '---------------> HASH2 +Note that it is perfectly legal to "abandon" a request object: +- call .init() and then (as many times) .update() +- _not_ call any of .final(), .finup() or .export() at any point in future + +In other words implementations should mind the resource allocation and clean-up. +No resources related to request objects should remain allocated after a call +to .init() or .update(), since there might be no chance to free them. + Specifics Of Asynchronous HASH Transformation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.16.2