Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp379825iob; Wed, 18 May 2022 04:21:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz76Qu5Osl3Bk6IVs7/Uc9lE8n+ezLeSHW6gjHtxxnTpAoQr/2UNiSZaGOFtaRPhqt2z3sY X-Received: by 2002:a17:90a:1d1:b0:1dd:220a:c433 with SMTP id 17-20020a17090a01d100b001dd220ac433mr30818347pjd.196.1652872875650; Wed, 18 May 2022 04:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652872875; cv=none; d=google.com; s=arc-20160816; b=UNBFU77y++9IHtAKy/LZyofHH3R5oPM6jTpRPBoCDZvznxGasFxcHGFeZ9WoFfSQ3g zheNx8RtsuNjOJsyErnb4COdaR5YSThzGdwhVNTThzSQvgJSJ5sZTXHfLcXxpwrfpwav YEuURD36lBQZM7Hjqeqohf0pE+WeysvLuma3qhP46SFDjhUNUO5QJfvTKJRBPU4hcudp 5q3Cs2KDRUX78rZJPzJ5Ry/HIU3dKGEOuVNAsWTeWui5fyqxqZPBy4OrAug4XZgkVjqX ElPAzw2/WALruFVa1NcOcNn4O5iwUpXEiUPiqnuE55mBPrW/lhO5i1aBSyPWTStVIKgU 7CsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NMUk7scsu6NZ9A1gFglIKuqfx7tEaQ6FQyLAtW1QS68=; b=OxTJ+Yb+hjg6R70CvuBQfn0yYEMEdwkdulo8qS+LP4MdQbkxvuYukCW0l9i63Olbu5 lN5q3zh/V7fvIabWrUnWwC2JAmvmqISAIJrwjW6xHniCK6OHSlCH+ouMuEL+3rsSRbZo S2cK+hoOULbuE9LV/aQxQgIHX/9kd6KFhVtKju9jOcy2FBkqtB/khK/tpEjPiVnXekPI FKYFK08XSKKmsAkz5YO4NsP9PPCGKXeh5rK/Ve0i4NgtQ7LYE87rn0qNsr08mpCtfDQ6 edlIfuxYZ68p5pfpYATleCNbJz/r2JXhDRB4VaT89wnf/nBZQMXI6xEu0m+cuu80Blwn 3zWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rtE8Wqlx; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s23-20020a056a00179700b0050ddce187edsi3055197pfg.331.2022.05.18.04.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 04:21:15 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rtE8Wqlx; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF31617490D; Wed, 18 May 2022 04:20:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235528AbiERLT6 (ORCPT + 99 others); Wed, 18 May 2022 07:19:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235544AbiERLT5 (ORCPT ); Wed, 18 May 2022 07:19:57 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C0EE1737FE; Wed, 18 May 2022 04:19:52 -0700 (PDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24IBDsJg019124; Wed, 18 May 2022 11:19:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=NMUk7scsu6NZ9A1gFglIKuqfx7tEaQ6FQyLAtW1QS68=; b=rtE8Wqlxjoe8QfOFmSd2+jRg3IUTqV3FBLPi7MVk9L7p90i6gipSPe9NcI2xPjg6BpKF g1qqE+RriQPYLON6LaGWrVMe1ANb9pAbUeoJlAjU6h1H3QXNlts93RjPDYOngIMbBvKM 7gBGqQ9QmDq1k43jGPIKqLv5aYPSe30rrR7vxFi0P3bILBp1G3p5P27/v3T9XZjMMKof GLClDFCsNLXPHYhJmxQ5Sn7K+KL1mbrjmA/yoU8enaNgfTwHzkNgLRuyghgenHoOYCCq Zcx54Cj4Mu78UVaINU6YoTUwBjQuoEt1Ucd+U6hPcOnbGzZNomqX7rrWVW+STONjdbO8 xQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g4yr4g41v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 May 2022 11:19:47 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24IBFUAt022640; Wed, 18 May 2022 11:19:47 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3g4yr4g41c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 May 2022 11:19:47 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24IB8OMI029648; Wed, 18 May 2022 11:19:44 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3g23pjdm57-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 May 2022 11:19:44 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24IBJfqI44892572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 18 May 2022 11:19:41 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79BA54C046; Wed, 18 May 2022 11:19:41 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C3764C040; Wed, 18 May 2022 11:19:41 +0000 (GMT) Received: from osiris (unknown [9.145.54.247]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 18 May 2022 11:19:40 +0000 (GMT) Date: Wed, 18 May 2022 13:19:39 +0200 From: Heiko Carstens To: Jann Horn , Harald Freudenberger Cc: Vasily Gorbik , Alexander Gordeev , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390/crypto: fix scatterwalk_unmap() callers in AES-GCM Message-ID: References: <20220517143047.3054498-1-jannh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220517143047.3054498-1-jannh@google.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pdTgmxH6gZ8qS8AQOKYU6qdavpgfHgm3 X-Proofpoint-ORIG-GUID: 7x1tqo9l-E_uOcaMWYkxGA9jVmv9O3fb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-18_04,2022-05-17_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=767 bulkscore=0 adultscore=0 clxscore=1015 priorityscore=1501 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205180059 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-crypto@vger.kernel.org On Tue, May 17, 2022 at 04:30:47PM +0200, Jann Horn wrote: > The argument of scatterwalk_unmap() is supposed to be the void* that was > returned by the previous scatterwalk_map() call. > The s390 AES-GCM implementation was instead passing the pointer to the > struct scatter_walk. > > This doesn't actually break anything because scatterwalk_unmap() only uses > its argument under CONFIG_HIGHMEM and ARCH_HAS_FLUSH_ON_KUNMAP. > > Note that I have not tested this patch in any way, not even compile-tested > it. > > Fixes: bf7fa038707c ("s390/crypto: add s390 platform specific aes gcm support.") > Signed-off-by: Jann Horn > --- > IDK which tree this has to go through - s390 or crypto? > maybe s390 is better, since they can actually test it? Applied to s390 tree. Thanks!