Emil Velikov [Mon, 19 May 2025 20:08:26 +0000 (21:08 +0100)]
tools/modprobe: accept module name with --show-exports
Use the newly introduced helper module_new_from_any(), so we accept both
files as well as modules. This means you can now do:
- modprobe --show-exports drm-vram-helper, alongside the existing
- modprobe --show-exports /full/path/to/the/module/drm_vram_helper.ko
Emil Velikov [Fri, 30 May 2025 18:11:48 +0000 (19:11 +0100)]
tools/modprobe: standardize on --show-foo, deprecate the rest
Currently we have a range of options which show specific details,
although they vary in prefix or spelling:
- prefix: dump vs resolve vs show
- with and without dash after show
Converge on --show-foo and deprecate the rest. The old options are still
accepted but will throw a warning. Only the (new) consistent names are
listed in --help, while the manual page lists both but spells out that
the old ones will be removed.
To avoid any confusion with --show (aka --dry-run) the option is also
soft-deprecated.
Emil Velikov [Fri, 30 May 2025 18:23:04 +0000 (19:23 +0100)]
man/modprobe.8: document --remove-holders
The option was introduced a few years ago, yet the manual page went
without an update. Add some basic documentation.
Cc: Lucas De Marchi <lucas.demarchi@intel.com> Fixes: 42b32d30 ("modprobe: Fix holders removal") Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/353 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)]
tools/depmod: don't use %m on kmod_new() failure
The KMOD API returns NULL on error and getting the exact means why it
failed is undefined. In practise the errno is set in _some_ of the error
paths, but not all.
Emil Velikov [Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)]
libkmod: don't use %m on read_str_ulong() failure
The function returns the actual error itself, identically to the signed
variant - read_str_long(). Unlike the signed variant, one of ulong's
users incorrectly uses %m instead of strerror(-err).
Emil Velikov [Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)]
libkmod: don't use %m on strbuf_to_vector() failure
The function does not set the errno on overflow conditions, so the ERR()
will produce (somewhat) arbitrary strerror. Similar to other places
throughout the code base - just use ENOMEM.
Emil Velikov [Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)]
Use explicit ENOMEM when {m,re}alloc fails
Currently our codebase has a mix of explicitly using ENOMEM and
propagating the errno... The latter of which is guaranteed to be ENOMEM
as documented in the manual pages.
Consolidate on ENOMEM, both for consistency sake and to remove a few
bytes off our binaries ;-)
Emil Velikov [Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)]
libkmod: return ENOMEM when strbuf_pushchar(s) fails
Currently get_strings() assumes that errno is set when either function
fails. This is not the case when our overflow checks kick in. The other
case where these functions fail is memory exhaustion.
In practice we cannot do anything if either of those trigger, plus I
don't see a compelling reason to set errno to EOVERFLOW... Something
which other parts of the codebase don't do.
So let's just return ENOMEM and avoid the corner case of returning
success from get_strings(), when it should be failing.
Fixes: 1005e99e ("libkmod: refactor builtin module handling") Fixes: 952bf223 ("strbuf: Add strbuf_reserve_extra()") Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/368 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
The function signature for our printers is uniform, even though in one
of the instances a parameter is unused. There is not much we can do
here, just silence the compiler warning.
The implementation of our "hash_free" function varies in that the hash
data itself is not freed. Thus the function argument is unused, leading
to annoying compiler warning. Since there is nothing to be done here,
just silence it.
Emil Velikov [Thu, 29 May 2025 14:31:36 +0000 (15:31 +0100)]
testsuite/{init,delete}_module: add TODOs for args validation
Currently we pass arguments to our *_module wrappers, which are lacking
any validation. Add a few TODO notes and silence the unused argument
compiler warnings.
Emil Velikov [Fri, 30 May 2025 10:52:27 +0000 (11:52 +0100)]
libkmod: silence unused param warnings for kmod_file_load_*() stubs
When building without compression, the respective load functions are
static inline header stubs. In which case the struct kmod_file *file is
always unused and the compiler rightfully warns about it.
Not much we can do here, other than annotate them to silence the
warnings.
Emil Velikov [Fri, 30 May 2025 10:00:13 +0000 (11:00 +0100)]
shared: properly __attribute__ all macros
Handful of the attributes were missing the trailing double underscore.
Thus they were not picked by our git grep combo and ultimately missing
from .clang-format.
Emil Velikov [Tue, 3 Jun 2025 17:55:03 +0000 (18:55 +0100)]
clang-format: update attribute macros
Use the command to update the attribute macros list. Seemingly we've
updated the list manually, which meant that a) some symbols were not
annotated the expected way and b) some macros were not picked up.
First we start with auto-generating the list, the other issues will be
handled as follow-ups.
Emil Velikov [Tue, 3 Jun 2025 22:06:48 +0000 (23:06 +0100)]
ci: install and use bash across the board
The upcoming CI rework will hard depend on some bash constructs. While
theoretically possible to make them dash compliant, I'm not sure it's
worth the effort. Just install bash and carry on.
Emil Velikov [Tue, 3 Jun 2025 21:46:47 +0000 (22:46 +0100)]
ci: use meson bla -C builddir/
Use builddir/ as indicated in our README, which makes it obvious that
what the argument is. While there, remove a few instances of mkdir/cd -
meson and ninja can handle it themselves.
On Arch (at least) the shell chokes when the CC variable contains space,
for the given construct - $("$CC" foobar).
Since we variable is likely to contain the executable and arguments, the
quotation is wrong. Drop it and ultimately resolve the LD_PRELOAD
issues... That said, the tests still fail over here, segfault-ing in (or
due to) the LD_PRELOAD library init-modules.so.
Fixes: f5b4ff82 ("Add support for clang sanitizers") Fixes: c7686797 ("scripts/sanitizer-env.sh: support new clang 19 DSO") Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/365 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
dependabot[bot] [Sun, 1 Jun 2025 01:46:06 +0000 (01:46 +0000)]
ci: bump the all-actions group with 2 updates
Bumps the all-actions group with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [codecov/codecov-action](https://github.com/codecov/codecov-action).
Updates `github/codeql-action` from 3.28.16 to 3.28.18
- [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/28deaeda66b76a05916b6923827895f2b14ab387...ff0a06e83cb2de871e5a09832bc6a81e7276941f)
Updates `codecov/codecov-action` from 5.4.2 to 5.4.3
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/ad3126e916f78f00edff4ed0317cf185271ccc2d...18283e04ce6e62d37312384ff67231eb8fd56d24)
Emil Velikov [Sat, 24 May 2025 15:10:11 +0000 (16:10 +0100)]
tools/depmod: use nsec granularity when checking timestamps
Current code uses the POSIX.1-2001 stat::st_mtime which has one second
granularity. Considering the depmod execution time may be smaller, we
should be using the POSIX.1-2008 stat::st_mtim which has nano-second
granularity instead.
Emil Velikov [Sat, 24 May 2025 14:40:49 +0000 (15:40 +0100)]
Remove dietlibc stat::st_mtim workaround
Some versions of dietlibc lack struct stat::st_mtim, which was
introduced with POSIX.1-2008.
Considering the slow development cycle of dietlibc (last three releases
are 2024, 2018 and 2013) and there's no popular user (nor one in CI) of
it, let's remove the workaround.
All the other runtimes that we target - glibc, bionic and musl - have
the struct member.
Iff needed we can reintroduce the workaround at a later stage alongside
a CI permutation.
Emil Velikov [Thu, 29 May 2025 09:26:29 +0000 (10:26 +0100)]
README: update C runtime library section
Our readme lists uClibc which has been EOL for over a decade and
superseded by uClibc-ng. In addition, in one place our code-base tries
to support dietlibc for some pre POSIX.1-2008 functionality.
Explicitly list POSIX.1-2008 alongside the C runtime libraries, which
are known to work.
If your favourite C library does not work with kmod, feel free to send
us patches - plus ideally one which adds a CI action for us to test.
Emil Velikov [Thu, 29 May 2025 09:21:47 +0000 (10:21 +0100)]
README: explicitly document compiler requirements
Document C11 + GNU extensions as the requirement, omitting the exact
list of extensions since it's quite a bit.
The minimum compiler versions are somewhat arbitrary - we don't check
for them, so your experience may vary. Patches to update the README, or
to make kmod more widely buildable are welcome.
Emil Velikov [Sat, 24 May 2025 15:21:18 +0000 (16:21 +0100)]
Convert most #ifdef HAVE_FOO checks to #if HAVE_FOO
The former is somewhat error prone, since the pre-processor will
evaluate the presence of the define, which might have been omitted due
to wrong include or otherwise.
Swap for the other solution we already have in-tree - always set the
relevant define(s) and evaluate them numerically. That combined with
-Wundef means that we'll get meaningful compiler warning when we get
something wrong.
The strto* family of functions may fail if the input string contains
a number which is too large for the designated data type. In such
cases, errno is set to ERANGE. Check for this error condition and if
subsequent casts would truncate the value.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/357 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Thu, 29 May 2025 08:30:58 +0000 (09:30 +0100)]
Remove default initializer for static variables
The spec dictates that static variables are initialized to 0/NULL.
Remove the unnecessary explicit initialization - on older compilers this
sheds a few bytes off the data section of respective binaries.
Emil Velikov [Sat, 24 May 2025 18:18:27 +0000 (19:18 +0100)]
libkmod: s/* const/*const/ style nitpick
Portion of the header is annotated as clang-format off, to prevent
unwanted over formatting by clang. At the same time, a few erroneous
spaces slipped in.
Emil Velikov [Sat, 24 May 2025 15:03:08 +0000 (16:03 +0100)]
tools/depmod: remove set but unused timeval
No longer needed since the introduction of tmpfile-util.
Fixes: aae48bc9 ("depmod: add tmpfile-util to generate temporary file") Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/358 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Sat, 24 May 2025 12:23:09 +0000 (13:23 +0100)]
testsuite/path: defer and inline get_rootpath()
In a handful of use-cases, we don't need to trap the respective libc
function. Although at that point we have already fetched the rootfs
environment variable.
Defer it until it's needed and in the process inline the function. As
result we have a) less duplication in the wrappers and b) the rootpath
handling is no longer split across multiple functions.
Emil Velikov [Sat, 24 May 2025 11:57:11 +0000 (12:57 +0100)]
testsuite: fprintf() + abort() when dlsym() returns NULL
Currently each of our three dlsym() instances behaves differently. From
seg-faulting, to abort() to assert(). Just use abort throughout, since
assert() is no-op when NDEBUG is defined.
Emil Velikov [Sat, 24 May 2025 11:06:13 +0000 (12:06 +0100)]
libkmod: use strlen() for string literals
Older compilers had struggles expanding strlen(string-literal) to a
constant compile time expression. Thus our code-base used sizeof() - 1
instead.
This has been resolved for years, so let's use the correct function. As
a bonus point, we can remove a few variable making the code tad easier
to follow.
Emil Velikov [Sat, 24 May 2025 16:40:47 +0000 (17:40 +0100)]
meson: disable Wdeclaration-after-statement
Having declarations after statement is a C90 requirement, which was
relaxed with C99. While there are some arguments for having it enabled
in new code, there are benefits to the contrary which are more appealing
IMHO.
Namely, by keeping the declarations where the variables are used, better
outlines the scope, reduces chances of shadowing and helps us avoid
"unused variable" compiler warning in some paths.
Flip the warning to -Wno for now and future patches can remove some of
the workarounds we have in-tree.
We don't have any moversion/vermagic tests. This patch add testsuite
--force-{vermagic,modversion} for modprobe.
Link: https://github.com/kmod-project/kmod/pull/344 Signed-off-by: Rong Tao <rongtao@cestc.cn> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 17:58:11 +0000 (18:58 +0100)]
libkmod: update remaining function to return the error code
Rework the function signature and return the error code instead of the
stripped module. Thus we no longer explicitly set errno.
v2:
- kmod_file_open() - use _cleanup_free_, return errno instead of ENOMEM
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 17:58:11 +0000 (18:58 +0100)]
libkmod: return the errno from kmod_elf_new()
Rework the function signature and return the error code instead of the
stripped module. Thus we no longer explicitly set errno.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 18:50:06 +0000 (19:50 +0100)]
libkmod: enforce non-null memory in kmod_elf_new()
In practise none of our code-paths will use a NULL pointer so we might
as well enforce that. To stay aligned with the kernel behaviour update
our init_module() preload library to return EFAULT... Should we get
confused and pass NULL in the future.
Emil Velikov [Wed, 7 May 2025 17:58:11 +0000 (18:58 +0100)]
libkmod: return the errno from kmod_elf_strip()
Rework the function signature and return the error code instead of the
stripped module. Thus we no longer explicitly set errno.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 17:46:55 +0000 (18:46 +0100)]
libkmod: remove getdelim() buffer null check
As per the manual getdelim(3):
The buffer is null-terminated and ...
Remove the local check and inline the function call. As a nice result,
we no longer set the errno and the context of feof() is obvious.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 13:20:29 +0000 (14:20 +0100)]
libkmod: don't set errno in strbuf_to_vector()
The function does bounds checking, allocation and copying. In the first
instance, we manually set errno (to ENOMEM?) on failure. The realloc()
call does the same, implicitly.
In practice we don't distinguish between the two failures, so we might
as well stop manually setting errno and always assume ENOMEM in the
caller.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 16:50:03 +0000 (17:50 +0100)]
testsuite/init-module: error out init_module() on kmod failure
Currently our wrapper init_module() will happily return success whenever
libkmod fails. While such failures are unlikely, our wrapper should also
fail. In part so it doesn't mask a potentially deeper problem and in
part because the kmod API used, will set errno... Something a normal
syscall wouldn't do AFAICT.
Emil Velikov [Wed, 7 May 2025 13:13:39 +0000 (14:13 +0100)]
libkmod: return the errno from kmod_builtin_info_init()
Change the function signature (bool -> int) and directly return the
error code. Thus we no longer need to overwrite errno.
v2:
- return false -> return -ENAMETOOLONG
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 12:22:41 +0000 (13:22 +0100)]
tools/modinfo: return the errno from add_param()
The single caller of add_param() does not need the struct param*, so we
might as well return the error code directly. As a result we don't
manually overwrite errno.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 13:24:36 +0000 (14:24 +0100)]
libkmod: don't reset errno in kmod_file_load_zlib()
Currently we reset errno, shortly to be followed by an fcntl() and
gzdopen() calls. Both of those should set errno on failure and preserve
it on success.
Just leave errno as-is, we shouldn't be changing it in this context.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 12:18:04 +0000 (13:18 +0100)]
shared: don't reset errno in read_str_{u,}long()
Currently we reset errno prior to calling strto{u,}l(). This is not
needed, since a) we don't check errno to see if the function was
successful and b) we explicitly propagate the error code by returning it
directly to the caller.
Reference: https://github.com/kmod-project/kmod/issues/244 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Emil Velikov [Wed, 7 May 2025 12:04:25 +0000 (13:04 +0100)]
Use %m over strerror(errno) where possible
The manual page of strerror() outlines a number of caveats wrt its usage.
Swap for the GNU specific %m printf modifier (also supported on musl and
bionic), which side-steps the issues as much as possible.
Co-authored-by: Cristian RodrÃguez <cristian@rodriguez.im>
[emil: split from larger patch, convert more instances to %m] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/346 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Currently, the function will report the exact same issue twice. Where
the second DBG() and the error code returned, should highlight the
(potential) stat(2) failure.
dependabot[bot] [Thu, 1 May 2025 01:29:29 +0000 (01:29 +0000)]
ci: bump the all-actions group with 2 updates
Bumps the all-actions group with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [codecov/codecov-action](https://github.com/codecov/codecov-action).
Updates `github/codeql-action` from 3.28.13 to 3.28.16
- [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/1b549b9259bda1cb5ddde3b41741a82a2d15a841...28deaeda66b76a05916b6923827895f2b14ab387)
Updates `codecov/codecov-action` from 5.4.0 to 5.4.2
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/0565863a31f2c772f9f0395002a31e3f06189574...ad3126e916f78f00edff4ed0317cf185271ccc2d)
Emil Velikov [Sun, 11 May 2025 18:34:52 +0000 (19:34 +0100)]
ci: install curl in Ubuntu container
With codecov v5, the script/action requires curl (and maybe more)
although the documentation wasn't updated. Furthermore, the missing
program will be reported in the logs, while the action will report
overall success :facepalm:
Emil Velikov [Wed, 7 May 2025 11:31:45 +0000 (12:31 +0100)]
shared: rework fd_lookup_path() helper
Reduce the stack and heap memory usage of the helper by using a caller
provided buffer. This allows us to avoid copying the path, yet again,
within the caller.
Aside: readlink(3) returns -1 on all errors, it won't return the
prospective size if the output buffer is too small.
v2:
- swap fd_lookup_path() path/pathlen argument order
Emil Velikov [Sat, 5 Apr 2025 10:39:42 +0000 (11:39 +0100)]
Use sizeof() over PATH_MAX for bounds handling
Bunch of our codebase uses sizeof() while the rest hard-coded length for
the destination buffer. Converge on the former since it makes for more
obvious and less error prone code.
Emil Velikov [Sat, 5 Apr 2025 10:39:42 +0000 (11:39 +0100)]
Use sizeof() over PATH_MAX in snprintf() contexts
Bunch of our codebase uses sizeof() while the rest hard-coded length for
the destination buffer. Converge on the former since it makes for more
obvious and less error prone code.
Rong Tao [Fri, 25 Apr 2025 07:47:28 +0000 (15:47 +0800)]
insmod: Support --force-{vermagic,modversion} arguments
Supports --force-{vermagic,modversion} parameter like modprobe.
Link: https://github.com/kmod-project/kmod/pull/340 Signed-off-by: Rong Tao <rongtao@cestc.cn> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Lucas De Marchi [Thu, 3 Apr 2025 04:17:27 +0000 (23:17 -0500)]
depmod: Fix possible 0 return on error
errno may be long overwritten at this point and doesn't mean much on a
return from the cb(). Just replace with the same error we are output on
the log.
Lucas De Marchi [Thu, 3 Apr 2025 04:39:17 +0000 (23:39 -0500)]
tmpfile-util: Drop libgen.h
We don't want the version of basename() that may leak memory - we want
the sane one. I remembered to add the missing.h while editing commit aae48bc9f73a ("depmod: add tmpfile-util to generate temporary file") to
merge it, but completely forgot to remove the libgen.h. Fix it now.
Fixes: aae48bc9f73a ("depmod: add tmpfile-util to generate temporary file") Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/335
Wang, Wenjie2 [Wed, 19 Mar 2025 01:54:08 +0000 (01:54 +0000)]
depmod: add tmpfile-util to generate temporary file
* we use `mkstemp` to create the temporary file since it's a general
function in linux system and O_TMPFILE is not supported on all linux
system.
* add `struct tmpfile` to keep the `dirfd`, temp file `fd` and the
filename.
Co-developed-by: Wenjie Wang <wenjie2.wang@intel.com> Signed-off-by: Wenjie Wang <wenjie2.wang@intel.com> Co-developed-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Gongjun Song <gongjun.song@intel.com> Signed-off-by: Dan He <dan.h.he@intel.com> Signed-off-by: Qingqing Li <qingqing.li@intel.com> Signed-off-by: Yuchi Chen <yuchi.chen@intel.com> Link: https://github.com/kmod-project/kmod/pull/305 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>