| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
gemini did this one. let's see how the tests go. |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 90.75862% with 67 lines in your changes missing coverage. Please review. @@ Coverage Diff @@
## main #3767 +/- ##
==========================================
+ Coverage 61.46% 61.91% +0.45%
==========================================
Files 648 648
Lines 45716 46349 +633
==========================================
+ Hits 28099 28698 +599
- Misses 17617 17651 +34
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sorry, something went wrong.
|
|
||
| Dir{Name: "/etc", Mode: 0o777}, | ||
|
|
||
| // The kernel's modprobe_path defaults to /sbin/modprobe for |
There was a problem hiding this comment.
This is not really how we want to do this, because, sometimes, the u-root initramfs is merged into an existing ramfs. We don't want to overwrite it this way.
I would suggest using the -base option with a cpio consisting of these two files. There may be other ways, but the change as done here can not be used.
Sorry, something went wrong.
There was a problem hiding this comment.
that's unfortunate - without some other initramfs, you won't be able to use module autoloading. and it's a pain to have to manually modprobe stuff.
not sure how exactly the extra cpio will work in our build environment. (possibly related: i've had other problems with our stuff and e.g. default_shell not setting a symlink for bin/sh).
other alternatives are changing the kernel config for it, (which is largely a non-starter), or changing the modpath at init time (which is potentially racy).
anyway, i'll have my agent talk to your agent to remove that symlink...
Sorry, something went wrong.
There was a problem hiding this comment.
actually, this is easy to add via command line
mkdir sbin
ln -s //sbin/modprobe sbin
u-root bla bla -files sbin
That's it. That's all it takes.
Sorry, something went wrong.
There was a problem hiding this comment.
note you can put that sbin anywhere
mkdir /tmp/blablah/sbin
ln -s /sbin/modprobe /tmp/blabla/sbin
u-root bla bla -files /tmp/blabla/sbin:sbin
you can create a tmpdir or whatever you want.
Sorry, something went wrong.
When the Linux kernel autoloads a module via request_module(), call_modprobe() in kernel/module/kmod.c invokes: /sbin/modprobe -q -- <module_or_alias> with PATH=/sbin:/usr/sbin:/bin:/usr/bin. Previously this failed in u-root for several reasons: - modprobe did not support -q or unixflag parsing, and unixflag.ArgsToGoArgs rewrote '--' to '-' while continuing to split subsequent arguments as flags. - kmodule did not resolve module aliases from modules.alias, modules.symbols, modules.builtin.modinfo, or modprobe.d/*.conf (e.g. fs-9p -> 9p, 9p-fd -> 9pnet_fd, symbol:*, or modalias wildcards). Fix these and related issues in modprobe and pkg/kmodule: - Fix unixflag.ArgsToGoArgs to stop flag splitting on '--' and '-'. - Update cmds/exp/modprobe to use unixflag and support -q/--quiet, -r/--remove, -b/--use-blacklist, -i/--ignore-install/--ignore-remove, -v/--verbose, -a/--all, -n/--dry-run/--show, -d/--dirname, -S/--set-version, and '--'. Reuse a single Prober across -a/-r arguments and exit non-zero on -a errors. - Resolve aliases from modprobe.d/*.conf, modules.alias, modules.symbols, and modules.builtin.modinfo, including wildcard globs, bracket ranges, DMI '/' dates, and chained aliases with cycle detection. - Parse module options and blacklists from modprobe.d/*.conf (/etc, /run, /usr/local/lib, /usr/lib, /lib with filename override precedence) and /proc/cmdline (<mod>.<param>=<val> and modprobe.blacklist=...). - Support softdep (pre: and post:) from modules.softdep and modprobe.d/*.conf, and treat 'Loading' modules in /proc/modules as in-kernel so recursive request_module() calls during module_init do not deadlock. - Support module removal (Prober.Remove / modprobe -r) in reverse topological order, skipping dependencies still in use by other loaded modules. - Fix findModPath for module filenames mixing '-' and '_', genLoadedMods early abort on out-of-tree modules, genDeps parsing of blank/comment lines and trailing spaces, and modStack slice aliasing in parallelProbeDep. Assisted-by: LLM Signed-off-by: Barret Rhoden <brho@google.com>
| Back | FazBrowse Home | New Git URL |
When the Linux kernel autoloads a module via request_module(), call_modprobe() in kernel/module/kmod.c invokes:
/sbin/modprobe -q -- <module_or_alias>
with PATH=/sbin:/usr/sbin:/bin:/usr/bin. Previously this failed in u-root for several reasons:
Fix these and related issues in modprobe and pkg/kmodule:
Assisted-by: LLM