Description:
I was originally browsing through project's FAQ on the
[website](https://kernelsu.org/) and noticed a few discrepancies across
the text.<br>I edited them out, and once having finished with the FAQ, I
looked through other website pages as well.
Changes:
- updated documentation for the project's website (English version).
--
P.S. I actually appreciate the partial documentation on GKI and in-depth
Android mechanisms present in it. While there is of course documentation
from Google, it is nice to have guidelines from a more practical
standpoint.
### enable CONFIG_KSU on the website documentation.
Added support for KernelSU by enabling CONFIG_KSU in the kernel
defconfig located at `arch/arm64/configs/vendor/your_defconfig`. Please
ensure to verify the correct location of the file. Note that on some
devices, the defconfig may be located in `arch/arm64/configs`.
---------
Signed-off-by: 明 <akariondev@gmail.com>
Signed-off-by: akari <akariondev@gmail.com>
1. Divide the patches into a separate file segment
2. Fix the ISO C90 grammar warning in fs/open.c
Conflict: JA_JP Folder does not do how-to-integrate-for-non-gki.md
Change-Id: I23a611eb937d9cb3da7a2d97046e0b57f1efc4d6
Co-authored-by: admin <paper@localhost>
Hi @tiann.
Thanks for the great project, I had great fun playing around with it.
This PR mainly tries to further minimize the possible delays caused by
KernelSU hooking.
There are 3 major changes:
- Processes with 0 < UID < 2000 are blocked straight-up before going
through the allow_list.
I don't see any need for such processes to be interested in root, and
this allows returning early before going through a more expensive
lookup.
If there's an expected breakage due to this change, I'll remove it. Let
me know.
- A page-sized (4K) bitmap is added.
This allows O(1) lookup for UID <= 32767.
This speeds up `ksu_is_allow_uid()` by about 4.8x by sacrificing a 4K
memory. IMHO, a good trade-off.
Most notably, this reduces the 99.999% result previously from worrying
milliseconds scale to microseconds scale.
For UID > 32767, another page-sized (4K) sequential array is used to
cache allow_list.
Compared to the previous PR #557, this new approach gives another nice
25% performance boost in average, 63-96% boost in worst cases.
Benchmark results are available at
https://docs.google.com/spreadsheets/d/1w_tO1zRLPNMFRer49pL1TQfL6ndEhilRrDU1XFIcWXY/edit?usp=sharing
Thanks!
---------
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>