Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp808333rbd; Fri, 23 Feb 2024 04:26:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU57EaH9kyjtNFoFRQ9n00V7S/+6FU3PmfGkT4GBEqX2oRz0v4O6ye7AYR18q+hAD0Z7YeBzKL0P/kZ5pYwfkeAJMWHhom3btRTrMlpxQ== X-Google-Smtp-Source: AGHT+IHC0uOz6e3uEQmI/ssKzm9XCm7+qtdIHOJAYJ1mT4SHwzYLUo1VvkIEo0wjOCmpdKGyfSDa X-Received: by 2002:a05:6a00:c7:b0:6e4:d117:9d6 with SMTP id e7-20020a056a0000c700b006e4d11709d6mr1640065pfj.17.1708691165272; Fri, 23 Feb 2024 04:26:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708691165; cv=pass; d=google.com; s=arc-20160816; b=a0PC9B4lNo93y+Wv+nxykWnla3Ao5YJq9i4EE+QBGgxE/tuNukMdQqfCv2U9Z0ZZjR tgmtmTvKBFXSEt9RQF8ue0SUGL+hBC2e5VnXDpBwejbn042stQdbRgI7S5yPunzWbPpr 6LT7vbrP2o1lAbwag4NbFcu8lCoXkP+2f1d0pJTmnZm/WvIcbDBUl/RQOrYiBJNR7lsE kZWZYTnDqVQEtcX2SQdTtbQ6UNrIPEzZ+odQXPld4Nlmr2M6Ow4Qu1FSnsBsDLceSJqc QGfOBtDhiBNFGmhcYq4cP1yrjGF3Xqn8OmptN5YIQ/zRJcnaQjrJSr5pj2e+RtaswYFT Bt3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=Ek5GYk/o4XGdzumYUMTRxuu132UAvYSFBwTykQWGJ40=; fh=AllcdVB9H1GwlFMc8HZglRXq5deq9mSo6tGZkOfYwzQ=; b=P7W9O4WFiXkX7EbtSjZBSBxFIduTztE/h2fpQngnznj+bFOoQTXVqYwYnWufbchwZS 3YQDnXSCMYr8Jlmb5uo5edCgY0lRlYik7KBhZcnYDX7PunxBcW0DuvUJk9v/DutGHUw0 7kHTxKfmZDryUrrrzumajc6t5uxmFdV+NEZ/hwdgrPcDG9YzAQhOVVRjZNrsQCyfd87G pHltP4nC6T31BGWD8+nxCRs3mLik0uRepVYuSLh0d8zWAYfsUSAyTqHl2+seNvhrSXT9 Lm4UmlCTA7flYTzRcWPbFvjkZbEeJXA2vFE20OOPwJoUI4uT/DROQEV1nUCjt8rSQiua +w5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i7CS91D9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-78290-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a21-20020a056a0011d500b006e08bc19c82si11863164pfu.82.2024.02.23.04.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 04:26:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78290-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i7CS91D9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-78290-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DA701B2262D for ; Fri, 23 Feb 2024 12:25:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AE777BAFF; Fri, 23 Feb 2024 12:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i7CS91D9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CF527B3E3; Fri, 23 Feb 2024 12:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708691136; cv=none; b=krD9ueKbD/h6xY6SIfrIfpyzuVSgVvACkG7Exo/zT+q1sUZxNMnEsMUem5Uhi/AfoZsSuhQBQb3nUzQbDJwbMO0G5UjUjL4Luk+zjI8AqQRb9MY/bN8+UPbnd+qFZ9qKKWj9r46nPMA42Z0+3PRh0GkPvZCrSGy9F+prrrqxuAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708691136; c=relaxed/simple; bh=8Of16FeuK62BABqKCILjWT3Z7WbQBNIne5rn4ZE3mAA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WsMtB6LUAW4gjlnm285OdvK6E6aro8zHuDwPs1HYl3Ad+CBeeibwR9ghZvhnSiUjBm5G2CVZqi4vdzojiLwVEE8boodsy10C/vsQdwz4V6aO/PRW8az2aWciKPpaQTRPy8xZhd2YmfjsaRjwjMoSnRzXJcFXo375wAg/CE6ix5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i7CS91D9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7800C433C7; Fri, 23 Feb 2024 12:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708691135; bh=8Of16FeuK62BABqKCILjWT3Z7WbQBNIne5rn4ZE3mAA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i7CS91D93l5F/DEdZGaKzR35RysxD2B4cH/G/VgiWBw4DEdFqMcvHkhlt9LBpYp8y GIG7u9B0KuEn4XbmV+6NZRYHKmFFR4BCSZsmiynuG28s26sg6xOQvx6jFd39yDmFA9 FMRqap7cdnUJgnaxH5deMKISFOmSxk2Wc1nkBoIcNfCfXFCuwTPDD5i3z8NJ+Omudb 0jMV0716KSF3cKt4D9gPM9LyWRLzEP2fXR+7aSvXvWczZLEJjcfEFOhF9UM500qTkr UNibDK6AFFawjAsq+iZj+zrQO0pyfPfZXavrT59l9H2aV97d5fyVjmpk9jHZZ1jNjf wcQkOffOWKEzw== Date: Fri, 23 Feb 2024 12:25:30 +0000 From: Will Deacon To: Nicolin Chen Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, iommu@lists.linux.dev, Christoph Hellwig , Marek Szyprowski , Robin Murphy , Petr Tesarik , Dexuan Cui , Michael Kelley Subject: Re: [PATCH v4 0/5] Fix double allocation in swiotlb_alloc() Message-ID: <20240223122529.GA10641@willie-the-truck> References: <20240221113504.7161-1-will@kernel.org> 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: User-Agent: Mutt/1.10.1 (2018-07-13) On Fri, Feb 23, 2024 at 03:34:56AM -0800, Nicolin Chen wrote: > On Wed, Feb 21, 2024 at 11:34:59AM +0000, Will Deacon wrote: > > This is version four of the patches which I previously posted at: > > > > v1: https://lore.kernel.org/r/20240126151956.10014-1-will@kernel.org > > v2: https://lore.kernel.org/r/20240131122543.14791-1-will@kernel.org > > v3: https://lore.kernel.org/r/20240205190127.20685-1-will@kernel.org > > > > Thanks to Petr for his Reviewed-by tag on the first three. > > > > Changes since v3 include: > > > > - Use umax() instead of max() to fix a build warning if the first > > patch is applied to older kernels which warn on signedness > > mismatches. > > > > - Add two new patches to the end of the series to resolve some > > additional issues with NVME and 64KiB pages, reported by Nicolin. > > I've added them to this series, as the first three patches make it > > easier to fix this problem in the SWIOTLB code. > > > > - Add Reviewed-by tags from Petr > > > > Cheers, > > > > Will > > > > Cc: iommu@lists.linux.dev > > Cc: Christoph Hellwig > > Cc: Marek Szyprowski > > Cc: Robin Murphy > > Cc: Petr Tesarik > > Cc: Dexuan Cui > > Cc: Nicolin Chen > > This fixes the bug with NVME on arm64/SMMU when PAGE_SIZE=64KiB. > > Tested-by: Nicolin Chen Thanks, Nicolin! Please can you also respond to Michael's observation on your patch (5/5)? I didn't think we needed anything extra there, but since it's your patch I'd prefer to hear your opinion. https://lore.kernel.org/lkml/SN6PR02MB4157828120FB7D3408CEC991D4572@SN6PR02MB4157.namprd02.prod.outlook.com/ Cheers, Will