From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKosp-0007vl-EM for qemu-devel@nongnu.org; Fri, 22 Aug 2014 09:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKosi-0003Q7-03 for qemu-devel@nongnu.org; Fri, 22 Aug 2014 09:27:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40032 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKosh-0003Q2-Qa for qemu-devel@nongnu.org; Fri, 22 Aug 2014 09:27:51 -0400 Message-ID: <53F74554.9010304@suse.de> Date: Fri, 22 Aug 2014 15:27:48 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1408708578-53362-1-git-send-email-agraf@suse.de> <2092450718.67025.1408709395059.open-xchange@oxbaltgw21.schlund.de> In-Reply-To: <2092450718.67025.1408709395059.open-xchange@oxbaltgw21.schlund.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , Riku Voipio , Alexander Graf , Peter Maydell Cc: qemu-devel@nongnu.org Hi, Am 22.08.2014 14:09, schrieb Laurent Vivier: > as in the kernel timer_t is an "int" (as said PMM), you should cast to > "int" to remove garbage on 64bit hosts and check sign ... So maybe that's the bug Alex was trying to fix downstream with the use of unsigned types? If as you say the upper 32 bits may be garbage, then casting from long to int would put garbage into bit 31 unless you cast to unsigned long first. Maybe we need cast macros to fix that? TARGET_TIMER_T() or something? Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg