Linux-Modules Archive on lore.kernel.org
 help / color / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: linux-modules@vger.kernel.org
Cc: Yanko Kaneti <yaneti@declera.com>,
	gladkov.alexey@gmail.com, auke-jan.h.kok@intel.com,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH 0/6] Fix modules.builtin.alias handling
Date: Mon,  9 Mar 2020 22:00:23 -0700
Message-ID: <20200310050029.27678-1-lucas.demarchi@intel.com> (raw)

This should fix 2 bugs reported last week:

- `depmod -n` failing. Like for other binary indexes we just
  skip now

- programs like lspci failing since they don't ignore errors from
  kmod_load_resources() - the new modules.builtin.alias.bin may not
  exist if depmod from kmod 27 wasn't executed for that kernel version.
  Also modules.builtin.modinfo (from where the former is extracted) is
  only available on recent kernel versions. So make this index optional
  for kmod_load_resources() - other parts of the code already assume
  it's optional

Lucas De Marchi (6):
  gitignore: ignore .cache.mk when building modules
  depmod: do not output .bin to stdout
  libkmod: simplify lookup when builtin.modinfo.bin file is missing
  libkmod: fix return error when opening index
  libkmod: allow modules.alias.builtin to be optional
  testsuite: add check for kmod_load_resources

 libkmod/libkmod-index.c                       |  31 ++++++-----
 libkmod/libkmod-index.h                       |   4 +-
 libkmod/libkmod-module.c                      |   8 +--
 libkmod/libkmod.c                             |  50 ++++++++++--------
 testsuite/module-playground/.gitignore        |   1 +
 .../lib/modules/5.6.0/modules.alias           |   1 +
 .../lib/modules/5.6.0/modules.alias.bin       | Bin 0 -> 12 bytes
 .../lib/modules/5.6.0/modules.builtin         |   1 +
 .../lib/modules/5.6.0/modules.builtin.bin     | Bin 0 -> 39 bytes
 .../lib/modules/5.6.0/modules.dep             |   0
 .../lib/modules/5.6.0/modules.dep.bin         | Bin 0 -> 12 bytes
 .../lib/modules/5.6.0/modules.devname         |   1 +
 .../lib/modules/5.6.0/modules.softdep         |   1 +
 .../lib/modules/5.6.0/modules.symbols         |   1 +
 .../lib/modules/5.6.0/modules.symbols.bin     | Bin 0 -> 12 bytes
 testsuite/test-init.c                         |  31 +++++++++++
 tools/depmod.c                                |   6 ++-
 17 files changed, 95 insertions(+), 41 deletions(-)
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.alias
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.alias.bin
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.builtin
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.builtin.bin
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.dep
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.dep.bin
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.devname
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.softdep
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.symbols
 create mode 100644 testsuite/rootfs-pristine/test-init-load-resources/lib/modules/5.6.0/modules.symbols.bin

-- 
2.25.1


             reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  5:00 Lucas De Marchi [this message]
2020-03-10  5:00 ` [PATCH 1/6] gitignore: ignore .cache.mk when building modules Lucas De Marchi
2020-03-10  5:00 ` [PATCH 2/6] depmod: do not output .bin to stdout Lucas De Marchi
2020-03-10  5:00 ` [PATCH 3/6] libkmod: simplify lookup when builtin.modinfo.bin file is missing Lucas De Marchi
2020-03-10  5:00 ` [PATCH 4/6] libkmod: fix return error when opening index Lucas De Marchi
2020-03-10  5:00 ` [PATCH 5/6] libkmod: allow modules.alias.builtin to be optional Lucas De Marchi
2020-03-10  5:00 ` [PATCH 6/6] testsuite: add check for kmod_load_resources Lucas De Marchi
2020-03-23 19:41 ` [PATCH 0/6] Fix modules.builtin.alias handling Lucas De Marchi

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=20200310050029.27678-1-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=linux-modules@vger.kernel.org \
    --cc=yaneti@declera.com \
    /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

Linux-Modules Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-modules/0 linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ https://lore.kernel.org/linux-modules \
		linux-modules@vger.kernel.org
	public-inbox-index linux-modules

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-modules


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git