Bug 117186

Summary: [modules] kldload Unsupported file type on STABLE amd64
Product: Base System Reporter: Sean McNeil <sean>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.2-STABLE   
Hardware: Any   
OS: Any   

Description Sean McNeil 2007-10-14 17:50:00 UTC
Loading kernel modules now causes the following output even though the
module appears to be loaded:

kldload: Unsupported file type

How-To-Repeat: Install a kernel module with kldload...

triton# kldunload umass
triton# kldload umass

The message is printed to the console and /var/log/messages
Comment 1 Matteo Riondato freebsd_committer freebsd_triage 2008-05-18 00:51:43 UTC
State Changed
From-To: open->feedback

Sean, are you still able to reproduce this ? did you try newer FreeBSD releases? 
Modules loading/unloading works just fine on my amd64.
Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2008-08-28 16:58:19 UTC
State Changed
From-To: feedback->closed

Feedback timeout (3 months).  To submitter: if you are still seeing 
this issue, we can reopen the PR 


Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2008-08-28 16:58:19 UTC
Responsible Changed
From-To: freebsd-amd64->gavin

Track
Comment 4 Gavin Atkinson freebsd_committer freebsd_triage 2008-08-29 16:04:39 UTC
State Changed
From-To: closed->open

Reopen. Quoting jhb@ on freebsd-amd64: 
http://docs.FreeBSD.org/cgi/mid.cgi?200808291038.56052.jhb 

This is still a bug.  It's a harmless warning, but it is caused by link_elf.c  
not handling a file and link_elf_obj.c then handling it ok.  Probably what  
needs to happen is that this specific error condition shouldn't output an  
error message, but should return a unique error value, and kern_linker.c  
should only output an error if all of the linker_if handlers fail with this  
error value and then output its own error message. 



Comment 5 Gavin Atkinson freebsd_committer freebsd_triage 2008-08-29 16:04:39 UTC
Responsible Changed
From-To: gavin->freebsd-amd64

Give back to maintainers
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2008-08-29 17:42:18 UTC
State Changed
From-To: open->analyzed

I think 'analyzed' might be a better state for this one.
Comment 7 nti 2008-12-28 17:39:26 UTC
Hi

Bug still exists on 6.4-STABLE FreeBSD amd64 build Sat Dec 27 23:51 2008

from dmesg:

kldload: /boot/kernel/fdescfs.ko: Unsupported file type
kldload: /boot/kernel/pflog.ko: Unsupported file type
kldload: /boot/kernel/pf.ko: Unsupported file type
kldload: /boot/kernel/nullfs.ko: Unsupported file type

Nicola
Comment 8 Andriy Gapon freebsd_committer freebsd_triage 2010-12-05 13:50:24 UTC
State Changed
From-To: analyzed->closed

This has been fixed for supported branches a while ago.
Comment 9 Mayank.Agarwal 2011-03-02 10:24:00 UTC
Hi, 

  

I am running a FreeBSD 7.2 amd64 machine. While I am trying to load a 
kernel module  I got following error: 

  

kldload: ./modules/base_kmod.ko: Unsupported file type 

After this error kernel panicked with following message: 

  

Fatal trap 12: page fault while in kernel mode 

cpuid = 0; apic id = 00 

fault virtual address   = 0xfffffffe80556000 

fault code              = supervisor read instruction, page not present 

instruction pointer     = 0x8:0xfffffffe80556000 

stack pointer           = 0x10:0xfffffffe8a88c710 

frame pointer           = 0x10:0xfffffffe8a88c760 

code segment            = base rx0, limit 0xfffff, type 0x1b 

                        = DPL 0, pres 1, long 1, def32 0, gran 1 

processor eflags        = interrupt enabled, resume, IOPL = 0 

current process         = 1009 (kldload) 

  

Machine information's are as follows: 

FreeBSD 7.2-RELEASE #0: Wed Feb 23 23:34:05 IST 2011     amd64 

  

  

-Mayank
Comment 10 Mark Linimon 2011-03-03 00:28:31 UTC
----- Forwarded message from John Baldwin <jhb@freebsd.org> -----

Date: Wed, 2 Mar 2011 07:41:41 -0500
From: John Baldwin <jhb@freebsd.org>
To: freebsd-amd64@freebsd.org,
	"Agarwal, Mayank" <Mayank.Agarwal@netapp.com>
Subject: Re: amd64/117186: [modules] kldload Unsupported file type on STABLE
	amd64

There should have been another message on the console before the panic that 
would explain why you got the error from kldload.

-- 
John Baldwin

----- End forwarded message -----
Comment 11 Mark Linimon 2011-03-03 00:29:32 UTC
----- Forwarded message from Etienne Robillard <erob@gthcfoundation.org> -----

Date: Wed, 02 Mar 2011 07:42:49 -0500
From: Etienne Robillard <erob@gthcfoundation.org>
To: "Agarwal, Mayank" <Mayank.Agarwal@netapp.com>,
	freebsd-stable@freebsd.org
Subject: Re: amd64/117186: [modules] kldload Unsupported file type on STABLE
	amd64

Hi Agarwal,

seems like your kernel is missing support to load this kind
of binaries. Is that a native ELF module or was it compiled with
on another machine?

also please send relevant tracebacks messages in plain as
opposed to html formatted messages!

Thanks,

-- 
Etienne Robillard

Company: Green Tea Hackers Club
Occupation: Software Developer (and CEO)
E-mail:     erob@gthcfoundation.org
Work phone: 450-936-2123
Website (Company):  https://gthc.org/
Website (Blog):     https://gthc.org/blog/
PGP public key fingerprint:    F2A9 32EA 8E7C 460F 1728  A1A7 649C 7F17 A086 DDEC

During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell 

If a free society cannot help the many who are poor, it cannot save the few who are rich. -- John F. Kennedy

----- End forwarded message -----
Comment 12 Mark Linimon 2011-03-06 22:10:10 UTC
----- Forwarded message from "Agarwal, Mayank" <Mayank.Agarwal@netapp.com> -----

Date: Thu, 3 Mar 2011 11:19:56 +0530
From: "Agarwal, Mayank" <Mayank.Agarwal@netapp.com>
To: Mark Linimon <linimon@lonesome.com>
Subject: RE: amd64/117186: [modules] kldload Unsupported file type on STABLE amd64

It is compiled on another machine:
Output of file command on module is:

bash-3.2# file base_kmod.ko
base_kmod.ko: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD),
not stripped

-Mayank	

----- End forwarded message -----