Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

scripts: Port mkdtboimg script to python3#21

Open
mnasibzade wants to merge 9 commits intokutemeikito:fourteen/dynamicfrom
mnasibzade:fourteen/dynamic-non-erofs
Open

scripts: Port mkdtboimg script to python3#21
mnasibzade wants to merge 9 commits intokutemeikito:fourteen/dynamicfrom
mnasibzade:fourteen/dynamic-non-erofs

Conversation

@mnasibzade
Copy link
Copy Markdown

@mnasibzade mnasibzade commented Jan 30, 2025

12:38:51 eklerismunir@DESKTOP-BJ3EVC4 kernelginkgo ±|fourteen/dynamic ✗|→ bash build.sh

Set No KernelSU Install, just skip


KSU not Support, let's Skip

make[1]: Entering directory '/opt/munir/kernelginkgo/out'
  GEN     ./Makefile
arch/arm64/configs/vendor/ginkgo-perf_defconfig:4066:warning: override: reassigning to symbol HAVE_KPROBES

configuration written to .config

make[1]: Leaving directory '/opt/munir/kernelginkgo/out'

Starting compilation...

make[1]: Entering directory '/opt/munir/kernelginkgo/out'
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  Using .. as source for kernel
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    ../scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  DTC     arch/arm64/boot/dts/qcom/trinket.dtb
  CHK     kernel/config_data.h
  DTC     arch/arm64/boot/dts/qcom/ginkgo-trinket-overlay.dtbo
  DTBOIMG arch/arm64/boot/dtbo.img
/bin/sh: 1: python2: not found
make[2]: *** [../arch/arm64/boot/Makefile:74: arch/arm64/boot/dtbo.img] Error 127
make[1]: *** [arch/arm64/Makefile:251: dtbo.img] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/opt/munir/kernelginkgo/out'
make: *** [Makefile:153: sub-make] Error 2

/bin/sh: 1: python2: not found
dtbo img is not compiled, the reason for this is python2;

Python2 is not supported in new Linux operating systems and this version is older than Python3.

To solve the error, I am ported the mkdtboimg file to Python3.

kutemeikito and others added 9 commits January 28, 2025 23:04
head: https://gitlab.com/simonpunk/susfs4ksu/-/commit/96750ec8cb280c22534875ebaaad360cefdec77b

Co-authored-by: simonpunk <simonpunk@users.noreply.github.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This reverts commit e7905dc.

Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This reverts commit 30fc326.

Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This reverts commit cc2070a.

Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
* We lack support for getsockopt and setsockopt progs

Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Change-Id: If3606b5e9ede96bf1537f8e2461a99b02d5d554c
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: mnasibzade <euoryexe@gmail.com>
@kutemeikito kutemeikito force-pushed the fourteen/dynamic branch 2 times, most recently from 2435100 to a337f39 Compare January 31, 2025 08:16
@kutemeikito kutemeikito force-pushed the fourteen/dynamic branch 3 times, most recently from 211b00b to f759845 Compare April 23, 2025 06:24
@kutemeikito kutemeikito force-pushed the fourteen/dynamic branch 7 times, most recently from 450bef2 to 4e1669f Compare June 7, 2025 07:25
@kutemeikito kutemeikito force-pushed the fourteen/dynamic branch 3 times, most recently from c75c7a1 to a8adf05 Compare July 13, 2025 12:11
@kutemeikito kutemeikito force-pushed the fourteen/dynamic branch 5 times, most recently from 4f36db8 to 80a2a88 Compare July 23, 2025 17:24
@kutemeikito kutemeikito force-pushed the fourteen/dynamic branch 2 times, most recently from 4417649 to c810a5d Compare July 26, 2025 06:22
kutemeikito pushed a commit that referenced this pull request Jan 1, 2026
pid_task() dereferences rcu protected tasks array.
But there is no rcu_read_lock() in shutdown_umh() routine so that
rcu_read_lock() is needed.
get_pid_task() is wrapper function of pid_task. it holds rcu_read_lock()
then calls pid_task(). if task isn't NULL, it increases reference count
of task.

test commands:
   %modprobe bpfilter
   %modprobe -rv bpfilter

splat looks like:
[15102.030932] =============================
[15102.030957] WARNING: suspicious RCU usage
[15102.030985] 4.19.0-rc7+ #21 Not tainted
[15102.031010] -----------------------------
[15102.031038] kernel/pid.c:330 suspicious rcu_dereference_check() usage!
[15102.031063]
	       other info that might help us debug this:

[15102.031332]
	       rcu_scheduler_active = 2, debug_locks = 1
[15102.031363] 1 lock held by modprobe/1570:
[15102.031389]  #0: 00000000580ef2b0 (bpfilter_lock){+.+.}, at: stop_umh+0x13/0x52 [bpfilter]
[15102.031552]
               stack backtrace:
[15102.031583] CPU: 1 PID: 1570 Comm: modprobe Not tainted 4.19.0-rc7+ #21
[15102.031607] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015
[15102.031628] Call Trace:
[15102.031676]  dump_stack+0xc9/0x16b
[15102.031723]  ? show_regs_print_info+0x5/0x5
[15102.031801]  ? lockdep_rcu_suspicious+0x117/0x160
[15102.031855]  pid_task+0x134/0x160
[15102.031900]  ? find_vpid+0xf0/0xf0
[15102.032017]  shutdown_umh.constprop.1+0x1e/0x53 [bpfilter]
[15102.032055]  stop_umh+0x46/0x52 [bpfilter]
[15102.032092]  __x64_sys_delete_module+0x47e/0x570
[ ... ]

Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
Change-Id: Ideb9fdae191efb594fa2a258d5e559fb0bba39ce
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
kutemeikito pushed a commit that referenced this pull request Jan 1, 2026
pid_task() dereferences rcu protected tasks array.
But there is no rcu_read_lock() in shutdown_umh() routine so that
rcu_read_lock() is needed.
get_pid_task() is wrapper function of pid_task. it holds rcu_read_lock()
then calls pid_task(). if task isn't NULL, it increases reference count
of task.

test commands:
   %modprobe bpfilter
   %modprobe -rv bpfilter

splat looks like:
[15102.030932] =============================
[15102.030957] WARNING: suspicious RCU usage
[15102.030985] 4.19.0-rc7+ #21 Not tainted
[15102.031010] -----------------------------
[15102.031038] kernel/pid.c:330 suspicious rcu_dereference_check() usage!
[15102.031063]
	       other info that might help us debug this:

[15102.031332]
	       rcu_scheduler_active = 2, debug_locks = 1
[15102.031363] 1 lock held by modprobe/1570:
[15102.031389]  #0: 00000000580ef2b0 (bpfilter_lock){+.+.}, at: stop_umh+0x13/0x52 [bpfilter]
[15102.031552]
               stack backtrace:
[15102.031583] CPU: 1 PID: 1570 Comm: modprobe Not tainted 4.19.0-rc7+ #21
[15102.031607] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/08/2015
[15102.031628] Call Trace:
[15102.031676]  dump_stack+0xc9/0x16b
[15102.031723]  ? show_regs_print_info+0x5/0x5
[15102.031801]  ? lockdep_rcu_suspicious+0x117/0x160
[15102.031855]  pid_task+0x134/0x160
[15102.031900]  ? find_vpid+0xf0/0xf0
[15102.032017]  shutdown_umh.constprop.1+0x1e/0x53 [bpfilter]
[15102.032055]  stop_umh+0x46/0x52 [bpfilter]
[15102.032092]  __x64_sys_delete_module+0x47e/0x570
[ ... ]

Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
Change-Id: Ideb9fdae191efb594fa2a258d5e559fb0bba39ce
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants