Emil Velikov [Thu, 30 Jul 2026 15:22:34 +0000 (16:22 +0100)]
modinfo: rework parm string length validation
Currently, we if we fail to find a name, description or type in the
value token we emit an error and continue.
At the same time, if the name is longer than INT_MAX we error out.
Move the validation (overall strlen(value), which includes namelen)
further up the call stack and make it a non-fatal.
This allows us to garbage collect the no longer reachable error paths
around {add,process}_param().
Emil Velikov [Sat, 18 Jul 2026 23:36:55 +0000 (00:36 +0100)]
modinfo: rework parm handling
Currently, we grow a list of parm entries and print each entry upon
being added. In addition, we have two separate code-paths for printing
depending if "--field parm" was provided on not.
Swap that for sufficiently sized, pre-allocated, buffers and unify the
print paths. Effectively fixing the broken `modinfo -0 modulename`
output.
v2:
- Find matching or empty entry in a single loop (add_param)
- match up-to UINT_MAX parm/parmtype entries
- drop unneeded INT_MAX checks for strlen(value)
- don't return success if we fail to [cm]alloc
Emil Velikov [Sun, 26 Jul 2026 16:47:28 +0000 (17:47 +0100)]
modinfo: add a couple of print_{all,parm} booleans
Add a couple of booleans to arguably make the code a wee-bit cleaner
to follow. A follow-up commit will further reuse the latter (print_parm)
to avoid repeatedly calling streq().
Emil Velikov [Sat, 18 Jul 2026 22:11:46 +0000 (23:11 +0100)]
modinfo: flesh out and reuse print_line helper
Thus using the correct format when `--null` is specified. In particular,
the both name + filename use the correct format, when --null (mode) is
requested.
Emil Velikov [Sat, 18 Jul 2026 20:26:03 +0000 (21:26 +0100)]
modinfo: use kmod_module_get_initstate() for is_builtin
Currently we assume that the module is built-in if
kmod_module_get_path() returns NULL... Which isn't quite true, since it
can fail for a range of reasons.
Use kmod_module_get_initstate() instead, which will incur in an extra
open("/sys/module/.../initstate") + read() for non built-in modules.
Emil Velikov [Sun, 2 Aug 2026 14:19:30 +0000 (15:19 +0100)]
Manually handle unrecognised getopt arguments
Was meaning to add a negative test or two to modinfo - where a invalid
option is passed into the program - only to notice that the default will
print the path, alongside the program name.
While fixing that, I've decided to pimp-up the reporting to also show
the help screen.
Eg. from this:
/usr/bin/insmod: unrecognized option '--versoin'
... to this
insmod: ERROR: unrecognised option '--versoin'
Usage:
insmod [options] filename [module options]
Options:
-f, --force DANGEROUS: forces a module load, may cause
data corruption and crash your machine.
implies --force-modversion and
--force-vermagic
--force-modversion Ignore module's version
--force-vermagic Ignore module's version magic
-s, --syslog print to syslog, not stderr
-v, --verbose enables more messages
-V, --version show version
-h, --help show this help
Lucas De Marchi [Wed, 5 Aug 2026 14:07:11 +0000 (09:07 -0500)]
ci: Fix MAKEFLAGS handling
Fix commit 47999f7f4fcd ("ci: Workaround alpine CI build"). When tested
it created an inavlid yml and the overall of CI status showed as "passed",
giving the wrong impression that it had fixed the breakage. On the
contrary, it only became even more borken. Try to fix it for good.
Signed-off-by: Lucas De Marchi <ldemarchi@kernel.org>
Lucas De Marchi [Mon, 3 Aug 2026 20:29:31 +0000 (15:29 -0500)]
ci: Add pahole to alpine
Drop warning from CI:
make[2]: Entering directory '/__w/kmod/kmod/builddir-gcc-64/testsuite/module-playground'
warning: pahole version differs from the one used to build the kernel
The kernel was built with: 130
You are using: 0
Emil Velikov [Sat, 18 Jul 2026 17:42:20 +0000 (18:42 +0100)]
COPYING: drop double-space the Copyright example
I am assuming that the COPYING boilerplate is the source for all the
varying double-space instances we have (had) in-tree.
Update those, so we can avoid them in the future.
As always, the typical IANAL disclaimer applies. To the best of my
knowledge and understanding the two forms are identical. With the
original being _slightly_ annoying especially if your editor
high-lights the double-space.
Emil Velikov [Sat, 18 Jul 2026 17:35:02 +0000 (18:35 +0100)]
Remove double-space in Copyright boilerplate
The amount of double space (and variation) in the Copyright statements
is... Interesting.
As always, the typical IANAL disclaimer applies. To the best of my
knowledge and understanding the two forms are identical. With the
original being _slightly_ annoying especially if your editor
high-lights the double-space.
Emil Velikov [Sat, 18 Jul 2026 17:28:03 +0000 (18:28 +0100)]
testsuite: add respective Copyright year
The Copyright header was pulled props to the weakdep test, which was
written/merged in 2024. Add the respective year, so the copyright
statement is valid.
Emil Velikov [Sat, 18 Jul 2026 17:10:12 +0000 (18:10 +0100)]
testsuite: rename test-list -> test-libkmod-list
Unlike the other libkmod tests, this one explicitly covers internal-only
API. As such keep it separate, to avoid pulling (again) the internal
headers and potentially leaking implementation details where they should
not be found.
We're starting to consolidate/fold the dozen+ tests into a few top-level
ones. This is the first step, renaming the first shared (utility) into
the final unified location.
We're moving both test-init and test-remove at the same time, while
renaming the latter, to workaround a meson complaint as below:
rootfs ... is dirty, please run 'meson compile testsuite/create-...
Suspecting some form of bug in the test and/or setup, but unwrapping
that's for another day.
Emil Velikov [Sat, 18 Jul 2026 14:01:32 +0000 (15:01 +0100)]
testsuite: rename test-array -> test-shared
We're starting to consolidate/fold the dozen+ tests into a few top-level
ones. This is the first step, renaming the first shared (utility) into
the final unified location.
Emil Velikov [Sat, 18 Jul 2026 12:59:38 +0000 (13:59 +0100)]
testsuite: flip testsuite iteration order
The way the tests are added to the section is implementation specific.
Altohough in practise both gcc and clang to so in revert order. Thus if
we have tests defined as:
Emil Velikov [Sat, 18 Jul 2026 15:23:18 +0000 (16:23 +0100)]
testsuite: add FIXME note about libkmod-internal.h include
We really do not want to have dependency on an internal header(s), since
it opens the possibility of leaking implementation details into what
should be API level tests.
Although, it could be that we should remove kmod_list from the public
API all together... Something for another day either way.
Emil Velikov [Sat, 18 Jul 2026 14:54:05 +0000 (15:54 +0100)]
testsuite: add TS_ prefix to logging macros
The tests have their own namespace (mostly at least), move the logging
macros to it accordingly. Thus we can remove the undef hacks that we
have in-tree.
Emil Velikov [Sat, 18 Jul 2026 14:25:32 +0000 (15:25 +0100)]
testsuite: convert a should-be-unreachable LOG to an ERR
Of the two call-sites to remove_directory() we have:
- we explicitly stat/S_ISDIR check prior, and
- the folder must exist, or out init_module.c implementation is broken
Thus is seems very unlikely to trigger the LOG and in practice, it
indicates a bug/race condition. Convert it to an ERR and return -1 to
indicate that.
Emil Velikov [Sat, 18 Jul 2026 14:20:56 +0000 (15:20 +0100)]
testsuite: remove overly verbose logging
The delete_module.c (LD_PRELOAD module) prints the result of the
TC_DELETE_MODULE_RETCODES parsing. At the same time the init_module.c
(and it's variant) don't bother.
Glancing throughout, no other test uses LOG so let's drop the logging
allowing us to garbage collect (hide really) the potentially conflicting
macros.
The existing macro has a few shortcomings:
- lowercase, non-prefixed so it can be confused with assert(3), which
has varying behaviour depending on -DNDEBUG
- the return value is constant across the project
Introduce TS_ASSERT which is modelled after KUNIT_ASSERT, addressing the
above and tweaking the output format.
Existing instances of assert_return will be updated with a follow-up
commit.
Emil Velikov [Fri, 3 Jul 2026 21:46:17 +0000 (22:46 +0100)]
ci: specify/run only the gcov pluin
The default has changed with codecov v5, where all existing plugins are
attempted. In practise we only need gcov, which seems to work file.
Specify it, saving us the following warning:
coverage.py is not installed or can't be found.
Initially I tried adding it to the Ubuntu image, only to notice they
lack the looked for `coverage.py` executable and instead have
`python{version.minor}-coverage.py`.
Emil Velikov [Sun, 31 May 2026 20:07:03 +0000 (21:07 +0100)]
ci: enable mbedtls by default for most instances
As the mbedtls introduction commit says, mbedtls v3 is not available in
Debian 12 and Ubuntu 22.04/24.04.
Although to ensure we have sufficient build coverage, let's enable it
everywhere else. While also adding a permutation where it's the only
crypto implementation built-in.
Emil Velikov [Sun, 15 Feb 2026 21:11:58 +0000 (21:11 +0000)]
mbedlts: add as alternative to openssl
In a recent conversation improving the depmod runtime, we noticed that
kmod_module_signature_info() normally takes 20-25% of the total runtime
for uncompressed modules.
The related attempts at using threads, also indicated that OpenSSL may
not be thread-safe... At least, not the way we use it.
Enter Mbed TLS (formerly known as polarssl), self described as:
Mbed TLS is a C library that implements X.509 certificate manipulation ...
... Its small code footprint makes it suitable for embedded systems. ...
There are 3 major/LTS versions in the wild,
- v2 released in 2015 - Debian 12- and Ubuntu 24.04-
- v3 released in 2021 - Debian 13+, Ubuntu 25.04+ and everywhere*
- v4 released in 2025 - close to non-existing adoption
In practical terms, using MbedTLS has proven to be a much shorter and
simpler implementation. Effectively eliminating the time spent in
kmod_module_signature_info() to practically zero. With the overall
execution time dropping respectively - 0.43s -> 0.35s on my machine.
From instructions/memory statistics POV, we have (per module):
- ~50k fewer instructions
- ~55 fewer memory allocations
- ~2KB less memory is allocated
Also, Helgrind seems quite happy.
Availability aside, there are a few IMHO minor downsides:
- MD4 support was removed with v3
- SM3 support is not available - neither in v3 nor v4
- No algo to string API
I wasn't able to find any distribution/builds that use MD4 or SM3 so
this aspect shouldn't be too critical.
Whereas for the algo-to-string API - it's a trivial mapping, that we can
(should?) copy from the kernel alongside the enum itself... But that's
an exercise for another day - alongside fixing the no openssl/mbedtls
code path.
Lucas De Marchi [Wed, 25 Mar 2026 05:28:46 +0000 (00:28 -0500)]
libkmod: Add build-id item to kmod_module_get_info()
If available, add the build-id to the info list returned by
kmod_module_get_info(). This allows us to compare the build-id of a
loaded module versus the build-id of the file. It's rather cumbersome
command, but it works:
Lucas De Marchi [Wed, 25 Mar 2026 04:34:28 +0000 (23:34 -0500)]
libkmod: Add helper to read .note.gnu.build-id section
Read the .note.gnu.build-id section so it can be displayed by modinfo in
a future change. For now this is only added to pretty-print the id, but
later can be refactored to easily compare with the section dump from
/sys/module/<module-name>/.note.gnu.build-id
The section in the elf is potentially available since kernel 4.10 (if
toolchain supports it) and became unconditional since commit 89ff7131f78a ("kbuild: add --hash-style= and --build-id unconditionally")
since minimum toolchain versions got raised.
Lucas De Marchi [Thu, 23 Apr 2026 19:43:10 +0000 (14:43 -0500)]
libkmod: Add elf_get_u32() helper
Shortcut to the size.
Keep this wrapper inline even after the previous de-inlining change:
it is a tiny typed helper around elf_get_uint() that avoids repeating
the uint32_t size at call sites, while the larger helpers can still be
left to the compiler.
dependabot[bot] [Fri, 1 May 2026 01:41:12 +0000 (01:41 +0000)]
ci: bump the all-actions group with 3 updates
Bumps the all-actions group with 3 updates: [github/codeql-action](https://github.com/github/codeql-action), [advanced-security/filter-sarif](https://github.com/advanced-security/filter-sarif) and [codecov/codecov-action](https://github.com/codecov/codecov-action).
Updates `github/codeql-action` from 4.32.0 to 4.35.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b20883b0cd1f46c72ae0ba6d1090936928f9fa30...95e58e9a2cdfd71adc6e0353d5c52f41a045d225)
Lucas De Marchi [Fri, 24 Apr 2026 14:55:51 +0000 (09:55 -0500)]
meson: Make dlopen=all the default
As of earlier commit, all dependencies can be dlopen'd on demand. Do
that for all optional libraries by default, but still allow it to be
overridden during build.
Example numbers/benefits taken from `modprobe --show-depends nouveau`:
- fewer instr - 50% reduction, 1.2M -> 0.5M
- less memory use - Rss by ~33%, 3M -> 2M
- reduced attack surface
Emil Velikov [Fri, 6 Feb 2026 20:38:18 +0000 (20:38 +0000)]
meson: bump minimal openssl/libcrypto to 3.0.0
OpenSSL 3.0 introduces semantic versioning, thus one can reason about
the supported (and/or broken) API/ABI by glancing at the number.
Version 3.0 was released in late 2021 and is adopted by, at least:
- CentOS Stream 9
- Debian 11 aka oldoldstable
- Fedora 38
- openSUSE Leap 15.5
- Ubuntu 22.04
This means that some older, yet maintained, enterprise-y linuxes will be
left in the dark. Namely:
- RHEL 6,7
- SLES 11,12,15?
- Ubuntu {14,16,18,20}.04
To the best of my knowledge, all of them are in deep maintenance mode
and do not target latest kmod releases.
Bumping the requirement, allows us to focus on a single DSO and its API,
as we move to dlopen(libcrypto.so) with the next commit(s).
Anton Moryakov [Tue, 10 Mar 2026 16:07:15 +0000 (19:07 +0300)]
shared: util.c: fix buffer overflow in alias_normalize()
The while-loop inside the '[' case of alias_normalize() increments the
index 'i' without checking against PATH_MAX bounds. If the input string
contains an opening '[' followed by many characters without a closing ']',
the index can exceed PATH_MAX-1, causing a buffer overflow when writing
to buf[i].
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/431 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Currently, we use a stack allocated instance which bolts of misc private
data via a void *, while also having an optional free callback.
In kmod we opt to pre-calculate the total size, do a one-off allocation,
copy the data as needed, adjusting the pointers.
Doing the same here, gives us a mixed bag of benefits:
- shorter and simpler code
- smaller binary - ~100 bytes off
- fewer instructions - ~40 per module
- few allocations - ~2 per module
- extra bytes are allocated - ~180 per module
The updated code seems far more natural and consistent with the
code-base. Although, if we really want to squeeze more cycles we could
use a reasonably large stack buffer and fallback to heap.
v2:
- don't leak on d2i_PKCS7_bio failure
- use +1 (instead of sizeof('\0')) for the null terminator
Having the guard repeated in the else/endif lines is generally a good
idea. Although in this case a) it has a typo (missing _) and b) no other
part of the code-base does it.
Currently, the kmod_file data fits in two groups:
- populated on initialization (aka kmod_file_open)- fd, compression
- populated on kmod_file_load_contents - contents, size
Currently, the caller has to track/remember kmod_file_load_contents
prior to calling the contents/size getters...
At the same time, we don't need the fine grained API since all call
sites need both contents and size. So let's just fold the three
together.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Not a huge fan of the casts, although we already use similar approach in
kmod_module_load_elf and others.
Don't mind going either way - keep the casts or drop the const.
Emil Velikov [Wed, 4 Feb 2026 15:12:48 +0000 (15:12 +0000)]
libkmod: tweak kmod_module_get_elf()
As of last commit, the kmod_elf is stored in the kmod_module instance.
Thus we no longer need the getter and the stack kmod_elf pointer.
Rename the function to kmod_module_load_elf() to align with rest of the
codebase, dropping the elf output pointer - callers can access it
directly via the kmod_module struct.
Emil Velikov [Thu, 29 Jan 2026 12:07:53 +0000 (12:07 +0000)]
libkmod: inline kmod_file_get_elf() as applicable
Move the kmod_elf instance from the kmod_file into the kmod_module
struct. Thus reducing the module->file->elf nesting, simplifying
kmod_module_get_elf() call sites and making the former
kmod_file_get_elf() callers tad easier to follow.
Wentao Guan [Thu, 19 Feb 2026 15:45:10 +0000 (23:45 +0800)]
libkmod: Fix open file which some char device
use lseek SEEK_CUR to get whether it is a regular file,
lseek return -ESPIPE when fd is associated with a pipe, socket, or FIFO.
commit 883d931d1bd04b089b85b554d1df6f41dcf5fbf5 upstream
("modprobe: Allow passing path to module") allow to modprobe a file,
but not handle opening a FIFO device such as modprobe /dev/tty1.
commit 8d03b6c7d990af301950d3ecdc4b5c69fa525928 uptream
("libkmod: Use pread where appropriate") fix some cases,
such as open /dev/tty1, but not for /dev/vmnet0 or /dev/userio etc.
Can be reproduced in run lshw in root and install some vm such ad vmware,
more about the case are in the Link.
Reference: https://github.com/lyonel/lshw/pull/110 Closes: https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/2069649 Closes: https://bbs.deepin.org.cn/post/291466 Reported-by: Qi Xu <xuqi@uniontech.com> Reported-by: lionheartyu <dongshengyuan@uniontech.com> Fixes: 883d931d1bd04 ("modprobe: Allow passing path to module") Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/407 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Lucas De Marchi [Thu, 12 Feb 2026 16:36:35 +0000 (10:36 -0600)]
testsuite: Prefer _cleanup_free_ to free temp storage
`preload` is freed in all exit paths, just use _cleanup_free_ to avoid
bugs like the one fixed in commit e1d21ab27277 ("testsuite: Fix memory
leak in test_export_environ error paths").
As noted by Emil, there's one place where the free() can't be removed:
when we are replacing what preload points to. Keep that one, zap the
rest.
jared mauch [Thu, 12 Feb 2026 13:54:14 +0000 (13:54 +0000)]
testsuite: Fix memory leak in test_export_environ error paths
[emil: split from larger patch, commit message] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/423 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
jared mauch [Thu, 22 Jan 2026 04:25:31 +0000 (23:25 -0500)]
tools/depmod: Fix memory leak in depmod_module_add error path
[emil: split from larger patch, commit message] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/423 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Make sure that division by zero is never possible.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/415 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
This improves support for rare systems like s390 in 31 bit mode, where
the size of size_t is equals uint32_t, yet types still differ.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/415 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
dependabot[bot] [Sun, 1 Feb 2026 01:24:24 +0000 (01:24 +0000)]
ci: bump the all-actions group across 1 directory with 2 updates
Bumps the all-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).
Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8e8c483db84b4bee98b60c0593521ed34d9990e8...de0fac2e4500dabe0009e67214ff5f5447ce83dd)
Updates `github/codeql-action` from 4.31.9 to 4.32.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/5d4e8d1aca955e8d8589aabd499c5cae939e33c7...b20883b0cd1f46c72ae0ba6d1090936928f9fa30)
Emil Velikov [Sun, 8 Feb 2026 14:43:31 +0000 (14:43 +0000)]
Consistently use endian.h swapping API
A handful of places are still using the old "networking" API. Swap that
with the usual (no longer GNU/glibc specific) ntobe*/be*toh.
Be that to stay consistent, to improve clarity or to celebrate that the
later is part of POSIX (2024) - take your pick.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/421 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Rudi Heitbaum [Sun, 8 Feb 2026 14:49:49 +0000 (01:49 +1100)]
util: Use const variable type in mkdir_parents
For ISO C23, the function strchr that return pointers into their input
arrays now have definitions as macros that return a pointer to a
const-qualified type when the in put argument is a pointer to a
const-qualified type.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/pull/422 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Emil Velikov [Wed, 28 Jan 2026 15:21:10 +0000 (15:21 +0000)]
Use $(uname -r) throughout
The backtick notation is considered deprecated, I believe. We already
have a handful of $(...) instances, so if nothing else it's better to
stay consistent.
Emil Velikov [Wed, 28 Jan 2026 15:08:37 +0000 (15:08 +0000)]
man/modprobe.8: use MODULE_DIRECTORY as applicable
The original XML based documentation was referencing MODULE_DIRECTORY
which got erroneously swapped to DISTCONFDIR during the scdoc
conversion.
Closes: https://github.com/kmod-project/kmod/issues/410 Fixes: f3a423b6 ("man: add scdoc based man pages") Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/pull/416 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Emil Velikov [Wed, 28 Jan 2026 21:05:51 +0000 (21:05 +0000)]
libkmod/README.md: convert to markdown
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/pull/417 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Emil Velikov [Wed, 28 Jan 2026 21:04:03 +0000 (21:04 +0000)]
testsuite/README.md: convert to markdown
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/pull/417 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Emil Velikov [Wed, 28 Jan 2026 20:09:17 +0000 (20:09 +0000)]
CODING-STYLE.md: mention clang-format
Copy/paste the section from CONTRIBUTING.md, completing the circle.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/pull/417 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Emil Velikov [Wed, 28 Jan 2026 20:04:42 +0000 (20:04 +0000)]
CODING-STYLE.md: update line wrapping section
We follow the tab + spaces, alongside a 90 col (soft) limit.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/pull/417 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Emil Velikov [Wed, 28 Jan 2026 19:56:10 +0000 (19:56 +0000)]
CODING-STYLE.md: trim down the inspiration section
Omit nearly everything but the projects which serve as inspiration and
the associated (updated) Linux kernel style guide link.
The checkpatch references are not particularly useful - the tool
exists in another (massive) git repo, plus we're using clang-format.
Plus the line wrapping details are already listed a few lines below.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Lucas De Marchi <demarchi@kernel.org> Link: https://github.com/kmod-project/kmod/pull/pull/417 Signed-off-by: Lucas De Marchi <demarchi@kernel.org>