Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2599143rdb; Mon, 5 Feb 2024 11:20:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLNlXw1x/dNgMKNyvJgI2JtFo68InpdEfaumRiQr5ZCZX0fxvh2nR8POktfpiXuayCnPDJ X-Received: by 2002:a17:90a:fe0e:b0:290:9e9e:a87e with SMTP id ck14-20020a17090afe0e00b002909e9ea87emr143705pjb.42.1707160855704; Mon, 05 Feb 2024 11:20:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707160855; cv=pass; d=google.com; s=arc-20160816; b=UtVsaG6uM5jqYfhfG/XufHhXb1l3Liyp6Rr/RsDajeeTxnRdmrcP6cSBu/bS5yLAFb 4ndLK9AsZV7qct0aC4+w44Mw4fUJ9rDZin3Atonhjj90vIRtnZgqrsD7JnQ4d5kA+16j 3RPWf8wPBC7n7AUdtVXOrXJRGv3EALRow1Kz4EogRO3BfNKAuKpY8C1YxRtilOITPZQW 8KHyRleJF3xRcuA1xTQvpz5wIVzSOLIIOFJ5Jw7GFWQ8Lz3IZDzzzuhxkGkvUvNP/5T4 9mKIQqh1V73FAGOz3f/EZTbwA+pyLAOo4lTuffzS4qKcDEmGyFsgd4YbmuPtBS4eCHZM 1S/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=FD6oLrKscGRSmiILd3uaPXw/1sJQqmBuWEEbw2qP52w=; fh=+vnDs6WAMU1P5NRX5iC2aLwE96jxXY/BYr5/KAhIuWs=; b=T2NxYTw2drUXDp0xO86+pmIWgQAOha8OGPA+SfYmTlut6bz7hHWXjmpXLAbQmxGnQG X5Scogq3w5TU7H4OjUnb03k3wtMSrT5RP4iJjDB9fQjS7ijBJRgO68YtqIEvja6RXwTe uYm+CM6NuHaJHZRQRbpGixnTI7g5SIctSu+PskrELTvVeN/z3YpEHgdk+jQg1koG3WOk c6h4ltnK9g1jDLyQ8jBiHemUGw/UUcuxggcsvTFI1ysB5zkMb2+LSqJ4ZN/ndIw7fTbY kwwOkhvwQHYE+ZIqFkVwFZDT9w9sEYQJtWTytPnGvFZ9PYgstaEJQ7s1AHg3w3QqY/cp bTlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AEtdUvhm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-53273-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53273-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWILZQ3k3X6POyJoRLAM6zdbQVegZ6kJzjRyhFag5dZI4hK8G4/XOz8rG4dpclVeC6+H7owKidHudLEgu8+DbbOG+OJujlfc2/vtiE/Zw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gm23-20020a17090b101700b0029689ce0db8si353177pjb.165.2024.02.05.11.20.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 11:20:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53273-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=AEtdUvhm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-53273-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53273-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 B8135B268E0 for ; Mon, 5 Feb 2024 19:02:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E775348CCF; Mon, 5 Feb 2024 19:01:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AEtdUvhm" 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 1548A48CC1; Mon, 5 Feb 2024 19:01:36 +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=1707159697; cv=none; b=V5ygstYHT5PElL75cOVOoNEvuebOX6VqLCQhLiIVn79FnCRD09QHwtnsIsiaG/jY+aXHADOjSdcZV4MK3vq+sERVSiaLcYFzVbDftxyjuXbtXr+ibm5o10jsDDG3O+ly0AAarWfKTmYpTqogz8J+7N3c3izDDxJd6b1S/awEjeo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707159697; c=relaxed/simple; bh=qXT6n/Xz8TGqf2KpHYW4visUF18bBDgbINzKQ8xLz0s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=teUpLMaG8odHKBDXA8rfRhIhnXo8/2kYNTC8Zrog6Ys6MsEPEliD2gzwqVABAR5laelnu+qC6mXs0Rd7HbDRXq39QdhM+fcAJFQ0q5U7oPTatSHcNnOA+Lt9qqiWySWjRL34raQI66EITgxueo+beLEkD+2WwSeVeSIP7Jts28k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AEtdUvhm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA939C4166B; Mon, 5 Feb 2024 19:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707159696; bh=qXT6n/Xz8TGqf2KpHYW4visUF18bBDgbINzKQ8xLz0s=; h=From:To:Cc:Subject:Date:From; b=AEtdUvhmlT6Q4z2ceE1S+VpZHbA1rQEw8LO+Bf9ETCZgbd5ufIs6vM741g/Q1erY3 iMGw6ItvBEer3EgK3/IjPwBqeUyC0wFxJKJi0BEDpfeCs7dT2SMFjBkmzKcYwnUthQ WhFfz5iTvetNX+ZxtVlfj7t4egZ8PyHbQmkHyLVeII7nobppWisVcBQOZMDByw/Jkb qPLCTlbjBlSBSTy4ss5xYgKC3b5E0kaXBuKNu5cwCBpZKrs4crm/8AR/BZQl4XTORR p7Sxw9/iybUH35eJgPdaYL+6/igMauYf/6XDG8mUy/tmLL8nCpYXoYbE3WM8+Id2o6 MaepARhHxl+og== From: Will Deacon To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, Will Deacon , iommu@lists.linux.dev, Christoph Hellwig , Marek Szyprowski , Robin Murphy , Petr Tesarik , Dexuan Cui Subject: [PATCH v3 0/3] Fix double allocation in swiotlb_alloc() Date: Mon, 5 Feb 2024 19:01:24 +0000 Message-Id: <20240205190127.20685-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi all, This is version three of the patches I posted recently: v1: https://lore.kernel.org/r/20240126151956.10014-1-will@kernel.org v2: https://lore.kernel.org/r/20240131122543.14791-1-will@kernel.org Thanks to Robin for the comments on the most recent version. Changes since v2 include: - Restore missing 'continue' statement that got accidentally dropped while addressing the initial round of review feedback. - Reword the commit message in patch #1 - Add a Fixes: tag to the last patch Cheers, Will Cc: iommu@lists.linux.dev Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: Petr Tesarik Cc: Dexuan Cui --->8 Will Deacon (3): swiotlb: Fix double-allocation of slots due to broken alignment handling swiotlb: Enforce page alignment in swiotlb_alloc() swiotlb: Honour dma_alloc_coherent() alignment in swiotlb_alloc() kernel/dma/swiotlb.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) -- 2.43.0.594.gd9cf4e227d-goog