Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scx_layered: add HAS_BEEN_RENAMED matching rule #1236

Closed
wants to merge 1 commit into from

Conversation

etsal
Copy link
Contributor

@etsal etsal commented Jan 21, 2025

Add a rule that tests whether a task has been renamed using pthread_rename_np() or through /proc. This has two uses:

  • Using task renames to identify specific tasks in a large application, without requiring modifications for that application.
  • Preventing tasks from renaming themselves to match into a more privileged layer for a performance boost.

@etsal etsal requested review from htejun, JakeHillion, hodgesds and likewhatevs and removed request for JakeHillion January 21, 2025 19:37
@htejun
Copy link
Contributor

htejun commented Jan 21, 2025

Hmm... this is rather trivial to defeat, so I'm not sure how meaningful this is. There are other gating mechanisms already (e.g. cgroup membership), wouldn't that be sufficient?

@likewhatevs
Copy link
Contributor

I think this is more about covering a case that cmdjoin doesn't cover:

  • I don't know the name of the threads I care about (or don't always know), but I do know that rename will be called on it.

@etsal etsal closed this Jan 29, 2025
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.

3 participants