NetBSD Problem Report #40309

From www@NetBSD.org  Thu Jan  1 01:13:53 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 87CAE63B8C6
	for <gnats-bugs@gnats.netbsd.org>; Thu,  1 Jan 2009 01:13:53 +0000 (UTC)
Message-Id: <20090101011353.548F863B884@narn.NetBSD.org>
Date: Thu,  1 Jan 2009 01:13:53 +0000 (UTC)
From: lloyd@must-have-coffee.gen.nz
Reply-To: lloyd@must-have-coffee.gen.nz
To: gnats-bugs@NetBSD.org
Subject: kmods don't work for ARM hosts
X-Send-Pr-Version: www-1.0

>Number:         40309
>Category:       port-arm32
>Synopsis:       kmods don't work for ARM hosts
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-arm32-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 01 01:15:00 +0000 2009
>Closed-Date:    Mon Aug 17 19:46:43 +0000 2009
>Last-Modified:  Tue Aug 18 06:50:02 +0000 2009
>Originator:     Lloyd Parkes
>Release:        5.99.5
>Organization:
Must Have Coffee
>Environment:
NetBSD evbarm 5.99.5 NetBSD 5.99.5 (TS7200_SMALL) #2: Thu Jan  1 13:58:00 NZDT 2009  lloyd@maro.must-have-coffee.gen.nz:/vol/scratch/obj/evbarm/sys/arch/evbarm/compile/TS7200_SMALL evbarm
>Description:
When running a kernel with "options MODULAR" it generates traps and panics as soon as it tries to load a module. This is due to various failings in sys/arch/arm/arm32/kobj_machdep.c:kobj_reloc().

In particular, the code for R_ARM_ABS32 fails to take addend in to account, and the code for R_ARM_PC24 fails to exist.

Some of the other code was a bit randomly structured (inconsistent coding styles).


>How-To-Repeat:
Build kernel and boot.
>Fix:
See http://www.must-have-coffee.gen.nz/kobj_arm.diff.


>Release-Note:

>Audit-Trail:
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm32/40309: kmods don't work for ARM hosts
Date: Thu, 1 Jan 2009 20:46:21 +1300

 I found a bug in the patch related to how overflow was being checked  
 and I have uploaded a fixed patch.

 Cheers,
 Lloyd

State-Changed-From-To: open->closed
State-Changed-By: dsl@NetBSD.org
State-Changed-When: Mon, 17 Aug 2009 19:46:43 +0000
State-Changed-Why:
Fix from PR applied


From: David Laight <dsl@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40309 CVS commit: src/sys/arch/arm/arm32
Date: Mon, 17 Aug 2009 19:44:32 +0000

 Module Name:	src
 Committed By:	dsl
 Date:		Mon Aug 17 19:44:32 UTC 2009

 Modified Files:
 	src/sys/arch/arm/arm32: kobj_machdep.c

 Log Message:
 Add support for R_ARM_PC24 relocations and fix R_ARM_ABS32.
 Changes from PR/40309, but structure changed so there is a common error printf.
 Compiles ok, but my quick kernel build failed to find module_init_md().


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm32/kobj_machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/40309 CVS commit: src/sys/arch/arm/arm32
Date: Tue, 18 Aug 2009 18:46:34 +1200

 On 18/08/2009, at 7:50 AM, David Laight wrote:
 > Log Message:
 > Add support for R_ARM_PC24 relocations and fix R_ARM_ABS32.
 > Changes from PR/40309, but structure changed so there is a common  
 > error printf.
 > Compiles ok, but my quick kernel build failed to find  
 > module_init_md().

 This could be caused by a lack of SYMTAB space in the kernel. If it  
 is, there will be a message about this in the build log. I'll give it  
 a go when I get a chance (probably not soon).

 Cheers,
 Lloyd

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.