Date: Sat, 29 May 1999 12:19:54 -0700 (PDT) From: aron@cs.rice.edu To: freebsd-gnats-submit@freebsd.org Subject: kern/11928: kldload loads kernel modules even if there are conflicting definitions Message-ID: <19990529191954.2D91914C97@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 11928 >Category: kern >Synopsis: kldload loads kernel modules even if there are conflicting definitions >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 29 12:20:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Mohit Aron >Release: FreeBSD-3.2-Release >Organization: Rice University >Environment: FreeBSD luzern.cs.rice.edu 3.2-RELEASE FreeBSD 3.2-RELEASE #2: Fri May 28 15:22:48 CDT 1999 aron@luzern.cs.rice.edu:/usr/src/sys/compile/LUZERN i386 >Description: kldload loads a module even if the module contains data or function definitions that exist in the kernel. The modload in the lkm interface used to refuse loading such modules unless such data or funtion definitions were localized to the module using 'symorder -c'. I am not sure whether the above behavior is a feature of the elf format. If so, couldn't this lead to programming bugs where multiply defined symbols in the module were actually supposed to fetched from the kernel ? >How-To-Repeat: Try putting the global defintion "int hz;" in the C code for a kld module (the example in /usr/share/examples/kld/syscall will do). The kernel already contains a symbol "hz" that gives the clock frequency. kldload will load the module without any complaints. >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990529191954.2D91914C97>