Skip to content

feat: KernelSU v1.0.2-45-legacy#3

Merged
rsuntk merged 5 commits into
mainfrom
test_branch
Jan 17, 2025
Merged

feat: KernelSU v1.0.2-45-legacy#3
rsuntk merged 5 commits into
mainfrom
test_branch

Conversation

@rsuntk
Copy link
Copy Markdown
Owner

@rsuntk rsuntk commented Jan 17, 2025

No description provided.

… is not neccessary

Just make things simple.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>
Keep the kernel driver clean.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>
Signed-off-by: rsuntk <rissu.ntk@gmail.com>
This can cause debugging process harder.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>
Signed-off-by: rsuntk <rissu.ntk@gmail.com>
@rsuntk rsuntk merged commit 1d1d58d into main Jan 17, 2025
@rsuntk rsuntk deleted the test_branch branch January 17, 2025 16:00
@ShevT
Copy link
Copy Markdown

ShevT commented Jan 18, 2025

The problem with compilation is due to - "kernel: put get_cred_rcu() function inside core_hook.c so backporting...." (4e5651a)


../../../../../../../../drivers/kernelsu/core_hook.c:149:7: error: incompatible pointer types passing 'atomic_long_t *' (aka 'atomic64_t *') to parameter of type 'atomic_t *' [-Werror,-Wincompatible-pointer-types]
  149 |         if (!atomic_inc_not_zero(&nonconst_cred->usage))
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../../../include/linux/atomic.h:544:51: note: expanded from macro 'atomic_inc_not_zero'
  544 | #define atomic_inc_not_zero(v)          atomic_add_unless((v), 1, 0)
      |                                                           ^~~
../../../../../../../../include/linux/atomic.h:531:47: note: passing argument to parameter 'v' here
  531 | static inline int atomic_add_unless(atomic_t *v, int a, int u)
      |                                               ^
1 error generated.
make[3]: *** [/scripts/Makefile.build:364: drivers/kernelsu/core_hook.o] Error 1
make[2]: *** [/scripts/Makefile.build:678: drivers/kernelsu] Error 2

Clang 19.0.1 compiler

@rsuntk
Copy link
Copy Markdown
Owner Author

rsuntk commented Jan 18, 2025

Ah i see the issue, lemme try to fix it.
Your kernel source is using atomic_long_t.

rsuntk added a commit that referenced this pull request Jan 18, 2025
Thanks to @ShevT for reporting this issue
#3 (comment)

I forgot that 'atomic_long_inc_not_zero' does not exist on cred.h, thus grep command always return '1' instead of '0'

Hopefully this will fix that issue.

Reference:
gregkh/linux@123e44b
@rsuntk
Copy link
Copy Markdown
Owner Author

rsuntk commented Jan 18, 2025

Kernel 4.14.

This is fixed on 3a16da0

@ShevT
Copy link
Copy Markdown

ShevT commented Jan 18, 2025

I ran the compilation to test it.

@ShevT
Copy link
Copy Markdown

ShevT commented Jan 18, 2025

Yes, everything is fine now. Thank you.

ShevT pushed a commit to crdroidandroid/android_kernel_oneplus_sm8150 that referenced this pull request Jan 18, 2025
Thanks to @ShevT for reporting this issue
rsuntk/KernelSU#3 (comment)

I forgot that 'atomic_long_inc_not_zero' does not exist on cred.h, thus grep command always return '1' instead of '0'

Hopefully this will fix that issue.

Reference:
gregkh/linux@123e44b
rsuntk added a commit that referenced this pull request May 9, 2025
* kernel: put get_cred_rcu() function inside core_hook.c so backporting is not neccessary

Just make things simple.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>

* kernel: refine path_umount detection

Keep the kernel driver clean.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>

* kernel: Refine kernelsu cmdline

Signed-off-by: rsuntk <rissu.ntk@gmail.com>

* kernel: throne_tracker: Only print if its valid kernelsu manager

This can cause debugging process harder.

Signed-off-by: rsuntk <rissu.ntk@gmail.com>

* kernel: throne_tracker: Ensure to log this on debug

Signed-off-by: rsuntk <rissu.ntk@gmail.com>

---------

Signed-off-by: rsuntk <rissu.ntk@gmail.com>
rsuntk added a commit that referenced this pull request May 9, 2025
Thanks to @ShevT for reporting this issue
#3 (comment)

I forgot that 'atomic_long_inc_not_zero' does not exist on cred.h, thus grep command always return '1' instead of '0'

Hopefully this will fix that issue.

Reference:
gregkh/linux@123e44b
cyberc3dr pushed a commit to cyberc3dr/KernelSU that referenced this pull request Apr 16, 2026
Vietnamese: @SaleOff (rsuntk#3, rsuntk#4, rsuntk#10, rsuntk#15, rsuntk#16, rsuntk#17, rsuntk#21), @PhuScam (rsuntk#8, rsuntk#27), @VietnameseTranslation (rsuntk#24)
Indonesian: @Neebe3289 (rsuntk#18, rsuntk#20, rsuntk#22. rsuntk#25)
Co-Authored-By: ꑄℭѧᝰ.ᐟ <133284637+saleoff@users.noreply.github.com>
Co-Authored-By: Juno Bủh <229590747+phuscam@users.noreply.github.com>
Co-Authored-By: Neebe3289 <107115607+neebe3289@users.noreply.github.com>
Co-Authored-By: VietnameseTranslation <219519027+vietnamesetranslation@users.noreply.github.com>
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