* [gentoo-user] Latest 4.9 kernels broken?
@ 2018-06-07 20:45 Ian Zimmerman
2018-06-08 6:22 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-07 20:45 UTC (permalink / raw
To: gentoo-user
I cannot get either 4.9.106 or 4.9.107 to work on my amd64 system at
all. It seems some (but not all) modules refuse to load:
Script started on 2018-06-07 13:31:28-0700
matica!501 ~# modprobe fbcon
modprobe: ERROR: could not insert 'fbcon': Exec format error
matica!502 ~# ls /usr/lib/modules/4.9.106/kernel/sound/
core/ hda/ pci/ soundcore.ko
matica!502 ~# ls /lib/modules/4.9.106/kernel/sound/hda/
snd-hda-core.ko
matica!503 ~# modprobe snd-hda-core
modprobe: ERROR: could not insert 'snd_hda_core': Exec format error
matica!504 ~# exit
Script done on 2018-06-07 13:32:56-0700
I am pretty sure this is caused by:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b790b4f22a165e85f0b53a3231764034e42c7ea6
Wth can I do about it? Wait for an updated kmod package? How long will
that take?
I run without initramfs, gcc version is 6.4.0-r1
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Latest 4.9 kernels broken?
2018-06-07 20:45 [gentoo-user] Latest 4.9 kernels broken? Ian Zimmerman
@ 2018-06-08 6:22 ` Alexander Kapshuk
2018-06-08 16:37 ` [gentoo-user] " Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-08 6:22 UTC (permalink / raw
To: Gentoo mailing list
On Thu, Jun 7, 2018 at 11:45 PM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> I cannot get either 4.9.106 or 4.9.107 to work on my amd64 system at
> all. It seems some (but not all) modules refuse to load:
>
> Script started on 2018-06-07 13:31:28-0700
> matica!501 ~# modprobe fbcon
> modprobe: ERROR: could not insert 'fbcon': Exec format error
> matica!502 ~# ls /usr/lib/modules/4.9.106/kernel/sound/
> core/ hda/ pci/ soundcore.ko
> matica!502 ~# ls /lib/modules/4.9.106/kernel/sound/hda/
> snd-hda-core.ko
> matica!503 ~# modprobe snd-hda-core
> modprobe: ERROR: could not insert 'snd_hda_core': Exec format error
> matica!504 ~# exit
> Script done on 2018-06-07 13:32:56-0700
>
> I am pretty sure this is caused by:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b790b4f22a165e85f0b53a3231764034e42c7ea6
>
> Wth can I do about it? Wait for an updated kmod package? How long will
> that take?
>
> I run without initramfs, gcc version is 6.4.0-r1
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
Could this be a multilib issue? Does you kernel have
CONFIG_IA32_EMULATION enabled?
See https://forums.gentoo.org/viewtopic-p-7647744.html.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-08 6:22 ` Alexander Kapshuk
@ 2018-06-08 16:37 ` Ian Zimmerman
2018-06-08 19:00 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-08 16:37 UTC (permalink / raw
To: gentoo-user
On 2018-06-08 09:22, Alexander Kapshuk wrote:
> > matica!501 ~# modprobe fbcon
> > modprobe: ERROR: could not insert 'fbcon': Exec format error
> Could this be a multilib issue? Does you kernel have
> CONFIG_IA32_EMULATION enabled?
> See https://forums.gentoo.org/viewtopic-p-7647744.html.
CONFIG_IA32_EMULATION is definitely set in the _current_ working kernel
(ie. 4.9.105), and I use the working config-* file as the start for the
new one (with make oldconfig), so unless there was a radical change in
the kernel build, this doesn't look like a possible cause.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-08 16:37 ` [gentoo-user] " Ian Zimmerman
@ 2018-06-08 19:00 ` Alexander Kapshuk
2018-06-08 19:09 ` Shea Alterio
2018-06-08 19:29 ` Ian Zimmerman
0 siblings, 2 replies; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-08 19:00 UTC (permalink / raw
To: Gentoo mailing list
On Fri, Jun 8, 2018 at 7:37 PM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> On 2018-06-08 09:22, Alexander Kapshuk wrote:
>
> > > matica!501 ~# modprobe fbcon
> > > modprobe: ERROR: could not insert 'fbcon': Exec format error
>
> > Could this be a multilib issue? Does you kernel have
> > CONFIG_IA32_EMULATION enabled?
> > See https://forums.gentoo.org/viewtopic-p-7647744.html.
>
> CONFIG_IA32_EMULATION is definitely set in the _current_ working kernel
> (ie. 4.9.105), and I use the working config-* file as the start for the
> new one (with make oldconfig), so unless there was a radical change in
> the kernel build, this doesn't look like a possible cause.
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
What's the output of:
uname -r
strings /path/to/your/module.ko | grep vermagic=
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-08 19:00 ` Alexander Kapshuk
@ 2018-06-08 19:09 ` Shea Alterio
2018-06-08 19:29 ` Ian Zimmerman
1 sibling, 0 replies; 20+ messages in thread
From: Shea Alterio @ 2018-06-08 19:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]
Hmm i had mentioned this to #gentoo-hardened, but it's good to know it's
broken in the non hardened kernel too, i am used to waiting for those
packages to update i guess.
On Fri, Jun 8, 2018 at 3:00 PM, Alexander Kapshuk <
alexander.kapshuk@gmail.com> wrote:
> On Fri, Jun 8, 2018 at 7:37 PM Ian Zimmerman <itz@very.loosely.org> wrote:
> >
> > On 2018-06-08 09:22, Alexander Kapshuk wrote:
> >
> > > > matica!501 ~# modprobe fbcon
> > > > modprobe: ERROR: could not insert 'fbcon': Exec format error
> >
> > > Could this be a multilib issue? Does you kernel have
> > > CONFIG_IA32_EMULATION enabled?
> > > See https://forums.gentoo.org/viewtopic-p-7647744.html.
> >
> > CONFIG_IA32_EMULATION is definitely set in the _current_ working kernel
> > (ie. 4.9.105), and I use the working config-* file as the start for the
> > new one (with make oldconfig), so unless there was a radical change in
> > the kernel build, this doesn't look like a possible cause.
> >
> > --
> > Please don't Cc: me privately on mailing lists and Usenet,
> > if you also post the followup to the list or newsgroup.
> > To reply privately _only_ on Usenet and on broken lists
> > which rewrite From, fetch the TXT record for no-use.mooo.com.
> >
>
> What's the output of:
> uname -r
> strings /path/to/your/module.ko | grep vermagic=
>
>
[-- Attachment #2: Type: text/html, Size: 2079 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-08 19:00 ` Alexander Kapshuk
2018-06-08 19:09 ` Shea Alterio
@ 2018-06-08 19:29 ` Ian Zimmerman
2018-06-08 19:38 ` Alexander Kapshuk
1 sibling, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-08 19:29 UTC (permalink / raw
To: gentoo-user
On 2018-06-08 22:00, Alexander Kapshuk wrote:
> What's the output of:
> uname -r
> strings /path/to/your/module.ko | grep vermagic=
Here are the results for 4.9.105 (working):
matica!6 ~$ uname -r
4.9.105
matica!7 ~$ strings
/lib64/modules/4.9.105/kernel/drivers/video/console/fbcon.ko |
fgrep -e 'vermagic='
vermagic=4.9.105 SMP
Let me know if you need to see the ones for the broken kernel ...
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-08 19:29 ` Ian Zimmerman
@ 2018-06-08 19:38 ` Alexander Kapshuk
2018-06-09 4:34 ` Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-08 19:38 UTC (permalink / raw
To: Gentoo mailing list
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On Fri, Jun 8, 2018, 22:30 Ian Zimmerman <itz@very.loosely.org> wrote:
> On 2018-06-08 22:00, Alexander Kapshuk wrote:
>
> > What's the output of:
> > uname -r
> > strings /path/to/your/module.ko | grep vermagic=
>
> Here are the results for 4.9.105 (working):
>
> matica!6 ~$ uname -r
> 4.9.105
> matica!7 ~$ strings
> /lib64/modules/4.9.105/kernel/drivers/video/console/fbcon.ko |
> fgrep -e 'vermagic='
> vermagic=4.9.105 SMP
>
> Let me know if you need to see the ones for the broken kernel ...
>
Yes, we want to make sure the vermagic of the modules you're trying to load
matches the output of uname -r of the running kernel.
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
>
[-- Attachment #2: Type: text/html, Size: 1603 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-08 19:38 ` Alexander Kapshuk
@ 2018-06-09 4:34 ` Ian Zimmerman
2018-06-09 5:56 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-09 4:34 UTC (permalink / raw
To: gentoo-user
On 2018-06-08 22:38, Alexander Kapshuk wrote:
> On Fri, Jun 8, 2018, 22:30 Ian Zimmerman <itz@very.loosely.org> wrote:
>
> > On 2018-06-08 22:00, Alexander Kapshuk wrote:
> >
> > > What's the output of:
> > > uname -r
> > > strings /path/to/your/module.ko | grep vermagic=
> >
> > Here are the results for 4.9.105 (working):
> >
> > matica!6 ~$ uname -r
> > 4.9.105
> > matica!7 ~$ strings
> > /lib64/modules/4.9.105/kernel/drivers/video/console/fbcon.ko |
> > fgrep -e 'vermagic='
> > vermagic=4.9.105 SMP
> >
> > Let me know if you need to see the ones for the broken kernel ...
> >
>
> Yes, we want to make sure the vermagic of the modules you're trying to load
> matches the output of uname -r of the running kernel.
Ok, here:
Script started on 2018-06-08 21:11:04-0700
matica!501 ~# ls -l /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon.ko
-rw-r--r-- 1 root root 54280 Jun 8 20:57 /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon.ko
matica!502 ~# uname -r
4.9.107
matica!503 ~# strings /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon
.ko | fgrep -e 'vermagic='
vermagic=4.9.107 SMP
matica!504 ~# modprobe fbcon
modprobe: ERROR: could not insert 'fbcon': Exec format error
matica!505 ~# exit
Script done on 2018-06-08 21:14:46-0700
Sorry to ruin the low-hanging hypothesis :-P
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-09 4:34 ` Ian Zimmerman
@ 2018-06-09 5:56 ` Alexander Kapshuk
2018-06-09 11:15 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-09 5:56 UTC (permalink / raw
To: Gentoo mailing list
[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]
On Sat, Jun 9, 2018, 07:34 Ian Zimmerman <itz@very.loosely.org> wrote:
> On 2018-06-08 22:38, Alexander Kapshuk wrote:
>
> > On Fri, Jun 8, 2018, 22:30 Ian Zimmerman <itz@very.loosely.org> wrote:
> >
> > > On 2018-06-08 22:00, Alexander Kapshuk wrote:
> > >
> > > > What's the output of:
> > > > uname -r
> > > > strings /path/to/your/module.ko | grep vermagic=
> > >
> > > Here are the results for 4.9.105 (working):
> > >
> > > matica!6 ~$ uname -r
> > > 4.9.105
> > > matica!7 ~$ strings
> > > /lib64/modules/4.9.105/kernel/drivers/video/console/fbcon.ko |
> > > fgrep -e 'vermagic='
> > > vermagic=4.9.105 SMP
> > >
> > > Let me know if you need to see the ones for the broken kernel ...
> > >
> >
> > Yes, we want to make sure the vermagic of the modules you're trying to
> load
> > matches the output of uname -r of the running kernel.
>
> Ok, here:
>
> Script started on 2018-06-08 21:11:04-0700
> matica!501 ~# ls -l
> /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon.ko
> -rw-r--r-- 1 root root 54280 Jun 8 20:57
> /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon.ko
> matica!502 ~# uname -r
> 4.9.107
> matica!503 ~# strings
> /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon
> .ko | fgrep -e 'vermagic='
> vermagic=4.9.107 SMP
> matica!504 ~# modprobe fbcon
> modprobe: ERROR: could not insert 'fbcon': Exec format error
> matica!505 ~# exit
>
> Script done on 2018-06-08 21:14:46-0700
>
> Sorry to ruin the low-hanging hypothesis :-P
>
>
Did dmesg have anything useful to say other than exec format error?
Have you tried insmod'ing the modules instead of modprobe'ing them?
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
>
[-- Attachment #2: Type: text/html, Size: 2860 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-09 5:56 ` Alexander Kapshuk
@ 2018-06-09 11:15 ` Alexander Kapshuk
2018-06-09 14:26 ` Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-09 11:15 UTC (permalink / raw
To: Gentoo mailing list
On Sat, Jun 9, 2018 at 8:56 AM Alexander Kapshuk
<alexander.kapshuk@gmail.com> wrote:
>
>
>
> On Sat, Jun 9, 2018, 07:34 Ian Zimmerman <itz@very.loosely.org> wrote:
>>
>> On 2018-06-08 22:38, Alexander Kapshuk wrote:
>>
>> > On Fri, Jun 8, 2018, 22:30 Ian Zimmerman <itz@very.loosely.org> wrote:
>> >
>> > > On 2018-06-08 22:00, Alexander Kapshuk wrote:
>> > >
>> > > > What's the output of:
>> > > > uname -r
>> > > > strings /path/to/your/module.ko | grep vermagic=
>> > >
>> > > Here are the results for 4.9.105 (working):
>> > >
>> > > matica!6 ~$ uname -r
>> > > 4.9.105
>> > > matica!7 ~$ strings
>> > > /lib64/modules/4.9.105/kernel/drivers/video/console/fbcon.ko |
>> > > fgrep -e 'vermagic='
>> > > vermagic=4.9.105 SMP
>> > >
>> > > Let me know if you need to see the ones for the broken kernel ...
>> > >
>> >
>> > Yes, we want to make sure the vermagic of the modules you're trying to load
>> > matches the output of uname -r of the running kernel.
>>
>> Ok, here:
>>
>> Script started on 2018-06-08 21:11:04-0700
>> matica!501 ~# ls -l /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon.ko
>> -rw-r--r-- 1 root root 54280 Jun 8 20:57 /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon.ko
>> matica!502 ~# uname -r
>> 4.9.107
>> matica!503 ~# strings /lib64/modules/4.9.107/kernel/drivers/video/console/fbcon
>> .ko | fgrep -e 'vermagic='
>> vermagic=4.9.107 SMP
>> matica!504 ~# modprobe fbcon
>> modprobe: ERROR: could not insert 'fbcon': Exec format error
>> matica!505 ~# exit
>>
>> Script done on 2018-06-08 21:14:46-0700
>>
>> Sorry to ruin the low-hanging hypothesis :-P
>>
>
> Did dmesg have anything useful to say other than exec format error?
> Have you tried insmod'ing the modules instead of modprobe'ing them?
>>
>>
>> --
I had a look at the source code for kmod-25. If I read it right, dmesg
should have records along the lines of:
kmod-25/libkmod/libkmod-module.c:886: INFO(mod->ctx, "Failed
to insert module '%s': %m\n", path);
modprobe returns Exec format error.
errno -l | grep 'Exec format error'
ENOEXEC 8 Exec format error
/usr/include/asm-generic/errno-base.h:
#define ENOEXEC 8 /* Exec format error */
Here's the execution path I've been able to follow:
insmod()->kmod_module_probe_insert_module()->kmod_module_insert_module()->init_module()->copy_module_from_user();
init_module(2):
http://man7.org/linux/man-pages/man2/init_module.2.html
ENOEXEC
The binary image supplied in module_image is not an ELF image,
or is an ELF image that is invalid or for a different
architecture.
(1). kmod-25/tools/modprobe.c
ENOEXEC returned by kmod_module_probe_insert_module().
static int insmod(struct kmod_ctx *ctx, const char *alias,
const char *extra_options)
{
...
kmod_list_foreach(l, list) {
...
if (lookup_only)
printf("%s\n", kmod_module_get_name(mod));
else {
err = kmod_module_probe_insert_module(mod, flags,
extra_options, NULL, NULL, show);
}
if (err >= 0)
/* ignore flag return values such as a mod being blacklisted */
err = 0;
else {
switch (err) {
...
default:
ERR("could not insert '%s': %s\n", <- the error message reported by modprobe
kmod_module_get_name(mod),
strerror(-err));
break;
}
}
(2). kmod-25/libkmod/libkmod-module.c
KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod,
unsigned int flags, const char *extra_options,
int (*run_install)(struct kmod_module *m,
const char *cmd, void *data),
const void *data,
void (*print_action)(struct kmod_module *m,
bool install,
const char *options))
{
...
if (!(flags & KMOD_PROBE_DRY_RUN))
err = kmod_module_insert_module(m, flags,
options);
}
...
}
(3). KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
unsigned int flags,
const char *options)
{
...
size = kmod_file_get_size(mod->file); <- the size of your modules elf file
...
err = init_module(mem, size, args);
...
}
(4). [init_module syscall]
kernel/module.c
SYSCALL_DEFINE3(init_module, void __user *, umod,
unsigned long, len, const char __user *, uargs)
{
int err;
struct load_info info = { };
err = may_init_module();
if (err)
return err;
pr_debug("init_module: umod=%p, len=%lu, uargs=%p\n",
umod, len, uargs);
err = copy_module_from_user(umod, len, &info);
if (err)
return err;
return load_module(&info, uargs, 0);
}
(5). kernel/module.c
/* Sets info->hdr and info->len. */
static int copy_module_from_user(const void __user *umod, unsigned long len,
struct load_info *info)
{
int err;
info->len = len;
if (info->len < sizeof(*(info->hdr))) <- here, size of your
module'e elf file is being compared against the size of the ELF header
as defined for your architecture. See below.
return -ENOEXEC;
...
}
kernel/module.c:310,313
struct load_info {
const char *name;
Elf_Ehdr *hdr; <- ELF header used in comparison above.
unsigned long len;
Elf_Ehdr is effected by CONFIG_X86_32 set in:
arch/x86/um/asm/module.h:14:#define Elf_Ehdr Elf32_Ehdr
arch/x86/um/asm/module.h:20:#define Elf_Ehdr Elf64_Ehdr
And CONFIG_64BIT defined in:
include/asm-generic/module.h:20:#define Elf_Ehdr Elf64_Ehdr
include/asm-generic/module.h:37:#define Elf_Ehdr Elf32_Ehdr
Example of ELF header sizes for 32/64 bit:
readelf -h ./kernel/fs/udf/udf.ko
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
...
Machine: Intel 80386
...
Size of this header: 52 (bytes)
readelf -h ./kernel/fs/udf/udf.ko
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
...
Machine: Advanced Micro Devices X86-64
Size of this header: 64 (bytes)
Now, if my understanding of the source code above is right, you either
have CONFIG_X86_32 set in your kernel, e.i. your Elf_Ehdr is set to
Elf32_Ehdr, or the module's header is for the architecture that is
different from what is expected by the kernel.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-09 11:15 ` Alexander Kapshuk
@ 2018-06-09 14:26 ` Ian Zimmerman
2018-06-09 15:51 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-09 14:26 UTC (permalink / raw
To: gentoo-user
On 2018-06-09 14:15, Alexander Kapshuk wrote:
> I had a look at the source code for kmod-25. If I read it right, dmesg
> should have records along the lines of:
> kmod-25/libkmod/libkmod-module.c:886: INFO(mod->ctx, "Failed
> to insert module '%s': %m\n", path);
>
> modprobe returns Exec format error.
> Now, if my understanding of the source code above is right, you either
> have CONFIG_X86_32 set in your kernel, e.i. your Elf_Ehdr is set to
> Elf32_Ehdr, or the module's header is for the architecture that is
> different from what is expected by the kernel.
The former is definitely false. If the latter holds, it is not due to
any action on my part, but due to how the module is built by the kernel
build system (at the same time as the kernel proper). Again, I strongly
suspect this is due to all the "objtool" churn in 4.9.106 and later.
I'm afraid I'm at the limit of my patience diving into this for now.
You see, I have to remove the broken kernel from grub manually every
time (and then re-add it for another test), otherwise it breaks
unattended boots.
Sorry about that. Maybe in a few days I'll have time to sit down and
track it properly.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-09 14:26 ` Ian Zimmerman
@ 2018-06-09 15:51 ` Alexander Kapshuk
2018-06-11 15:09 ` Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-09 15:51 UTC (permalink / raw
To: Gentoo mailing list
On Sat, Jun 9, 2018 at 5:26 PM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> On 2018-06-09 14:15, Alexander Kapshuk wrote:
>
> > I had a look at the source code for kmod-25. If I read it right, dmesg
> > should have records along the lines of:
> > kmod-25/libkmod/libkmod-module.c:886: INFO(mod->ctx, "Failed
> > to insert module '%s': %m\n", path);
> >
> > modprobe returns Exec format error.
>
> > Now, if my understanding of the source code above is right, you either
> > have CONFIG_X86_32 set in your kernel, e.i. your Elf_Ehdr is set to
> > Elf32_Ehdr, or the module's header is for the architecture that is
> > different from what is expected by the kernel.
>
> The former is definitely false. If the latter holds, it is not due to
> any action on my part, but due to how the module is built by the kernel
> build system (at the same time as the kernel proper). Again, I strongly
> suspect this is due to all the "objtool" churn in 4.9.106 and later.
>
> I'm afraid I'm at the limit of my patience diving into this for now.
> You see, I have to remove the broken kernel from grub manually every
> time (and then re-add it for another test), otherwise it breaks
> unattended boots.
>
> Sorry about that. Maybe in a few days I'll have time to sit down and
> track it properly.
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
I appreciate that this has been a frustrating experience for you, but
when you get a change, could you please run 'readelf -h' on the module
concerned and show the output below:
readelf -h /path/to/module.ko
ELF Header:
Magic:
Class:
Machine:
Size of this header:
This will either confirm or refute my assumption about the ELF header
being the wrong size and causing the 'Exec format error' message to be
printed.
Thanks.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-09 15:51 ` Alexander Kapshuk
@ 2018-06-11 15:09 ` Ian Zimmerman
2018-06-12 5:23 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-11 15:09 UTC (permalink / raw
To: gentoo-user
On 2018-06-09 18:51, Alexander Kapshuk wrote:
> readelf -h /path/to/module.ko
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 52808 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 23
Section header string table index: 22
This was less frustrating than the other times as I didn't have to
reboot back and forth, so you need not feel guilty about it.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-11 15:09 ` Ian Zimmerman
@ 2018-06-12 5:23 ` Alexander Kapshuk
2018-06-12 5:53 ` Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-12 5:23 UTC (permalink / raw
To: Gentoo mailing list
On Mon, Jun 11, 2018 at 6:09 PM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> On 2018-06-09 18:51, Alexander Kapshuk wrote:
>
> > readelf -h /path/to/module.ko
>
> ELF Header:
> Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
> Class: ELF64
> Data: 2's complement, little endian
> Version: 1 (current)
> OS/ABI: UNIX - System V
> ABI Version: 0
> Type: REL (Relocatable file)
> Machine: Advanced Micro Devices X86-64
> Version: 0x1
> Entry point address: 0x0
> Start of program headers: 0 (bytes into file)
> Start of section headers: 52808 (bytes into file)
> Flags: 0x0
> Size of this header: 64 (bytes)
> Size of program headers: 0 (bytes)
> Number of program headers: 0
> Size of section headers: 64 (bytes)
> Number of section headers: 23
> Section header string table index: 22
>
> This was less frustrating than the other times as I didn't have to
> reboot back and forth, so you need not feel guilty about it.
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
Hmm...
Looks like I'd have to build kernel 4.9.107 in an environment
resembling yours to try and reproduce the behavior in question.
What is the version of kmods you have installed on your system?
What's the output of 'emerge --info'?
In the meantime, see this email exchange [1] that might be relevant
to the problem you're having.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857354#10
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-12 5:23 ` Alexander Kapshuk
@ 2018-06-12 5:53 ` Ian Zimmerman
2018-06-12 6:56 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-12 5:53 UTC (permalink / raw
To: gentoo-user
On 2018-06-12 08:23, Alexander Kapshuk wrote:
> Looks like I'd have to build kernel 4.9.107 in an environment
> resembling yours to try and reproduce the behavior in question.
> What is the version of kmods you have installed on your system?
> What's the output of 'emerge --info'?
https://gist.github.com/nobrowser/314da0f994ce134e3d554cc4cfed266e
BTW, why are you so interested in this? It seems to me to be purely a
kernel/kernel tools problem. What is the gentoo angle?
Of course I'm not complaining that you're trying to help - thanks a lot.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-12 5:53 ` Ian Zimmerman
@ 2018-06-12 6:56 ` Alexander Kapshuk
2018-06-12 14:54 ` Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-12 6:56 UTC (permalink / raw
To: Gentoo mailing list
On Tue, Jun 12, 2018 at 8:54 AM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> On 2018-06-12 08:23, Alexander Kapshuk wrote:
>
> > Looks like I'd have to build kernel 4.9.107 in an environment
> > resembling yours to try and reproduce the behavior in question.
> > What is the version of kmods you have installed on your system?
> > What's the output of 'emerge --info'?
>
> https://gist.github.com/nobrowser/314da0f994ce134e3d554cc4cfed266e
>
> BTW, why are you so interested in this? It seems to me to be purely a
> kernel/kernel tools problem. What is the gentoo angle?
>
> Of course I'm not complaining that you're trying to help - thanks a lot.
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
I do programming for a living with an interest in kernel programming.
I'm not a Gentoo developer and I'm not doing this on behalf of the
Gentoo Foundation.
I was just l curious to find out what could have caused the issue
you're having and if possible to try and come up with a fix.
I can't promise I will be able to fix this for you. Chances are, the
next kmods and/or kernel upgrade will have fixed this for you.
Any reason you're trying to load those modules by hand rather then
have them loaded for you automatically?
Did dmesg have any more info on the failing modules?
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-12 6:56 ` Alexander Kapshuk
@ 2018-06-12 14:54 ` Ian Zimmerman
2018-06-13 17:29 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-12 14:54 UTC (permalink / raw
To: gentoo-user
On 2018-06-12 09:56, Alexander Kapshuk wrote:
> Any reason you're trying to load those modules by hand rather then
> have them loaded for you automatically?
The only one I try to "load by hand" (rather: via conf.d/modules) is
fbcon, because IME that is how I actually get a framebuffer console. Is
there a better way?
But there were other modules, including network drivers, that produced
the same error, despite getting autoloaded. Not all modules, though.
> Did dmesg have any more info on the failing modules?
I will report on this when I can play the reboot game again, which may
be a few days yet.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-12 14:54 ` Ian Zimmerman
@ 2018-06-13 17:29 ` Alexander Kapshuk
2018-06-14 16:56 ` Ian Zimmerman
0 siblings, 1 reply; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-13 17:29 UTC (permalink / raw
To: Gentoo mailing list
On Tue, Jun 12, 2018 at 5:54 PM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> On 2018-06-12 09:56, Alexander Kapshuk wrote:
>
> > Any reason you're trying to load those modules by hand rather then
> > have them loaded for you automatically?
>
> The only one I try to "load by hand" (rather: via conf.d/modules) is
> fbcon, because IME that is how I actually get a framebuffer console. Is
> there a better way?
>
> But there were other modules, including network drivers, that produced
> the same error, despite getting autoloaded. Not all modules, though.
>
> > Did dmesg have any more info on the failing modules?
>
> I will report on this when I can play the reboot game again, which may
> be a few days yet.
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
4.9.108 is out with some objtool fixes among other things. See the
change log for details.
https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.108
Want to give this kernel a try and seen if it fixes the issues you were having?
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-13 17:29 ` Alexander Kapshuk
@ 2018-06-14 16:56 ` Ian Zimmerman
2018-06-14 17:00 ` Alexander Kapshuk
0 siblings, 1 reply; 20+ messages in thread
From: Ian Zimmerman @ 2018-06-14 16:56 UTC (permalink / raw
To: gentoo-user
On 2018-06-13 20:29, Alexander Kapshuk wrote:
> 4.9.108 is out with some objtool fixes among other things. See the
> change log for details.
> https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.108
>
> Want to give this kernel a try and seen if it fixes the issues you were having?
4.9.108 didn't solve the problem. But I installed 4.14.49 and it behaves.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [gentoo-user] Re: Latest 4.9 kernels broken?
2018-06-14 16:56 ` Ian Zimmerman
@ 2018-06-14 17:00 ` Alexander Kapshuk
0 siblings, 0 replies; 20+ messages in thread
From: Alexander Kapshuk @ 2018-06-14 17:00 UTC (permalink / raw
To: Gentoo mailing list
On Thu, Jun 14, 2018 at 7:56 PM Ian Zimmerman <itz@very.loosely.org> wrote:
>
> On 2018-06-13 20:29, Alexander Kapshuk wrote:
>
> > 4.9.108 is out with some objtool fixes among other things. See the
> > change log for details.
> > https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.108
> >
> > Want to give this kernel a try and seen if it fixes the issues you were having?
>
> 4.9.108 didn't solve the problem. But I installed 4.14.49 and it behaves.
>
> --
> Please don't Cc: me privately on mailing lists and Usenet,
> if you also post the followup to the list or newsgroup.
> To reply privately _only_ on Usenet and on broken lists
> which rewrite From, fetch the TXT record for no-use.mooo.com.
>
Good to hear. Thanks for letting us know.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-06-14 17:00 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-07 20:45 [gentoo-user] Latest 4.9 kernels broken? Ian Zimmerman
2018-06-08 6:22 ` Alexander Kapshuk
2018-06-08 16:37 ` [gentoo-user] " Ian Zimmerman
2018-06-08 19:00 ` Alexander Kapshuk
2018-06-08 19:09 ` Shea Alterio
2018-06-08 19:29 ` Ian Zimmerman
2018-06-08 19:38 ` Alexander Kapshuk
2018-06-09 4:34 ` Ian Zimmerman
2018-06-09 5:56 ` Alexander Kapshuk
2018-06-09 11:15 ` Alexander Kapshuk
2018-06-09 14:26 ` Ian Zimmerman
2018-06-09 15:51 ` Alexander Kapshuk
2018-06-11 15:09 ` Ian Zimmerman
2018-06-12 5:23 ` Alexander Kapshuk
2018-06-12 5:53 ` Ian Zimmerman
2018-06-12 6:56 ` Alexander Kapshuk
2018-06-12 14:54 ` Ian Zimmerman
2018-06-13 17:29 ` Alexander Kapshuk
2018-06-14 16:56 ` Ian Zimmerman
2018-06-14 17:00 ` Alexander Kapshuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox