append to init.rc instead of atrace.rc#232
Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes the initialization file being intercepted and modified from atrace.rc to init.rc, updating the path from /system/etc/init/atrace.rc to /system/etc/init/hw/init.rc. The version is also bumped from 0.12.5 to 0.12.6.
- Changes the target RC file for kernel initialization hooks from atrace.rc to init.rc
- Bumps the version to 0.12.6
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| version | Updates PATCH version from 5 to 6 |
| kernel/patch/android/userd.c | Changes ORIGIN_RC_FILE path from /system/etc/init/atrace.rc to /system/etc/init/hw/init.rc |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #include <uapi/linux/stat.h> | ||
|
|
||
| #define ORIGIN_RC_FILE "/system/etc/init/atrace.rc" | ||
| #define ORIGIN_RC_FILE "/system/etc/init/hw/init.rc" |
There was a problem hiding this comment.
The new path "/system/etc/init/hw/init.rc" is 33 bytes including the null terminator, but the buffer used to compare against it at line 270 is only 32 bytes. This will cause the path comparison to fail because strncpy_from_user will not be able to read the full path. The buffer size needs to be increased to at least 40 bytes to accommodate this path safely.
Ref: tiann/KernelSU#3107