From patchwork Mon Feb 10 12:31:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 231747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79B59C352A3 for ; Mon, 10 Feb 2020 13:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D69E20715 for ; Mon, 10 Feb 2020 13:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581340713; bh=UrvypBgypcPzAr+C9fAiejRCLfVDQOskhpqRCz/HBgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Je4XCCW29J86voVNq4ULI7su9ESSDNpaXl3aY4t8YI+ahW6qiwOAIuxW9yPHEPYph UlhHpqZbixcP2yZNLoiKXS2JweT5gS3ESp5ZRr9WZx+U+i+KB4HcUtpg0m9H8p3Sdr 5oiW8rDjWrQqc6Z/Z3+ErHpFT1tskOjnhybbXyKg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730627AbgBJNS2 (ORCPT ); Mon, 10 Feb 2020 08:18:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:59942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728938AbgBJMhx (ORCPT ); Mon, 10 Feb 2020 07:37:53 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F69A2085B; Mon, 10 Feb 2020 12:37:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338273; bh=UrvypBgypcPzAr+C9fAiejRCLfVDQOskhpqRCz/HBgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h001m6v8rzZ4PfHTa0PeM4tNQEFitr6kR3MVPokdBa5+QQ9QYj0bldlteffdNXwlU Z4988xm0FjPhTjizDzG8F+XnPJ4t2A5/fSZeBMZj4JZjEeC9aNVlxOQKfg8gE9qte0 MIRfs92FvXoPqO+wM398pvIegf9S+rOMFQt2zd68= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gary R Hook , Ard Biesheuvel , Herbert Xu Subject: [PATCH 5.4 157/309] crypto: ccp - set max RSA modulus size for v3 platform devices as well Date: Mon, 10 Feb 2020 04:31:53 -0800 Message-Id: <20200210122421.313285838@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122406.106356946@linuxfoundation.org> References: <20200210122406.106356946@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ard Biesheuvel commit 11548f5a5747813ff84bed6f2ea01100053b0d8d upstream. AMD Seattle incorporates a non-PCI version of the v3 CCP crypto accelerator, and this version was left behind when the maximum RSA modulus size was parameterized in order to support v5 hardware which supports larger moduli than v3 hardware does. Due to this oversight, RSA acceleration no longer works at all on these systems. Fix this by setting the .rsamax property to the appropriate value for v3 platform hardware. Fixes: e28c190db66830c0 ("csrypto: ccp - Expand RSA support for a v5 ccp") Cc: Gary R Hook Signed-off-by: Ard Biesheuvel Acked-by: Gary R Hook Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccp/ccp-dev-v3.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -586,6 +586,7 @@ const struct ccp_vdata ccpv3_platform = .setup = NULL, .perform = &ccp3_actions, .offset = 0, + .rsamax = CCP_RSA_MAX_WIDTH, }; const struct ccp_vdata ccpv3 = {