Skip to content

ntsync miscellaneous patches

Elizabeth Figura linux-api linux-doc linux-kselftest lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 0 repliesNew
  2. v14 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5selftests: ntsync: fix wake_all CREATE_EVENT fd expectationtools/testing/selftests/drivers/ntsync/ntsync.c+1 -10 replies
2/5selftests: ntsync: add wait argument validation teststools/testing/selftests/drivers/ntsync/ntsync.c+44 -00 replies
3/5ntsync: reject wait ioctls with zero ownerdrivers/misc/ntsync.c+3 -00 replies
4/5docs: ntsync: align ioctl names and struct layouts with uapiDocumentation/userspace-api/ntsync.rst+17 -160 replies
5/5selftests: ntsync: test absolute MONOTONIC waits under time namespacestools/testing/selftests/drivers/ntsync/ntsync.c+87 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchElizabeth Figura
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] ntsync miscellaneous patches

This is a resend of a series originally submitted as [1], combined with two patches originally sent as [2].

This supersedes a previous set of patches sent as [3].

The following is the original cover letter sent with the series at [1].

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/

===

This series improves ntsync without changing wait/wake semantics:

1/4 — Align Documentation/userspace-api/ntsync.rst with
include/uapi/linux/ntsync.h (ioctl macro names and struct layout).

2/4 — Fix wake_all selftest: CREATE_EVENT returns an fd, not zero.

3/4 — Add selftests for documented EINVAL cases (zero owner, non-zero
pad, cross-instance object use).

4/4 — Reject wait ioctls when owner is zero, matching the documented
uAPI (3/4 depends on 4/4 for the owner tests).

Patch 4/4 closes a spec gap: Documentation/userspace-api/ntsync.rst requires EINVAL when wait owner is zero, but setup_wait() only validated pad and flags. Unlock/kill mutex ioctls already reject owner == 0.

Testing:
- scripts/checkpatch.pl --strict --no-tree: clean (4/4 patches)
- make headers && make -C tools/testing/selftests TARGETS=drivers/ntsync
- Kernel 7.1.0-ntsync-test+ (CONFIG_NTSYNC=y), QEMU x86_64 initramfs:
tools/testing/selftests/drivers/ntsync/ntsync — 12/12 PASS, including wake_all and wait_args_validation
- On 6.17.0-35-generic with the distro ntsync.ko (without patch 4/4):
wait_args_validation fails on owner==0 (wait proceeds instead of EINVAL), confirming the gap this series fixes

Iván Ezequiel Rodriguez (5):
selftests: ntsync: fix wake_all CREATE_EVENT fd expectation
selftests: ntsync: add wait argument validation tests
ntsync: reject wait ioctls with zero owner
docs: ntsync: align ioctl names and struct layouts with uapi
selftests: ntsync: test absolute MONOTONIC waits under time namespaces

 Documentation/userspace-api/ntsync.rst        |  33 ++---
 drivers/misc/ntsync.c                         |   3 +
 .../testing/selftests/drivers/ntsync/ntsync.c | 133 +++++++++++++++++-
 3 files changed, 152 insertions(+), 17 deletions(-)

base-commit: 2cedf2272f1bb42471e646868ac572cc5752bd91

Signature · 1 line
2.53.0