From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 961E649250B for ; Tue, 9 Jun 2026 15:35:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781019309; cv=none; b=dO3c8fiCz5CU2Fe7VWy1jBscqSRyW3tx3YuPqYvZ2s1Hozn7VMGeSbCSZPqBRoGmD3wJQJ8k6FYh1i6QHge1/Gf6eiswWdrzmTf6/yaqEtVpn/GzgK2a8y5/4RRGMvvQwrOKMRujNOSGus7SetoJkz6wxVCnokxMG7IIud7YBAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781019309; c=relaxed/simple; bh=IqA7ece+KivQIz+QnTfJlr8GYFK3bFrh9+lzAaVoLks=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nlM8hVezpzO0m258Ke1VLH9bH+nLi65x42fXI/+vl+uX5gcRy/nAUhsd1qvulQ6p8cvAIeJBxS9OkmRfAjuFCqat+O+J+9qIlOYJmt8GgwTyXnrTRAU62MQW4rn196EUxEWv374GQ/1NjrfWcNxcCy9Sb7t1/nCr4VH/ikZyp84= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VKwEITMm; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VKwEITMm" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2bf2911f93cso448815ad.1 for ; Tue, 09 Jun 2026 08:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781019306; x=1781624106; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=UyfvIUyYOvTVt/UpRIulwDCiz4s89QiTYmiwF1UuTbs=; b=VKwEITMmY+vIF7jLHPm/G3ujxm+/qQAK6QbACHBRHkH8m32SFVruEegpcyXlaCBVqu VCjsa/rdPcJp35mI2h6n9tpOuGNWUuaQ672kL87BfJ8fA4XiLfAS8dzGhYCMsiHiMQAQ u+kAUtHMKxkaqatkoNqFsJd2xRtBbkpXfUlfDm8dXmz3XNIG7/GWlufKlgCvlVJQWpoj jT//BncqBAcfCRJDw4CjgvZ8fILeeTX7hsPJYxq050U22ausROyCbFBo/3kXBtTRKTKb gMtpCGmO2VbnxSeFNsp1948l+WUDylvlTrkzF2nmXkyoGoJxP90a3jZkRqTpBHs/ayhw x7CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781019306; x=1781624106; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UyfvIUyYOvTVt/UpRIulwDCiz4s89QiTYmiwF1UuTbs=; b=rK3sc2/jvwikUWaFCXXK9St90fnSrf4NR4p/89Zc5+SGR2M9zhzNEJHIjDcqjKdbHY VicU8dIQnobPtA2uqK6fGwmllYW7MKSWdZTSPLU38Uld69uunCYzxp48yv6sI5Oxjqgr HLyVX/oZ1m+xrXRRpgcXjSePoRzjLRzMKRPexwezi11bkY3KeTi2NZg/YE1JNTlBYGVI LBFZvmsVM+wo/ZqvdB0Gylk9tmhkVsPRZNtAoLALqpefL/TLXl+s4yyJMY26YaM9g0zk /sZuQ8/c3M81Hi3fR7yyNWeastv6nLryFem3dtNwtom3Hgnfv2zJXihdFhYq8r6vTYsW aJ4w== X-Forwarded-Encrypted: i=1; AFNElJ8MiSyhYNXcutl/eoq1bTZQI8ozbAhUspsZMLLNV5WTlFHoSI0VZG/vsvhnUMswFTp1fPl4LoAS7OiISuI=@vger.kernel.org X-Gm-Message-State: AOJu0Yw0Hmu/Fasx6DWCGUQk2khLoKW9ETbB+7Jbjh/4gtDdkqXMCaNz r4qotOZ0QSiypu/hebCvqB6uYqEscakh9Mtvkn69EvtjV4NyctnSf+jf2UQnVpBQyg== X-Gm-Gg: Acq92OEGnyQFtuRbJxC/FTfyDYex0dy/nJ3jNvEzr3To9yY02kCWCQ/+CRuDPR392aH RixZ1tRy56l/ap80sgfqzck4ByiEltmyB5UUfpD4pKjw0DZFAQYIoTT+P3BEvqmM7iOHgza46w3 KyCOpCgKUCxz04ug5Hh7LjtDQqXurcjSWC4Y1bU0RNGhaALYHIXP+G6qizq9wmu+FluByw+PaEw DpVytsIRdIB0vMwGEu/9fR0MNN7VMfO0II40U4zCGu7CNGKbi+Wh/DzTU3LnPT7CQmjjNh2Ym0S 8N+pjtWWwL3lspwMjGMC7tB0TlA03KeVzeJK+Mn5d9AQRZa3hFZUklhdUpjPPbBGZAoBnNVqo/y SbRk9cRg33BFcyBGvQcvjKw7Ct0d08b0dkTSL7zkF7psKEsAkzkDIa0YsDYJAdOoaZsA7RIQnGx +pzWVRXOBrLmS+xn6Uqut2MMJR0Mv85FiIm8QNK539Oc0bM9FV1kFyaoUWn6mMCCXhRPXuxKzk5 BMX2JmkbQ== X-Received: by 2002:a17:902:e885:b0:2bd:7e8e:ad56 with SMTP id d9443c01a7336-2c1eafba702mr7653595ad.6.1781019305283; Tue, 09 Jun 2026 08:35:05 -0700 (PDT) Received: from google.com (199.255.142.34.bc.googleusercontent.com. [34.142.255.199]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36f6bf827e6sm24737580a91.1.2026.06.09.08.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 08:35:04 -0700 (PDT) Date: Tue, 9 Jun 2026 15:34:55 +0000 From: Pranjal Shrivastava To: Jason Gunthorpe Cc: David Matlack , kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Adithya Jayachandran , Alexander Graf , Alex Williamson , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pratyush Yadav , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Subject: Re: [PATCH v6 08/12] PCI: liveupdate: Inherit ACS flags in incoming preserved devices Message-ID: References: <20260522202410.3104264-1-dmatlack@google.com> <20260522202410.3104264-9-dmatlack@google.com> <20260608181640.GO1962447@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jun 09, 2026 at 03:12:11PM +0000, Pranjal Shrivastava wrote: > On Mon, Jun 08, 2026 at 03:16:40PM -0300, Jason Gunthorpe wrote: > > On Mon, Jun 08, 2026 at 10:49:29AM +0000, Pranjal Shrivastava wrote: > > > > > My point was that a FW exploit can meddle with the bitfields of the > > > ACS_CTRL to spoof and mis-report the ACS flags. > > > > Devices can also ignore the ACS flags. I don't think this is an area > > where we should be worrying about devices being actively hostile. > > I'm wondering what happens if we preserve IOMMU groups across a kexec, > but a switch's ACS capability is dropped or the ACS_RR bit gets cleared? > The incoming kernel assumes that it's the same ACS cap from the old one > > Now, the incoming kernel restores the groups assuming they're still > isolated, but the hardware no longer enforces it, silently allowing DMAs > & breaking isolation? Again, to clarify, I'm aware that we aren't preserving IOMMU groups, the incoming kernel has to rebuild the groups. My concern is that if the ACS_RR bit is cleared during the kexec window, the produced grouping would be different than the old kernel. What happens if two devices on the same bridge were assigned to 2 different VMs? Thanks, Praan