Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp645587rdh; Wed, 7 Feb 2024 16:05:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWPVWREQ9WvOHmTsg8CddrfSBE2Y5KVXzjSLjMSpE9vaLSKgao/b/CGyPBDghKaSrvGT5TXQhruB0ZfT7M/REt/xcPEpdvugMDIbxa9wA== X-Google-Smtp-Source: AGHT+IHgli9WH4zHnWhBA5ZQbpHfIshE8CrCILl9LGuOG9Ct79FKyGuz7A/7Y5VNxh0EPnLdYEDJ X-Received: by 2002:a25:8185:0:b0:dc6:ff12:13d7 with SMTP id p5-20020a258185000000b00dc6ff1213d7mr5400471ybk.60.1707350732837; Wed, 07 Feb 2024 16:05:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707350732; cv=pass; d=google.com; s=arc-20160816; b=V+v9IrpG4e8+h30eR1wo2YCqTlFLF5IP+Xk1UiFytBytFzabgBDBPDPBpx1pQ89+Hj znMvo/zWIqkudX8k9dSkfMdP+X8x814tmaH6FZY+AY5xZKRameCvCp98nz5j5FuyR+vL SRjMMGJKRuRPXGJcC8QNzUe682nMB2ypDxSafHEQR3qa1j+4DCAg4HE1IZ9Ukz8iAsrP Y+nX9ON7UnzhnX+N2UgktGASHBJutDkBi7yEj52SqG1uOQ+LfKKzD+NBrFX5H0omAOk1 +5QWd64zWs6mv6bdjcAlrkFp6bi5pBBq9lCZ1GT99niTCzTVa9YI2PLVxtcfzcV/hDZH B5CQ== 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=wmZos+RN7iziAxQMqTldFtRTLq7++ozxUGou0PBWuKA=; fh=b+LiV68kkqJ4nkwFO7kJNVqlNcVCbYWii8CNktGr3UI=; b=jQw+nIpYZxW0VP0DoiTytN9Fy6wpbSucPDRPY1zZN1TMYEj5Jy3o7RadxDpBjLwci/ Z0W97FozgsF3kJj4DTO724NFIVikvcyCg+21wqroQt4XjoNY4KfJ/bhBgLi7innwUhz0 AzZ6dvN2gR1YiGELDTrIhoCx84r58e8Q+FCS+WcW1MC+W5Rfm5BJU19/c/4g8xxLKza+ vuEKoPOC/XFgj1v9l1TI/HR6DoPNbhQQFQ2mL0KE5YIyXQdRYJGM6DVetca7709/OcPB Sx+yAvQ8YBlLoLFcssRuzAUjQLKtePU/Tza+AhX+xJey2dCopA1W0rGXmc4dRPnOwI8V L2Cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-57313-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCUlsRG77Q1X5gjWxS799rF4uRK5eBZ/KNQbt2mNV8Dr13cRSCMyUAFFCnAAXELc5FktWoqF7FRUv17B38UiZNp7WLulu88dUySypw8Xwg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dw13-20020a0562140a0d00b0067f7b1f8f34si2104698qvb.242.2024.02.07.16.05.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 16:05:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57313-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-57313-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 914471C22547 for ; Thu, 8 Feb 2024 00:05:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8959EAF1; Thu, 8 Feb 2024 00:04:50 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 182A51E87F for ; Thu, 8 Feb 2024 00:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707350690; cv=none; b=HR+g8YvPXakH7tjXSPrQQWw8+or1scw+Cf7e3BGiBkkq+Vy3yWOL7TsKeGwPrOhd3QKcesQzO6Zfu5c3iiOerr/vdFG8sgY3lP9qOQH+T7fvqkEqpID1EsgCY1Ht4UmXCWf3yWhvrIOau5ZtuPWjk6wcMkpB8QvqZ9CrmGFichY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707350690; c=relaxed/simple; bh=p5zVpNRV/Kw4RpQSuCTfGevl+nGajRGf+VhjwPTrxzo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Lgkc6sXF9L8WfUICr86HQuoVs4yWuDTUlolVq6KgOPIsiMMtvoDZezW600huzeHJBUcnUv0ROctPuAGxgLQPskKrC80gPKdEubyO9rsbrS/h5ltJwRik45DeE+uPBpdGTqQiJeZ5g8Z7Vw94qi1U+biQlikIYwpt4bpY1Fjk3+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 889451FB; Wed, 7 Feb 2024 16:05:29 -0800 (PST) Received: from [10.57.49.110] (unknown [10.57.49.110]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 372A83F64C; Wed, 7 Feb 2024 16:04:46 -0800 (PST) Message-ID: <37ab8689-5e0d-4166-bad6-84d3c51446ca@arm.com> Date: Thu, 8 Feb 2024 00:04:44 +0000 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 1/1] iommu: Avoid races around default domain allocations Content-Language: en-GB To: Jason Gunthorpe , Nikhil V Cc: Will Deacon , Joerg Roedel , Charan Teja Kalla , iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <139a9abe-75d8-3bda-3ec9-a14a493eb2a9@quicinc.com> <20240201162317.GI50608@ziepe.ca> <9ba9c4fa-3fa9-c6c4-ce77-0c6cd5e23680@quicinc.com> <20240207145656.GJ31743@ziepe.ca> From: Robin Murphy In-Reply-To: <20240207145656.GJ31743@ziepe.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-02-07 2:56 pm, Jason Gunthorpe wrote: > On Wed, Feb 07, 2024 at 07:56:25PM +0530, Nikhil V wrote: >> >> >> On 2/1/2024 9:53 PM, Jason Gunthorpe wrote: >>> On Mon, Jan 29, 2024 at 01:29:12PM +0530, Nikhil V wrote: >>> >>>> Gentle ping to have your valuable feedback. This fix is helping us >>>> downstream without which we see a bunch of kernel crashes. >>> >>> What are you expecting here? This was fixed in Linus's tree some time >>> ago now >>> >>> Are you asking for the stable team to put something weird in 6.1? I >>> don't think they generally do that? >>> >>> Jason >> >> >> Hi @Jason, >> >> Considering that the issue is reported on 6.1, which is an __LTS kernel__, >> any suggestion to fix this issue cleanly would help us a lot. Right thing >> here would have been propagating the changes from 6.6 (like for any >> stability issue), but considering the intrusiveness of them, is it even >> possible? >> >> Just to be open about reproducibility of the issue, a bunch of them are >> reported, both internally and by customers. > > I think you need to talk to the stable maintainers not the iommu > upstream folks. I don't well know their policy. > > Frankly, I'd suggest just proposing the necessary (and tested) > upstream patches to 6.1, however large they are, and see what Greg and > Sasha say. This is the usual working model they have, as I understand > it. To be blunt, hell no. Stable is far enough from its namesake already; the ongoing bordering-on-ridiculous brokenness of your mainline changes where each "fix" keeps affecting something else is a massive NAK to backporting any of it, let alone 43+ patches to achieve a 2-line fix. Nikhil, if this is truly sufficient to resolve the issues you see (AFAICS things end up serialised by the group mutex so probably should be robust enough), then I'm OK with you proposing it as a dedicated stable-only fix, as an "equivalent" patch per Option 3 of stable-kernel-rules.rst - I reckon your commit message is already pretty good with regards to the final point there, but I'll be happy to help argue the case if necessary. Just one point - is it genuinely not relevant to 5.15 and earlier or is it just the case that 6.1 is the oldest thing you're actively testing? (Apologies, I've already forgotten where things were that far back). That said, I also don't think there would be any harm in applying this to mainline as a belt-and-braces thing either, if it helps makes a backport easier and Joerg doesn't mind. There's already a bunch of stuff I'll be cleaning up once the underlying issue behind all of this is properly fixed, so adding a couple more lines of code to that list is no big deal as far as I'm concerned. Thanks, Robin.