Skip to content

Fix oppo devices - #163

Merged
diabl0w merged 17 commits into
masterfrom
dev
Oct 19, 2026
Merged

diabl0w merged 17 commits into
masterfrom
dev

Conversation

@diabl0w

@diabl0w diabl0w commented Oct 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

diabl0w and others added 17 commits October 15, 2026 14:49
…le time

-fno-sanitize=kcfi was removing the per-function kCFI type hash that newer
kernels (e.g. SM8850) embed before each function and verify before calling
init_module via a function pointer. Without it, do_one_initcall panics with
a CFI type mismatch.

The original motivation for -fno-sanitize=kcfi was to prevent cfi_init on
older kernels (5.15/BENGAL) from crashing when processing kCFI sections in
the module. Strip .kcfi_traps post-link with objcopy instead — this removes
the section that confuses old-kernel cfi_init while preserving the type
annotations new kernels require.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R4n56oMAQR79xSmj2PzVXz
Move all post-build objcopy work from the root Makefile's container script
into lkm/Makefile so standalone builds (outside the container) get the same
size reduction. The root Makefile now just calls make/make clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R4n56oMAQR79xSmj2PzVXz
Add a no-op module_exit so the compiler emits cleanup_module and
__cfi_jt_cleanup_module. Some kernels' cfi_init walks both
__cfi_jt_init_module and __cfi_jt_cleanup_module at load time; without
a module_exit, the cleanup_module CFI jump table entry is absent and
cfi_init crashes in strcmp.

Remove -fno-sanitize=cfi: it suppresses __cfi_jt_* generation and those
entries live in .init.data/.exit.data, not strippable post-link.

Drop .kcfi_traps from objcopy strip list — section is never present.

intentionally fail init to unload immediately; avoids triggering
mrdump module-loaded callbacks on MTK devices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R4n56oMAQR79xSmj2PzVXz
@diabl0w
diabl0w merged commit 452191a into master Oct 19, 2026
17 checks passed
@Android-Artisan

Copy link
Copy Markdown
Contributor

Next is fix samsung devices lol, last working version on my flip 7 was 3.1, ill make a issue soon

@diabl0w
diabl0w deleted the dev branch October 21, 2026 22:13
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