66 Commits

Author SHA1 Message Date
AlexLiuDev233
fdf5e7104e refactor: kpm: memory management migrate to sukisu side (#539)
* refactor: kpm: memory management migrate to sukisu side

* fix: build warning in some gki2 device

fix stack frame size warning (maybe) in gki2 device, specialy in ShirkNeko's device

* chore: use pr_info instead of printk

* feat: check the validity of pointers sent from user space
Sometimes, ksud or other root processes might request a kpm ioctl,
but data incorrectly, such as invalid pointer,
which cause the kernel to crash.

If the request is made by ksud at boot time, the situation is even worse,
as it can cause the system to enter the boot loop.

Therefore, I believe we need to check pointer integrity in kernel space to fix this problem.

---------

Co-authored-by: Saksham <typeflu@gmail.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-11-08 18:11:29 +08:00
ShirkNeko
d286f49e11 [skip ci]kernel: Migrating KPM to ioctl 2025-11-04 00:52:13 +08:00
Cloud_Yun
75fe8c9b6a kpm: remove incorrect "<" to fix compilation error (#418)
i'm so sorry

Signed-off-by: Cloud_Yun <1770669041@qq.com>
2025-09-24 21:48:03 +09:00
Cloud_Yun
ed7dc01fb2 kpm: fix compilation errors (#396)
Sorry, I made another mistake

Signed-off-by: Cloud_Yun <1770669041@qq.com>
2025-09-17 20:01:12 +08:00
Cloud_Yun
7d475e642f kpm: 改进可读性 (#392)
* kpm: improving readability
Honestly, this format is really messy

Signed-off-by: Cloud_Yun <1770669041@qq.com>

* kpm: fix missing int label
my bad (((

Signed-off-by: Cloud_Yun <1770669041@qq.com>

---------

Signed-off-by: Cloud_Yun <1770669041@qq.com>
2025-09-17 20:01:05 +08:00
Prslc
0fdd7d437f kernel(kpm): Fix typo in printk logs (#311)
Signed-off-by: Prslc <prslc113@gmail.com>
2025-08-06 17:02:38 +08:00
liankong
e7cef05c6a 修复 2025-03-31 20:28:26 +08:00
liankong
9c902fb264 2 2025-03-31 20:24:56 +08:00
liankong
079f74d960 更改返回值处理方式 2025-03-31 19:47:22 +08:00
liankong
3e928365de 1 2025-03-31 18:51:20 +08:00
liankong
47ba174fb1 尝试支持clang关闭优化 2025-03-31 18:31:21 +08:00
liankong
9446296daa 尝试禁用对壳函数的优化 2025-03-31 18:19:55 +08:00
liankong
1b06f7d317 关掉所有对壳函数的优化 2025-03-31 18:08:09 +08:00
liankong
dec9a72b41 增加壳函数信息打印 2025-03-31 17:17:21 +08:00
liankong
593cbaa067 添加壳函数防止被inline优化掉 2025-03-31 16:55:51 +08:00
liankong
fb8906e371 4 2025-03-31 16:19:52 +08:00
liankong
df943250ac 3 2025-03-31 16:07:29 +08:00
liankong
6b3d2bef12 1 2025-03-31 15:22:30 +08:00
liankong
2e711c3ac9 3 2025-03-31 15:13:13 +08:00
liankong
60cb41c76b 1 2025-03-31 14:04:04 +08:00
liankong
af78f3bac4 转变为仅在内核留下Stub在外部加载KPM 2025-03-31 13:55:48 +08:00
liankong
fff86dcc8d 4 2025-03-30 21:06:56 +08:00
liankong
5ec053ca34 3 2025-03-30 20:39:23 +08:00
liankong
e9f1631b06 根据KP修复 2025-03-30 20:29:43 +08:00
liankong
3db338da3e 2 2025-03-30 20:10:50 +08:00
liankong
d126d0f5b8 1 2025-03-30 20:03:40 +08:00
liankong
40bada35c6 尝试修复 2025-03-30 19:56:04 +08:00
liankong
877e4f9416 修复调用错误 2025-03-30 19:42:09 +08:00
liankong
5f5f677b7b 修复 2025-03-30 19:38:19 +08:00
liankong
4abd35fb44 10 2025-03-30 19:27:27 +08:00
liankong
e68afb04eb 9 2025-03-30 19:18:38 +08:00
liankong
bf2be96b29 8 2025-03-30 19:17:42 +08:00
liankong
b0b5048b01 7 2025-03-30 18:57:51 +08:00
liankong
aff69af690 6 2025-03-30 18:56:28 +08:00
liankong
c1d156cd6b 5 2025-03-30 18:50:33 +08:00
liankong
440fe972f4 4 2025-03-30 18:35:47 +08:00
liankong
79c0bebcf5 3 2025-03-30 18:30:44 +08:00
liankong
f6134b47da 2 2025-03-30 18:25:40 +08:00
liankong
8c282b28a0 1 2025-03-30 18:24:56 +08:00
liankong
656cd11876 根据KP修复 2025-03-30 18:10:14 +08:00
liankong
5e77c08872 尝试修复: 内存段缓存/权限问题? 2025-03-30 17:56:53 +08:00
liankong
c6664af45b 修复 2025-03-30 17:15:25 +08:00
liankong
d6b0ce2565 修复堆栈支持 2025-03-30 17:09:51 +08:00
liankong
770c9632ae 添加panic时打印出对应KPM信息的情况 2025-03-30 16:52:44 +08:00
liankong
06cdd92129 BypassCFI 2025-03-30 16:19:36 +08:00
liankong
315df33bd6 添加跳过CFI检查的机制 2025-03-30 16:14:23 +08:00
liankong
f990bda4e5 绕过CFI限制 2025-03-30 15:37:09 +08:00
liankong
b755ad3602 2 2025-03-30 15:22:40 +08:00
liankong
b060b2827e 1 2025-03-30 15:13:16 +08:00
liankong
73493b288f 按照KernelPatch原代码修复 2025-03-30 14:58:08 +08:00