From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 AA1BC3A6B93 for ; Mon, 20 Apr 2026 14:17:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776694668; cv=none; b=GzhUvSf9TKBZR3Bc20aIENxqmko8JBADJAxeJGjVxzPH/37hPNW4XWjO1TqTXdO/8x6H+7JZt8dBY8+bMmt4EUQl0exQ5TYmy3YsQb8SgPLhFJ4oZtq4uaBDRSV883DR5SjsHH1U+MB0Wl6zqXHiLjCWC3I+l6Xxp4aYg+Ri9Yw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776694668; c=relaxed/simple; bh=V8dE/wH4ug4b+WrwlpeXnoIYx7hdBeCahZF8kvHj+Fw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bDVM2HpoSifNOB0xTWyRfihmCHUeeVYxBLL+9i8ghiv36Q9jJsjerx0ONwR6j5LJgOzGyaBlB8iHY6/80oxL02UFEQ71a7C2uURPb/9fEwd9mM7zZ32eWIQk0gzm6gCax+LQblGw01VdiN5Ekp1LHLSrcrxeHDEhPsES+KLTjEc= 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=SSxr1i3B; arc=none smtp.client-ip=209.85.128.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="SSxr1i3B" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-48984d29fe3so9837985e9.0 for ; Mon, 20 Apr 2026 07:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776694665; x=1777299465; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5HAgeJOZaSUjQDMERltKw7poLkmLCttGsEyTv6VLp9I=; b=SSxr1i3BST6kY6X/eb1VDCdlbrO9vzM/kyrcuaD0pLyTo/83yTirbgDXKb0CCnScGV 0RaSEZGl1Imv811ieov4ir8jm9w2/1yv3yfTOycAevSR72F5DV9pzrH8bDwyquEwDI9m 1aRAHHGa4/Hkg+tyhi+s3QBGXQZ1bCcJWy/1NODuPmoACH9yE7Gp0gNpuzL7LVnWa5SY 1S/3dOmfDlYgZ0lJt2bt5CcXbpzxq7hNvLPCm9YbUqjfnr5F1p7BMJJ8Homwq+y1R04v WL731FqP0K49VFUoPwcob8NMy+6Xt8qwgfWoFOeVeDymJc6hVzZ+N8VLGZLRXu7F0+eI fg8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776694665; x=1777299465; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5HAgeJOZaSUjQDMERltKw7poLkmLCttGsEyTv6VLp9I=; b=s+DVWApmOwPQc06+u+u6b/aqG9bcKMGs/5hhNC1Ckb5ZmMm12np9fFoIjgzGCY7NAa FmJm2asR3rj1UO6DcFZVP/5QE6QQLpc6ne67l4K1bXf/fVaR83ZaLXvY6heQaa+wAxW/ zAGTdVPjvOzDuDHitSi/S5JFiJQ+l1zyXjk8anTzN6Hvyim1mJPYx1B2LK8myRMLvCKo UfAJCZSJho7Rj2fEr2u7MQmzPtlY4JH5ts3uULT/tpuhTV+LVOACGrF6AaeH7TaAHjnI uyYf25Lfjp2G4L2Bp5HK9kuiO6i+TvFoUdn4L9C2qEVRfILzCfvMVr4ne+XDsUHJ2PhQ 2Xvw== X-Forwarded-Encrypted: i=1; AFNElJ80CBx97wmKaD/6n5P/KIWPfIMh7vz1OokFMuKoiMSZfEWPojYgnr29iAxxzfbNj6MVzwOn918xS0PagMc=@vger.kernel.org X-Gm-Message-State: AOJu0Yxq9hoaN8fPHCSVFPMgsxGBjFzuqutYRljmsSLmHFwY/W5Jzl0t AarPw8LZs4/TJLyP9t4r3XR61btXAvLVGoS0RSitSKHdxkmRDKulR1Zh X-Gm-Gg: AeBDieupHx2coPLJa/oUzxLgR67Vvc2lQ58WbTNYwrQf+wRS3lbmz1dLD+aVQECg4ZD PDqpwcNrdUvZg0JFUiEuOl1yvfd0plrJmi1jzP1B60q83uaGYrWuMllX+oFO4348x3KZxvQ9Ghx 9FW+ya3jTlA+c4qcEX2EXmxNySm5OSdkF0fk00jwXjSBW8p0aat6y4Hale17+yUxFfUJvC4KMvv ETvmq3BVHGlU4RwYZBXu42/Ucu9P/N+awbeLpks/5Enm1ubFCdtQMK5AQ+h69Y9+7rB90GXGmfl DYJ0lzvHzYThXGo9Rt+sGXXrjpw4IvIVEaXioHdIy3OsWK/WaRGvlf3GZHd0xKnDF4+CQT4tn8S iNVLXl+HldMenr050Ge9LfCHaXzL0pXEubXe5kS6Q35gxBSuUyVZiaTtYS+DMHLRmdNVBTJxH0i /KyNQY0pBPThnp/S4ft5hdts0CN6pa2X3pAZ/qEso= X-Received: by 2002:a05:600c:859a:b0:48a:53ea:13eb with SMTP id 5b1f17b1804b1-48a53ea15bdmr3192745e9.5.1776694664793; Mon, 20 Apr 2026 07:17:44 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:355d:3be4:308b:c943]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-488fb77b001sm131753195e9.3.2026.04.20.07.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2026 07:17:44 -0700 (PDT) From: luca.boccassi@gmail.com To: kexec@lists.infradead.org Cc: linux-mm@kvack.org, graf@amazon.com, rppt@kernel.org, pasha.tatashin@soleen.com, pratyush@kernel.org, brauner@kernel.org, linux-kernel@vger.kernel.org, Luca Boccassi Subject: [PATCH v9 0/6] liveupdate: new ioctl, change session inode type, bug fixes Date: Mon, 20 Apr 2026 15:15:08 +0100 Message-ID: <20260420141741.2688371-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luca Boccassi A series of patches matured while implementing LUO support in userspace in systemd. - reject session names that are either empty strings or too long - change inode type of session FDs to a new singleton magic number, so that userspace can immediately identify them without string parsing in procfs - add new ioctl to retrieve session name from FD, so that userspace can query it without string parsing in procfs All changes come with a follow-up patch add test coverage via the existing selftest. v2: apply one fix from bot review about cleanup on error path: https://sashiko.dev/#/patchset/20260415184536.1155220-1-luca.boccassi%40gmail.com the other comments are invalid: luo is not a kmod, and the write hooks are not set up v3: add test case to liveupdate selftest v4: split test case in separate follow-up patch v5: add r-b tag, merge series with LIVEUPDATE_SESSION_GET_NAME ioctl as they both change the same unit test source file, to avoid merge conflicts add '__u32 reserved' to the UAPI struct v6: add more test cases as suggested more verbose commit message fix docstring v7: apply suggestion from review bot to stub out setattr ops, like it was done in 22bdf3d6581a v8: add new patches to reject session names that are empty or too long v9: fixes following review comments on LUO_SESSION_MAGIC Luca Boccassi (6): liveupdate: reject LIVEUPDATE_IOCTL_CREATE_SESSION with invalid name length selftests/liveupdate: add test cases for LIVEUPDATE_IOCTL_CREATE_SESSION calls with invalid length liveupdate: add LUO_SESSION_MAGIC magic inode type selftests/liveupdate: add test case for LUO_SESSION_MAGIC liveupdate: add LIVEUPDATE_SESSION_GET_NAME ioctl selftests/liveupdate: add test cases for LIVEUPDATE_SESSION_GET_NAME include/uapi/linux/liveupdate.h | 21 +++ include/uapi/linux/magic.h | 1 + kernel/liveupdate/luo_core.c | 10 +- kernel/liveupdate/luo_internal.h | 2 + kernel/liveupdate/luo_session.c | 108 ++++++++++++- .../testing/selftests/liveupdate/liveupdate.c | 153 ++++++++++++++++++ 6 files changed, 289 insertions(+), 6 deletions(-) -- 2.47.3