Skip to content

Conversation

@hmtheboy154
Copy link
Contributor

This is based on commit "LSM: Identify modules by more than name" https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID for KernelSU as that's the date the Github repo was created.

@hmtheboy154
Copy link
Contributor Author

image
uh oh

@hmtheboy154
Copy link
Contributor Author

Oh no I didn't think about this 🥲
https://elixir.bootlin.com/linux/v6.8/source/security/security.c#L558

@hmtheboy154
Copy link
Contributor Author

hmtheboy154 commented May 31, 2024

Extra patches might be needed, but this is directly into the kernel
https://elixir.bootlin.com/linux/v6.8/source/security/security.c#L55
Basically add CONFIG_KSU into LSM_CONFIG_COUNT define. I think we might have to update the wiki for this @tiann

@hmtheboy154
Copy link
Contributor Author

image
yep, it's working now

@hmtheboy154
Copy link
Contributor Author

@tiann
Copy link
Owner

tiann commented Jun 1, 2024

This won't work for LKM mode, we need another solution.

@hmtheboy154
Copy link
Contributor Author

This won't work for LKM mode, we need another solution.

Find a way to reduce lsm active count to make it lower than LSM_CONFIG_COUNT and then load the LKM ?

@hmtheboy154
Copy link
Contributor Author

photo_2024-06-01_19-39-34

ok this is bad 🤔

@yujincheng08 yujincheng08 marked this pull request as draft July 6, 2024 05:41
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Sep 2, 2025
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Sep 2, 2025
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Sep 10, 2025
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Sep 10, 2025
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
backslashxx pushed a commit to backslashxx/KernelSU that referenced this pull request Sep 10, 2025
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
luyanci pushed a commit to luyanci/KernelSU that referenced this pull request Oct 2, 2025
This is based on commit "LSM: Identify modules by more than name"
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.8&id=f3b8788cde61b02f1e6c202f8fac4360e6adbafc

Which is a requirement to build on kernel 6.8+. I use 912 as the ID
for KernelSU as that's the date the Github repo was created.

Signed-off-by: hmtheboy154 <[email protected]>
@hmtheboy154
Copy link
Contributor Author

With the fact that some recent phones start shipped with kernel 6.12, if anyone try this PR please remember that you need to put this into your kernel
android-generic/kernel-zenith@7042991

or else you won't be able to boot

@backslashxx
Copy link
Contributor

backslashxx commented Oct 3, 2025

@hmtheboy154 lsm hook hack is kill damn, ksu has to hook prctl and setuid on kprobe for LKM

@hmtheboy154
Copy link
Contributor Author

@hmtheboy154 lsm hook hack is kill damn, ksu has to hook prctl and setuid on kprobe for LKM

if it can, I don't even know if LKM is possible after 6.8+

@backslashxx
Copy link
Contributor

backslashxx commented Oct 3, 2025

its still doable, the issue is that they have to move the hooks to kprobe (prctl, setuid)
not great when theres actual apps that probe prctl nowadays, its just gonna make it easier for them

for gki, even this can be skipped, we can just manually hook on security/security.c
straight up like how 3.x integration, but yeah way dirtier code

rsuntk pushed a commit to rsuntk/KernelSU that referenced this pull request Oct 3, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann#1785
tiann#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
@hmtheboy154 hmtheboy154 mentioned this pull request Oct 7, 2025
ShirkNeko pushed a commit to SukiSU-Ultra/SukiSU-Ultra that referenced this pull request Oct 7, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann/KernelSU#1785
tiann/KernelSU#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
ShirkNeko pushed a commit to SukiSU-Ultra/SukiSU-Ultra that referenced this pull request Oct 7, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann/KernelSU#1785
tiann/KernelSU#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
ShirkNeko pushed a commit to SukiSU-Ultra/SukiSU-Ultra that referenced this pull request Oct 8, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann/KernelSU#1785
tiann/KernelSU#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
luyanci pushed a commit to vc-teahouse/SukiSU-Ultra that referenced this pull request Oct 8, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann/KernelSU#1785
tiann/KernelSU#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
luyanci pushed a commit to vc-teahouse/SukiSU-Ultra that referenced this pull request Oct 8, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann/KernelSU#1785
tiann/KernelSU#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
LeCmnGend pushed a commit to LeCmnGend/KernelSU that referenced this pull request Oct 9, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann#1785
tiann#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
LeCmnGend pushed a commit to LeCmnGend/KernelSU that referenced this pull request Oct 10, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann#1785
tiann#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
LeCmnGend pushed a commit to LeCmnGend/KernelSU that referenced this pull request Oct 10, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann#1785
tiann#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
LeCmnGend pushed a commit to LeCmnGend/KernelSU that referenced this pull request Oct 10, 2025
* This is a squashed of un-merged pull requests of Official KernelSU
* LKM support are not available.
* Require this additional patch to avoid kernel panic because of "Too many LSMs registered":
android-generic/kernel-zenith@7042991

* Un-merged pull requests of Official KernelSU:
tiann#1785
tiann#2662

* This commit probably not 100% completed.

Signed-off-by: rsuntk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants