From patchwork Wed Oct 18 12:33:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 116289 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp6020218qgn; Wed, 18 Oct 2017 05:42:24 -0700 (PDT) X-Received: by 10.55.45.67 with SMTP id t64mr2163486qkh.267.1508330544549; Wed, 18 Oct 2017 05:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508330544; cv=none; d=google.com; s=arc-20160816; b=UA+didIt/7YjgEAVIXgKOZpgBaNSYqiRoF1BfLF3o3kk8W0zih0RYxnxqVVX5j86DD iaeN8Ke+UPY/FTQSyjzXRIix6xctYgfkgPoaWwjix/fqnT4lrPTYoBLf1VMsFLAjUVz4 urHESv2r0+hCuNKvssecKfvDdO9JKigSVRnLWvAp4ImlskfnksFXRqc7rgsEn9IrKWIn LYvcNlHuqv4+huQLJdyByqA3YEpjgvalPro82ifOVNudQLe058zY8/dfCtAjCzmNehrN wcNvSMOMbX+idKHSdi1sn+8/bDjLWgttqluK61e4AxmEdil4ysYan5/wVWd+tzJPt2FD pRng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=/XwIGgOXv4F9+pRS0TzrF1GrdJ9DxxkMfT3QupPCcYY=; b=jZ5G4wX6ywd6ZXvAhbtqJy3jaOuxwlMK3brMREbkL8KspdSelBq32bnGM+91KYSVsG Fkjoc0S52TPHHs7QP2wCo+ijrfDjpmdVkh4J3jnC17Qy0zAeQcDBXan0y9stY2d32Fu0 dpcQisbwLTvViA3zm/fgmgiWDbwe3ims0kDWUw6CzgoEYvqUpK2lV00daLxUND+H3ZXK z9Fgl1NTgcqcZ3Jl3m/SAQs4q+ngfZ8/fQ0uOB6rG6+4whcDB6uWmzuWXK9SQ7+Ea1qs Nj/wZ0ROIgGQH5MBbNYAKzoErkiDe4VKzLHdUHBCRCM4kp6zInbyBncE4SEbRVt1Ap+2 +Ifg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g6qGhgeg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f30si2503879qta.422.2017.10.18.05.42.24 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 18 Oct 2017 05:42:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g6qGhgeg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4nfy-0003KL-F9 for patch@linaro.org; Wed, 18 Oct 2017 08:42:22 -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) 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) 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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.14.2 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) #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap)