From: Lucas De Marchi <lucas.demarchi@intel.com>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: <linux-modules@vger.kernel.org>, Luis Chamberlain <mcgrof@kernel.org>
Subject: Re: [PATCH 0/5] libkmod: Use kernel decompression support
Date: Mon, 24 Jul 2023 10:28:33 -0300 [thread overview]
Message-ID: <jud4da4s5jaqjidtiyog7vjruqhguaxum6n6pmlhcmqllazcu7@qmsex3rljiv3> (raw)
In-Reply-To: <20230601224001.23397-1-lucas.de.marchi@gmail.com>
On Thu, Jun 01, 2023 at 03:39:56PM -0700, Lucas De Marchi wrote:
>When kernel is built with CONFIG_MODULE_DECOMPRESS=y, it can handle 1
>algorithm for module decompression with finit_module(). When that
>algorithm matches the one used in the module we are trying to load,
>prefer using the in-kernel decompression. This way the kernel can also
>apply any additional security measures based on where the module is
>coming from.
>
>In future, if the kernel supports more algorithms at a time, libkmod
>could even be compiled without them and just let the kernel handle it.
>Since it's likely a distro kernel supports all of them, that would
>seem a good thing to do (on the other hand, tools like modinfo and
>depmod wouldn't be able read the module information).
>
>For zstd, this needs the following fix on the kernel side:
>https://lore.kernel.org/linux-modules/ZHkQNQK5zrzo4Cq2@bombadil.infradead.org/
>
>Lucas De Marchi (5):
> libkmod: Do not inititialize file->memory on open
> libkmod: Extract finit_module vs init_module paths
> libkmod: Keep track of compression type
> libkmod: Keep track of in-kernel compression support
> libkmod: Use kernel decompression when available
thank you all for the reviews. I just pushed all the patches here.
Lucas De Marchi
>
> libkmod/libkmod-elf.c | 5 ++
> libkmod/libkmod-file.c | 46 +++++++++-----
> libkmod/libkmod-internal.h | 13 +++-
> libkmod/libkmod-module.c | 127 ++++++++++++++++++++++++-------------
> libkmod/libkmod.c | 42 ++++++++++++
> 5 files changed, 170 insertions(+), 63 deletions(-)
>
>--
>2.40.1
>
prev parent reply other threads:[~2023-07-24 13:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 22:39 [PATCH 0/5] libkmod: Use kernel decompression support Lucas De Marchi
2023-06-01 22:39 ` [PATCH 1/5] libkmod: Do not inititialize file->memory on open Lucas De Marchi
2023-06-06 18:24 ` Luis Chamberlain
2023-06-01 22:39 ` [PATCH 2/5] libkmod: Extract finit_module vs init_module paths Lucas De Marchi
2023-06-06 18:27 ` Luis Chamberlain
2023-06-01 22:39 ` [PATCH 3/5] libkmod: Keep track of compression type Lucas De Marchi
2023-06-06 18:28 ` Luis Chamberlain
2023-06-01 22:40 ` [PATCH 4/5] libkmod: Keep track of in-kernel compression support Lucas De Marchi
2023-06-06 18:29 ` Luis Chamberlain
2023-06-06 18:30 ` Luis Chamberlain
2023-06-01 22:40 ` [PATCH 5/5] libkmod: Use kernel decompression when available Lucas De Marchi
2023-06-06 18:38 ` Luis Chamberlain
2023-06-06 19:01 ` Lucas De Marchi
2023-07-24 13:28 ` Lucas De Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jud4da4s5jaqjidtiyog7vjruqhguaxum6n6pmlhcmqllazcu7@qmsex3rljiv3 \
--to=lucas.demarchi@intel.com \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).