Re: First experiments with kmod-git and meson build-system

2024-10-19 Thread Emil Velikov
On Sat, 19 Oct 2024 at 12:35, Sedat Dilek wrote: > > On Fri, Oct 18, 2024 at 2:01 PM Emil Velikov wrote: > > > > Hi Sedat, > > > > On Fri, 18 Oct 2024 at 11:48, Sedat Dilek wrote: > > > Have you tested the resulting files, or you're just building t

Re: First experiments with kmod-git and meson build-system

2024-10-18 Thread Emil Velikov
Hi Sedat, On Fri, 18 Oct 2024 at 11:48, Sedat Dilek wrote: > > Hi, > Have you tested the resulting files, or you're just building testing? In case of the latter we already have CI which covers Debian so :shrug: > looks like etc directory was not copied to $PREFIX. > Yes, meson behaves differen

[PATCH kmod 0/2] Couple of SPDX fixes

2024-08-10 Thread Emil Velikov via B4 Relay
arate patches, since I'm not 100% sure if dropping the former wasn't semi-intentional. Feel free to pick whichever patch makes sense o/ --- Emil Velikov (2): m4: reinstate CC_CHECK_FLAG_APPEND summary m4: remove verbose license exception clause m4/attributes.m4 | 5 +

[PATCH kmod 1/2] m4: reinstate CC_CHECK_FLAG_APPEND summary

2024-08-10 Thread Emil Velikov via B4 Relay
From: Emil Velikov Earlier commit was reducing the license boilerplate to SPDX license identifiers and erroneously dropped the function summary section. Cc: Lucas De Marchi Fixes: b5a2cd0 ("Use SPDX header for license") Signed-off-by: Emil Velikov --- m4/attributes.m4 | 5 +++

[PATCH kmod 2/2] m4: remove verbose license exception clause

2024-08-10 Thread Emil Velikov via B4 Relay
From: Emil Velikov It is already encoded in the SPDX license identifier. Cc: Lucas De Marchi Fixes: b5a2cd0 ("Use SPDX header for license") Signed-off-by: Emil Velikov --- m4/features.m4 | 13 - 1 file changed, 13 deletions(-) diff --git a/m4/features.m4 b/m4/feature

Re: [PATCH v2 1/3] Use SPDX header for license

2024-07-26 Thread Emil Velikov
;m reading things correctly [1] [2], these two should be: # SPDX-License-Identifier: GPL-2.0-or-later WITH Autoconf-exception-macro ... and the exception can be removed. With that addressed - either as separate patch or squashed - the series is: Reviewed-by: Emil Velikov HTH Emil [1] https://spdx.org/licenses/exceptions-index.html [2] https://spdx.org/licenses/Autoconf-exception-macro.html

Re: [PATCH kmod] Use SPDX header for license

2024-07-20 Thread Emil Velikov
On Fri, 19 Jul 2024 at 23:13, Lucas De Marchi wrote: > > Drop the lengthy license from each file and just use SPDX like most > projects nowadays. > Massive +1 for the idea, I should go and update some of my other projects. > Signed-off-by: Lucas De Marchi > --- > --- a/libkmod/libkmod-config

[PATCH kmod 1/3] libkmod: document KMOD_INDEX_MODULES_BUILTIN_ALIAS in kmod_dump_index()

2024-07-19 Thread Emil Velikov via B4 Relay
From: Emil Velikov The extra enum was introduced a few years ago, although the (only) function using it did not have it's documentation updated. The commit itself has caused an ABI break with kmod v27, since the KMOD_INDEX_MODULES_BUILTIN value has changed. A search through Google, Githu

[PATCH kmod 0/3] libkmod: misc ABI changes

2024-07-19 Thread Emil Velikov via B4 Relay
distro is shipping kmod version from git. Cc-ing Debian, Fedora and RedHat maintainers - team, please forward this to any fellow maintainers I may have missed. Thanks in advance, To: linux-modules@vger.kernel.org --- Emil Velikov (3): libkmod: document KMOD_INDEX_MODULES_BUILTIN_ALIAS in kmod_

[PATCH kmod 2/3] libkmod: correctly tag kmod_module_new_from_name_lookup

2024-07-19 Thread Emil Velikov via B4 Relay
From: Emil Velikov The symbol was introduced with v30, yet was erroneously added in the v5 section. Move it to the correct place. In theory this might cause an issue - severity depends on how the runtime linker is setup. From a harmless warning (on stderr/stdout) to failure to load the library

[PATCH kmod 3/3] libkmod: move new weak API to separate section

2024-07-19 Thread Emil Velikov via B4 Relay
From: Emil Velikov Add the new weak API, to a separate section in the version script. These will be exposed with the upcoming v33 release and not with v5 as the symbol tag implies. Cc: Jose Ignacio Tornos Martinez Fixes: 05828b4 ("libkmod: add weak dependecies") Signed-off-by: Em

[PATCH kmod] kmod: remove .alias config files for modprobe.d

2024-07-17 Thread Emil Velikov via B4 Relay
From: Emil Velikov The use of .alias (alongside .conf) was added for compatibility with the original module-init-tools project and has been living in kmod ever since. In practise, all the linux distributions that I can see are using .conf files alone, as instructed by modprobe.d(5) and the only

Re: [PATCH] README: update to a decade+ later

2024-07-17 Thread Emil Velikov
- GNU C library > +In order to compile the source code you need following software packages: s/need following/need the following/ perhaps? Although feel free to land it as-is. There are a few nitpicks/markdown fixes that I will send as follow-up. In either case: Reviewed-by: Emil Velikov &

Re: [PATCH kmod] testsuite: add tests for weak dependencies

2024-07-08 Thread Emil Velikov
Hello Jose, On 2024/05/30, Jose Ignacio Tornos Martinez wrote: > The following tests to verify weak dependencies have been implemented: > 1) modprobe test to check that related weakdep modules are not loaded >due to being a weakdep. > 2) depmod test to check weakdep output. > 3) user test to c

[PATCH kmod v2 10/17] man: depmod: remove hard-coded /etc/depmod.d references

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Point the users to depmod.d(5) instead. Signed-off-by: Emil Velikov --- man/depmod.8.scd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/depmod.8.scd b/man/depmod.8.scd index 7a2e84b..0252a72 100644 --- a/man/depmod.8.scd +++ b/man/depmod.8.scd

[PATCH kmod v2 16/17] man: rework AUTHORS section

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Replace the partial listing with suggestion to check through git shortlog and git blame. Explicitly spell out the current maintainer, alongside giving Jon attribution for the original project. Signed-off-by: Emil Velikov --- man/depmod.8.scd | 13 ++--- man

[PATCH kmod v2 14/17] man: modprobe: remove hard-coded /etc/modprobe.d references

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Point the users to modprobe.d(5) instead. Signed-off-by: Emil Velikov --- man/modprobe.8.scd | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd index 321fa59..30ccc21 100644 --- a/man/modprobe.8.scd +++ b

[PATCH kmod v2 17/17] man: list options one per line

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Somewhat inspired by my selfish use of VIM as man pager. Namely, when there are multiple options on the same line, only the first one gets properly rendered. A good bonus point is that very long instances, like modinfo's legacy "--author, --description ..." lo

[PATCH kmod v2 09/17] man: depmod.d: rework the opening description sentence

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Use a slightly longer, more gradual introduction. Signed-off-by: Emil Velikov --- Lucas, I'm reading the first sentence and struggling a bit. What does the "global or per-module" refer to? Thanks in advance o/ --- man/depmod.d.5.scd | 13 - 1

[PATCH kmod v2 00/17] man: minor improvements, post the scdoc conversion

2024-07-08 Thread Emil Velikov via B4 Relay
to v1: https://lore.kernel.org/r/20240611-man-v1-0-bd6864d49...@gmail.com --- Emil Velikov (17): man: add some extra bold/italic annotations man: white space fixes man: misc punctuation fixes man: some options take an argument, mention that man: couple of grammar/language fixes

[PATCH kmod v2 12/17] man: modprobe.d: factor out a CONFIGURATION FORMAT section

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Keep the description neat and tidy. Signed-off-by: Emil Velikov --- man/modprobe.d.5.scd | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd index 2a6a789..823ba62 100644 --- a/man/modprobe.d.5.scd

[PATCH kmod v2 11/17] man: modprobe.d: document the config file order handling

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov The modprobe.d configuration order/handling aligns with existing tools such as sysctl.d, even though there is no mention in the manual. Reorder the list in SYNOPSIS and add a bit of verbiage describing things. Section is inspired by sysctl.d(5) and sysctl(8). Signed-off-by

[PATCH kmod v2 06/17] man: stop removing DISTCONFDIR lines

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Presently when DISTCONFDIR is identical to /lib we remove the whole line, since the man pages already have an /lib instance. At the same time, there are in-text DISTCONFDIR entries, and removing the whole line outright breaks the documentation. Drop the removal line - worst

[PATCH kmod v2 13/17] man: add few mentions about MODPROBE_OPTIONS

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov The environment variable may alter config file ordering, so mention it in the man page. In addition, highlight that the format is intentionally undocumented since the use by third parties is discouraged. Signed-off-by: Emil Velikov --- v2: tweak (5) wording, add details to

[PATCH kmod v2 05/17] man: couple of grammar/language fixes

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Signed-off-by: Emil Velikov --- man/modprobe.8.scd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd index 9594798..b47908b 100644 --- a/man/modprobe.8.scd +++ b/man/modprobe.8.scd @@ -101,7 +101,7 @@ database

[PATCH kmod v2 03/17] man: misc punctuation fixes

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Some commas and a full stop was missing ;-) Signed-off-by: Emil Velikov --- man/depmod.d.5.scd | 2 +- man/kmod.8.scd | 4 ++-- man/lsmod.8.scd| 2 +- man/modprobe.8.scd | 2 +- man/rmmod.8.scd| 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH kmod v2 04/17] man: some options take an argument, mention that

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov For example modinfo -F requires the field name, although the documentation was missing the "field". Similarly modprobe has omissions, so let's fix those as well. Signed-off-by: Emil Velikov --- There are two different styles across the man pages: -s, --sh

[PATCH kmod v2 08/17] man: depmod.d: factor out a CONFIGURATION FORMAT section

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Keep the description neat and tidy. Signed-off-by: Emil Velikov --- man/depmod.d.5.scd | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd index bd1291b..ddb1340 100644 --- a/man/depmod.d.5.scd +++ b/man

[PATCH kmod v2 07/17] man: depmod.d: document the config file order handling

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov The depmod.d configuration order/handling aligns with existing tools such as sysctl.d, even though there is no mention in the manual. Reorder the list in SYNOPSIS and add a bit of verbiage describing things. Section is inspired by sysctl.d(5) and sysctl(8). Signed-off-by

[PATCH kmod v2 02/17] man: white space fixes

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov These were present in the original xml files and I opted to keep them separate fix to make the transition/comparison easier. Signed-off-by: Emil Velikov --- v2: drop unrelated bold annotation - move to previous patch --- man/depmod.8.scd | 2 +- man/depmod.d.5.scd | 2

[PATCH kmod v2 01/17] man: add some extra bold/italic annotations

2024-07-08 Thread Emil Velikov via B4 Relay
From: Emil Velikov Signed-off-by: Emil Velikov --- v2: add an extra depmod instance --- man/depmod.8.scd | 20 ++-- man/kmod.8.scd| 2 +- man/modinfo.8.scd | 8 man/modprobe.8.scd| 12 ++-- man/modules.dep.5.scd | 11 ++- man

[PATCH kmod 16/20] man: modprobe.d: factor out a CONFIGURATION FORMAT section

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Keep the description neat and tidy. Signed-off-by: Emil Velikov --- man/modprobe.d.5.scd | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/modprobe.d.5.scd b/man/modprobe.d.5.scd index 2f78dd7..b300758 100644 --- a/man/modprobe.d.5.scd

[PATCH kmod 12/20] man: depmod.d: factor out a CONFIGURATION FORMAT section

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Keep the description neat and tidy. Signed-off-by: Emil Velikov --- man/depmod.d.5.scd | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man/depmod.d.5.scd b/man/depmod.d.5.scd index 9ee35e8..ef57aac 100644 --- a/man/depmod.d.5.scd +++ b/man

[PATCH kmod 04/20] man: remove no longer used XML files

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Signed-off-by: Emil Velikov --- man/depmod.8.xml | 343 --- man/depmod.d.5.xml| 164 --- man/insmod.8.xml | 87 man/kmod.8.xml| 120 --- man/lsmod.8.xml | 73 --- man/modinfo.8.xml

[PATCH kmod 15/20] man: modprobe.d: document the config file order handling

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov The modprobe.d configuration order/handling aligns with existing tools such as sysctl.d, even though there is no mention in the manual. Reorder the list in SYNOPSIS and add a bit of verbiage describing things. Section is copied^Winspired by sysctl.d(5) ;-) Signed-off-by

[PATCH kmod 18/20] man: modprobe: remove hard-coded /etc/modprobe.d references

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Point the users to modprobe.d(5) instead. Signed-off-by: Emil Velikov --- man/modprobe.8.scd | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd index b47908b..8354765 100644 --- a/man/modprobe.8.scd +++ b

[PATCH kmod 20/20] man: list options one per line

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Somewhat inspired by my selfish use of VIM as man pager. Namely, when there are multiple options on the same line, only the first one gets properly rendered. A good bonus point is that very long instances, like modinfo's legacy "--author, --description ..." lo

[PATCH kmod 13/20] man: depmod.d: rework the opening description sentence

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Use a slightly longer, more gradual introduction. Signed-off-by: Emil Velikov --- Lucas, I'm reading the first sentence and struggling a bit. What does the "global or per-module" refer to? Thanks in advance o/ --- man/depmod.d.5.scd | 13 - 1

[PATCH kmod 05/20] man: add some extra bold/italic annotations

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Signed-off-by: Emil Velikov --- man/depmod.8.scd | 18 +- man/kmod.8.scd| 2 +- man/modinfo.8.scd | 8 man/modprobe.8.scd| 12 ++-- man/modules.dep.5.scd | 11 ++- man/rmmod.8.scd | 2 +- 6 files changed

[PATCH kmod 17/20] man: modprobe.d: mention about MODPROBE_OPTIONS

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov The environment variable alters the config file ordering, so mention it in the man page. Signed-off-by: Emil Velikov --- Hi Lucas, Looking at modprobe(8), while the variable is mentioned there is no details about: - the format and it's stability across versions - is i

[PATCH kmod 08/20] man: some options take an argument, mention that

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov For example modinfo -F requires the field name, although the documentation was missing the "field". Similarly modprobe has omissions, so let's fix those as well. Signed-off-by: Emil Velikov --- There are two different styles across the man pages: -s, --sh

[PATCH kmod 14/20] man: depmod: remove hard-coded /etc/depmod.d references

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Point the users to depmod.d(5) instead. Signed-off-by: Emil Velikov --- man/depmod.8.scd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/depmod.8.scd b/man/depmod.8.scd index 7a2e84b..0252a72 100644 --- a/man/depmod.8.scd +++ b/man/depmod.8.scd

[PATCH kmod 02/20] man: add scdoc based man pages

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Working with xml is quite fiddly. Swap that for scdoc, which has very trivial markup-like syntax. We have opted for scdoc since it's available on practically any linux distribution. Implementation-wise it's a trivial C99 project, at 1k LoC. If using scdoc prov

[PATCH kmod 11/20] man: depmod.d: document the config file order handling

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov The depmod.d configuration order/handling aligns with existing tools such as sysctl.d, even though there is no mention in the manual. Reorder the list in SYNOPSIS and add a bit of verbiage describing things. Section is copied^Winspired by sysctl.d(5) ;-) Signed-off-by: Emil

[PATCH kmod 01/20] man: add script to generate/compare the xslt vs upcoming scdoc

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Signed-off-by: Emil Velikov --- man/compare.sh | 63 ++ 1 file changed, 63 insertions(+) diff --git a/man/compare.sh b/man/compare.sh new file mode 100755 index 000..7579ab5 --- /dev/null +++ b/man/compare.sh

[PATCH kmod 03/20] man: build the scdoc based man pages

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Note that scdoc does not handle natively handle the dummy modules.dep.bin.5 entry, so we need to create one manually. Not a big deal, since it's single static line anyway. Also: pkg-config --variable=scdoc scdoc, produces the full executable and path, although for n

[PATCH kmod 09/20] man: couple of grammar/language fixes

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Signed-off-by: Emil Velikov --- man/modprobe.8.scd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/modprobe.8.scd b/man/modprobe.8.scd index 9594798..b47908b 100644 --- a/man/modprobe.8.scd +++ b/man/modprobe.8.scd @@ -101,7 +101,7 @@ database

[PATCH kmod 06/20] man: white space fixes

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov These were present in the original xml files and I opted to keep them separate fix to make the transition/comparison easier. Signed-off-by: Emil Velikov --- man/depmod.8.scd | 4 ++-- man/depmod.d.5.scd | 2 +- man/modprobe.8.scd | 8 man/modprobe.d.5.scd

[PATCH kmod 07/20] man: misc punctuation fixes

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov Some commas and a full stop was missing ;-) Signed-off-by: Emil Velikov --- man/depmod.d.5.scd | 2 +- man/kmod.8.scd | 4 ++-- man/lsmod.8.scd| 2 +- man/modprobe.8.scd | 2 +- man/rmmod.8.scd| 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH kmod 00/20] man: convert to scdoc and minor improvements

2024-06-11 Thread Emil Velikov via B4 Relay
ents and suggestions are greatly appreciated. [1] https://repology.org/project/scdoc/versions [2] https://archlinux.org/packages/extra/x86_64/scdoc/ --- Emil Velikov (20): man: add script to generate/compare the xslt vs upcoming scdoc man: add scdoc based man pages man: build

[PATCH kmod] .mailmap: Forward to my personal email

2024-06-11 Thread Emil Velikov via B4 Relay
From: Emil Velikov My Collabora email is bouncing, so forward to my personal Gmail. Signed-off-by: Emil Velikov --- Hello everyone, just a trivial one-liner to reduce annoyance due to bouncing emails. --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap new

Re: [PATCH kmod 09/13] libkmod: swap alloca usage for a few assert_cc

2024-04-30 Thread Emil Velikov
On Tue, 30 Apr 2024 at 19:43, Lucas De Marchi wrote: > > On Tue, Apr 30, 2024 at 07:27:00PM GMT, Emil Velikov wrote: > >On Tue, 30 Apr 2024 at 19:18, Lucas De Marchi > >wrote: > >> > >> On Tue, Apr 30, 2024 at 06:54:00PM GMT, Emil Velikov wrote: > >

Re: [PATCH kmod 09/13] libkmod: swap alloca usage for a few assert_cc

2024-04-30 Thread Emil Velikov
On Tue, 30 Apr 2024 at 19:18, Lucas De Marchi wrote: > > On Tue, Apr 30, 2024 at 06:54:00PM GMT, Emil Velikov wrote: > >On Tue, 30 Apr 2024 at 18:39, Lucas De Marchi > >wrote: > >> > >> On Mon, Feb 12, 2024 at 05:23:10PM GMT, Emil Velikov via B4 R

Re: [PATCH kmod] man: silence autoconf warnings

2024-04-30 Thread Emil Velikov
On Mon, 29 Apr 2024 at 22:45, Lucas De Marchi wrote: > > On Fri, Feb 23, 2024 at 11:05:24AM GMT, Emil Velikov wrote: > >On Tue, 20 Feb 2024 at 21:56, Lucas De Marchi > >wrote: > >> > >> On Sat, Feb 17, 2024 at 04:01:26PM +, Emil Velikov via B4 R

Re: [PATCH kmod 09/13] libkmod: swap alloca usage for a few assert_cc

2024-04-30 Thread Emil Velikov
On Tue, 30 Apr 2024 at 18:39, Lucas De Marchi wrote: > > On Mon, Feb 12, 2024 at 05:23:10PM GMT, Emil Velikov via B4 Relay wrote: > >From: Emil Velikov > > > >Since all the compression magic is always available now, we don't need > >to loop at runtime nor use

Re: [PATCH kmod 13/13] libkmod: always fallback to do_init_module()

2024-04-30 Thread Emil Velikov
On Tue, 30 Apr 2024 at 00:39, Lucas De Marchi wrote: > > On Mon, Feb 12, 2024 at 05:23:14PM GMT, Emil Velikov via B4 Relay wrote: > >From: Emil Velikov > > > >Since the direct loading was introduced a few bugs became obvious that > >the compression args used were

Re: [PATCH] build: Allow to install over dirty dir

2024-03-06 Thread Emil Velikov
r 1 > make[2]: *** [Makefile:2553: install-exec-am] Error 2 > make[1]: *** [Makefile:2439: install-am] Error 2 > make: *** [Makefile:1848: install-recursive] Error 1 > > Cc: Emil Velikov > Closes: https://github.com/kmod-project/kmod/issues/35 > Signed-off-by: Lucas De Marchi This matches the default `man 1 install` behaviour, which overrides existing file(s). Reviewed-by: Emil Velikov -Emil

Re: [PATCH kmod] man: silence autoconf warnings

2024-02-23 Thread Emil Velikov
On Tue, 20 Feb 2024 at 21:56, Lucas De Marchi wrote: > > On Sat, Feb 17, 2024 at 04:01:26PM +, Emil Velikov via B4 Relay wrote: > >From: Emil Velikov > > > >Currently we have a pattern rule, which effective states that two output > >files are produced - %.5 an

Re: [PATCH kmod] Remove unmaintained experimental tools

2024-02-23 Thread Emil Velikov
On Tue, 20 Feb 2024 at 22:11, Lucas De Marchi wrote: > > On Mon, Feb 12, 2024 at 05:07:57PM +, Emil Velikov via B4 Relay wrote: > >From: Emil Velikov > > > >The kmod insert/remove tools were introduced back in 2015. Since then > >they have recieved zero atte

[PATCH kmod] man: silence autoconf warnings

2024-02-17 Thread Emil Velikov via B4 Relay
From: Emil Velikov Currently we have a pattern rule, which effective states that two output files are produced - %.5 and %.8. Although that's not the case in practise, since each input xml will be generated to a single manual page. Add the manpage section as part of the xml filename and

Re: Re: Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod

2024-02-14 Thread Emil Velikov
On Tue, 6 Feb 2024 at 16:15, Lucas De Marchi wrote: > > On Mon, Feb 05, 2024 at 05:50:54PM +, Emil Velikov wrote: > >On Mon, 5 Feb 2024 at 14:30, Lucas De Marchi > >wrote: > > > >[snip] > > > >> >I'm not a huge fan of using relative sym

Re: [PATCH kmod 08/13] libkmod: always detect the module compression

2024-02-13 Thread Emil Velikov
On Mon, 12 Feb 2024 at 17:23, Emil Velikov via B4 Relay wrote: > > From: Emil Velikov > > Currently, when built w/o given compression we'll incorrectly report a > "compression_none". > > As we reach do_finit_module(), we'll naively assume that the kerne

[PATCH kmod 13/13] libkmod: always fallback to do_init_module()

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov Since the direct loading was introduced a few bugs became obvious that the compression args used were off - both in-kernel and dkms. While both of those are fixed already, not all of those have reached all users. For example: for dkms I'm aiming to do a release just as

[PATCH kmod 11/13] libkmod: move load_reg() further up

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov We're about to reference it in comp_types with next commit. Signed-off-by: Emil Velikov --- libkmod/libkmod-file.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-file.c index c4

[PATCH kmod 12/13] libkmod: keep KMOD_FILE_COMPRESSION_NONE/load_reg in comp_types

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov It's cleaner to handle all compression types and load functions in the same style. Signed-off-by: Emil Velikov --- libkmod/libkmod-file.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-f

[PATCH kmod 08/13] libkmod: always detect the module compression

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov Currently, when built w/o given compression we'll incorrectly report a "compression_none". As we reach do_finit_module(), we'll naively assume that the kernel can handle the compressed module, yet omit the MODULE_INIT_COMPRESSED_FILE flag. As result the

[PATCH kmod 09/13] libkmod: swap alloca usage for a few assert_cc

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov Since all the compression magic is always available now, we don't need to loop at runtime nor use alloca - latter of which comes with a handful of caveats. Simply throw in a few assert_cc(), which will trigger at build-time. Signed-off-by: Emil Velikov --- libkmod/li

[PATCH kmod 10/13] libkmod: tidy-up kmod_file_open()

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov This commit cleans up the indentation and the error path of the function. It bears no functional changes. Signed-off-by: Emil Velikov --- libkmod/libkmod-file.c | 60 +- 1 file changed, 25 insertions(+), 35 deletions(-) diff

[PATCH kmod 07/13] libkmod: move kmod_file_load_contents as applicable

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov When dealing with an elf, we don't know or care about loading the file. The kmod_elf subsystem/API will deal with the required parts itself. Which in this case, already calls kmod_file_load_contents() as applicable. Signed-off-by: Emil Velikov --- libkmod/libkmod-mod

[PATCH kmod 06/13] libkmod: propagate {zstd,xz,zlib}_load errors

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov Propagate any errors during decompression further up the call stack. Without this we could easily pass NULL as mem to init_module(2). Signed-off-by: Emil Velikov --- libkmod/libkmod-file.c | 15 +++ libkmod/libkmod-internal.h | 2 +- libkmod/libkmod

[PATCH kmod 03/13] libkmod: remove kmod_file::{zstd,xz}_used flags

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov These are used to protect a free(file->memory), within their respective unload functions. Where the sole caller of the unload function already does a NULL check prior. Even so, free(NULL) is guaranteed to be safe by the standard. Signed-off-by: Emil Velikov --- libk

[PATCH kmod 05/13] libkmod: nuke struct file_ops

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov With the previous commits, we removed the need for a distinct unload callback. So nuke the struct all together and only use/keep the load one around. Signed-off-by: Emil Velikov --- libkmod/libkmod-file.c | 62 +++--- 1 file

[PATCH kmod 04/13] libkmod: clear file->memory if map fails

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov On mmap failure file->memory is set to -1, which we'll happily pass down to munmap later on. More importantly, since we do a NULL check in kmod_file_load_contents() we will exit the function without (re)attempting the load again. Since we ignore the return code for

[PATCH kmod 02/13] libkmod: keep gzFile gzf local to load_zlib()

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov There is no need to keep the root gzFile context open for the whole duration. Once we've copied the decompressed module to file->memory we can close the handle. Signed-off-by: Emil Velikov --- libkmod/libkmod-file.c | 18 +++--- 1 file changed, 7 in

[PATCH kmod 00/13] Load compressed modules with compression-less kmod

2024-02-12 Thread Emil Velikov via B4 Relay
lated bugs along the way. The last commits is somewhat questionable commit and addresses the former issue. Happy to hear your feedback, Emil --- Emil Velikov (13): libkmod: use a dup()'d fd for zlib libkmod: keep gzFile gzf local to load_zlib() libkmod: remove kmod_file::{zstd

[PATCH kmod 01/13] libkmod: use a dup()'d fd for zlib

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov The gzdopen() API used, takes ownership of the fd. To make that more explicit we clear it (-1) as applicable. Yet again, kmod has explicit API to return the fd to the user - which currently is used solely when uncompressed, so we're safe. Regardless - simply duplicate t

[PATCH kmod] Remove unmaintained experimental tools

2024-02-12 Thread Emil Velikov via B4 Relay
From: Emil Velikov The kmod insert/remove tools were introduced back in 2015. Since then they have recieved zero attention, unlike the insmod/rmmod variants. Glancing around - neither of the following distributions (Arch, Fedora, Gentoo, Debian) build them, so we're safe to say they ha

Re: Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod

2024-02-05 Thread Emil Velikov
On Mon, 5 Feb 2024 at 14:30, Lucas De Marchi wrote: [snip] > >I'm not a huge fan of using relative symlinks, especially if the tool> >is > >run as root. In my experience that makes things harder to audit and > >prevent accidental breakages. > > I'm completely in the opposite camp. Relative syml

Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod

2024-02-05 Thread Emil Velikov
Hey Lucas, On Fri, 2 Feb 2024 at 18:53, Lucas De Marchi wrote: > > On Fri, Jan 26, 2024 at 02:43:51PM +, Emil Velikov via B4 Relay wrote: > >From: Emil Velikov > > > >Currently we create symlinks like modprobe (pointing to kmod), during > >the normal `make` bu

Re: Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod

2024-01-31 Thread Emil Velikov
On Mon, 29 Jan 2024 at 22:09, Lucas De Marchi wrote: > > On Mon, Jan 29, 2024 at 05:23:44PM +, Emil Velikov wrote: > >On Mon, 29 Jan 2024 at 16:40, Lucas De Marchi > >wrote: > >> > >> On Fri, Jan 26, 2024 at 02:43:51PM +, Emil Velikov via B4 R

Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod

2024-01-29 Thread Emil Velikov
On Mon, 29 Jan 2024 at 16:40, Lucas De Marchi wrote: > > On Fri, Jan 26, 2024 at 02:43:51PM +, Emil Velikov via B4 Relay wrote: > >From: Emil Velikov > > > >Currently we create symlinks like modprobe (pointing to kmod), during > >the normal `make` build. Altho

[PATCH 2/2] make: install/uninstall tools symlinks to kmod

2024-01-26 Thread Emil Velikov via B4 Relay
From: Emil Velikov Currently we create symlinks like modprobe (pointing to kmod), during the normal `make` build. Although those were never installed. Add a few lines in the install-exec-hook, to ensure they're present at `make install` time. Thus one can actually use those without addit

[PATCH 1/2] configure: tweak the module_directory help string

2024-01-26 Thread Emil Velikov via B4 Relay
From: Emil Velikov Drop the somewhat misleading ${prefix}/lib/modules and explicitly mention what's the default. Signed-off-by: Emil Velikov --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index de01e08..ab0b303 100644

[PATCH 0/2] Polish module_directory help string, install symlinks

2024-01-26 Thread Emil Velikov via B4 Relay
be fairly straightforward, but if there's any questions or concerns do let me know. Thanks Emil --- Emil Velikov (2): configure: tweak the module_directory help string make: install/uninstall tools symlinks to kmod Makefile.am | 10 ++ configure.ac | 2 +- 2 fi