Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15060807ybl; Tue, 31 Dec 2019 00:14:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwZE4J9UWcgMzqipEjCEQL+qfsz1/QEQAIntbqsfVRYsulINP1s1yeEpB2Pn4eWSKcCqckq X-Received: by 2002:a9d:1c95:: with SMTP id l21mr69291592ota.271.1577780093242; Tue, 31 Dec 2019 00:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577780093; cv=none; d=google.com; s=arc-20160816; b=G8sVCUiQ3Zr6WKV0d2DJ1X63WqiJBesmkABTx0OH2jiqViclzaSkSOoulmYJg1M3Wm loZr8pvh2KeHrUMkfk6wDbizu/qRqjFEI914icy5z64tTLDgOB16VrCzhr4E9YtLej9O /Mxdprdz8EpM/S8ATQftavDk5cG/tDBka3H2E0F6SnQnpot4gFtyX7qYyYTg/Fks46kX VPhc6l2ZAcOa8TQTwL7LbInMkScbugIty55ElAC2ZlJ5L+hAeo057EFBBbdEObiRXZPh 4ZQEjvgfwUuYJckg3Bs5IJZrA7eVE7opZNsCVNmU9IPMPy2K3IqGR1yacS1N78AHABOR kwrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=g0Pdjud1VU0ZUxaakoki+l3FmURlkZsw8p9lGLeQCSM=; b=Tnqtoxrx8EwP3Dvh27sy3Pqc60bhQvki5ig3sWQTEgQ0pzyVvc+cgxSlx+qisZ+35X s3c3XKYMI9DplS9arTicL7HcVNjboZf+tVlQfVCJl7VJRa+4YNoFNhsM2B3Z//Zfette poT/SQQ5ubDebDtvt2grksRawSZMMRs0mAXOXibwAT3235xpvVuyKoAbwNhl9MkAD5uN tIDH/rXmBrOw39LkUqDBRuMt7J4uncBOdiNEp1vmxkUQEGiDVNBfBrJntXcTVU0iPCih nmzkKFkETNVJ9ObZhFkiAvGCNF6UuhYHRMJgzOA8u+41D8Pct3rGiQxeeRk6NmYAg7TT YnEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xW+LbBKx; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7si23643928otp.284.2019.12.31.00.14.28; Tue, 31 Dec 2019 00:14:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@linaro.org header.s=google header.b=xW+LbBKx; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725536AbfLaIO1 (ORCPT + 99 others); Tue, 31 Dec 2019 03:14:27 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54048 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfLaIO1 (ORCPT ); Tue, 31 Dec 2019 03:14:27 -0500 Received: by mail-wm1-f65.google.com with SMTP id m24so1330532wmc.3 for ; Tue, 31 Dec 2019 00:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g0Pdjud1VU0ZUxaakoki+l3FmURlkZsw8p9lGLeQCSM=; b=xW+LbBKxSfggvu3XNYEd7trF1IxVexJk5QFxRLRHLXT7WvkLh2yDDQ1RdDj0E1qDOG z9HcZ2zXIQuFYmiiTUeymrsPCmy3/vdrSr5ar3WK3Ru4IEMZUXYZIWjQ4z8CEyb+bdWR KC/ZCG4F7mZAcEtDA1jDkIDxsm0BEHWGhX7TlwozN8qXoD4z7aVjHxWSrZtquXbVBsHk 8f3+eAjKTC+Jk3PqgJcfVA2tQ5p2C9SC8hb6DgpnuYnYOeoQ5enmoCqfrbkdx14hUrgh WPngXQqm+1YaFGDGj2LZjissxSJCL3MYAaowfoh85kYV9YaTGjq7nzIu64pSmZOr59o4 /6Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g0Pdjud1VU0ZUxaakoki+l3FmURlkZsw8p9lGLeQCSM=; b=N7HCdJXPW6LwQ8lGQvCCrn0cRiJXoSApdJSBFh64EblfdCkvagQYq1/b69v9EtcQIK BWflfkz55F5hzorM2GEHJQId7QEjnzM7PyXTwbYj35kZdk/I3h0or5nGKfk4RCr64IRE DoKnPhi7UgAzPgrxoNzBpsC5bwXNhoFXz8YvV+E7gv2xbDZcd1hY2WSLS1ukS1OOl2iA AuIjRD3s8KKTNQbPj5O2bThdhlZidNlZXPpsSK9CkaWDdpWJyE2RiDIT9bxIdcyXJNdi p0mcvSAndWLiWDQhRi40aGcZhkSsbhGLR7de86rGqyidkDJROj523P+5Vb/lw0t2Gg7j 1L/g== X-Gm-Message-State: APjAAAWEGff7GxrzJq8iiRdECU/JvqkiK6eGRBzxOVD/bQnmkONyv+a0 WeNKiTGLL6js965K/78UNUMTDkq56l8swHr8NYtYiA== X-Received: by 2002:a1c:a795:: with SMTP id q143mr2928370wme.52.1577780065223; Tue, 31 Dec 2019 00:14:25 -0800 (PST) MIME-Version: 1.0 References: <20191231031938.241705-1-ebiggers@kernel.org> In-Reply-To: <20191231031938.241705-1-ebiggers@kernel.org> From: Ard Biesheuvel Date: Tue, 31 Dec 2019 09:14:14 +0100 Message-ID: Subject: Re: [PATCH 0/8] crypto: remove the CRYPTO_TFM_RES_* flags To: Eric Biggers Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, 31 Dec 2019 at 04:21, Eric Biggers wrote: > > The CRYPTO_TFM_RES_* flags are pointless since they are never checked > anywhere. And it's not really possible for anyone to start using them > without a lot of work, since many drivers aren't setting them or are > setting them when they shouldn't. > > Also, if we ever actually need to start distinguishing ->setkey() errors > better (which is somewhat unlikely, as it's been a long time with no one > caring), we'd probably be much better off just using different return > values, like -EINVAL if the key is invalid for the algorithm vs. > -EKEYREJECTED if the key was rejected by a policy like "no weak keys". > That would be much simpler, less error-prone, and easier to test. > > So let's just remove these flags for now. This gets rid of a lot of > pointless boilerplate code. > > Patches 6 and 8 are a bit large since they touch so many drivers, though > the changes are straightforward and it would seem overkill to do this as > a series of 70 separate patches. But let me know if it's needed. > > Eric Biggers (8): > crypto: chelsio - fix writing tfm flags to wrong place > crypto: artpec6 - return correct error code for failed setkey() > crypto: atmel-sha - fix error handling when setting hmac key > crypto: remove unused tfm result flags > crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN > crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN > crypto: remove CRYPTO_TFM_RES_WEAK_KEY > crypto: remove propagation of CRYPTO_TFM_RES_* flags > ... > 108 files changed, 218 insertions(+), 917 deletions(-) > For the series: Acked-by: Ard Biesheuvel