Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2532554rdh; Wed, 27 Sep 2023 05:43:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEU9bbY0NS63qP/17lMBpxtxV/+dtB8C2Z7uIgv9Xt7Fuvw2GVYVoPWmwMmsTeqMzuTtl2i X-Received: by 2002:a25:ae10:0:b0:d49:6718:433c with SMTP id a16-20020a25ae10000000b00d496718433cmr1437693ybj.6.1695818595475; Wed, 27 Sep 2023 05:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695818595; cv=none; d=google.com; s=arc-20160816; b=ikzDi048GNatFIwsMIK9RLyVjQKuuwRkVDfRd07XvoRUDDuWMLli4m4M/17j/P9A8p C8dtHh9UqGtsolDputYVG00jWNo2qeS95IG/ugfcxkFjQPLT7cd+O6oGz7PMXtKTOygG Z2q7wGeyNYyv3mh016MfYE97E6JLWdE7US84U0hia0p+5laIhrwYk81VnmpB6aizlsSv srHKSJnGxFq75okXXstupd2o3cv+WlGcvRs0DlzUR17Tg66vwE34vuSA80+goAVnZflQ QJcrTC2CqTOuZP5mxCgNhL1FzAqNCq6qyHPc7yDyGyPztNSzl+R8KqDaCvm3Nq3uU1wh eazQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=IkLbV0Pz2XDtSKSWv403UvnCHBWnP/TinHDuZPlM1nc=; fh=lBhfc3wqKN10hr6R6bVuQ6ni/cf//8TNJ/UMe6EkRFw=; b=jlmJr+0mJ2e9LH6T2/Ga1KFDziTumjxad4BtoUHc/Anpn9QfFaExZHkm94kD5pMV8U kmOfAT1U/vK2sB27XCfSWzh26rrHu4Yj8OCR1WUaqw3PRS7gNwvSJlsRU0OQQfMxMOag X96R8RJc1BoQlOl6l3fBJeZx4dFP5NaM8vWDs1n1xITaxXm8reqv4Wl8XJomg76LxB85 LdtrLrcieLGSMDGYoZ7XKTXR9BS2ODOCkQHUCFoNIn5YnTNtZLq8gZ4YwnQIeMKDxrKr /bY3udia88BAxMIWofgBm0LSVnCUau59H49UUWK2jkX6wVc5FNYwX61st3V9jpnMRIyw fLFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=kqzFObf3; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d19-20020a637353000000b00577f80ddb2esi15435543pgn.705.2023.09.27.05.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 05:43:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=kqzFObf3; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D3812832A013; Wed, 27 Sep 2023 02:38:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbjI0JiK (ORCPT + 99 others); Wed, 27 Sep 2023 05:38:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231381AbjI0Jhx (ORCPT ); Wed, 27 Sep 2023 05:37:53 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA9D12128; Wed, 27 Sep 2023 02:36:49 -0700 (PDT) Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38R9Fk2R025606; Wed, 27 Sep 2023 09:36:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=IkLbV0Pz2XDtSKSWv403UvnCHBWnP/TinHDuZPlM1nc=; b=kqzFObf3PYvd7EbZ68J+hL53rN1X/G05fSlJA6u/oMAXPlGJ2N2VNpvx7SZe3DJ293V7 Q6Vh3LAHYheGe/DCuEHUjK0Xa2XDLbl7dzL4tyswEyPkOQcVOnvvdZ8Q2pVkuSuHy0xB e14X6J28dDyRvNpt3qzES4v3O+oCWx6e3NFl1WTJ/tkDUCTmki5AzccRtC5jPw+mwLd0 /Wz5t+Yg7ZG6TAn8aQ9c00EVp54fNZ1U1G96c0kKS+rV3gqJnTGcgZNFre7czILDw38U DinznDrqHOGUMXoEZ9edZfpR3sRkA8DeDbY/NADoNpyockwAvv5SR9c6FOIfYnyQxJzb Nw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tch9f10d1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Sep 2023 09:36:21 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38R9UDak010309; Wed, 27 Sep 2023 09:36:20 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tch9f10ad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Sep 2023 09:36:20 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38R81446008167; Wed, 27 Sep 2023 09:36:18 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3taaqyjnk4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Sep 2023 09:36:18 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38R9aF4842271434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Sep 2023 09:36:15 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B3EB2004E; Wed, 27 Sep 2023 09:36:15 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74D5720040; Wed, 27 Sep 2023 09:36:14 +0000 (GMT) Received: from li-ce58cfcc-320b-11b2-a85c-85e19b5285e0 (unknown [9.171.79.41]) by smtpav07.fra02v.mail.ibm.com (Postfix) with SMTP; Wed, 27 Sep 2023 09:36:14 +0000 (GMT) Date: Wed, 27 Sep 2023 11:36:12 +0200 From: Halil Pasic To: "Michael S. Tsirkin" Cc: "Gonglei (Arei)" , Herbert Xu , "linux-crypto@vger.kernel.org" , Marc Hartmayer , Jason Wang , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "pizhenwei@bytedance.com" , Cornelia Huck , Halil Pasic Subject: Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled Message-ID: <20230927113612.3c46c20c.pasic@linux.ibm.com> In-Reply-To: <20230926130521-mutt-send-email-mst@kernel.org> References: <1914739e2de14ed396e5674aa2d4766c@huawei.com> <20230926184158.4ca2c0c3.pasic@linux.ibm.com> <20230926130521-mutt-send-email-mst@kernel.org> Organization: IBM X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 2akQb3dZW89laYdAKzdNwTw2BmGVBdBJ X-Proofpoint-ORIG-GUID: 62mVAe7pSjKh81-Kj_g5UDMo7ZlKhuL0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-27_04,2023-09-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 mlxscore=0 bulkscore=0 clxscore=1015 mlxlogscore=410 adultscore=0 spamscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309270078 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 27 Sep 2023 02:38:16 -0700 (PDT) On Tue, 26 Sep 2023 13:13:51 -0400 "Michael S. Tsirkin" wrote: > > On the other hand virtio_airq_handler() calls vring_interrupt() with > > interrupts enabled. (While vring_interrupt() is called in a (read) > > critical section in virtio_airq_handler() we use read_lock() and > > not read_lock_irqsave() to grab the lock. Whether that is correct in > > it self (i.e. disregarding the crypto problem) or not I'm not sure right > > now. Will think some more about it tomorrow.) If the way to go forward > > is disabling interrupts in virtio-ccw before vring_interrupt() is > > called, I would be glad to spin a patch for that. > > > > Copying Conny, as she may have an opinion on this (if I'm not wrong she > > authored that code). > > > > Regards, > > Halil > > On a related note, config change callback is also handled incorrectly > in this driver, it takes a mutex from interrupt context. Thanks Michael! I intend to give Connie a little more time to chime in. Assumed no controversies emerge I intend to cook up two patches for the two issues later during the day. Regards, Halil