From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5503 Path: news.gmane.org!not-for-mail From: Peter Maydell Newsgroups: gmane.comp.emulators.qemu,gmane.linux.lib.musl.general,gmane.linux.uclinux.microblaze Subject: Re: Bogus struct stat64 for qemu-microblaze (user emulation)? Date: Wed, 16 Jul 2014 09:36:23 +0100 Message-ID: References: <20140716040233.GA25975@brightrain.aerifal.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1405499831 7552 80.91.229.3 (16 Jul 2014 08:37:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jul 2014 08:37:11 +0000 (UTC) Cc: musl@lists.openwall.com, QEMU Developers , microblaze-linux@lists.itee.uq.edu.au, Stefan Kristiansson To: Rich Felker Original-X-From: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Wed Jul 16 10:37:06 2014 Return-path: Envelope-to: gceq-qemu-devel@gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X7Ki1-0008Md-Kb for gceq-qemu-devel@gmane.org; Wed, 16 Jul 2014 10:37:05 +0200 Original-Received: from localhost ([::1]:38146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7Khy-0004TF-QN for gceq-qemu-devel@gmane.org; Wed, 16 Jul 2014 04:37:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7Khl-0004T7-4J for qemu-devel@nongnu.org; Wed, 16 Jul 2014 04:36:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7Khg-0000M8-VL for qemu-devel@nongnu.org; Wed, 16 Jul 2014 04:36:49 -0400 Original-Received: from mail-la0-f46.google.com ([209.85.215.46]:65183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7Khg-0000Lw-Nx for qemu-devel@nongnu.org; Wed, 16 Jul 2014 04:36:44 -0400 Original-Received: by mail-la0-f46.google.com with SMTP id b8so401471lan.19 for ; Wed, 16 Jul 2014 01:36:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=1ETFgWIZFjBQfck6S9bwA8cVbPcd+7CSjv4A+gk2tbc=; b=QUkIYcj2jbaX7ycp5AYj6h+/UlTVk5WhtVDL+1/3xwfrL+CE/OtPrMPr+saJiXtRiB LW/k4gFmJGePTueNyzy28qlQynLO4D9Qow75KW+RyETzuQ3JelLFOTQMMZqrAVzsxusv 1WSHJGXl22QDSAFNYWwD1dnKBz/na8TtUvD0ktv2tiKoqtlag/RHRnSrDr23MRW8B6IL CshRQG3uPhKuzwt+SvVDI/IrhvXrwrKQ4Zs0nBZx/rqSDhzX7/W5861tf4hBMHr5pSrw +GWATaatP/hdaooTk7qzt9bqNLLEg8uGLUfoC2rsr200MsvavLiEiSeBG7BPKKUO0MWd ZpKA== X-Gm-Message-State: ALoCoQlNSQhFmUmeZ2e8B3qswW8zMoCA+a5CUbW2KkoX+4i5O0jsri0MruVhd/3Za0HUmEyDA7jy X-Received: by 10.112.16.199 with SMTP id i7mr15735559lbd.5.1405499803510; Wed, 16 Jul 2014 01:36:43 -0700 (PDT) Original-Received: by 10.112.158.228 with HTTP; Wed, 16 Jul 2014 01:36:23 -0700 (PDT) In-Reply-To: <20140716040233.GA25975@brightrain.aerifal.cx> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.215.46 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Original-Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Xref: news.gmane.org gmane.comp.emulators.qemu:286741 gmane.linux.lib.musl.general:5503 gmane.linux.uclinux.microblaze:12119 Archived-At: 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. > 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! thanks -- PMM