Docs update (#1143)
This commit is contained in:
@@ -46,27 +46,27 @@ If kprobe does not work in your kernel (may be an upstream or kernel bug below 4
|
||||
|
||||
First, add KernelSU to your kernel source tree:
|
||||
|
||||
- Latest tag(stable)
|
||||
::: code-group
|
||||
|
||||
```sh
|
||||
```sh[Latest tag(stable)]
|
||||
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
|
||||
```
|
||||
|
||||
- main branch(dev)
|
||||
|
||||
```sh
|
||||
```sh[ main branch(dev)]
|
||||
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
|
||||
```
|
||||
|
||||
- Select tag(Such as v0.5.2)
|
||||
|
||||
```sh
|
||||
```sh[Select tag(Such as v0.5.2)]
|
||||
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
Then, add KernelSU calls to the kernel source, here is a patch to refer:
|
||||
|
||||
```diff
|
||||
::: code-group
|
||||
|
||||
```diff[exec.c]
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index ac59664eaecf..bdd585e1d2cc 100644
|
||||
--- a/fs/exec.c
|
||||
@@ -92,7 +92,7 @@ index ac59664eaecf..bdd585e1d2cc 100644
|
||||
return __do_execve_file(fd, filename, argv, envp, flags, NULL);
|
||||
}
|
||||
```
|
||||
```diff
|
||||
```diff[open.c]
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index 05036d819197..965b84d486b8 100644
|
||||
--- a/fs/open.c
|
||||
@@ -123,7 +123,7 @@ index 05036d819197..965b84d486b8 100644
|
||||
if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
|
||||
return -EINVAL;
|
||||
```
|
||||
```diff
|
||||
```diff[read_write.c]
|
||||
diff --git a/fs/read_write.c b/fs/read_write.c
|
||||
index 650fc7e0f3a6..55be193913b6 100644
|
||||
--- a/fs/read_write.c
|
||||
@@ -146,7 +146,7 @@ index 650fc7e0f3a6..55be193913b6 100644
|
||||
return -EBADF;
|
||||
if (!(file->f_mode & FMODE_CAN_READ))
|
||||
```
|
||||
```diff
|
||||
```diff[stat.c]
|
||||
diff --git a/fs/stat.c b/fs/stat.c
|
||||
index 376543199b5a..82adcef03ecc 100644
|
||||
--- a/fs/stat.c
|
||||
@@ -170,6 +170,8 @@ index 376543199b5a..82adcef03ecc 100644
|
||||
return -EINVAL;
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
You should find the four functions in kernel source:
|
||||
|
||||
1. do_faccessat, usually in `fs/open.c`
|
||||
@@ -262,3 +264,7 @@ index 45306f9ef247..815091ebfca4 100755
|
||||
```
|
||||
|
||||
Finally, build your kernel again, KernelSU should work well.
|
||||
|
||||
:::info Entering safe mode accidiently?
|
||||
If you use manual integration and do not disable `CONFIG_KPROBES`, then the user may trigger safe mode by pressing the volume down button after booting! Therefore if using manual integration you need to disable `CONFIG_KPROBES`!
|
||||
:::
|
||||
|
||||
Reference in New Issue
Block a user