From owner-freebsd-arm@FreeBSD.ORG Thu Jan 24 16:17:05 2008 Return-Path: Delivered-To: freebsd-arm@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB1416A41B; Thu, 24 Jan 2008 16:17:05 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mail.digiware.nl (www.tegenbosch28.nl [217.21.251.97]) by mx1.freebsd.org (Postfix) with ESMTP id 6192F13C4D5; Thu, 24 Jan 2008 16:17:05 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from localhost (localhost.digiware.nl [127.0.0.1]) by mail.digiware.nl (Postfix) with ESMTP id 15E7217340; Thu, 24 Jan 2008 17:17:04 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from mail.digiware.nl ([127.0.0.1]) by localhost (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NxciYwxFjaYi; Thu, 24 Jan 2008 17:17:00 +0100 (CET) Received: from [212.61.27.67] (opteron.digiware.nl [212.61.27.67]) by mail.digiware.nl (Postfix) with ESMTP id E2FCB17343; Thu, 24 Jan 2008 17:17:00 +0100 (CET) Message-ID: <4798B9FA.9070501@digiware.nl> Date: Thu, 24 Jan 2008 17:16:58 +0100 From: Willem Jan Withagen Organization: Digiware User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: "M. Warner Losh" References: <20080118.145436.-1540399028.imp@bsdimp.com> <20080124114039.GF79134@zibbi.meraka.csir.co.za> <479880A7.1030107@digiware.nl> <20080124.084828.1608359032.imp@bsdimp.com> In-Reply-To: <20080124.084828.1608359032.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.ORG, des@FreeBSD.ORG Subject: Re: sshd broken on arm? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2008 16:17:05 -0000 M. Warner Losh wrote: > In message: <479880A7.1030107@digiware.nl> > Willem Jan Withagen writes: > : John Hay and others wrote: > : > Just adding __aligned(4) like Warner suggested also fix the problem. > : > + char tmp[CMSG_SPACE(sizeof(int))] __aligned(4); > : > So what should we do? > : > : I would say that the correct fix would be to fix the compiler. > : Going through all the code and make sure that everything is correctly > : aligned would be a humongous task.... > > Actually, the above fix *IS* the correct fix for arm given the ABI > that we're using... Well usually this is the punishment one get when jumping right in, without lurking for a longer time..... I only subscribed to this specific freebsd-arm recently, 'cause my job requires me to start doing ARM. So other than a few years of FreeBSD and my general knowledge on systems and Compilers I have not followed the discussion on the way things are coded. Given that tricks like accessing char-arrays with int pointers is a bit of a stretch, but not a very uncommon one, the following question pops in my mind: Does this then require programmers to real carefully look at what they are whiping up on code, to make shure that they don't by accident run into un-aligned access? And how about all that is already lying about?? Even still if this is mostly an embedded platform... Other than on the newer ARMs where unalinged access IS possible. Something that was not in my book, but I was told that is in the new v6 architecture. crawling back into his corner to do some more list searching. --WjW