Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5431543ybc; Wed, 27 Nov 2019 04:02:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxX3AirI3xJUmvr7NiQzb2zXixgsb/CUCDRyIgqkDW4HUJBS5Q5cEk0bs4o0/Yx+8eOX3nS X-Received: by 2002:a05:6402:13cd:: with SMTP id a13mr31403139edx.57.1574856153381; Wed, 27 Nov 2019 04:02:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574856153; cv=none; d=google.com; s=arc-20160816; b=g81i3QZ/ABvm9rJVhBdnaqpSGd/f5z2DIZO5t0+w2q9LMshONhrMeLWo3z9W9CB/Lr hat+51Swfe1HIRzG9GJlIJSgzqbqoTYMZM4Bk3HdVSSOgjkH+OiKc36jU4rqftqvDwQm U3UTUtSj71zdGcPDI45FkzyDHbR0vVTj0BPVlpeeJZ5MO8ciDXYXKQCpoQXR+ufNMKan BFCoDWolwZoUI01lsnyPS2VXVhJgoZbB/yXjLrufzwmlJTtN31vntcFYocqov8jYeDhp VAiqaww25jKT0BqcFLoAWrY1ShMjUIPTNKMl6lTJfJROomILWHKZ+vIqM/oqBPXUF+M9 xGsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Hj7ljmPAZ4eOBJRBTl8dJFoieX071n/r7KLOprrO+Vw=; b=gWEgpiUy774aRhQrjCrQJrwHomOoHHVTqEOVM+YqfpzR53WuCn29RLKmcqGYzCOsF0 ipg74uR65EPB6zpZ/Olm4uapu8eflPF3jjQcbpVp4L/jtAYw3roYayGV1mGMrd4qKmgY uCz7y+ud7ZC5TVsZZsv1in2LNNygGsdSSkEXnrHWuVvDU9xvJIr2DDLsg7hwFvv0P8nM hT6pG6HV9+1qlJWc6uxacZk7LlOUVVEqbFORR3MS7UI2uOiUKSxVUrXTE76gxNUKx8T1 o6yLB6hgd950VOpdr8iNUUn2xkNkWBlniV92dPbSxid9VCcH87Z3bhYpJv1Whd7X3Sfa 1qXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=adGbilzh; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si9059371ejk.173.2019.11.27.04.01.59; Wed, 27 Nov 2019 04:02:33 -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=@kernel.org header.s=default header.b=adGbilzh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbfK0MBo (ORCPT + 99 others); Wed, 27 Nov 2019 07:01:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:41914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726320AbfK0MBo (ORCPT ); Wed, 27 Nov 2019 07:01:44 -0500 Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr [92.154.90.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5097E206F0; Wed, 27 Nov 2019 12:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574856104; bh=TziSEip9ZikWXUb6vddqqT1XCVIbwlGlZtN3ZQciJFQ=; h=From:To:Cc:Subject:Date:From; b=adGbilzhpKiK4sfwGDqft1IqGvpY+Lm1ThaHm1tI2LsI032dTR38upyYl2yCA70sd QWa1dTxHjkjM690IY2v1OnA1QSFdTFwFzp2FN805hDT8hsRm7Jnlsud26abhcwy6Xq Z0nYd25ROG8G7/YdUiZcmRunCSuLnolKOheXl4Hc= From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, Ard Biesheuvel , Gary R Hook Subject: [PATCH] crypto: ccp: set max RSA modulus size for v3 platform devices as well Date: Wed, 27 Nov 2019 13:01:36 +0100 Message-Id: <20191127120136.105325-1-ardb@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 --- drivers/crypto/ccp/ccp-dev-v3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 0186b3df4c87..0d5576f6ad21 100644 --- 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 = { -- 2.20.1