From owner-freebsd-arm@FreeBSD.ORG Fri Aug 8 22:16:01 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B7448FA; Fri, 8 Aug 2014 22:16:01 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA7325C0; Fri, 8 Aug 2014 22:16:00 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XFsS7-0004uf-CM; Fri, 08 Aug 2014 22:15:59 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s78MFvlO022292; Fri, 8 Aug 2014 16:15:57 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+G8Q3HNsPlIMSbzucOsbZO X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: [CFR] mge driver / elf reloc From: Ian Lepore To: Fabien Thomas In-Reply-To: References: <14D22EA6-B73C-47BA-9A86-A957D24F23B8@freebsd.org> <1405810447.85788.41.camel@revolution.hippie.lan> <20140720220514.GP45513@funkthat.com> <20140720231056.GQ45513@funkthat.com> Content-Type: text/plain; charset="us-ascii" Date: Fri, 08 Aug 2014 16:15:56 -0600 Message-ID: <1407536156.56408.412.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Tim Kientzle , freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 22:16:01 -0000 On Mon, 2014-07-21 at 10:40 +0200, Fabien Thomas wrote: > On 21 Jul 2014, at 01:10, John-Mark Gurney wrote: > > > Tim Kientzle wrote this message on Sun, Jul 20, 2014 at 15:25 -0700: > >> > >> On Jul 20, 2014, at 3:05 PM, John-Mark Gurney wrote: > >> > >>> Ian Lepore wrote this message on Sat, Jul 19, 2014 at 16:54 -0600: > >>>> Sorry to take so long to reply to this, I'm trying to get caught up. I > >>>> see you've already committed the mge fixes. I think the ELF alignment > >>>> fix looks good and should also be committed. > >>> > >>> So, re the elf alignment... > >>> > >>> I think we should get a set of macros that handle load/stores to/from > >>> unaligned addresses that are transparent to the caller.... I need > >>> these for some other code I'm writing... > >>> > >>> I thought Open/Net had these available, but I can't seem to find them > >>> right now... > >> > >> $ man 9 byteorder > >> > >> is most of what you want, lacking only some aliases to pick > >> the correct macro for native byte order. > > > > Um, those doesn't help if you want native endian order... > > > > Also, only the enc/dec functions are documented to work on non-aligned > > address, so that doesn't help in most cases... > > Yes, having an API to read unaligned pointer is better than than using local fix like in the patch. > Tell me if you add one and I can adapt the patch. > > Fabien > So can we just get this patch committed as-is, and then maybe convert it later to the much-desired "something better" that this discussion deteriorated into? http://people.freebsd.org/~fabient/ARM/patch-arm_elf_alignfix If you've ever wondered whether there are real costs to bikeshedding, this is an example of such. This relocation patch is the fix to the kernel module loading problem HPS has been having, and who knows how much time he had to waste debugging it. I know I spent 4 hours on it today before discovering that the problem was known and fixed, only the fix isn't committed yet. -- Ian