Commit Graph

10 Commits

Author SHA1 Message Date
Juhyung Park
bd8434f4f4 Hook improvements (take 2) (#563)
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>
2023-06-16 19:53:15 +08:00
aiamadeus
c969ff4011 website: fix web link address of taichi (#391)
Co-authored-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
2023-04-15 15:32:07 +08:00
セリカ・シルフィル
2f67d24ec9 kernel: Support switch branch or tag (#382) 2023-04-13 14:40:56 +08:00
Amicia De Rune
ab07557aa5 website: update id translation (#325)
Signed-off-by: RooGhz720 <rooghz720@gmail.com>
2023-03-27 23:42:42 +08:00
Amicia De Rune
498763505a manager: update id translation language (#259)
Signed-off-by: RooGhz720 <rooghz720@gmail.com>
2023-02-20 14:33:16 +08:00
Amicia De Rune
64c2f6ba5c website: update translation in ID language (#176)
Signed-off-by: RooGhz720 <rooghz720@gmail.com>

Signed-off-by: RooGhz720 <rooghz720@gmail.com>
2023-02-02 13:59:10 +08:00
tiann
a6dddd32b3 website: fix build err 2023-02-02 08:40:28 +08:00
Amicia De Rune
3f625a000b website: fix missing pages in ID language (#168)
Signed-off-by: RooGhz720 <rooghz720@gmail.com>

Signed-off-by: RooGhz720 <rooghz720@gmail.com>
2023-02-01 22:41:53 +08:00
セリカ・シルフィル
87d05fbbdc website:Remind readers how to resolve dependencies for KPROBES (#106)
website:Remind readers how to resolve  dependencies for KPROBES

Power by DeepL and Google Translate
2023-01-24 15:10:44 +08:00
Anggit Febriantoro
505b5ea767 website: add id_ID translation (#96)
* website: add id_ID translation

* website: fix leftover id_ID translation
2023-01-21 15:32:55 +08:00