Skip to content

kernel: use sys_enter tracepoint for sucompat#2866

Merged
Ylarod merged 9 commits into
mainfrom
sucompat
Nov 6, 2025
Merged

kernel: use sys_enter tracepoint for sucompat#2866
Ylarod merged 9 commits into
mainfrom
sucompat

Conversation

@Ylarod

@Ylarod Ylarod commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@Ylarod Ylarod requested a review from tiann November 5, 2025 09:15
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 5, 2025
we zero it anyway on setuid, so we can repurpose it to prevent a recheck.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
@Ylarod Ylarod merged commit bfb767b into main Nov 6, 2025
@Ylarod Ylarod deleted the sucompat branch November 6, 2025 00:22
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to prevent a recheck.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

A temporay Kconfig entry is added in case there is a need to disable this for tests.

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
KOWX712 pushed a commit to KOWX712/KernelSU that referenced this pull request Nov 6, 2025
Co-Authored-By: weishu <twsxtd@gmail.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 6, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 8, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
backslashxx added a commit to backslashxx/KernelSU that referenced this pull request Nov 9, 2025
we zero it anyway on setuid, so we can repurpose it to speedup return checks.
we abuse the fact that task_struct is real hot.

upstream is doing the same thing anyway. set something on task_struct and use it to check.
ref: tiann#2866

rebase of: 36348f2

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
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.

2 participants