Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernelsu: LSM: Identify modules by more than name #1785

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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]>
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.

2 participants