From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5500 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general,gmane.comp.emulators.qemu,gmane.linux.uclinux.microblaze Subject: Bogus struct stat64 for qemu-microblaze (user emulation)? Date: Wed, 16 Jul 2014 00:02:33 -0400 Message-ID: <20140716040233.GA25975@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1405483377 21723 80.91.229.3 (16 Jul 2014 04:02:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jul 2014 04:02:57 +0000 (UTC) Cc: microblaze-linux@lists.itee.uq.edu.au, musl@lists.openwall.com, Stefan Kristiansson To: qemu-devel@nongnu.org Original-X-From: musl-return-5505-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 16 06:02:52 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1X7GQd-0003Yp-9r for gllmg-musl@plane.gmane.org; Wed, 16 Jul 2014 06:02:51 +0200 Original-Received: (qmail 29713 invoked by uid 550); 16 Jul 2014 04:02:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 29702 invoked from network); 16 Jul 2014 04:02:50 -0000 Mail-Followup-To: Rich Felker Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5500 gmane.comp.emulators.qemu:286731 gmane.linux.uclinux.microblaze:12118 Archived-At: 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. 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. Rich