Kuan-Wei Chiu [Sun, 3 Sep 2023 20:53:07 +0000 (04:53 +0800)]
Remove duplicated words
Jim Huang [Sun, 3 Sep 2023 07:33:52 +0000 (15:33 +0800)]
Merge pull request #224 from fourcolor/master
Fix typo
Shih-Sheng Yang [Sun, 3 Sep 2023 05:06:13 +0000 (13:06 +0800)]
Fix typo
Amit Dhingra [Sat, 2 Sep 2023 18:24:35 +0000 (20:24 +0200)]
Remove module * parameter from class_create() (#222)
From v6.4, class_create() does not have module *
See commit 11ba11 :
> driver core: class: remove module * from class_create()
>
> The module pointer in class_create() never actually did anything,
> and it shouldn't have been requred to be set as a parameter even
> if it did something. So just remove it and fix up all callers of the
> function in the kernel tree at the same time.
Jim Huang [Sat, 2 Sep 2023 14:48:12 +0000 (22:48 +0800)]
Merge pull request #223 from visitorckw/master
Fix typo
Kuan-Wei Chiu [Sat, 2 Sep 2023 11:57:53 +0000 (19:57 +0800)]
Fix typo
Capitalized the first letter in a sentence.
Jim Huang [Fri, 1 Sep 2023 01:00:29 +0000 (09:00 +0800)]
Merge pull request #221 from visitorckw/master
Fix typo
visitorckw [Thu, 31 Aug 2023 20:32:57 +0000 (04:32 +0800)]
Fix typo
Jim Huang [Mon, 14 Aug 2023 17:41:08 +0000 (01:41 +0800)]
Merge pull request #219 from eeeXun/archlinux
Update dependencies for Arch Linux
eeeXun [Mon, 14 Aug 2023 16:25:14 +0000 (00:25 +0800)]
Update dependencies for Arch Linux
Jim Huang [Fri, 11 Aug 2023 02:38:18 +0000 (10:38 +0800)]
Refine contributor list
Jim Huang [Thu, 10 Aug 2023 07:27:11 +0000 (15:27 +0800)]
Proofread
Jim Huang [Thu, 10 Aug 2023 07:05:19 +0000 (15:05 +0800)]
Always use Debian GNU/Linux explicitly
Jim Huang [Thu, 10 Aug 2023 07:02:31 +0000 (15:02 +0800)]
Proofread
Jim Huang [Thu, 10 Aug 2023 06:47:42 +0000 (14:47 +0800)]
Update contributor list
Jim Huang [Thu, 10 Aug 2023 06:39:31 +0000 (14:39 +0800)]
Proofread
Jim Huang [Thu, 10 Aug 2023 06:31:33 +0000 (14:31 +0800)]
Update contributor list
Jim Huang [Thu, 10 Aug 2023 02:26:11 +0000 (10:26 +0800)]
Proofread
Jim Huang [Thu, 10 Aug 2023 02:06:39 +0000 (10:06 +0800)]
Proofread
Jim Huang [Thu, 10 Aug 2023 02:00:50 +0000 (10:00 +0800)]
Proofread
Jim Huang [Thu, 10 Aug 2023 01:32:45 +0000 (09:32 +0800)]
Merge pull request #218 from linD026/master
kbleds: Replace magic with driver_name
Chih-En Lin [Thu, 10 Aug 2023 00:41:13 +0000 (08:41 +0800)]
kbleds: Replace magic with driver_name
Since the commit
5052df99d3bc ("tty: remove TTY_DRIVER_MAGIC") [1],
the magic field no longer exists in the tty_driver. Instead of
printing the magic field, use the driver_name field.
[1] https://lore.kernel.org/linux-doc/
20220907231109.htnfxzmr6wkuhn2v@tarta.nabijaczleweli.xyz/
Close #216
Close #217
Jim Huang [Sun, 23 Jul 2023 13:17:38 +0000 (21:17 +0800)]
Merge pull request #213 from keytouch/master
procfs: Remove unnecessary cleanup on proc_create failure
keytouch [Sun, 23 Jul 2023 10:41:46 +0000 (18:41 +0800)]
procfs: Remove unnecessary cleanup on proc_create failure
Jim Huang [Sat, 8 Jul 2023 04:11:00 +0000 (12:11 +0800)]
Merge pull request #212 from tylerfanelli/dnf_notes
headers: Update header installation for Fedora
Tyler Fanelli [Sat, 8 Jul 2023 03:58:30 +0000 (23:58 -0400)]
headers: Update header installation for Fedora
Sam Erickson [Wed, 5 Jul 2023 15:14:49 +0000 (10:14 -0500)]
static_key: Include <linux/jump_label.h> (#210)
Chih-En Lin [Wed, 5 Jul 2023 01:44:21 +0000 (09:44 +0800)]
examples: Add missing __init/__exit (#209)
Close #207
Jim Huang [Tue, 4 Jul 2023 23:56:03 +0000 (07:56 +0800)]
Merge pull request #208 from samuelerickson977/master
include linux/init.h in bottomhalf.c
Sam Erickson [Tue, 4 Jul 2023 15:10:18 +0000 (10:10 -0500)]
include linux/init.h in bottomhalf.c
Jim Huang [Mon, 3 Jul 2023 21:37:06 +0000 (05:37 +0800)]
Merge pull request #206 from ekangmonyet/master
Cleanup redundant workflow step, fix release body and timestamp
Ekang Monyet [Mon, 3 Jul 2023 01:47:24 +0000 (09:47 +0800)]
Delete old release and retag latest commit
This ensures the latest commit message and timestamp can be correctly
included in the release.
Ekang Monyet [Mon, 3 Jul 2023 01:32:35 +0000 (09:32 +0800)]
Revert "Delete existing release asset before releasing"
This reverts commit
7ee66c559ff12c254d04c65c54325acbb655133a.
Jim Huang [Tue, 2 May 2023 02:58:15 +0000 (10:58 +0800)]
Merge pull request #200 from lyctw/static_key
Introduce static key in optimizations section
Peter Lin [Mon, 1 May 2023 08:15:58 +0000 (16:15 +0800)]
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>
Jim Huang [Mon, 1 May 2023 15:48:53 +0000 (23:48 +0800)]
Merge pull request #202 from linD026/master
CI: Switch Smatch source code to GitHub mirror
Chih-En Lin [Mon, 1 May 2023 15:26:17 +0000 (23:26 +0800)]
CI: Switch Smatch source code to GitHub mirror
Since the Smatch repository is unavailable recently [1], let's switch
to GitHub mirror, https://github.com/error27/smatch.git [2], instead
of using https://repo.or.cz/smatch.git.
[1] https://lore.kernel.org/all/Y1qf7w%2Fjo8FH5I8G@kadam/
[2] https://lore.kernel.org/all/
20220810105926.GS3460@kadam/
Jim Huang [Thu, 27 Apr 2023 03:28:05 +0000 (11:28 +0800)]
Merge pull request #198 from linD026/master
Remove sleep_on family
Chih-En Lin [Thu, 27 Apr 2023 02:20:48 +0000 (10:20 +0800)]
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.
Jim Huang [Sun, 26 Mar 2023 01:21:53 +0000 (09:21 +0800)]
Fix macOS prerequisites
Jim Huang [Fri, 24 Mar 2023 04:23:24 +0000 (12:23 +0800)]
Merge pull request #193 from linD026/master
procfs: Enforce Linux naming style
Chih-En Lin [Fri, 24 Mar 2023 03:36:33 +0000 (11:36 +0800)]
procfs: Enforce Linux naming style
Jim Huang [Tue, 14 Mar 2023 01:01:22 +0000 (09:01 +0800)]
Merge pull request #189 from linD026/master
Improve the compatibility and fix the missing header
linD026 [Mon, 13 Mar 2023 23:59:42 +0000 (07:59 +0800)]
completion: Improve the compatibility with v5.17+
Since v5.17-rc1, particularly after the commit
cead1855266 ("exit:
Rename complete_and_exit to kthread_complete_and_exit"),
complete_and_exit() is renamed to kthread_complete_and_exit().
Close #188
linD026 [Mon, 13 Mar 2023 23:51:00 +0000 (07:51 +0800)]
chardev2: Fix missing header for {get, put}_user
Jim Huang [Thu, 23 Feb 2023 13:58:20 +0000 (21:58 +0800)]
Merge pull request #187 from linD026/master
Relocate Archlinux code snippet to avoid confusion
Chih-En Lin [Thu, 23 Feb 2023 12:53:27 +0000 (20:53 +0800)]
Relocate Archlinux code snippet to avoid confusion
Close #185
Jim Huang [Thu, 23 Feb 2023 12:33:11 +0000 (20:33 +0800)]
Merge pull request #186 from ashevche/kernel.h
Discourage kernel.h usage and other header cleanups
Andy Shevchenko [Thu, 23 Feb 2023 10:41:23 +0000 (12:41 +0200)]
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>
Andy Shevchenko [Wed, 22 Feb 2023 15:43:27 +0000 (17:43 +0200)]
treewide: Clean up the headers
The rule of thumb is to include the headers we are the direct user of.
In particular, if we need an atomic API, we include <linux/atomic.h>.
On the other hand we should not use headers for no reason. In particular,
if we are not doing any IRQ job, why is the <linux/irq.h> included?
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Andy Shevchenko [Tue, 21 Feb 2023 21:03:25 +0000 (23:03 +0200)]
devicemodel: Remove duplicate owner assignment
platform_driver_register() macro already does the correct assignment for
the owner of the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Jim Huang [Sun, 25 Dec 2022 12:24:10 +0000 (20:24 +0800)]
Merge pull request #184 from linD026/master
syscall: Use openat() instead of open()
linD026 [Sun, 25 Dec 2022 05:31:01 +0000 (13:31 +0800)]
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
Jim Huang [Sun, 25 Dec 2022 04:50:15 +0000 (12:50 +0800)]
Merge pull request #183 from linD026/master
example/syscall: Fix typo and unmatch types
linD026 [Sun, 25 Dec 2022 04:33:52 +0000 (12:33 +0800)]
example/syscall: Fix typo and unmatch types
Jim Huang [Mon, 12 Dec 2022 17:11:45 +0000 (01:11 +0800)]
Merge pull request #182 from lyctw/master
Add error message when sha256 algorithm is not supported
Peter Lin [Mon, 12 Dec 2022 14:55:06 +0000 (22:55 +0800)]
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>
Jim Huang [Sun, 11 Dec 2022 08:49:44 +0000 (16:49 +0800)]
Merge pull request #181 from lyctw/master
Fix typo in interrupt handlers section
Peter Lin [Sun, 11 Dec 2022 06:45:42 +0000 (14:45 +0800)]
Fix typo in interrupt handlers section
%s/assembler/assembly language/
Signed-off-by: Yu Chien Peter Lin <peterlin.tw@pm.me>
Jim Huang [Fri, 9 Dec 2022 22:21:02 +0000 (06:21 +0800)]
CI: Bump validation host versioning
The CI is now running on Ubuntu 22.04-LTS along with gcc-11 and
clang-format-12 .
Jim Huang [Fri, 9 Dec 2022 22:11:09 +0000 (06:11 +0800)]
CI: Bump dependency versions
Jim Huang [Fri, 9 Dec 2022 22:07:56 +0000 (06:07 +0800)]
Make the naming for GitHub Actions more consistent
Iûnn Kiàn-îng [Thu, 10 Nov 2022 14:24:37 +0000 (22:24 +0800)]
Convey secure boot specific considerations (#177)
Jim Huang [Thu, 3 Nov 2022 17:35:33 +0000 (01:35 +0800)]
Merge pull request #176 from linD026/master
vinput: Fix missing error code
Chih-En Lin [Thu, 3 Nov 2022 17:16:14 +0000 (01:16 +0800)]
vinput: Fix missing error code
Fix the missing error code when register_chrdev() failed.
The report is from Smatch:
Smatch failed: 1 warning(s), 0 error(s)
/home/runner/work/lkmpg/lkmpg/examples/vinput.c:372 vinput_init() warn: missing error code 'err'
Johan Calle [Mon, 24 Oct 2022 13:52:05 +0000 (22:52 +0900)]
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 ..."
Jim Huang [Sat, 22 Oct 2022 16:28:11 +0000 (00:28 +0800)]
Merge pull request #124 from tzuyichan/patch
Fix grammar
Jim Huang [Fri, 21 Oct 2022 01:36:47 +0000 (09:36 +0800)]
Fix dead link
Close #173
Kohei Otsuka [Tue, 4 Oct 2022 16:52:07 +0000 (18:52 +0200)]
Fix typo (#169)
Jim Huang [Fri, 23 Sep 2022 05:52:06 +0000 (13:52 +0800)]
Merge pull request #168 from linD026/master
Fix dereference NULL pointer with proc_lseek
Jim Huang [Fri, 23 Sep 2022 05:51:25 +0000 (13:51 +0800)]
Merge pull request #167 from linD026/minmax
Improve the compatibility with kernel < v5.10
linD026 [Wed, 21 Sep 2022 05:55:30 +0000 (13:55 +0800)]
Fix dereference NULL pointer with proc_lseek
Since the operations are static storage duration, the pointer in
operation structures will initialize with NULL. But, the kernel
doesn't check whether the pointer is NULL or not when calling it.
Related Discussion:
- https://github.com/sysprog21/lkmpg/issues/165
- https://github.com/sysprog21/lkmpg/issues/160
Close #165
linD026 [Wed, 21 Sep 2022 05:53:06 +0000 (13:53 +0800)]
Improve the compatibility with kernel < v5.10
min()/max() splited from kernel.h to minmax.h since v5.10-rc1.
Before v5.10, minmax.h doesn't exist [1].
[1] https://github.com/torvalds/linux/commit/
b296a6d53339a79082c1d2c1761e948e8b3def69
Jim Huang [Thu, 8 Sep 2022 14:24:20 +0000 (22:24 +0800)]
Merge pull request #163 from linD026/read-write
procfs{2, 3}: Change to use offset parameter
linD026 [Wed, 7 Sep 2022 22:51:14 +0000 (06:51 +0800)]
procfs{2, 3}: Change to use offset parameter
To make sure the behavior of the read and write operations are correct
with offset, update it each time. Also, since it is using the offset,
modify the part of read for removing unnecessary variable.
Jim Huang [Thu, 8 Sep 2022 04:22:12 +0000 (12:22 +0800)]
Merge pull request #164 from linD026/file-proc_ops
Improve the description of proc in file-ops
Jim Huang [Thu, 8 Sep 2022 04:19:42 +0000 (12:19 +0800)]
Merge pull request #162 from linD026/master
Fix the buffer length may cause a read error
linD026 [Thu, 8 Sep 2022 00:24:47 +0000 (08:24 +0800)]
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.
linD026 [Wed, 7 Sep 2022 21:37:48 +0000 (05:37 +0800)]
Fix the buffer length may cause a read error
Since The length of the message buffer is BUF_LEN. When writing the
BUF_LEN length of the string it will overwrite the last character
(usually it is '\0' from the initialization). And, because the read
operation uses the character in the message buffer ('\0') to stop the
read loop. It will cause the read operation will read out of the
message buffer when the length parameter of read() is not lower than
or equal to BUF_LEN. So add one more byte space to avoid this problem.
Cheng-En Lee [Sat, 27 Aug 2022 02:14:17 +0000 (19:14 -0700)]
Add additional macos installation instruction in README.md (#157)
Signed-off-by: Cheng-En Lee <chengenl@usc.edu>
Jim Huang [Sat, 2 Jul 2022 14:38:06 +0000 (22:38 +0800)]
Merge pull request #156 from linD026/master
Adjust "in the mean time" description of tasklet
Chih-En Lin [Sat, 2 Jul 2022 13:58:50 +0000 (21:58 +0800)]
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
Jim Huang [Sat, 2 Jul 2022 05:49:15 +0000 (13:49 +0800)]
Merge pull request #155 from linD026/master
Add more information about the CFI of timer API
Chih-En Lin [Fri, 1 Jul 2022 13:09:38 +0000 (21:09 +0800)]
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
Jim Huang [Sat, 25 Jun 2022 15:39:19 +0000 (23:39 +0800)]
Merge pull request #154 from leovincentseles/master
module_init and module_exit are defined in module.h
leovincentseles [Sat, 25 Jun 2022 15:15:48 +0000 (23:15 +0800)]
module_init and module_exit are defined in module.h
Both module_init and module_exit are defined in
include/linux/module.h
Jim Huang [Thu, 28 Apr 2022 11:19:29 +0000 (19:19 +0800)]
CI: Bump dependency versions
Jim Huang [Mon, 18 Apr 2022 19:22:04 +0000 (03:22 +0800)]
Merge pull request #150 from asas1asas200/zeng-feat-attributes
Add description of sysfs attribute
asas1asas200 [Sun, 17 Apr 2022 14:20:18 +0000 (22:20 +0800)]
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.
Jim Huang [Sat, 16 Apr 2022 18:52:15 +0000 (02:52 +0800)]
Merge pull request #149 from linD026/master
Fix potential concurrent problems in chardev2.c
linD026 [Sat, 16 Apr 2022 16:23:49 +0000 (00:23 +0800)]
Fix potential concurrent problems in chardev2.c
After forking, Each file descriptor in the child refers to the same
open file description as the parent. So when calling open() before
fork(), the child can access the device file without checking by
exclusive access in device_open(). It may cause race conditions
in device_ioctl().
Because of that, it is unnecessary to check the multiple access
in device_open(). It just needs check in device_ioctl(), since
read(), write(), seek() system call are atomic [1][2].
Related discussion:
- https://github.com/sysprog21/lkmpg/issues/148
[1] https://lore.kernel.org/lkml/
53022DB1.
4070805@gmail.com/
[2] https://www.kernel.org/doc/html/latest/filesystems/files.html
Close #148
Jim Huang [Sun, 10 Apr 2022 14:59:12 +0000 (22:59 +0800)]
Merge pull request #147 from linD026/master
Fix wrong regular expression of clang-format
linD026 [Sun, 10 Apr 2022 14:51:59 +0000 (22:51 +0800)]
Fix wrong regular expression of clang-format
Jim Huang [Sun, 10 Apr 2022 13:38:52 +0000 (21:38 +0800)]
Merge pull request #146 from linD026/master
Fix typo
linD026 [Sun, 10 Apr 2022 12:31:19 +0000 (20:31 +0800)]
Fix typo
Jim Huang [Fri, 8 Apr 2022 10:15:57 +0000 (18:15 +0800)]
Merge pull request #145 from linD026/master
Introduce Virtual Input Device Driver
linD026 [Tue, 5 Apr 2022 15:51:54 +0000 (23:51 +0800)]
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
Jim Huang [Fri, 18 Mar 2022 19:20:41 +0000 (20:20 +0100)]
Merge pull request #144 from henrybear327/improvement/latexmk
Use latexmk instead of pdflatex for PDF generation
Chun-Hung Tseng [Fri, 18 Mar 2022 18:56:25 +0000 (19:56 +0100)]
Update README and Makefile for the latexmk existence check
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
Jim Huang [Fri, 18 Mar 2022 18:26:43 +0000 (02:26 +0800)]
Tweak the style of sudoers file