Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp138824rdh; Tue, 13 Feb 2024 11:47:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6vEAH0lXsp5A/YRuq1zOaiwOrtUci5yiE+W5flBRFlPbwUmS4GtY0W+RhMJqtPafVDpQ3wTKi4hsJt4qAmhk6fcG2pCWlLJ9LLNJopw== X-Google-Smtp-Source: AGHT+IH8mje32Y/L/4SYX4eFvjkN1yP07AVzlgt3rVV2gox1WmGRTX0Iby4u1muiSm0HKcfJMF/s X-Received: by 2002:a17:90a:39c8:b0:298:becd:e836 with SMTP id k8-20020a17090a39c800b00298becde836mr2348904pjf.16.1707853677812; Tue, 13 Feb 2024 11:47:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707853677; cv=pass; d=google.com; s=arc-20160816; b=bCEc6CE3PrPQVYk27ac9YcTshFDnmtB/TqN2DmT+aTpfyCHKzfZCOZnr5JLa1fDRsQ hQKkI5bE8RHmT7noDlTjfvgvsQMpowZJBLxrNvIicxJiXiUpmquykYzjTBj4myht4XRP xYE/fyL6dYsQNiyden/UlrAk/lLv2nca75R5V+j63AD5IWOJMn+QarIDTtNGtc+0Zkfn nyoZMh31iOIBluA11+s+0lvO6EkqjplyBSbzpQYBHWtXx1lFYLdyMOa3k/OqtKV4Zq+v o8rS/fnTHPEfkiCi5C9t6mF80e2dCv0FGRSd6bomeqRRNwUwF+czMjTh5df25DTJDkZv 1EaA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NNCHu54fDH3Bu8jHWhDd7xA/Zw7jyOf5WqMBRbMpN3M=; fh=/3eE8vxhBrMwZ59aqNWgDWTYJca50lsrnxFY5l6eDnI=; b=1BBKyDgAeNpfkYThXkBeznVxqDShILuv7Mio78zAkeiGXFRJ3tnuGFHo05zuY4iWxV RsZhoSoGsScsO5aFT8lTyxdoio5bjrEq5Seb+/BBn5tMi1Bq0aKv3y0Ccb1Yzl2xvW1Z UCpdMj/FeauDtTv571nZzFnS+wCsQzkz0rQVPR2oi/hqXAcc/u4tsFbHEA5Pax1CHHez Lz9lzxEfqBv1EKyFYSsht569mAfB9Hyo2lDscky4oAnme2FFsT+gr06POwbALoXnX6Cr gPYta4cyo7QIdWYaehAN16UF5eqlwFkfhZUMzAfXdbcJ0XXufpSm0XHEnoX0JDUVE7Kl x0iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PnUA/PQA"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64160-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUKFmlyN2v7D9GBe98UbE68/HYlzSWQ9aT/ewOQtqalNzpStpsbQgTPnICvzw39o9wYOeR+wzBZ+dFWk0CDbG/1+7U8/kEo0AIc7SleRA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t186-20020a6381c3000000b005dc85506e66si1505465pgd.402.2024.02.13.11.47.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 11:47:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PnUA/PQA"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64160-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64160-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 0BD12B239C7 for ; Tue, 13 Feb 2024 19:25:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2260060263; Tue, 13 Feb 2024 19:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PnUA/PQA" 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 48CCB56768; Tue, 13 Feb 2024 19:25:22 +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=1707852323; cv=none; b=b0eBMKi2fpK4MVl/dlrIBA1pQpToiGcjmGfr/ixdPlePxEO1Oeo6iI3f74Uhs3tiqMjrzrzxKcvgjQLQbSIY4DzQ188b0cOhwG3xoTkNUfnV2NhUze3/HOIzfL+hVTQnIM7JC3gJ8dxiOzg4QBNLck2iXXHCWTOv5ZUdJhJ1hv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707852323; c=relaxed/simple; bh=I6hO5jlwBaKJFc+VKnC3tf7xGWq+cLtrlW3tHXiWBho=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=OSrx26smceRVFm/IhjmuCf0gd3OL8BFRqd2BC/K08tuqAfJgVE/faQEH7g9QeXCKeaUYeBHZlTRee0C4yOPPzK7YcAWWs45SYElDOQjNhQ0K2ZxpW5AqFiNgJ+0AVQ9IKYxu8ED9dcaJReS3BiQDpU1n9Y83TrbOWK993ey8DXo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PnUA/PQA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF8B7C433C7; Tue, 13 Feb 2024 19:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707852322; bh=I6hO5jlwBaKJFc+VKnC3tf7xGWq+cLtrlW3tHXiWBho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PnUA/PQAwLP7ry+1TEQd4Dzy+U76NeX7ehNECyNf8BUEVbl7sUR6aLeKiygsvASmM yBW/mLpsuPR3cq4DfEBWqsmfQ1v7/UqO52m2WIM5MFbhCaXThPYTAR6GbRxO4QbZVx QdDDst/fWw3i6IRA+KiGIMWCJnkLW/cduT1oNC3/asc3CIcA9wyuSds2FTv165JLA/ aI/PAB8QZM68FSc33cVNCKMvtkHGsp3rIzwiqcbbYlGTeGVyRaBfOO1zLOyxQj+axX soVuJfXrFgr4/TGuQzyiBkmRSjN+N7xI3CG4lWcHV383Noau/FAJ+CDXNRmVsfKq2g ybDI1+le7luqw== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rZyPA-002tNf-Hf; Tue, 13 Feb 2024 19:25:20 +0000 From: Marc Zyngier To: Will Deacon , kvmarm@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org, Ricardo Koller , Oliver Upton , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] KVM: arm64: Fix double-free following kvm_pgtable_stage2_free_unlinked() Date: Tue, 13 Feb 2024 19:25:16 +0000 Message-Id: <170785230656.2847941.2376736166184489545.b4-ty@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240212193052.27765-1-will@kernel.org> References: <20240212193052.27765-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="utf-8" Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, ricarkol@google.com, oliver.upton@linux.dev, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 12 Feb 2024 19:30:52 +0000, Will Deacon wrote: > kvm_pgtable_stage2_free_unlinked() does the final put_page() on the > root page of the sub-tree before returning, so remove the additional > put_page() invocations in the callers. Applied to fixes, thanks! [1/1] KVM: arm64: Fix double-free following kvm_pgtable_stage2_free_unlinked() commit: c60d847be7b8e69e419e02a2b3d19c2842a3c35d Cheers, M. -- Without deviation from the norm, progress is not possible.