Skip to content

Commit 9357a8b

Browse files
committed
kernel: synchronize with the latest 'scope-minimized manual hooks'
-v1.5 __backslashxx/KernelSU#5 ____kernel_compat: remove cond. check against ksu_access_ok in ksu_copy_from_user_retry; remove comment <><><> Description addendum: kernel: ksud: migrate ksud execution to security_bprm_check (tiann/KernelSU#2653) backslashxx/KernelSU@1e5994d ... References: ... - old version2 backslashxx/KernelSU@37d5938 ... This now provides a small helper function, ksu_copy_from_user_retry, which explains itself. First we attempt a _nofault copy, if that fails, we try plain. While using strncpy_from_user_nofault was considered, this wont do, this will only copy up to the first \0. ... Stale: tiann/KernelSU#2653 Signed-off-by: backslashxx <[email protected]> <><><> -https://gitlab.com/pershoot/susfs4ksu/-/tree/gki-android14-6.1-dev
1 parent 5d15869 commit 9357a8b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

kernel/kernel_compat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,11 @@ __attribute__((hot))
5050
static long ksu_copy_from_user_retry(void *to,
5151
const void __user *from, unsigned long count)
5252
{
53-
// _nofault does access_ok by itself already
5453
long ret = ksu_copy_from_user_nofault(to, from, count);
5554
if (likely(!ret))
5655
return ret;
5756

5857
// we faulted! fallback to slow path
59-
if (unlikely(!ksu_access_ok(from, count)))
60-
return -EFAULT;
61-
6258
return copy_from_user(to, from, count);
6359
}
6460

0 commit comments

Comments
 (0)