Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6847690rwr; Tue, 25 Apr 2023 04:55:19 -0700 (PDT) X-Google-Smtp-Source: AKy350Y6XP9+xmCyykUK9Frpk5MBE7DKkkVOggG+ibqkUDC2LDsq9Ik2BFewCvBAW1sV0xUz5b35 X-Received: by 2002:a17:902:dad1:b0:1a6:d15f:3ce1 with SMTP id q17-20020a170902dad100b001a6d15f3ce1mr21950062plx.34.1682423719009; Tue, 25 Apr 2023 04:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682423718; cv=none; d=google.com; s=arc-20160816; b=rd3JF3NOA9A5R3iX6qTFtdXjuwuE6xwdlH9HxSzmaii1CvRkOOPHNpBsLXBGKF4l6z bPAzot9XvLcvdqWKJu3s/r+jTO76JQ0gfyfN3Sy89UiQKVEdjH7B+RPTCkJ9gIc4rGJd bDLGs4n4dhDE8oheT0Sf7Zrdw83K5ypWR9t6FDsZYKK5zWHdjwNL2Q39gRl0vZD3+dem pUnqjjtOqBknw6Iyo68g6sQ6bFJHgx0MLR9ZdmvwANdBjAC/qjTxz7yl/oiToufeypbe EJyzTyhl1jf9kadfOv8KZ8lO6lHMHUjVJisVrcVCB8ce3K9xo48oJehRIxLs+E1t67zz 4v9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=PYQw1s1UJ4ZCRX8T/hOdGvjUGWcyLQTuH++SIg+EMBA=; b=n54iSXnujycrUVDqGN0egtmWjooH3JMsRGB8F3uHsgK4h9woE2keN1JOGio7PJ9Hz+ pG7CRgh+mykAdbwQGq5/21SCetkp1gt00uf5aqp5/9865mmvjuknd0ZpjWBJjxUABOoo 4yHa4+o4hYeCaqbwQv0M0GrWJEfbPU5V9L0v5KLZLnArgqhzjHSGWY05IujdjrHxoVRL JgCdY5iVW0+KKmHjuoTEDnqAe9qyDJzg0tOmYLjfrH1OLfIRpu+kP8fM6HnbDujuSquc 1Hy7SWeAyn8PPqgykJrjXBoYMngRPv7keyVEIKmq/LblsIVJbAz81ExyvOVmhg3x3PJ9 JNxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=PUSBuMmf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id co11-20020a17090afe8b00b002498218b776si15640214pjb.188.2023.04.25.04.55.04; Tue, 25 Apr 2023 04:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=PUSBuMmf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233842AbjDYLyH (ORCPT + 99 others); Tue, 25 Apr 2023 07:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbjDYLyD (ORCPT ); Tue, 25 Apr 2023 07:54:03 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA20013F9C; Tue, 25 Apr 2023 04:53:58 -0700 (PDT) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33PBeqv7031308; Tue, 25 Apr 2023 11:53:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=PYQw1s1UJ4ZCRX8T/hOdGvjUGWcyLQTuH++SIg+EMBA=; b=PUSBuMmfHRXh+xpkXntuoqa9ndYyrnPRRSx36solurRrh8yV6R25Jss8Xp14jOg8evO8 hQNqgnx0Jrl9Wlo7gAWxsCPCyDTWZKXlB0zkOIHasrA5Y4Qa091qHq+H9e0PCml5U6IQ nmdgbAYXDD/DyhM2pqBzr4wVcaLQ48noJ3FBN39a52TyqY19w7TTABwdkCeHQCgEduWh S15ylVu9DejlX/1+MsBRVI3SnL+fAoKNV7b0ArJrE8haC0DApjSjhU57DhwNf+vsWR0E +t9nvmW89sCuCRADRA7T0tlzEHsSapSySpKVXf0MK3qtVfXOgVEMEGZkquSqkYXbEJmB rA== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q6d30u5ub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Apr 2023 11:53:45 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33P8lJji016566; Tue, 25 Apr 2023 11:53:44 GMT Received: from smtprelay04.wdc07v.mail.ibm.com ([9.208.129.114]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3q477842sp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Apr 2023 11:53:44 +0000 Received: from smtpav06.wdc07v.mail.ibm.com (smtpav06.wdc07v.mail.ibm.com [10.39.53.233]) by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33PBrgGY27525864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2023 11:53:42 GMT Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8574B58054; Tue, 25 Apr 2023 11:53:42 +0000 (GMT) Received: from smtpav06.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F5DB5804E; Tue, 25 Apr 2023 11:53:41 +0000 (GMT) Received: from [9.160.16.18] (unknown [9.160.16.18]) by smtpav06.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 25 Apr 2023 11:53:41 +0000 (GMT) Message-ID: <841ea455-ef41-427c-7ce5-3c9c942abd14@linux.ibm.com> Date: Tue, 25 Apr 2023 06:53:40 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le. Content-Language: en-US To: Herbert Xu Cc: linux-crypto@vger.kernel.org, leitao@debian.org, nayna@linux.ibm.com, appro@cryptogams.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, ltcgcw@linux.vnet.ibm.com, dtsen@us.ibm.com References: <20230424184726.2091-1-dtsen@linux.ibm.com> <20230424184726.2091-3-dtsen@linux.ibm.com> From: Danny Tsen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: zlHphbR6COsD9eRHL4IDo-_c0b1YBhGx X-Proofpoint-GUID: zlHphbR6COsD9eRHL4IDo-_c0b1YBhGx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-25_04,2023-04-25_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 spamscore=0 impostorscore=0 phishscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304250103 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Got it.  Will fix it. Thanks. -Danny On 4/25/23 12:41 AM, Herbert Xu wrote: > On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote: >> +static int chacha_p10_stream_xor(struct skcipher_request *req, >> + const struct chacha_ctx *ctx, const u8 *iv) >> +{ >> + struct skcipher_walk walk; >> + u32 state[16]; >> + int err; >> + >> + err = skcipher_walk_virt(&walk, req, false); >> + if (err) >> + return err; >> + >> + chacha_init_generic(state, ctx->key, iv); >> + >> + while (walk.nbytes > 0) { >> + unsigned int nbytes = walk.nbytes; >> + >> + if (nbytes < walk.total) >> + nbytes = rounddown(nbytes, walk.stride); >> + >> + if (!static_branch_likely(&have_p10) || > You don't need the static branch in the Crypto API code since > the registration is already conditional. > > Cheers,