From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5519 Path: news.gmane.org!not-for-mail From: "Edgar E. Iglesias" Newsgroups: gmane.linux.uclinux.microblaze,gmane.linux.lib.musl.general,gmane.comp.emulators.qemu Subject: Re: [Qemu-devel] [musl] Re: Bogus struct stat64 for qemu-microblaze (user emulation)? Date: Fri, 18 Jul 2014 09:39:57 +1000 Message-ID: <20140717233957.GB13728@toto> References: <20140716040233.GA25975@brightrain.aerifal.cx> <20140716155957.GL17402@brightrain.aerifal.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1405640596 30940 80.91.229.3 (17 Jul 2014 23:43:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2014 23:43:16 +0000 (UTC) Cc: Peter Maydell , microblaze-linux-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8@public.gmane.org, QEMU Developers , Stefan Kristiansson , "Edgar E. Iglesias" To: Rich Felker Original-X-From: microblaze-linux-bounces-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org Fri Jul 18 01:43:10 2014 Return-path: Envelope-to: glum-microblaze-uclinux-Uylq5CNFT+jYtjvyW6yDsg@public.gmane.org Original-Received: from mailhub2.soe.uq.edu.au ([130.102.132.209] helo=newmailhub.uq.edu.au) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X7vKN-0001Nd-5E for glum-microblaze-uclinux-Uylq5CNFT+jYtjvyW6yDsg@public.gmane.org; Fri, 18 Jul 2014 01:43:07 +0200 Original-Received: from smtp2.soe.uq.edu.au (smtp2.soe.uq.edu.au [10.138.113.41]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id s6HNgbS7021373; Fri, 18 Jul 2014 09:42:37 +1000 Original-Received: from mailhub.eait.uq.edu.au (taxus.eait.uq.edu.au [130.102.79.56]) by smtp2.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id s6HNgaVO006381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jul 2014 09:42:37 +1000 Original-Received: from hakea.eait.uq.edu.au (hakea.eait.uq.edu.au [IPv6:2407:2e00:602:301:918f:714b:a603:22d7]) by mailhub.eait.uq.edu.au (8.14.6/8.14.6) with ESMTP id s6HNgNeA014143; Fri, 18 Jul 2014 09:42:23 +1000 (EST) Original-Received: from hakea.eait.uq.edu.au (localhost [127.0.0.1]) by hakea.eait.uq.edu.au (8.14.6/8.14.6) with ESMTP id s6HNfo9j001564; Fri, 18 Jul 2014 09:42:05 +1000 (EST) X-Mailman-Handler: $Id: mm-handler 5100 2002-04-05 19:41:09Z bwarsaw $ Original-Received: from mailhub.eait.uq.edu.au (baccata.eait.uq.edu.au [IPv6:2407:2e00:602:301:82e9:e11f:5b01:417a]) by hakea.eait.uq.edu.au (8.14.6/8.14.6) with ESMTP id s6HNfkT9004645 for ; Fri, 18 Jul 2014 09:41:46 +1000 (EST) Original-Received: from newmailhub.uq.edu.au (mailhub2.soe.uq.edu.au [130.102.132.209]) by mailhub.eait.uq.edu.au (8.14.6/8.14.6) with ESMTP id s6HNfkre009052 for ; Fri, 18 Jul 2014 09:41:46 +1000 (EST) Original-Received: from mx1.uq.edu.au (mx1.uq.edu.au [203.101.255.13]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id s6HNfkp7019291 for ; Fri, 18 Jul 2014 09:41:46 +1000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkBANteyFPRVcCwlGdsb2JhbABZg2BXxBOHPwGBCRYPAQEBAQcLCwkSK4QDAQEBAQIBEigGARsdAQMMBgUOCgklDwUPEQEFASITIogLAQMJBwEFCKFtao0agxCKMwoZJw1khksRAQUOjz0Hgy6BGAWbHpI8QYMygVRaAQED X-IPAS-Result: AhkBANteyFPRVcCwlGdsb2JhbABZg2BXxBOHPwGBCRYPAQEBAQcLCwkSK4QDAQEBAQIBEigGARsdAQMMBgUOCgklDwUPEQEFASITIogLAQMJBwEFCKFtao0agxCKMwoZJw1khksRAQUOjz0Hgy6BGAWbHpI8QYMygVRaAQED X-IronPort-AV: E=Sophos;i="5.01,681,1399989600"; d="scan'208";a="92367274" Original-Received: from mail-pd0-f176.google.com ([209.85.192.176]) by mx1.uq.edu.au with ESMTP; 18 Jul 2014 09:41:38 +1000 Original-Received: by mail-pd0-f176.google.com with SMTP id y10so3952244pdj.21 for ; Thu, 17 Jul 2014 16:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=oFBT6j0JdmQTYpb5nHNFrvHjRr+4QRX5Xdk/B/I9+NE=; b=gFkCeze46DdWq8YryEHYLoHDJxTnKPxcNKbVFqTnwnYjLptG9bUtBTHPKRFR/UsMsF YY29vmrXWYJH3IyZm7uADnhXTk9bVCIW35ze9ErcYkO7IO8XU0H4E+/kFbsjgTSNi7co tBmeZaExC3x+VJiJtUNoJxqkC/785FuaMMz7jgEo2pTZMKqfACctwpweyef6YMi8Cox0 VAb891nEIlTmwwUGU2Af8QqzngEmSVKbPttkDD1wkyPPTFkn03Ddfmf5d3/B2RHUPF61 zNRGPaRxM2F7flCQX5sImiez2X9MZ8510asYwwqTeI0tNcBypwQ/ELxAv0PRoo6CegmB e7pg== X-Received: by 10.68.57.140 with SMTP id i12mr708615pbq.44.1405640497312; Thu, 17 Jul 2014 16:41:37 -0700 (PDT) Original-Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id vy8sm3635343pbc.84.2014.07.17.16.41.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 17 Jul 2014 16:41:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140716155957.GL17402-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: 0.221 (), 5 = high X-UQ-Spam-Score: UQ-Spam-Score (0.221), 5 = high X-UQ-Spam-Tests: LOCAL_GENERIC LOCAL_NON_UQCONNECT_URI LOCAL_NON_UQ_URI X-UQ-FilterTime: 1405640562 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Scanned-By: MIMEDefang 2.73 X-Scanned-By: MIMEDefang 2.73 on 130.102.79.34 X-Scanned-By: MIMEDefang 2.73 X-Scanned-By: MIMEDefang 2.73 on 130.102.79.57 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-BeenThere: microblaze-linux-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: microblaze-linux-bounces-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org Xref: news.gmane.org gmane.linux.uclinux.microblaze:12121 gmane.linux.lib.musl.general:5519 gmane.comp.emulators.qemu:286979 Archived-At: On Wed, Jul 16, 2014 at 11:59:58AM -0400, Rich Felker wrote: > On Wed, Jul 16, 2014 at 09:36:23AM +0100, Peter Maydell wrote: > > On 16 July 2014 05:02, Rich Felker wrote: > > > The qemu-microblaze definition of struct stat64 seems to mismatch the > > > kernel definition, which is using asm-generic/stat.h. See: > > > > > > http://git.qemu.org/?p=qemu.git;a=blob;f=linux-user/syscall_defs.h;h=c9e6323905486452f518102bf40ba73143c9d601;hb=HEAD#l1469 > > > http://git.qemu.org/?p=qemu.git;a=blob;f=linux-user/syscall.c;h=a50229d0d72fc68966515fcf2bc308b833a3c032;hb=HEAD#l4949 > > > > > > This seems to be causing a truncated-to-32-bit inode number to be > > > stored in the location where st_ino should reside, and a spurious copy > > > of the inode number to be written in a unused slot at the end of the > > > structure. > > > > Sounds quite plausible -- we've had issues with other archs > > not having correct stat struct definitions in QEMU. I don't > > suppose anybody's done much testing of the microblaze > > linux-user code. > > The bug seems to have been introduced here. > > http://git.qemu.org/?p=qemu.git;a=commitdiff;h=a523eb06ec3fb2f4f4f4d362bb23704811d11379 > > I'm CC'ing the author/committer in case he has any input on why he did > this. > > > > Is my analysis correct? Stefan Kristiansson and I found this while > > > working on the or1k port of musl libc, where it seems our structure > > > for the existing microblaze port is wrongly aligned with the qemu > > > definition rather than the definition the real kernel is using. Before > > > I try correcting this on our side, I want to make sure we're working > > > with the right version. > > > > I would definitely trust the kernel definition, not QEMU's! > > Yes. Hi, Yes, please trust the kernel. We had a state of flux for a while where various ABIs circulated, I don't remember the details. If you create a patch and try both mb little and big-endian that would be awesome. Thanks, Edgar > > Rich > _______________________________________________ microblaze-linux mailing list microblaze-linux-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org https://lists.eait.uq.edu.au/mailman/listinfo/microblaze-linux