-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Kernel: Add the actual UID by parsing the UID in /data/user_de/ #2759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…[app] directory Prioritize retrieving the application UID from /data/user_de. If this fails, fall back to retrieving it from packages.list. Fix unstable application UID acquisition Signed-off-by: ShirkNeko <[email protected]>
Co-authored-by: Copilot <[email protected]>
Enhance scan support for active users in /data/user_de Signed-off-by: ShirkNeko <[email protected]>
- Remove the deprecated USER_DATA_LEGACY_BASE_PATH path -Increase the size of USER_DATA_PATH_LEN to 384
|
提交 efb0c44 以后,为多用户扫描添加可选开关
|
|
建议不添加开关,刚看了下,全部扫一个用户的所有应用其实几十毫秒就能完成,没必要增加复杂性 |
看术哥怎么说吧,对于内核来说确实越小的开销越好 |
|
我也不建议加开关。之前 comment 里面的 Optional 指的是对开发者而言的,如果想做可以加上,不想做就不做;并非把这个选择权给用户,用户看到这个开关可能会很懵逼。 |
好的 |
- Use a cached buffer as an array-based stack to avoid panics caused by overly deep traversal.
INTCAM: no information
TPU: no information
TNR: no information
MFC: no information
BO: no information
[ 4.715484] [I] [DSS] Last AVB: avb_ret=ERROR_VERIFICATION
[ 4.715890] [I] [DSS] Last AVB: avb_veritymode=enforcing
[ 4.716289] [I] [DSS] Last AVB: avb_error_parts=boot
[ 4.717085] [I] [LNXDBG] build info set by kernel
RAMDUMP_MSG.txt:
reset message: KP: kernel stack overflow
UUID: e2faff80-83ea-c240-ac75-d7b8a528c892
last kernel version: 6.1.134-android14-11-g23e556daebf3-ab13800907
aosp kernel version: 6.1.145-android14-11-g8d713f9e8e7b-ab13202960
build: google/shiba/shiba:16/BP3A.250905.014/13873947:user/release-keys
RST_STAT: 0x1 - CLUSTER0_NONCPU_WDTRESET
GSA_RESET_STATUS: 0x0 -
Reboot reason: 0xbaba - Kernel PANIC
Reboot mode: 0x0 - Normal Boot
[ 4.719030] [I] [DSS] -------------------- DSS LOGS END --------------------
Reboot Info:
RST_STAT: 0x180000 - PIN_RESET | PO_RESET
GSA_RESET_STATUS: 0x0 -
Reboot reason: 0xbaba - Kernel PANIC
Reboot mode: 0x0 - Normal Boot
Signed-off-by: ShirkNeko <[email protected]>
`[ 23.379244][ T5074] ufshcd-qcom 1d84000.ufshc: ............. ufs dump complete .......... [ 23.379263][ T5074] dump-reason-buffer-size: 256 [ 23.379267][ T5074] dump-reason-pidbuffer:PID: 5074, Process Name: throne_tracker [ 23.379295][ T5074] qcom_q6v5_pas a3380000.remoteproc-soccp: waking SOCCP from panic path [ 23.379455][ T5074] CPU0 next event is 23368000000 [ 23.379456][ T5074] CP.rkp_only' to 'true' in property file '/odm/build.prop': SELinux permission check failed [ 1.248057][ T1] init: Do not have permissions to set 'ro.oplus.nfc.support.tee' to 'true' in pro 23.379459][ T5074] CPU5 next event is 23368000000 [ 23.3794 1.248059][ T1] init: Do not have permissions to set 'ro.oplus.eid.enable.state' to '1' in property file '/odm/build.prop':l-3d0: snapshot: device is powered off [ 23.589323][ T5074] Kernel Offset: 0x1738a00000 from 0xffffffc080000000 [ 23.589325][ T5074] PHYS_OFFSET: 0x80000000 [ 23.589326][ T5074] CPU features: 0x000000,00000000,70024f43,95fffea7 [ 23.589328][ T5074] Memory Limit: none [ 23.589490][ T5074] mhi mhi_110e_00.01.00: [E][mhi_debug_reg_dump] host pm_state:M2 dev_state:M2 ee:MISSION MODE [ 23.589505][ T5074] mhi mhi_110e_00.01.00: [E][mhi_debug_reg_dump] device ee: MISSION MODE dev_state: M2` Signed-off-by: ShirkNeko <[email protected]>
|
我觉得直接在内核中直接遍历/data是否会导致部分机型在解析时如果遇到了加密或挂载状态有概率会导致内核死锁 |
|
因为它是一个动态目录,而不是像packages.list一样是一个静态文件 |
move to always kthreaded and mitigate sporadic deadlocks on ref tiann/KernelSU#2757 tiann/KernelSU#2759
Added filesystem type checks to prevent dangerous paths
|
这些fs magic是怎么选的 |
…nnecessary info * tiann#2759 Introduce /data/user_de/0 scanning, however upon testing, we got a lot of dmesg log spam about scanned packages. <timestamp> KernelSU: Found package: com.android.vending, uid: 10372 This reduce the unused dmesg bloating. Signed-off-by: rsuntk <[email protected]>
…nnecessary info * tiann tiann#2759 Introduce /data/user_de/0 scanning, however upon testing, we got a lot of dmesg log spam about scanned packages. <timestamp> KernelSU: Found package: com.android.vending, uid: 10372 This reduce the unused dmesg bloating. Co-authored-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> Signed-off-by: ShirkNeko <[email protected]>
* Based on tiann#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! - Added self-healing lock mechanism: * Reset scan_lock if /data/user_de/0 scan fails * Reset pkg_lock if /data/user_de/0 scan later succeeds * Always prefers /data/user_de/0 when accessible * Prevents lock from becoming stuck forever Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! - Added self-healing lock mechanism: * Reset scan_lock if /data/user_de/0 scan fails * Reset pkg_lock if /data/user_de/0 scan later succeeds * Always prefers /data/user_de/0 when accessible * Prevents lock from becoming stuck forever Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> Co-authored-by: rifsxd <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! - Added self-healing lock mechanism: * Reset scan_lock if /data/user_de/0 scan fails * Reset pkg_lock if /data/user_de/0 scan later succeeds * Always prefers /data/user_de/0 when accessible * Prevents lock from becoming stuck forever Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> Co-authored-by: rifsxd <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! - Added self-healing lock mechanism: * Reset scan_lock if /data/user_de/0 scan fails * Reset pkg_lock if /data/user_de/0 scan later succeeds * Always prefers /data/user_de/0 when accessible * Prevents lock from becoming stuck forever Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> Co-authored-by: rifsxd <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> kernel: handle throned UID change if manager is reinstall or changed drop old UID and throne the new one when the manager is reinstalled or changed
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! - Added self-healing lock mechanism: * Reset scan_lock if /data/user_de/0 scan fails * Reset pkg_lock if /data/user_de/0 scan later succeeds * Always prefers /data/user_de/0 when accessible * Prevents lock from becoming stuck forever Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> Co-authored-by: rifsxd <[email protected]>
* Based on tiann#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]> Signed-off-by: Rama Bondan Prakoso <[email protected]> Conflicts: kernel/Makefile kernel/apk_sign.c
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
|
怎么回到/data/user_de/0了 |
我发现遍历多个用户会有很高的概率造成死锁 |
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
|
we decided to move these stuffs to userspace daemon |
That's great, but I've already done it |
* Based on tiann/KernelSU#2759 - This may not perfect (such as lock), but tests were fine on ASUS Zenfone Max Pro M2 (X01BD), Android 16 (AOSP) - Any suggestion or bug reports is highly appreciated! Tested-by: rsuntk <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: ShirkNeko <[email protected]>
/data/user_de/{userid}/[package]解析对应用户应用的UIDpackages.list获取