From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1123D3ED5BD for ; Thu, 23 Apr 2026 12:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776949017; cv=none; b=TxTQGQ++xaEgKlaBm+jgSzZo8xCrqUQSCYnfRiPzdEqZBHMr52lvuiTUileV3NdH739f0HKVKT1Al71KvUh941pJbrtA7/qBvxcezljwhlxKb8iH8+suBhD1FAQ6OZaREBmf3Wi6lXkPOFNVZyJKLXlObR5Xp2uUtBrtSlZZtsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776949017; c=relaxed/simple; bh=yNIiZzdhf2R5gcCO0KblN1xeRoimYCy+ZqBs2d0VfXM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fNnMgQI5yxqwNn+DzJZI9O1v8iicSuvX8QJXE9zEKdG800UbzhvYdrO4UrY5lvIZ5sUG/yGm3zV/WA7MNfsKROOUXcEoyjLcrA67hOFDZjICesZDMmgJFUAmjgQCrksICJqivGgqmj4recXn08fE6pH5nSMdveyqhpW9MMWw9z4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jQopSSDa; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jQopSSDa" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-43d75312379so4880886f8f.1 for ; Thu, 23 Apr 2026 05:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776949014; x=1777553814; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yJW0byvMLamYAxiKwRCqLs+XElTdPsa1lYRy91tdi1g=; b=jQopSSDat5M203aiZF8OIf16m5QnXtQCxL/X4nqlECmI3jD+uEhfT9MiXLfkWs/P98 iuyK9qReOt0yjw57Tm9HkwoeuSiALSegdghYopCElyCPFPVNdqOQhsVzgeDxGOVxfT0C f6Fu8uN9ZNazvPb2qeVN8oVSGxqA4SINZpoKk/za93uMMTge3I74TV5lcwlHPSk92pSa 2vPescnuf4dmh6vkGECSlkfMIgj6wQWJ4SZjKcHCjrpJCwXiecRFp0Tce5MGOvvsUp0/ UAgHQ1xiMUtOiaVx3YUJcV5TeuZbxHx9jOm0/GZQSysFkq3+POBtPJXfpCjJzWD1W/bh GY6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776949014; x=1777553814; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yJW0byvMLamYAxiKwRCqLs+XElTdPsa1lYRy91tdi1g=; b=eBEYrDyxrfkVUt2qRWImigU/IYw6wYP9E6QGY1/zNSHw87WOWmDNYeNbA6l6nc0z+Z 9zz1f9dX6bqi4XbWIKI5xtJ38h9dRQPjsrCEI75aIp3GszD7BnRTuAft4lqYKMn/ML+l KJNGU704nKClB9A2bdqHjkoMRwFUz2M4jtkAgVEuiEZ8JD0PxMAE2jfIP4f9tDPYVxRm F56wrLTHnmvN35V8tsqt7oOJeOXY/nnmF4gzqPLGQFSNPuSLlyZ0TgtIOf5LKehH+uMz uYtm99Y2Rvc/+bMWjGEKFbR1Dh34aILsSYrP+T6HM8YMCyX5GAjllpgPgEHVSxRxMUMu ydSg== X-Forwarded-Encrypted: i=1; AFNElJ+xhoAnqw+XAXZea88O0NLwmFNnsXl9Dqa+/Np9KBA2lFy7/WW2IZbL0b92YIkin4QFxn339alYWG0yreI=@vger.kernel.org X-Gm-Message-State: AOJu0Yx41bIVdLsRgkUbsYCLKZYCESobxBqivEZ6YER5J7zXR0IEY9Yj nD5rtXPq31dF9q0/wdUA1wRCgC4WGKR1uJTaeaedHMS4/1P174sxfsWt X-Gm-Gg: AeBDiesKN0DeVrCsyIekW2NKck6abra3e+8DmaqvD+qiEdio7T3qBb/o5MdZF7DMy3I qob3bP7baCtss2LPF1sWYPSUg+nzDQIk/DDvD84V9ScsMpryvQAwivdsPQ4xWQ7mxHIxqHlVXTw Jkfy1Dqwf+fedFB/cKxZMR8sP25jho7UBYm++SBrELCgDJu2DusqQMSFr7W91HBEtUFEpfGyF2E V7vouHrJsuHCeTnxNom7eQtkKXSAED8Z8rA3Qpm/fQZGq6ZXrUtzNbhBAdlVtLkAW+TjqhZbnL6 z7FRXWFiu95R0yi/iTGwsCitOUwdpww8dVxC228kpxhdXDA7y0eUWt9rAPEMRMszuN9ZL5IPGec 9+/efREiHQF/tmmYUYVId3CRcmAkhH7ahIw2cbvG7Lit3YnHUqmcKLSiqyYvokRtGcgJsGmX/1z U4oypDhEcmCz0Nk9x1953M7ESpt90VRBb1Se2TZXYRN+BEsh3DxusvUJMi4hj5GvLiugWZrs4MH 7RqzQLGhbpulyYeXB2w0gRX5C2TXHaV X-Received: by 2002:a05:6000:1ac5:b0:43d:73d4:b1a with SMTP id ffacd0b85a97d-43fe407c0d8mr42929332f8f.19.1776949013988; Thu, 23 Apr 2026 05:56:53 -0700 (PDT) Received: from dohko.chello.ie (188-141-5-72.dynamic.upc.ie. [188.141.5.72]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4cb1405sm52887714f8f.4.2026.04.23.05.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 05:56:53 -0700 (PDT) From: David Carlier To: akpm@linux-foundation.org Cc: pratyush@kernel.org, pasha.tatashin@soleen.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Carlier Subject: [PATCH 2/2] mm/memfd_luo: document preservation of file seals Date: Thu, 23 Apr 2026 13:56:48 +0100 Message-ID: <20260423125648.152113-2-devnexen@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260423125648.152113-1-devnexen@gmail.com> References: <20260423125648.152113-1-devnexen@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit 8a552d68a86e ("mm: memfd_luo: preserve file seals") started preserving file seals across live update and restoring them via memfd_add_seals() on retrieve, but the DOC header was not updated and still listed seals under "Non-Preserved Properties" as being unsealed on restore. Move the Seals entry to the "Preserved Properties" section and describe the actual behavior, including the MEMFD_LUO_ALL_SEALS restriction that both preserve and retrieve enforce. Fixes: 8a552d68a86e ("mm: memfd_luo: preserve file seals") Signed-off-by: David Carlier --- mm/memfd_luo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mm/memfd_luo.c b/mm/memfd_luo.c index f41d11053b7d..c5250f68c096 100644 --- a/mm/memfd_luo.c +++ b/mm/memfd_luo.c @@ -50,6 +50,11 @@ * memfds are always opened with ``O_RDWR`` and ``O_LARGEFILE``. This property * is maintained. * + * Seals + * File seals set on the memfd are preserved and re-applied on restore. + * Only seals known to this LUO version (see ``MEMFD_LUO_ALL_SEALS``) may + * be present; preservation fails with ``-EOPNOTSUPP`` otherwise. + * * Non-Preserved Properties * ======================== * @@ -61,10 +66,6 @@ * A memfd can be created with the ``MFD_CLOEXEC`` flag that sets the * ``FD_CLOEXEC`` on the file. This flag is not preserved and must be set * again after restore via ``fcntl()``. - * - * Seals - * File seals are not preserved. The file is unsealed on restore and if - * needed, must be sealed again via ``fcntl()``. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -- 2.53.0