Coconut
7be61b9657
Make Huawei 4.9 Kernel compiler Happy and Does not affect other kernels ( #374 )
...
Adapt to SELinux with Huawei 4.9.xxx kernel without affecting other
mainstream kernels
2023-04-13 17:08:05 +08:00
Dhruv Gera
7be405e4e4
selinux: Update 4.9 to the correct check ( #324 )
...
4.9's last release aka 4.9.337 still needs the same fallbacks as 4.9.212
and breaks otherwise, upgrade this to fix compilation
Tested and working on POCO F1, 4.9.337
2023-03-27 21:26:37 +08:00
weishu
54d2962a0d
kernel: add_type for 5.4 is supported actually.
2023-03-03 11:17:17 +07:00
weishu
849164e4de
kernel: fix compile err
2023-02-20 20:06:56 +07:00
weishu
83b0aed52a
kernel: apply rules should return success when selinux is disabled or permissive
2023-02-20 18:13:53 +07:00
Enes Sastim
8fbdd996de
use selinux_state for 4.9.212+ ( #245 )
...
_selinux_state_ is backported to 4.9 kernel with the 4.9.212 release,
use it to fix the build.
many thanks to @reallysnow for figuring this out.
inspired by
d7c2c5f02a
2023-02-15 11:39:16 +08:00
weishu
b024b5d006
kernel: support add_type for 4.x kernel
...
Co-authored-by: Ookiineko <chiisaineko@protonmail.com >
2023-02-14 19:08:18 +07:00
weishu
d5bab2317e
kernel: correctly handle add attr
2023-02-14 18:52:48 +07:00
weishu
f9b3218ded
kernel: fix policydb length
2023-02-14 14:41:00 +07:00
weishu
20ff530962
kernel: fix sepolicy apply may not work #227
...
Co-authored-by: sekaiacg <sekaiacg@gmail.com >
2023-02-13 09:12:31 +07:00
Aquarius223
6d15cb7e33
kernel: Fix f6967d2c lost parameters after ack-linux 4.14.y (>=163) ( #234 )
...
* [android-4.14-stable tree:
https://github.com/aosp-mirror/kernel_common/commit/5d0939e1 ]
Change-Id: Ice92dd83df4c4f1ae272156cb57f95998e45819f
Co-authored-by: stic-server-open <1138705738@qq.com >
2023-02-12 18:11:28 +08:00
weishu
f6967d2cfb
kernel: reset avc cache for sepolicy
...
Co-authored-by: sekaiacg <sekaiacg@gmail.com >
2023-02-12 13:09:00 +07:00
Aquarius223
66284bfbe3
kernel: Correctly judge the version of selinux_state ( #214 )
...
* Merged related changes in android-common-kernel-4.14.163 [1] Handle
correct checks for older versions (below 4.14.163, 4.9, 4.4)
* fixes 14be7562 , it is required in 4.14.163 kernel, it is not needed in
4.14.163 and later
[1]: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/commits/1cfd8419
Change-Id: Iade104312d058a249667ca836259d5608418bb55
Co-authored-by: admin <paper@localhost>
2023-02-07 15:02:48 +08:00
初羽
14be75629b
kernel: selinux: Fix build error ( #213 )
...
* d77ab8d although fixed some typo, but since there is no include avc.h,
this will cause the build to fail
* Error:
/mnt/HDD/fish/aospa/kernel/msm-4.9/drivers/staging/ksu/selinux/selinux.c:60:2:
error: use of undeclared identifier 'selinux_enforcing'
selinux_enforcing = enforce;
^
/mnt/HDD/fish/aospa/kernel/msm-4.9/drivers/staging/ksu/selinux/selinux.c:81:9:
error: use of undeclared identifier 'selinux_enforcing'
return selinux_enforcing;
^
2 errors generated.
Change-Id: I4cc8917b2b73ca467873222e02d498da8718988e
2023-02-07 09:50:55 +08:00
小さい猫
d77ab8dbff
kernel: selinux: fix more typos introduced in #166 ( #212 )
...
i didn't realize these typos in #181
Signed-off-by: Ookiineko <chiisaineko@protonmail.com >
2023-02-06 16:31:26 +08:00
小さい猫
199f5cc223
fix some typos introduced in #166 ( #181 )
...
Signed-off-by: Ookiineko <chiisaineko@protonmail.com >
Co-authored-by: f19 <58457605+F-19-F@users.noreply.github.com >
Co-authored-by: Scirese <nuclearlight91@gmail.com >
2023-02-02 23:38:04 +08:00
f19
4f2b8b7077
kernel: backport to 4.4 ( #166 )
...
These changes make KernelSU work on kernel4.4
[link](https://github.com/F-19-F/android_kernel_oneplus_msm8998 ).
LINUX_VERSION_CODE macro changes have been vertied on 4.4 4.9 4.14.
For kernel 4.4,just pick two commits
* [introduce
KernelSU](2993524f2f )
* [allow init exec ksud under
nosuid](3df9df42a6 )
2023-02-01 19:48:36 +08:00
skbeh
46913671a8
kernel, ksud: collect binaries into /data/adb/ksu ( #161 )
2023-02-01 17:58:58 +08:00
weishu
ab6d483c32
kernel: fix sepolicy rule which contains *
2023-01-31 20:51:02 +07:00
weishu
b9e27621ee
kernel: support sepolicy
2023-01-31 18:54:31 +07:00
weishu
413a8d0a2f
kernel: support selinux state transition
2023-01-26 16:05:14 +07:00
weishu
1852652029
kernel: add sepolicy calls
2023-01-26 16:05:14 +07:00
Ylarod
db600d5ea0
kernel: precise trigger timing of post-fs-data ( #118 )
...
* kernel: add report_event cmd
* ksud: report event
* kernel: trigger on_post_fs_data
* ksud: comment unused code
* [skip ci] run clang-format
Signed-off-by: Ylarod <me@ylarod.cn >
* ci: use custom key to sign official bootimgs
* format ksud
* reject non root
* remove
Signed-off-by: Ylarod <me@ylarod.cn >
2023-01-26 11:29:02 +08:00
Ylarod
06aaae1335
kernel: fix missing log tag ( #117 )
2023-01-25 22:24:00 +08:00
Ylarod
2f970f7ab8
kernel: refact ( #113 )
...
* refact
* sort inlude
* update
* unregister execve kprobe
* update log
* don't unregister if not in kprobe
* opt for no kprobe
* opt for no kprobe
* stop debug
* don't forget to call ksu_uid_observer_exit
* rename core to core_hook
* direct call do_persistent_allow_list
* add prefix
* use getter, add warn
* add wrapper
* run clang-format
clang-format --style="{BasedOnStyle: InheritParentConfig, SortIncludes: true}" -i kernel/**/*.[ch]
* try fix wsa x64 build
2023-01-25 21:53:19 +08:00
weishu
e5044b4b6f
kernel: selinux support add new type and add builtin unconstrained file type
2023-01-24 19:48:41 +07:00
weishu
ab36e1fa0c
kernel: add uid observer, correctly prune uid allowlist when app is installed/uninstalled.
2023-01-17 12:44:38 +07:00
weishu
710b933b08
kernel: fix am/pm error in app's su
2023-01-16 15:48:40 +07:00
Ylarod
177d6dba15
kernel: add prefix for functions in sepolicy ( #49 )
...
* kernel: add prefix for functions in sepolicy
* ci: fix 5.15 compile error
2023-01-13 20:05:52 +08:00
セリカ・シルフィル
bf87b134de
Fix error for some non-GKI kernel source code ( #45 )
...
Idea from @Dreamail
2023-01-12 15:11:51 +08:00
weishu
0e0a812a9c
kernel: backport to 4.19 ( #36 )
2023-01-10 23:20:32 +08:00
Ylarod
26f80b7107
kernel: improve include ( #35 )
2023-01-10 19:44:43 +08:00
YuKongA
0c6de7a1ed
kernel: CI build for 5.15.y ( #30 )
2023-01-07 16:39:19 +08:00
weishu
ae18ab2b5e
kernel: inject userspace init events
2023-01-01 23:54:54 +07:00
weishu
b427c86ab3
misc: code format(use kernel code stype: https://www.kernel.org/doc/html/v6.1/process/coding-style.html
2022-12-27 18:21:10 +07:00
weishu
342910771b
kernel: support xperms for sepolicy
2022-12-27 17:43:58 +07:00
weishu
7b3f3d4965
kernel: fix sepolicy db size incorrect
2022-12-27 15:55:54 +07:00
Ylarod
4c9942dd3f
🚨 [kernel] remove warnings ( #20 )
2022-12-24 09:18:38 +08:00
weishu
33096754dd
kernel: fix compile err
2022-12-23 10:46:19 +07:00
weishu
87d1158313
kernel: don't apply rules for permissive/disabled selinux
2022-12-23 08:59:57 +07:00
weishu
fa59434753
kernel: add selinux rules for allowlist
2022-12-23 08:15:35 +07:00
weishu
3196731545
kernel: improve selinux for su context
2022-12-22 22:10:17 +07:00
weishu
9aacf2a64d
kernel: avoding other root process being kprobed
2022-12-21 20:50:55 +07:00
SsageParuders
92a3be8af9
kernel: add ccflags ( #11 )
...
make `Mixing declarations and code is a C99 extension` disappear
2022-12-20 14:04:14 +08:00
weishu
280660125f
kernel: don't setenforce if kernel is already permissive
2022-12-12 22:19:17 +07:00
weishu
820d84e512
kernel: make allowlist available cross boot
2022-12-12 11:17:51 +07:00
tiann
51c84400cf
Init
2022-12-09 22:04:40 +08:00