From nobody Tue Feb 10 08:04:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508330616975939.6316832337588; Wed, 18 Oct 2017 05:43:36 -0700 (PDT) Received: from localhost ([::1]:44465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4nh5-0004BU-AQ for importer@patchew.org; Wed, 18 Oct 2017 08:43:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4nXe-0005IA-UX for qemu-devel@nongnu.org; Wed, 18 Oct 2017 08:33:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4nXZ-0003zT-42 for qemu-devel@nongnu.org; Wed, 18 Oct 2017 08:33:46 -0400 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]:51460) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4nXY-0003z5-St for qemu-devel@nongnu.org; Wed, 18 Oct 2017 08:33:41 -0400 Received: by mail-lf0-x243.google.com with SMTP id r129so5622356lff.8 for ; Wed, 18 Oct 2017 05:33:40 -0700 (PDT) Received: from berserk.kos.to (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id j71sm2590718lfk.6.2017.10.18.05.33.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 05:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/XwIGgOXv4F9+pRS0TzrF1GrdJ9DxxkMfT3QupPCcYY=; b=g6qGhgegiIRM47mnhXrH1wEGfptGOVXhCsZsj3kK63wlT3GrucnPInJOzhgsILq0DI K53Q+DHTVFZ0rSxV/FAZ/dgRmhzCIrHVzyA99fzc18eE+4CwDPgn99NPSy0945ssHGaG nO7Kw3cx0HQqSI2DJZQxho1TeJPwhmqulkMkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/XwIGgOXv4F9+pRS0TzrF1GrdJ9DxxkMfT3QupPCcYY=; b=PiTT9eZTpd8f0/Hg9xBWVormMks+RzP3jhnQ2P0gS5eHsvl7eONgssKPFj418723pj 9d/ZwjkFTMLgh1z5WTv81gxDZ9t04dHYj0IQy97sEqYBer2VYoZQlfdJlv5QgFlkAmrl eUZ6wtMWWqSlW6HuXFR1x3rFZLNPUdBNweE7j/Y28TZB9m3XVTPz5zYafJatjJq5mFXp 0mD7QP0EdQEZGtrpG9yvEQKaJS3nCa2H+LkSYj1e1K2XZMDK6Cfb1gv5EBcvI7WgjnEI Tg2/cHsQ52wl/sSK03mlRPGcNoYOaCLjGaDyD3dvvtpZeUxOCqo93PWSj2D+IqXsui65 8VGQ== X-Gm-Message-State: AMCzsaVyW4F9RO1KC0abonYlEg0cJ1KXyrWQ8ffqfXLM9Q0zxC/pmynA O4/uXQSk7CymMBKKD8RJD6Z5gB+iDPE= X-Google-Smtp-Source: ABhQp+QIGWoFZuz7AliFXitswKPyqpAIG5sx+0gU59fSU4DR5qhuUm7XrXcMqTolnPKSjtEOOE6a5w== X-Received: by 10.25.160.201 with SMTP id j192mr5207653lfe.145.1508330019445; Wed, 18 Oct 2017 05:33:39 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 18 Oct 2017 15:33:22 +0300 Message-Id: <1847b7ba7015a7448079c2d8fd7187726c33c707.1508329282.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::243 Subject: [Qemu-devel] [PULL 08/10] linux-user: Fix target FS_IOC_GETFLAGS and FS_IOC_SETFLAGS numbers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Peter Maydell We were defining TARGET_FS_IOC_GETFLAGS and TARGET_FS_IOC_SETFLAGS using the host 'long' type in the size field, which meant that they had the wrong values if the host and guest had different sized longs. Switch to abi_long instead. This fixes a bug where these ioctls don't work on 32-bit guests on 64-bit hosts (and makes the LTP test 'setxattr03' pass where it did not previously.) Reported-by: pgndev Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 6e2287e918..447915cf80 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1101,8 +1101,8 @@ struct target_pollfd { /* Note that the ioctl numbers claim type "long" but the actual type * used by the kernel is "int". */ -#define TARGET_FS_IOC_GETFLAGS TARGET_IOR('f', 1, long) -#define TARGET_FS_IOC_SETFLAGS TARGET_IOW('f', 2, long) +#define TARGET_FS_IOC_GETFLAGS TARGET_IOR('f', 1, abi_long) +#define TARGET_FS_IOC_SETFLAGS TARGET_IOW('f', 2, abi_long) =20 #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap) =20 --=20 2.14.2