Commit Graph

161 Commits

Author SHA1 Message Date
heartofrain
a8558121d9 Revise the depiction of return type of proc_create(). 2023-10-07 16:50:23 +08:00
Amit Dhingra
8150c1dead
Change word in tasklet description
The word 'defator' is unable to be found in a lexicon. Change the word
'defator' with 'drawbacks' which should imply the negative meaning intended
in the sentence.
2023-10-06 23:13:09 +02:00
Amit Dhingra
bf523b2332 Simplify code by removal of outer struct
Two struct completion(s) are encapsulated within another 'struct machine'.
Simplify the code by removing the outer struct and let the struct
completion(s) be self-standing.

Update description in tex to match code.
2023-09-28 06:02:39 +00:00
Kuan-Wei Chiu
ee617a1e53 Fix typo 2023-09-04 04:58:31 +08:00
Kuan-Wei Chiu
d45485f637 Remove duplicated words 2023-09-04 04:53:07 +08:00
Shih-Sheng Yang
34eb62045e
Fix typo 2023-09-03 13:06:13 +08:00
Kuan-Wei Chiu
292339e628 Fix typo
Capitalized the first letter in a sentence.
2023-09-02 19:57:53 +08:00
visitorckw
e976c32ceb Fix typo 2023-09-01 04:32:57 +08:00
Jim Huang
7c4e64e51a Proofread 2023-08-10 15:27:11 +08:00
Jim Huang
55aee85570 Always use Debian GNU/Linux explicitly 2023-08-10 15:05:19 +08:00
Jim Huang
261332c805 Proofread 2023-08-10 15:02:31 +08:00
Jim Huang
12be76c5dc Proofread 2023-08-10 14:39:31 +08:00
Jim Huang
fae9ac44d4 Proofread 2023-08-10 10:26:11 +08:00
Jim Huang
ae308fd092 Proofread 2023-08-10 10:06:39 +08:00
Jim Huang
e6e8e48d81 Proofread 2023-08-10 10:00:50 +08:00
Tyler Fanelli
4f0fa3b17c headers: Update header installation for Fedora 2023-07-08 00:00:20 -04:00
Peter Lin
421b9b04fe Introduce static key in optimizations section
This patch introduces static key technique and adds a kernel module
to demostrate how to use static key to optimize an almost unlikely
branch, the module can interact with userspace thru a character device.

Signed-off-by: Peter Lin <peterlin@qilai.dev>
2023-05-02 10:33:36 +08:00
Chih-En Lin
d2d54ca639 Remove sleep_on family
Since the commit b8780c363d80 ("sched: remove sleep_on() and friends
"), the description about sleep_on is incorrect and the example code has
been fixed by replacing it with wait_event family. Let's also fix the
description to match the corrected code.
2023-04-27 10:20:48 +08:00
Chih-En Lin
b0d4204405 Relocate Archlinux code snippet to avoid confusion
Close #185
2023-02-23 21:03:49 +08:00
Andy Shevchenko
b8bbcd8a07 treewide: Replace kernel.h by printk.h
The kernel.h should be discouraged for use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2023-02-23 12:54:30 +02:00
linD026
78e3e062c4 syscall: Use openat() instead of open()
Since sys_open is deprecated and some architectures don't support it.
We switch the implementation to sys_openat.

Moreover, in some architectures like x86-64, the prototype of syscall,
for example, openat(), might have been changed to struct pt_regs [1]
but we cannot promise that so support the two types
(sys_openat and pt_regs).

Also, to prevent other untraced tasks print out the information, add
the uid checking in our_sys_openat().

[1] https://lore.kernel.org/lkml/20180405095307.3730-1-linux@dominikbrodowski.net/

Close #159
2022-12-25 14:27:03 +08:00
Peter Lin
3133ee5293 Add error message when sha256 algorithm is not supported
It failed silently when crypto_alloc_tfm() failed, so add an error
message to inform the developer to enable sha256 algorithm support.

Signed-off-by: Yu Chien Peter Lin <peterlin.tw@pm.me>
2022-12-12 23:07:20 +08:00
Peter Lin
55e7a155fa Fix typo in interrupt handlers section
%s/assembler/assembly language/

Signed-off-by: Yu Chien Peter Lin <peterlin.tw@pm.me>
2022-12-11 14:46:08 +08:00
Iûnn Kiàn-îng
9c25e59b43
Convey secure boot specific considerations (#177) 2022-11-10 22:24:37 +08:00
Johan Calle
9892214764
Fix typo (line 1019) (#174)
Changed "The choose of two different functions depend on whether ..." to
"The choice between two different functions depends on whether ..."
2022-10-24 21:52:05 +08:00
Jim Huang
b950a100f6
Merge pull request #124 from tzuyichan/patch
Fix grammar
2022-10-23 00:28:11 +08:00
Kohei Otsuka
7b38f3713a
Fix typo (#169) 2022-10-05 00:52:07 +08:00
linD026
9db8c92cf5 Improve the description of proc in file-ops
Currently, the description of the proc_ops in the file operation section
will confuse the reader with registering the device. Add more hints to
avoid it.
2022-09-08 08:34:06 +08:00
Chih-En Lin
87bd9ceb34 Adjust "in the mean time" description of tasklet
Since the init function may be interrupted. Tweak the description of
"in the mean time".

Close #152
2022-07-02 22:31:48 +08:00
Chih-En Lin
3d1fb29070 Add more information about the CFI of timer API
Currently, in 13.2 Flashing keyboard LEDs, the description of the
control-flow integrity, "Furthermore, the function prototype with
unsigned long argument may be an obstacle to the control-flow integrity
.", will confuse the reader.

It may lead the reader to think about hardware-assisted CFI like Intel
CET uses the shadow stack attack for ROP (backward-edge protection). But
the description of CFI here talks about the function pointer checking
with the prototype (forward-edge protection).

So add more information to make it more clear.

Close #151
2022-07-01 21:31:08 +08:00
leovincentseles
22ebabe297 module_init and module_exit are defined in module.h
Both module_init and module_exit are defined in
include/linux/module.h
2022-06-25 23:15:48 +08:00
asas1asas200
04465b1a44 Add description of sysfs attribute
The description of the attribute was added in sysfs section and referenced in vinput section.

In vinput section, just described the class_attribute and some macros about sysfs class.

Add file name at vinput-related examples begin.
2022-04-19 01:54:24 +08:00
linD026
6e7eda6398 Fix typo 2022-04-10 20:31:19 +08:00
Jim Huang
3beae490ee
Merge pull request #145 from linD026/master
Introduce Virtual Input Device Driver
2022-04-08 18:15:57 +08:00
linD026
636c1e702d Introduce Virtual Input Device Driver
Add the new section of input device driver, vinput[1].

Also, update the Acknowledgements.

[1] https://github.com/sysprog21/vinput
2022-04-06 17:13:29 +08:00
Jim Huang
d78afd22ac Tweak the style of sudoers file 2022-03-19 02:26:43 +08:00
Jim Huang
19521bc60a Refine wording on module loading
Close #134
2022-03-16 14:32:08 +08:00
Steven Lung
d771c50166 Fix grammar 2022-03-09 14:14:08 +08:00
linD026
d8216ff7b6
Fix incoherent ioctl examples (#139)
Previously ioctl.c is a userspace program for chardev2.c and chardev.h [1].
But now, this file is an independent kernel module, and the original code
disappear.
This patch adds back the original userspace code and renames it to
userspace_ioctl.c.

[1] https://tldp.org/LDP/lkmpg/2.4/html/x856.html
2022-02-21 00:53:29 +08:00
Ching-Hua (Vivian) Lin
fb15882377
Add book cover (#136)
Both PDF and HTML generation are supported.
2022-01-09 20:26:07 +08:00
萌新阿岩
5c0f9b0abc
Update Makefile and Add explanation (#133)
Add `PWD := $(CURDIR)` in Makefile and the explanation about `sudo make`
when only having `PWD`.
2021-12-28 20:45:50 +08:00
RinHizakura
2cc4264f72 Introduce the new method for chardev registration
Instead of using the old register_chrdev / unregister_chrdev API,
cdev interface which is newer and would be better for new driver programmers
in most cases. This commit is trying to give the brief overview for
this different interface.
2021-12-23 21:12:14 -08:00
Jim Huang
e4016013b2 modinfo does not require superuser permission 2021-12-04 16:13:22 +00:00
lyctw
e2a6fcdae9 Fix typo 2021-11-16 14:50:01 +08:00
Jim Huang
d88d0cd227
Merge pull request #123 from fennecJ/patch
Generate contributor list as a modular inclusion
2021-11-08 12:07:57 +08:00
manbing
07a9741f79
Adjust the position of Figure 1 (#126) 2021-11-08 12:06:19 +08:00
fennecJ
af09a8a1e5 Add script to gen contributor list and contrib.tex
This script do mainly 2 things:
1.
Generate file `Contributors` with git log in following format:
Contributor's name,<1-st e-mail>[,<2nd e-mail>][,<3rd e-mail>]...
The 2-nd email and so on are based on file `.mailmap` in the root
directory of the repo.
Note that it will also append contributors in File `Include`; and
will NOT append contributors in File `Exclude`.
If there are new contributors, script will sort `Contributor` after
append new contributors into each file; Otherwise it do nothing.

2.
Generate contrib.tex based on `Contributors` into lib/contrib.tex in
following format:
[name], (reasonable width) % [1-st e-mail]
Which is inspired by The Not So Short Introduction to Latex 2e[1]

We need to maintain `.mailmap`, `Exclude` and `Include` manually.
All Chinese name should be converted into English/Pinyin in `.mailmap`,
otherwise we may need extra pkg for latex to parse Chinese characters.

[1] - https://tobi.oetiker.ch/lshort/lshort.pdf

Close #68
2021-11-03 19:32:48 +08:00
tzuyichan
b95f6f5cf6
Fix grammar
in the hope ... will -> in the hope that ... would
get -> got
where are ... gone -> where have ... gone
For those not -> For those who are not
2021-10-27 05:00:05 +08:00
demonsome
67149719a4
Explain inode at the first occurrence (#115)
The explanation of "inode" should appear at the first occurrence to which readers
can refer.
2021-10-25 22:46:02 +08:00
Jim Huang
28018227fc Remove out-of-date syscall information
Close #121
2021-10-14 20:51:09 +08:00