From mboxrd@z Thu Jan 1 00:00:00 1970 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 035282D24AD for ; Fri, 14 Nov 2025 17:18: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=1763140717; cv=none; b=Z6XbJVYo9MnK7JDbCYTf/HhEGUTfm9q2Nf+zFZIZYZvpIZHxDtGsnie13lCpopgieEdMphKjs0nySYE42waGNtOTcJ4HesanXxX5QFvXNP9f3FuKsfgJPvhLovqsiO9nHfx03GLfQSUcF4ZJU4W6JyYo9lnOSXKXZ2IhCCZfmb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763140717; c=relaxed/simple; bh=gAz8c0U9qtGAsVP9eT4MuLFLegWENzvHUrrbzi6YB7I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=HNbkGkMRGCBt8rG/f2m361/Oyv14CHznH+UHM9Ksr/HkE1xcFw1Q1Ra5FYd8mBzBktQm3gDYba/O+kKPTwEtmaOaabHXldqkl9v3nB8l98PlHIY5394xedACBDM4Eze706p9UjWl5WNsL/BzNVHJPnnMd6NOrHsPOHSKgzugdEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DDxLfb/K; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DDxLfb/K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10CD8C113D0; Fri, 14 Nov 2025 17:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763140716; bh=gAz8c0U9qtGAsVP9eT4MuLFLegWENzvHUrrbzi6YB7I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DDxLfb/KkNzBf01AdwZSzMCwl9oCPhwnWtd+w1+yjiWzwQJtCAL+vxORBRLi8xFre xB+730Li3oDV3fKjjKXHPSzdB82BwnpQiZZJin3jtPS1ePiS75Zv937VzhpshGKyGR QP0/XGz/Eumy45mDMOlTBAmUqYP0m4eR+ZWM1pYQZF5mRb6hLYdJVUKRW9DPwpSl0U 8HrAQBajQXlKt1Urh02I6HXS4EhbZ8Xpj8bRRQ8TIoNOiif5nfqUR2+PYPdsmGFF9s Hf3kY8hPotr125tSFrKIepSsSmW9RDjkTofYXhIPRkhjqK7KDNdWVuC4i/opEFM7rc AIhRV8xetghsg== From: Pratyush Yadav To: Pasha Tatashin Cc: akpm@linux-foundation.org, bhe@redhat.com, rppt@kernel.org, jasonmiu@google.com, arnd@arndb.de, coxu@redhat.com, dave@vasilevsky.ca, ebiggers@google.com, graf@amazon.com, kees@kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org Subject: Re: [PATCH v1 08/13] kho: Remove abort functionality and support state refresh In-Reply-To: <20251114155358.2884014-9-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Fri, 14 Nov 2025 10:53:53 -0500") References: <20251114155358.2884014-1-pasha.tatashin@soleen.com> <20251114155358.2884014-9-pasha.tatashin@soleen.com> Date: Fri, 14 Nov 2025 18:18:32 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Nov 14 2025, Pasha Tatashin wrote: > Previously, KHO required a dedicated kho_abort() function to clean up > state before kho_finalize() could be called again. This was necessary > to handle complex unwind paths when using notifiers. > > With the shift to direct memory preservation, the explicit abort step > is no longer strictly necessary. > > Remove kho_abort() and refactor kho_finalize() to handle re-entry. > If kho_finalize() is called while KHO is already finalized, it will > now automatically clean up the previous memory map and state before > generating a new one. This allows the KHO state to be updated/refreshed > simply by triggering finalize again. > > Update debugfs to return -EINVAL if userspace attempts to write 0 to > the finalize attribute, as explicit abort is no longer supported. Documentation/core-api/kho/concepts.rst touches on the concept of finalization. I suppose that should be updated as well. Other than this, Reviewed-by: Pratyush Yadav [...] -- Regards, Pratyush Yadav