summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-09-21 16:15:38 +0200
committerChristian Brauner <brauner@kernel.org>2026-10-05 13:02:41 +0200
commit0a0f88fcb434f58fc5b444e7c9eeae791cdbbeda (patch)
tree0dbbe2d22ab8dc1d281dd3de402863870816750f /tools/lib/python
parent06074fbbf092b1a6292c108eef2b94f43333ea1c (diff)
downloadlinux-next-0a0f88fcb434f58fc5b444e7c9eeae791cdbbeda.tar.gz
linux-next-0a0f88fcb434f58fc5b444e7c9eeae791cdbbeda.zip
selftests/core: test CLOSE_RANGE_CLOEXEC_ONLY
Cover closing what is marked: - close-on-exec descriptors in the range go, the ones outside stay, and a range above the table closes nothing - with CLOSE_RANGE_EXCEPT it is the other way around, and the kept ones keep their flag, for a window in the middle, at the top and at the bottom - descriptors without close-on-exec are never touched, in or out of the range - a range that cannot hold an open descriptor keeps nothing, one that covers everything keeps everything, in place and in a clone - the unshare form leaves the table it was cloned from alone, with and without CLOSE_RANGE_EXCEPT - the unshare form keeps the descriptors without the flag that sit in the range it drops from, and hands the dropped slots out again - a kept range above the last descriptor without close-on-exec still comes back, so the clone is sized off the range too Also check that asking for CLOSE_RANGE_CLOEXEC at the same time is refused, whatever else is asked for, and that the bounds are still checked. The extra cases came out of the same walk with the close-on-exec mask on top: a marked and an unmarked descriptor on each side of every window position, and the size of the clone when only unmarked ones are left in the range it drops from. Link: https://patch.msgid.link/20260921-work-file-close_range_except-v1-10-c20d0b49270d@kernel.org Reviewed-by: Jann Horn <jannh@google.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions