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 46D8C329E6D for ; Tue, 10 Feb 2026 13:53:55 +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=1770731635; cv=none; b=ONx4CsfBGk8yeVkmP7p7YN5K6kGB6odSTX/Xyrtnax/nMclEPhbSzfyQTz1KEXPh2c+4VczPCz4TGMwCiKH3YZPAKzSnAmBDStKkfLCC1P/BzkrLBIBbZ88ROV8IiZ9CK93Kb/8j04IDe2L9ZFGiKpGYVvIeEMTJtQgl9Dujb1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770731635; c=relaxed/simple; bh=VjfuewZzYWww0CFJ55+XO3WsL/dZMjCPGMxVFhP69TA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=bdepq70kICDecCJ9CGilclpAGGfCXpGkPQx4Cb7H9b56wLxY7h9YK/ei6lAPnfVh+4+SQGkpf8Rq7hEm9cTdvtMZsSN/XpBwM3jdVt0JPdftSR7XJ2EwBH9DqNqx3JEqpjl+5k0p9WFAKFs7OctNg94AnboQo9i7VuG/MBKG3RI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vDd/q0az; 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="vDd/q0az" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5FBAC2BC87; Tue, 10 Feb 2026 13:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770731634; bh=VjfuewZzYWww0CFJ55+XO3WsL/dZMjCPGMxVFhP69TA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=vDd/q0azdMtrp2hKtDQkpUaA9emXt02SSh7+uAg7CkpQJk1RE3gahzbaGsioInj1p x7WJ1rPOuQyw1aQfAXLKw+brfi4W4qFZw6Y/xB5+DC66567PDhAYMiwJFiOGSMfV3n d7QuxkkYNLvVmuk8EzCaEHAmNYk6YJiG1L1N4e/QG+NZkbBbWSpwtkZd5vImwdQJFx QpOktu/gxks+TfF96NyQq/n2BihpMTOVQfaBpfUYSPHLJGegZHwCsdNWrypoaOSbnO enWdJBd0Wn10LU/ZXuSRfbCPw0f8Ua2BygD1+kWCSc5WKthVKRxoqWdPd6/zS8EGU2 WO6dD/9RiQ3jA== From: Pratyush Yadav To: Jason Gunthorpe Cc: Pratyush Yadav , Mike Rapoport , Alexander Graf , Pasha Tatashin , Hugh Dickins , Baolin Wang , Andrew Morton , Samiullah Khawaja , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm: memfd_luo: preserve file seals In-Reply-To: <20260210131307.GD3076640@nvidia.com> (Jason Gunthorpe's message of "Tue, 10 Feb 2026 09:13:07 -0400") References: <20260123095854.535058-1-pratyush@kernel.org> <20260123095854.535058-3-pratyush@kernel.org> <20260126183115.GU1134360@nvidia.com> <2vxzseb8u4kq.fsf@kernel.org> <20260210131307.GD3076640@nvidia.com> Date: Tue, 10 Feb 2026 14:53:51 +0100 Message-ID: <2vxzikc4so0g.fsf@kernel.org> 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 Tue, Feb 10 2026, Jason Gunthorpe wrote: > On Tue, Feb 10, 2026 at 02:10:45PM +0100, Pratyush Yadav wrote: >> Hi Jason, >> >> On Mon, Jan 26 2026, Jason Gunthorpe wrote: >> >> > On Sun, Jan 25, 2026 at 02:03:29PM +0200, Mike Rapoport wrote: >> >> > @@ -67,11 +72,13 @@ struct memfd_luo_folio_ser { >> >> > struct memfd_luo_ser { >> >> > u64 pos; >> >> > u64 size; >> >> > + u64 seals:8; >> >> >> >> Kernel uABI defines seals as unsigned int, I think we can spare u32 for >> >> them and reserve a u32 flags for other memfd flags (MFD_CLOEXEC, >> >> MFD_HUGETLB etc). >> > >> > It is a bit worse than that, the "v2" version is only going to support >> > some set of seals (probably the set defined in v6.19) and if there are >> > new seals down the road then this needs a version bump. >> >> If we are running say kernel X, then X + 1 will always support a >> superset of the seals, since the seals are UAPI. So it should be able to >> handle all the seals that are given to it by X. This only becomes a >> problem on rollbacks. Is this what you are worried about or am I missing >> something? > > I think you need a check at some point only permitting seals that are > defined right now. > > Eg some future v7.19 kernel has MEMFD_SEAL_XX it should not be allowed > through luo until the API is bumped to v3 Makes sense. Will add. -- Regards, Pratyush Yadav