Commit Graph

10 Commits

Author SHA1 Message Date
Jim Huang
1c916a79a9 CI: Bump validation host versioning
The CI is now running on Ubuntu 22.04-LTS along with gcc-11 and
clang-format-12 .
2022-12-10 06:21:02 +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
linD026
6b6b6635cf
CI: Introduce Smatch for static analysis (#125)
Smatch[1][2] is a pluggable static analysis for C. It may help us find
out the potential problem of the example code.

Doing with smatch, if set the --file-output flag, it will generate the
{}.c.smatch report for each c file. This will make a little bit
complicated to collect all the report messages. So, here we stay at the
default setting, stdout for the smatch messages.

For more information, see:
- https://lwn.net/Articles/696624/
- https://elinux.org/images/d/d3/Bargmann.pdf

Also, fix the warning from Smatch:

Smatch failed: 1 warning(s), 1 error(s)
lkmpg/examples/procfs2.c:57 procfile_write() error: buffer overflow 'procfs_buffer' 1024 <= 1024
lkmpg/examples/kbleds.c:58 kbleds_init() warn: argument 5 to %lx specifier is cast from pointer

Furthermore, the effect of the write operation in procfs2.c is too
implied. So after writing, print the buffer every time.

Close #122

[1] https://github.com/error27/smatch
[2] https://repo.or.cz/w/smatch.git
2021-11-01 08:20:41 +08:00
linD026
d6e1044aa7 CI: introduce GCC static analysis
Since GCC version 10, there has been a new option -fanalyzer for
static analysis. It can make the CI pipeline more comprehensive.

Also, the static analysis updates in GCC 11, but we cannot install
the GCC 11 in ubuntu 20.04 straightforwardly right now, which is
the GitHub workflow environment (see status-check.yaml).
For this reason, we stay at the GCC 10.

Close #117

Reference
- https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html
- https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10
- https://lwn.net/Articles/870290/
- https://developers.redhat.com/blog/2021/01/28/static-analysis-updates-in-gcc-11
- 7d73c3e9c5
2021-10-08 19:41:22 +08:00
linD026
25d82ec47f CI: Integrate the Sparse into the CI pipeline
Sparse[1] is a semantic parser for C language, it can find out the
potential problem of the example code.

[1] https://www.kernel.org/doc/html/latest/dev-tools/sparse.html
2021-09-15 12:43:56 +08:00
linD026
5070fcd9d0
CI: Run static analysis with Cppcheck (#105)
Cppcheck[1] is integrated into CI pipeline for running static analysis.

However, Cppcheck is known to report false-positive, and we have to
suppress some warnings in advance.

[1] https://cppcheck.sourceforge.io/
2021-09-14 00:52:04 +08:00
Jim Huang
0a4aad90b4 Make CI validation more verbose 2021-09-13 04:03:04 +00:00
fennecJ
377e63449b Remove kbleds from non-working list
Since #98 has fixed the error with kbleds caused by changed timer API,
now it can work again with docker container.
2021-09-12 11:47:00 +08:00
fennecJ
3fcbb8e182
Improve CI pipeline to automate module testing (#95)
The script executes insmod/rmmod twice with available kernel modules.

Close #72
2021-09-08 20:38:50 +08:00
Jim Huang
2db805da2c Check coding style in CI 2021-08-17 13:07:06 +08:00