Skip to content

Draft, not for merging: timing probes for #579 - #626

Closed
ronleizrowice-ant wants to merge 11 commits into
fix/windows-mandatory-deniesfrom
experiment/windows-acl-cost
Closed

ronleizrowice-ant wants to merge 11 commits into
fix/windows-mandatory-deniesfrom
experiment/windows-acl-cost

Conversation

@ronleizrowice-ant

Copy link
Copy Markdown
Collaborator

Draft, not for merging. A throwaway branch on top of #579, so that its history stays clean. It prints timings on CI's Windows legs and asserts nothing new. To be closed once read.

#579 holds the directory-level denies for the session, which brought one command in a 20,000-file directory from 6 to 8 s down to about 0.3 s, and moved the cost to initialize() and reset() (4 to 7 s each there). The cost comes from an inheritable FILE_DELETE_CHILD deny on the parent of each denied name, which Windows re-propagates through the tree.

What it measures

  • One DACL write on that directory with an object-only deny, and with an inheritable one, each going on and coming off, twice. If the object-only write does not walk the tree, the deny need not be inheritable to do its job, and the cost goes.
  • Ten commands in M6 instead of three, to see whether the first commands after a whole-tree rewrite are slower.
  • The network group's initialize() time, its working directory and how many entries lie under it.
  • Whether real-time antivirus protection and the indexer are on.

…on Windows

Prints, and asserts nothing new: an object-only deny against an
inheritable one on M6's 20,000-file tree; ten commands in M6 instead of
three; the network group's initialize() time, working directory and the
number of entries under it; the antivirus state of the runner.
…6 with real-time protection on

Prints only. SetFileSecurityW with an object-only deny on M6's tree: its
time, and the SDDL of the directory and of one child before, with and
after it. Then M6 once more with the antivirus exclusions removed and
real-time protection switched on.
… stand-in home

Prints only. A home of 20,000 unrelated files, a project of 100, write
denies on absent names at each level between them: what initialize(),
one command and reset() take, against the same session without the
denies, and which directories carry the sandbox account's ACEs.
…y that has lost it

Prints only. SetFileSecurityW with SE_DACL_AUTO_INHERIT_REQ set beside
SE_DACL_AUTO_INHERITED: does the directory keep the flag? Then two
sibling directories, one made to lose the flag: what each and a file in
each carry while the parent gains and loses an inheritable grant.
…owns

Prints only. A file made by a sandboxed command and one made by the user,
each with a deny that names WRITE_DAC and WRITE_OWNER: can a sandboxed
command take the deny off and write? In the session, and after reset()
from a session in another directory.
…cl-cost

# Conflicts:
#	test/sandbox/winsrt.test.ts
…er reset()

Prints only. icacls reads attributes and lists the parent before it opens
a file, which the account cannot do once the grant is gone, so its refusal
proves little. SetFileSecurityW opens for WRITE_DAC alone.
…d say what was received

The last attempt measured nothing: Add-Type could not compile inside the
sandbox, so the call was never made.
PowerShell could not work from the session's directory (it may not list
the parents), so the last attempt failed before it reached the file. It
now goes to the account's own temp directory first and is given the long
name with the verbatim prefix. Python's ctypes makes the raw call.
…ult, not a crash

The last run stopped where the host tried to read the file after the first
bare call, and then could not remove its own directory. Report that, go on
to the other three attempts, and take the files back before removing them.
@ronleizrowice-ant
ronleizrowice-ant deleted the experiment/windows-acl-cost branch September 29, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant