Skip to content

Commit

Permalink
docs: Updates some
Browse files Browse the repository at this point in the history
Signed-off-by: Rong Tao <[email protected]>
  • Loading branch information
Rtoax committed Jul 27, 2024
1 parent d156d50 commit 2655637
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 26 deletions.
22 changes: 11 additions & 11 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ULPatch Contributing Guidelines
## ULPatch Contributing Guidelines

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.

### Report Bugs

Expand All @@ -14,25 +14,25 @@ If you are reporting a bug, please include:
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.


### Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.


### Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.


### Write Documentation

ULPatch could always use more documentation, whether as part of the
official ULPatch docs, in docstrings, or even on the web in blog posts,
articles, and such.
ULPatch could always use more documentation, whether as part of the official ULPatch docs, in docstrings, or even on the web in blog posts, articles, and such.


### Submit Feedback

The best way to send feedback is to file an issue at [https://github.com/Rtoax/ulpatch/issues](https://github.com/Rtoax/ulpatch/issues)
The best way to send feedback is to file an issue at [https://github.com/Rtoax/ulpatch/issues](https://github.com/Rtoax/ulpatch/issues).

If you are proposing a feature:

Expand Down
13 changes: 6 additions & 7 deletions docs/THEORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ hide:

## Theroy

This page will only introduce the principle of ULPatch, but not the implementation details.
This page only introduce theroy of ULPatch, but not the implementation details.


## ULPatch

### Patch

The following figure shows the hot patch loading process.
The following figure shows the livepatch loading procedures.

![ulpatch](images/ulpatch-patch.drawio.svg)

The detailed steps are as follows:

1. Compile source code into a relocatable ELF file;
1. Compile source code into a relocatable ELF file, it's livepatch file;
2. Load the relocatable ELF file into the target process address space;
3. Relocate the symbols in the patch according to the target process address symbol table;
4. Modify the patch function entry to jump to the patch function;


### Unpatch

The following figure shows the uninstall process of the hot patch.
The following figure shows the uninstall procedures of the livepatch.

![ulpatch::unpatch](images/ulpatch-unpatch.drawio.svg)

Expand All @@ -35,14 +35,13 @@ The `unpatch` operation is the reverse operation of `patch`, but without the rel

## ULTask

It's an useful tool to modify target process.
It's an useful tool to modify target process, I call it **Program Modifier**. `BUILD_ULTASK` decides whether to compile `ultask`. Check manual `ultask(8)` to see more.

TODO


## ULFtrace

Same as [linux ftrace](https://www.kernel.org/doc/html/latest/trace/ftrace.html), need gcc `-pg` compile option.
`BUILD_ULFTRACE` decides whether to compile `ulftrace`.
Same as [linux ftrace](https://www.kernel.org/doc/html/latest/trace/ftrace.html), need gcc `-pg` compile option. `BUILD_ULFTRACE` decides whether to compile `ulftrace`. Check manual `ulftrace(8)` to see more.

TODO
3 changes: 1 addition & 2 deletions docs/code-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The basic configuration of the `.vimrc` file is as follows:
set tabstop=8
set softtabstop=8
set shiftwidth=8
# Maybe needed
set cc=80
```

Expand All @@ -25,5 +24,5 @@ As you can see from manual of `dos2unix(1)`

> In DOS/Windows text files a line break, also known as newline, is a combination of two characters: a Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break is a single character: the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single Carriage Return (CR) character. Nowadays Mac OS uses Unix style (LF) line breaks.
You may often see the special character `^M` under Unix if DOS or Mac format.
You may often see the special character `^M` under Unix like system if code is **DOS or Mac format**.

9 changes: 4 additions & 5 deletions docs/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ This document features basic guidelines and recommendations on how to do ulpatch
In my opinion, if you want to develop and participate in the development of this project together, the following knowledge points need to be understood in advance:

- Linux Basics;
- ELF file format;
- ELF format;
- ELF relocation;
- How the Linux kernel runs an ELF executable;
- How the GNU linker works;
- How Linux kernel runs an ELF executable;
- How GNU linker works;


### Precautions

You can view unfinished development tasks in [TODO-List](./TODO.md), and you neeto obey the [coding style](./code-style.md) rules.

You can view unfinished development tasks in [TODO-List](./TODO.md), and you need to obey the [Coding Style](./code-style.md) and [Contributing](./CONTRIBUTING.md) rules.

File renamed without changes.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ nav:
- Tutorials:
- Code Style: code-style.md
- Developer: developers.md
- Log: LOG.md
- Log: log.md
- ULPatch: ulpatch.md
- ULTask: ultask.md
- Contributing: CONTRIBUTING.md
Expand Down

0 comments on commit 2655637

Please sign in to comment.