Skip to content

Dev/lineage 22.2#7

Merged
awkoo merged 59 commits into
stable/lineage-22.2from
dev/lineage-22.2
May 13, 2026
Merged

Dev/lineage 22.2#7
awkoo merged 59 commits into
stable/lineage-22.2from
dev/lineage-22.2

Conversation

@awkoo
Copy link
Copy Markdown
Owner

@awkoo awkoo commented May 13, 2026

No description provided.

awkoo added 30 commits March 7, 2026 16:46
This reverts commit 718a3aa.
This reverts commit d6d716d.
This reverts commit 05028df.
This reverts commit 3f4f96d.
This reverts commit 2e3711c.
This reverts commit e99fbdb.
This reverts commit 3037a77.
awkoo added 27 commits March 7, 2026 17:00
This reverts commit 2bc2623.
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
This reverts commit 9c2b350.
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
Signed-off-by: awkoo <184658409+awkoo@users.noreply.github.com>
@awkoo awkoo merged commit 077ad91 into stable/lineage-22.2 May 13, 2026
7 checks passed
@awkoo awkoo deleted the dev/lineage-22.2 branch May 13, 2026 15:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

return do_execveat_common(fd, filename, argv, envp, flags);

P2 Badge Restore KSU hook for execveat entrypoints

The KSU exec hook was moved out of do_execveat_common() and is now only called in do_execve()/compat_do_execve(), so direct execveat and compat_execveat calls bypass ksu_handle_execveat. This is a behavioral regression from the previous version (which hooked in the common path) and causes sucompat/ksud path rewriting to be skipped for callers that use execveat, leading to inconsistent root behavior depending on which syscall userspace chooses.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fs/stat.c
Comment on lines 94 to 97
int error = -EINVAL;
unsigned int lookup_flags = 0;

#ifdef CONFIG_KSU_MANUAL_HOOK
ksu_handle_stat(&dfd, &filename, &flag);
#endif
if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Re-apply KSU stat hook in shared vfs_fstatat path

ksu_handle_stat was removed from vfs_fstatat() and re-added only in specific syscall wrappers (newfstatat/fstatat64), which means other stat-family syscalls that route through vfs_stat()/vfs_lstat() no longer get rewritten. Previously, all those call paths were covered via vfs_fstatat; now stat/lstat (and compat variants that do not go through the wrapped syscalls) can bypass sucompat path translation, producing inconsistent behavior for /system/bin/su checks.

Useful? React with 👍 / 👎.

Comment thread fs/stat.c
Comment on lines +328 to +330
#if defined(CONFIG_KSU) && !defined(CONFIG_KSU_KPROBES_KSUD)
ksu_handle_newfstat_ret(&fd, &statbuf);
#endif
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid double-adjusting fstat size in syscall-table mode

This adds a direct ksu_handle_newfstat_ret call inside sys_newfstat, but syscall-table hooks already invoke the same helper after calling the original syscall (hook_aarch64_newfstat_ret/hook_armeabi_fstat64_ret). When CONFIG_KSU_TAMPER_SYSCALL_TABLE=y and CONFIG_KSU_KPROBES_KSUD=n (the non-kprobe path), the size patching runs twice and inflates st_size by 2 * ksu_rc_len, which corrupts the fake init.rc sizing KSU depends on.

Useful? React with 👍 / 👎.

Comment thread kernel/reboot.c
Comment on lines +291 to 293
#if defined(CONFIG_KSU) && !defined(CONFIG_KSU_KPROBES_KSUD)
ksu_handle_sys_reboot(magic1, magic2, cmd, &arg);
#endif
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard reboot hook to prevent duplicate KSU supercall handling

Calling ksu_handle_sys_reboot from sys_reboot under !CONFIG_KSU_KPROBES_KSUD overlaps with syscall-table hijack mode, where hook_aarch64_reboot/hook_armeabi_reboot already run the same handler before dispatching to the original syscall. In the CONFIG_KSU_TAMPER_SYSCALL_TABLE=y + CONFIG_KSU_KPROBES_KSUD=n configuration, KSU reboot supercalls are processed twice (for example, KSU fd install runs twice and creates duplicate FDs), so this should also exclude tamper mode.

Useful? React with 👍 / 👎.

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