Dev/lineage 22.2#7
Conversation
This reverts commit 718a3aa.
This reverts commit 4c08d91.
This reverts commit fc05904.
This reverts commit 8c981a6.
This reverts commit e925354.
This reverts commit 359574c.
This reverts commit 4e6ba9b.
This reverts commit 2a3e4c2.
This reverts commit 510ac91.
This reverts commit 5c755eb.
This reverts commit 4955af7.
…an entity is active" This reverts commit ca07b96.
This reverts commit 742d69d.
This reverts commit 53db227.
This reverts commit d6d716d.
…rvice tree" This reverts commit 7227531.
This reverts commit 1ed63f7.
…roughput" This reverts commit 0e02e43.
This reverts commit 612c7ed.
This reverts commit 05028df.
This reverts commit 618883a.
This reverts commit 74af90e.
This reverts commit 3f4f96d.
This reverts commit 2e3711c.
This reverts commit 25d0a01.
This reverts commit 5241cdd.
This reverts commit e99fbdb.
This reverts commit 830d4b4.
This reverts commit 3037a77.
This reverts commit 171598f.
This reverts commit 2bc2623.
This reverts commit a9cddfd.
This reverts commit 22edd62.
This reverts commit 53ba58b.
This reverts commit 0827cbb.
This reverts commit 3a4cb60.
This reverts commit 659c7d1.
This reverts commit 24995f0.
This reverts commit 109bc60.
This reverts commit 4a0767b.
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>
There was a problem hiding this comment.
💡 Codex Review
kernel_mi845_lineage/fs/exec.c
Line 1866 in 82b068a
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".
| 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 | |
There was a problem hiding this comment.
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 👍 / 👎.
| #if defined(CONFIG_KSU) && !defined(CONFIG_KSU_KPROBES_KSUD) | ||
| ksu_handle_newfstat_ret(&fd, &statbuf); | ||
| #endif |
There was a problem hiding this comment.
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 👍 / 👎.
| #if defined(CONFIG_KSU) && !defined(CONFIG_KSU_KPROBES_KSUD) | ||
| ksu_handle_sys_reboot(magic1, magic2, cmd, &arg); | ||
| #endif |
There was a problem hiding this comment.
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 👍 / 👎.
No description provided.