From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8780BC43334 for ; Wed, 22 Jun 2022 13:42:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EF9C54181D; Wed, 22 Jun 2022 13:42:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EF9C54181D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LYW8OR7zRvPS; Wed, 22 Jun 2022 13:42:16 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 95308417DE; Wed, 22 Jun 2022 13:42:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 95308417DE Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 71AB6C0032; Wed, 22 Jun 2022 13:42:15 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2E138C002D for ; Wed, 22 Jun 2022 13:42:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 02D2360AF8 for ; Wed, 22 Jun 2022 13:42:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 02D2360AF8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b49C_m0JYmb1 for ; Wed, 22 Jun 2022 13:42:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 570DD607F7 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by smtp3.osuosl.org (Postfix) with ESMTPS id 570DD607F7 for ; Wed, 22 Jun 2022 13:42:13 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 314092D0; Wed, 22 Jun 2022 15:42:10 +0200 (CEST) Date: Wed, 22 Jun 2022 15:42:08 +0200 From: Joerg Roedel To: Robin Murphy Subject: Re: [PATCH] iommu/dma: Fix race condition during iova_domain initialization Message-ID: References: <20220530120748.31733-1-yf.wang@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: wsd_upstream@mediatek.com, open list , "open list:IOMMU DRIVERS" , Libo Kang , yf.wang@mediatek.com, Miles Chen , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Will Deacon , Ning Li X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Jun 22, 2022 at 02:27:57PM +0100, Robin Murphy wrote: > Apologies, I did spot this before, I've just been tied up with other things > and dropping everything non-critical on the floor, so didn't get round to > replying before it slipped my mind again. > > In summary, I hate it, but mostly because the whole situation of calling > iommu_probe_device off the back of driver probe is fundamentally broken. I'm > still a few steps away from fixing that properly, at which point I can just > as well rip all these little bodges out again. If it really does need > mitigating in the meantime (i.e. this is real-world async probe, not just > some contrived testcase), then I can't easily think of any cleaner hack, so, > > Acked-by: Robin Murphy Alright, applied this now. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 982BDC433EF for ; Wed, 22 Jun 2022 13:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=67yISJeGbMBfRouD+iI161Nl4+FkiAWRitrUJKea00s=; b=lFlcJhfGwcAbmSjmFPAGONPXDr tUTVH1soX8U+4sPCwfk6cQKaumjaiZZj5P289ZxaKIHcnM+CG2a2ndTk+cw4bDySAHcGytK+2oDKW gGd7xQQZkgnmqLfBD2gcGd4dU2OTzhGvQ9wRKHmWNYJKNF7NlTT5o5PjNpMNlzAmmf1a3Oj/dQbaS 12+2DpM/7Sy4Y/+5QzzFu+q+UzK0GG7KmWdFYgexTjugR1CKUB/38F4rQspiiGK6iA0SPDNmBWETt 45YoK2DBbX9tgAGrYwZeRh+NV2L8h7jIAiMRmBtHISzu0scN8zdTykzY2YNJIAQOCv5fXUG4qOow/ lx8B0OAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o40dd-00AfEM-DB; Wed, 22 Jun 2022 13:43:21 +0000 Received: from 8bytes.org ([2a01:238:4383:600:38bc:a715:4b6d:a889] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o40cY-00Aeil-7m; Wed, 22 Jun 2022 13:42:15 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id 314092D0; Wed, 22 Jun 2022 15:42:10 +0200 (CEST) Date: Wed, 22 Jun 2022 15:42:08 +0200 From: Joerg Roedel To: Robin Murphy Cc: yf.wang@mediatek.com, Miles Chen , wsd_upstream@mediatek.com, open list , Libo Kang , "open list:IOMMU DRIVERS" , "moderated list:ARM/Mediatek SoC support" , Ning Li , Matthias Brugger , Will Deacon , "moderated list:ARM/Mediatek SoC support" Subject: Re: [PATCH] iommu/dma: Fix race condition during iova_domain initialization Message-ID: References: <20220530120748.31733-1-yf.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_064214_485254_2EB404B8 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Wed, Jun 22, 2022 at 02:27:57PM +0100, Robin Murphy wrote: > Apologies, I did spot this before, I've just been tied up with other things > and dropping everything non-critical on the floor, so didn't get round to > replying before it slipped my mind again. > > In summary, I hate it, but mostly because the whole situation of calling > iommu_probe_device off the back of driver probe is fundamentally broken. I'm > still a few steps away from fixing that properly, at which point I can just > as well rip all these little bodges out again. If it really does need > mitigating in the meantime (i.e. this is real-world async probe, not just > some contrived testcase), then I can't easily think of any cleaner hack, so, > > Acked-by: Robin Murphy Alright, applied this now. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1415BC43334 for ; Wed, 22 Jun 2022 13:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=basnV9Wa8VUYYLOeSBDd1XEofR6NFv/PudaSWm9q/aw=; b=Lnv7gGG+8kbEvB 2gfRySQVeITcvYSnMvleNxNRrZPYGHBBliPc6B/1LBbt4Pw7zoQSD+zQ5N/9R3ga/vg/aaYq7quXf w+4xsBT0/XNmPIV+Aac51a/nqOU8asejkH4dbGvXAyxs6a/xwVNYu8tu+HR+cBnw+U4q3q/3r2WYu dn3e6Gglo82KpMqZlKVYvtBDgZitb46UTrAbwDXmKGvbH6qS7FpHjqkJlSzqZqVh1f+KSJMrsfe2b gopGrs/npi7Vkj1x0xCFgmovvzYAYK0f9FlFlNcZF1r5haO89mtsStN46jzLxCYisGiIHBt56vHUp eSIi9O7J7ejQFhdfeiGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o40d0-00AeuW-8E; Wed, 22 Jun 2022 13:42:42 +0000 Received: from 8bytes.org ([2a01:238:4383:600:38bc:a715:4b6d:a889] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o40cY-00Aeil-7m; Wed, 22 Jun 2022 13:42:15 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id 314092D0; Wed, 22 Jun 2022 15:42:10 +0200 (CEST) Date: Wed, 22 Jun 2022 15:42:08 +0200 From: Joerg Roedel To: Robin Murphy Cc: yf.wang@mediatek.com, Miles Chen , wsd_upstream@mediatek.com, open list , Libo Kang , "open list:IOMMU DRIVERS" , "moderated list:ARM/Mediatek SoC support" , Ning Li , Matthias Brugger , Will Deacon , "moderated list:ARM/Mediatek SoC support" Subject: Re: [PATCH] iommu/dma: Fix race condition during iova_domain initialization Message-ID: References: <20220530120748.31733-1-yf.wang@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220622_064214_485254_2EB404B8 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 22, 2022 at 02:27:57PM +0100, Robin Murphy wrote: > Apologies, I did spot this before, I've just been tied up with other things > and dropping everything non-critical on the floor, so didn't get round to > replying before it slipped my mind again. > > In summary, I hate it, but mostly because the whole situation of calling > iommu_probe_device off the back of driver probe is fundamentally broken. I'm > still a few steps away from fixing that properly, at which point I can just > as well rip all these little bodges out again. If it really does need > mitigating in the meantime (i.e. this is real-world async probe, not just > some contrived testcase), then I can't easily think of any cleaner hack, so, > > Acked-by: Robin Murphy Alright, applied this now. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel