Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5581093img; Wed, 27 Mar 2019 11:05:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkUI1qdpmB4n8IXtVy532sgBMoge6gCg0FZwtGaMpZGLDfOaLZtdPp87YMe+smfRFzaTt6 X-Received: by 2002:a63:1ce:: with SMTP id 197mr35580484pgb.47.1553709953639; Wed, 27 Mar 2019 11:05:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553709953; cv=none; d=google.com; s=arc-20160816; b=n9vwqNPH103jnyDdNwI9GhbMOPAs6x19vsz1wLcHqli09MsUifDqb+MXvLTnAmcDbp J9Zdlm+A3cDa9PW5gv0SAuLY0dNZXjQVVOs1Id9+MuiXoaqP2yJiS4vXnLt507IRN/SK ZEiN1emT//OYsRgMy74fp65SZar3ju7c4wobU0H6SLb2TGxvn66p+504UuEcXFF8Mr9G Z54VvAWtbwVnCNabmMHAFsWtAYuEaKbwyxY2DCbVelDDC8J2ePjz9j53YV5GQ43gSKxD r0DqPvVp+I1v4cAHt51C0F1IClXnb0W8zcW69RzM1TQvfFXt32uyHtaWaHW18ZKETexP p3nw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PPgEk8BcKsS8Lb/q5eZfazSpSXVKgdjcGShaQwXY49U=; b=cdidpquiw/Cz+2BbANRJEIGklMG1SR+mGU0I8M7yf1dUYBbdxMYY58B4JYYpwWRe+l 4RSxmWgD+CMMYUQdvUsxCvBUEkM/UWZdI5SADyQp1ahTGLXgsaE7zZNUA01NIeOBKtBo 9EcI9jmTpZFEalbhXsZlhYjCb6nvgR0sIvc7oRxkn/XinjmANvlw7Cc+CAsO9wz4jfh1 uq2cGH1Ex+vV8BYeRXj2+1taacKS7bQGbNaOnuAkoRCjlM/j46l4UWyWBbZRHky30NjY CFU7lkEeooA6t6owPxteFQUOOEefhod1rhjNDCG2u2Q98vt22plGuZeQNoray3JcoOzX LCvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UAFLSKrC; 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=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 t23si19182227pfa.64.2019.03.27.11.05.38; Wed, 27 Mar 2019 11:05: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; dkim=pass header.i=@kernel.org header.s=default header.b=UAFLSKrC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733136AbfC0SEF (ORCPT + 99 others); Wed, 27 Mar 2019 14:04:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:44502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733068AbfC0SEB (ORCPT ); Wed, 27 Mar 2019 14:04:01 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 AC9E92063F; Wed, 27 Mar 2019 18:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709840; bh=nY+eHoxEhyDZlB54lIOyeUi9JPcqzwmLIWIwepUcsRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UAFLSKrCUh1HWMuBlcO5/OrJ+qOEqYBQ6BeWJ9bcfnTJpEYZm5bgxQE6mCaE01OGT GEHacJtXnF5YykZ6lOrab3zsoOpjAYECtvZFOiesLS7F9WtLwzXlCwcQAfylM++3z3 ztRoqx26qkTDtukFNzU655nArdU2AVGdmUmzrVto= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Eric Biggers , Mahipal Challa , Jan Glauber , Herbert Xu , Sasha Levin , linux-crypto@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 068/262] crypto: cavium/zip - fix collision with generic cra_driver_name Date: Wed, 27 Mar 2019 13:58:43 -0400 Message-Id: <20190327180158.10245-68-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Biggers [ Upstream commit 41798036430015ad45137db2d4c213cd77fd0251 ] The cavium/zip implementation of the deflate compression algorithm is incorrectly being registered under the generic driver name, which prevents the generic implementation from being registered with the crypto API when CONFIG_CRYPTO_DEV_CAVIUM_ZIP=y. Similarly the lzs algorithm (which does not currently have a generic implementation...) is incorrectly being registered as lzs-generic. Fix the naming collision by adding a suffix "-cavium" to the cra_driver_name of the cavium/zip algorithms. Fixes: 640035a2dc55 ("crypto: zip - Add ThunderX ZIP driver core") Cc: Mahipal Challa Cc: Jan Glauber Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/cavium/zip/zip_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c index be055b9547f6..6183f9128a8a 100644 --- a/drivers/crypto/cavium/zip/zip_main.c +++ b/drivers/crypto/cavium/zip/zip_main.c @@ -351,6 +351,7 @@ static struct pci_driver zip_driver = { static struct crypto_alg zip_comp_deflate = { .cra_name = "deflate", + .cra_driver_name = "deflate-cavium", .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, .cra_ctxsize = sizeof(struct zip_kernel_ctx), .cra_priority = 300, @@ -365,6 +366,7 @@ static struct crypto_alg zip_comp_deflate = { static struct crypto_alg zip_comp_lzs = { .cra_name = "lzs", + .cra_driver_name = "lzs-cavium", .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, .cra_ctxsize = sizeof(struct zip_kernel_ctx), .cra_priority = 300, @@ -384,7 +386,7 @@ static struct scomp_alg zip_scomp_deflate = { .decompress = zip_scomp_decompress, .base = { .cra_name = "deflate", - .cra_driver_name = "deflate-scomp", + .cra_driver_name = "deflate-scomp-cavium", .cra_module = THIS_MODULE, .cra_priority = 300, } @@ -397,7 +399,7 @@ static struct scomp_alg zip_scomp_lzs = { .decompress = zip_scomp_decompress, .base = { .cra_name = "lzs", - .cra_driver_name = "lzs-scomp", + .cra_driver_name = "lzs-scomp-cavium", .cra_module = THIS_MODULE, .cra_priority = 300, } -- 2.19.1