Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1553594rdb; Wed, 31 Jan 2024 02:03:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IESpqx4lTClWSpaprs+cDLvhRW2Z3KPF6KpVmCBrMXDsi45zG4RPXTV/RO3lyBirICHQ0Or X-Received: by 2002:a05:6402:2cc:b0:55f:9063:f639 with SMTP id b12-20020a05640202cc00b0055f9063f639mr542345edx.9.1706695416069; Wed, 31 Jan 2024 02:03:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706695416; cv=pass; d=google.com; s=arc-20160816; b=Xsx4xhkL9Pr7tMMZMm1u/pQiHfCdlc3j5jb0YEq1NwbJInmVB1JbbVRDBEXiT4g41l Do4C+XlP2WbQ/93c0auJTcjMQ0yJ61YGVGmW2LA1ZRmo1x4bpp++OCuvBLB+57tEYJK8 S1TWW/uDP7WBtElDY15NHS5BJzxyp/bXoREKWdka/q8hfJceYxtqXgymglMxlBQVmWrr 4EvkyQnJn0NUkqYCkoVi90FzmLT/SCJSZ9LXz72eVaL9FIQxFthaKxH3dzgGbuWkhkmd 2oBWhRSKHf2nv+8NzZcyRnRleFA5XR/M7uzqbjo1PL3FcDf1AmEimNPDU6wT4bkqVV+Y iUhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=BV/AffijBruDrdoczQ89DtuVFDRvYEfkaBOU+qLWbxg=; fh=R431XnVg+xURJD5y9c/oieyEtrC1dpwpxmec3T8xgeM=; b=eh/0AbSdYGFoacyR94x2PcLwmsgaPWKxvA94UHUR0lcOP1Ek7XXg4HwNwfzd58Hljl rnNJcq7Ysee/N76htHG+X0CIyshkn5zjuED6A2mUVZYnTRXAKwqyX6nTpCkZeh6/neTB Bgj3zfHIQ19saNAwv+mF3EC5pqXiDphYCJN1mJLcKrfdGYWJULC/W7N646+0Y6V8jnuR PYjs0GCbrPi6FrQzuCabqcDRZxtWXJy1CLriCkZZ45bk58pRQK5tYmSIcb0Z+WUFoHyL kHr9PNMP6YhbQxzL7mtE2A5MjOz2d7Ybx4GEIs3AdTtMuZ62dwFM3pWQCxHQmQf4yA3M Dihw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=zhaoxin.com); spf=pass (google.com: domain of linux-kernel+bounces-46174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46174-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCX3bX+eapw1dv7093wbFtZY4uwNtjpMROqgXjsyWmI+KvZg9vAg5cBtvzeYIHtO7Jx2n0UyqqqR8Mhla2ay5IYqlEZtHnBm1b5CR8wH1g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ez18-20020a056402451200b0055eb4088a0dsi4310962edb.566.2024.01.31.02.03.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:03:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=zhaoxin.com); spf=pass (google.com: domain of linux-kernel+bounces-46174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46174-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CDAFC1F2D06F for ; Wed, 31 Jan 2024 10:03:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A40946996E; Wed, 31 Jan 2024 10:02:49 +0000 (UTC) Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FD5D69965 for ; Wed, 31 Jan 2024 10:02:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.110.167.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706695369; cv=none; b=Fe11K29/B3URDTAIn8RtB9db+VtZgXqssg3gwRz7PM35Rd+SepcV8ps9dUrfY1/i54d4w9oUXLaG0aQ+x9dMYvfWz6hLftlM9oThhr7vAX4+uCtVCO5JFdZiXJqeitptLctzPaXM9oGcWsLpJYuLdyHyN1L+kZzyc1qH5fq3I4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706695369; c=relaxed/simple; bh=F5mGUoW48xzXAZjc5e38EOEQmw7xZuGlse21UFTk0ZQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=XV0yp+PzntZ46r10Ax0g9E1yKP3q/5dAJUopq71Nk9WyGr3G/olXlHmv8NSxCx1R4Qj9kA6fF9QfADMpJAt1LD41CJg/agEVyksqQA12qJuqmhQ4y5PqYBBYpgcyw1fdTZNYJr73QMksEFzH3knmuy/+gJ2KV6gK8CC6UHUQcEk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com; spf=pass smtp.mailfrom=zhaoxin.com; arc=none smtp.client-ip=203.110.167.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zhaoxin.com X-ASG-Debug-ID: 1706694341-1eb14e0c7f32630001-xx1T2L Received: from ZXSHMBX1.zhaoxin.com (ZXSHMBX1.zhaoxin.com [10.28.252.163]) by mx2.zhaoxin.com with ESMTP id 9Am2KIjGkuhD23mh (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 31 Jan 2024 17:45:41 +0800 (CST) X-Barracuda-Envelope-From: TonyWWang-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHMBX1.zhaoxin.com (10.28.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 31 Jan 2024 17:45:41 +0800 Received: from [10.32.57.248] (10.32.57.248) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 31 Jan 2024 17:45:38 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.163 Message-ID: <40e74749-fa9d-4089-ae23-e9aefdd3549f@zhaoxin.com> X-Barracuda-RBL-Trusted-Forwarder: 10.32.57.248 Date: Wed, 31 Jan 2024 17:45:37 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] crypto: padlock-sha: Matches CPU with Family with 6 explicitly Content-Language: en-US X-ASG-Orig-Subj: Re: [PATCH v2 1/3] crypto: padlock-sha: Matches CPU with Family with 6 explicitly To: Dave Hansen , , , , , , , , , , , , , , , , , , , CC: , , , References: <20240123022852.2475-1-TonyWWang-oc@zhaoxin.com> <20240123022852.2475-2-TonyWWang-oc@zhaoxin.com> <54d4fe7f-2e36-4bb3-8b51-4a68510010d5@intel.com> From: Tony W Wang-oc In-Reply-To: <54d4fe7f-2e36-4bb3-8b51-4a68510010d5@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) X-Barracuda-Connect: ZXSHMBX1.zhaoxin.com[10.28.252.163] X-Barracuda-Start-Time: 1706694341 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 1370 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.120184 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On 2024/1/24 00:33, Dave Hansen wrote: > > [这封邮件来自外部发件人 谨防风险] > > On 1/22/24 18:28, Tony W Wang-oc wrote: >> Updates the supporting qualification for packlock-sha driver, making >> it support CPUs whose vendor ID is Centaur and Famliy is 6. > This changelog isn't telling us very much. *Why* is this a good change? > >> diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c >> index 6865c7f1fc1a..2e82c5e77f7a 100644 >> --- a/drivers/crypto/padlock-sha.c >> +++ b/drivers/crypto/padlock-sha.c >> @@ -491,7 +491,7 @@ static struct shash_alg sha256_alg_nano = { >> }; >> >> static const struct x86_cpu_id padlock_sha_ids[] = { >> - X86_MATCH_FEATURE(X86_FEATURE_PHE, NULL), >> + X86_MATCH_VENDOR_FAM_FEATURE(CENTAUR, 6, X86_FEATURE_PHE, NULL), >> {} >> }; > Logically, this is saying that there are non-CENTAUR or non-family-6 > CPUs that set X86_FEATURE_PHE, but don't support X86_FEATURE_PHE. Is > that the case? Not exactly. Zhaoxin CPU supports X86_FEATURE_PHE and X86_FEATURE_PHE2. We expect the Zhaoxin CPU to use the zhaoxin_sha driver introduced in the third patch of this patch set. Without this patch Zhaoxin CPU will also match the padlock-sha driver too. > The one Intel use of X86_MATCH_VENDOR_FAM_FEATURE() also looks a bit > suspect, btw.