Received: by 10.213.65.68 with SMTP id h4csp447195imn; Tue, 20 Mar 2018 07:08:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELv0TTsdAPH8jbLsgcLa5ENGIx2Pw742lF3n//EM7n+GDvc6MVCsAAH/WqvUShyoJI9wj+Bq X-Received: by 2002:a17:902:7b85:: with SMTP id w5-v6mr16831543pll.131.1521554913656; Tue, 20 Mar 2018 07:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521554913; cv=none; d=google.com; s=arc-20160816; b=ki/BgQ5IpOSyjCjwd812VaEAz6uegv4vHiyU63ZRD0FtqjnxwJvkv4fv0wGsZlBKR3 aDkCJe07QaU+VGu97d/IlK2SGkrCdGiPicFUODPrK1DOXEfoCvl2zoepP9Sty+kv77hJ c0Q48xJU/iK+lHsUtKM9ZwaQ438YVYZAU6m5bcuBnVAwlKgEIsNmROJEBWfJyyJsDyZ8 3en9MoNd/awZ/v0vzg7qyR61Y6r+Jk4r/3+ZvBbiEASQBxJBmT6p1imJyhbycHM2g+m4 nNWnliCayOJIYtm5jt4g40Mq2+3HUR+BqiZMQplISGhd10Bj2E8nMkVzrHcs9vUi8sXV jloQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:date:message-id:subject :mime-version:content-transfer-encoding:from :arc-authentication-results; bh=vP+8+D2pXv0GpTOZPU9xQddMR45wz6sa9d//v+/euAU=; b=bAPj1nSB9pZin/3uPWkSWN6664DSt0x8GaH6yf0ODIOP0JL5efomfSzXniX003XexM vpEhEmlP8nxZc4zEdJlLE8+FWsvWJzVEOT0TkDlHZcb0I3NTxTHZtu0GQRnuS+00tZVn P/uSTIyRpRkt410DtLg+LdH9UM2rwkLOCO67kyh59s9NlgAMXZbDtf4jGPD3YOjlKbOz ioG4YnXTOlrNmeN1LPI9NZOWa/3WcKdcc1iqRycxMsnk50EMzZ5PA1BDzsGIB7jNx5Uf A55S+x7K/b+yMp2/SBXUyRNXTf1SKSoJXotVO//YZerqSwV25ZSAUXEWtVG1jff5Zv8L AJwQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az10-v6si932968plb.145.2018.03.20.07.08.16; Tue, 20 Mar 2018 07:08:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753972AbeCTOFN convert rfc822-to-8bit (ORCPT + 99 others); Tue, 20 Mar 2018 10:05:13 -0400 Received: from mailhost.informatik.uni-hamburg.de ([134.100.9.70]:38504 "EHLO mailhost.informatik.uni-hamburg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753131AbeCTOEf (ORCPT ); Tue, 20 Mar 2018 10:04:35 -0400 Received: from localhost (localhost [127.0.0.1]) by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTP id 6A69A8F2; Tue, 20 Mar 2018 15:04:33 +0100 (CET) X-Virus-Scanned: amavisd-new at informatik.uni-hamburg.de Received: from mailhost.informatik.uni-hamburg.de ([127.0.0.1]) by localhost (mailhost.informatik.uni-hamburg.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id P6eHnZJZ8d4E; Tue, 20 Mar 2018 15:04:33 +0100 (CET) Received: from benjamins-mbp.fritz.box (port-8343.pppoe.wtnet.de [84.46.32.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: 4bwarnke@informatik.uni-hamburg.de) by mailhost.informatik.uni-hamburg.de (Postfix) with ESMTPSA id B39188EF; Tue, 20 Mar 2018 15:04:32 +0100 (CET) From: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: [PATCH 5/5 v4] crypto: add flag for unstable encoding Message-Id: <40C79A08-9DCC-4188-8F9D-1BAE5A8019F6@informatik.uni-hamburg.de> Date: Tue, 20 Mar 2018 15:04:31 +0100 Cc: Linux Crypto Mailing List , linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, minchan@kernel.org, ngupta@vflare.org, Sergey Senozhatsky X-Mailer: Apple Mail (2.3445.5.20) To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The data-format of zBeWalgo, and some other algorithms is unstable. To identify such unstable algorithms this patch adds a new flag to the crypto-api. Signed-off-by: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de> --- crypto/zbewalgo.c | 2 +- include/linux/crypto.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crypto/zbewalgo.c b/crypto/zbewalgo.c index c8481b872..9f2b07ac2 100644 --- a/crypto/zbewalgo.c +++ b/crypto/zbewalgo.c @@ -148,7 +148,7 @@ static int zbewalgo_decompress_crypto_unsafe(struct crypto_tfm *tfm, static struct crypto_alg crypto_alg_zbewalgo = { .cra_name = "zbewalgo", - .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, + .cra_flags = CRYPTO_ALG_TYPE_COMPRESS | CRYPTO_ALG_UNSTABLE_ENCODING, .cra_ctxsize = sizeof(struct zbewalgo_ctx), .cra_module = THIS_MODULE, .cra_init = zbewalgo_init, diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 63420dac0..372893569 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -112,6 +112,12 @@ */ #define CRYPTO_ALG_OPTIONAL_KEY 0x00004000 +/* + * Set if the algorithm is new and it is likely that the encoding may + * change in near future + */ +#define CRYPTO_ALG_UNSTABLE_ENCODING 0x00008000 + /* * Transform masks and values (for crt_flags). */ -- 2.14.1