From patchwork Tue Apr 7 15:51:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 185240 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp5011669ilr; Tue, 7 Apr 2020 08:51:39 -0700 (PDT) X-Google-Smtp-Source: APiQypLTUi/gmVCS1xQR8fCCuVTLrEygb3tEXKvp8d3O3ZVtpb1Tp1XCgQKdS1BtL0/eTsuz43hR X-Received: by 2002:ac8:7a6b:: with SMTP id w11mr2852144qtt.126.1586274699053; Tue, 07 Apr 2020 08:51:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586274699; cv=none; d=google.com; s=arc-20160816; b=tHTogJj2lH20WFMZlQNkSpe9lgYkGzSFdF2DtGC0IZjUpkHmrItK/EoJMj6dH1ISrp e80BKXxGu7aS0JoK2+3bnxrt1PG70LZRheddnxQMrzS2ylvCCzIZ9rDJlZeEB2fG5Wqt 0wFrLwXJLIV1nq3n4zA+Iw28jJf36cJQCwlnGZ8APo+6iOuORT8h6Vn/5wCpzlyPkwkA /LlFyGXeLVAVHJBMO+hS1eAPRGrhdOV/gBgM2CCjv53VeHecsamwD6eXvfWP7Y+t4O37 iS6zlt3Kmv+v2WkKcklgYENbOCa9yn6xzgmzffv+DtSAlQFwKrrQJAvvd8Zg5ziRwvWM 9p+w== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=VJ6+jJuK9aM49AP9y9RG5kZxMwVILHzFOXjQWpNENXw=; b=EEqx6jRoUhowZTlaDRNmUpZh3vEbqs/ST3hlWCYYicDVna6Lz9Z43hhepy0lrEixlr A4HiiRg2qBBVt8IetpJ1PRJICtn4CRyagF2Hfuu/flqtfNdmIb+MEpQT/f9ay4TRy+zR zcLpSM3N07JJxJmyk3C2Skhq69Iax3iC8AJ3vHgUwr9iJwk6G4dXuGtgEUNQ+UAYDr8m Ze4gn3TUHAxqeSk3JuP3iLFUSJGjQO5YY8ioh0lEuXvswNvocgzMXKVJa1N4e9AgQtRe fSMocDYCPtNO7QA6apnnbtfaScwZwYj8720ycki+TnRYn1ncHTTl9COUJO1vqEry8h4T fIDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E7cVgqrm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id s20si2055142qth.227.2020.04.07.08.51.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 08:51:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E7cVgqrm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:49568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqVm-0003O9-FI for patch@linaro.org; Tue, 07 Apr 2020 11:51:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43607) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqVX-0003NF-MX for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLqVW-0004Fp-KY for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:23 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLqVW-0004FD-Ep for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:22 -0400 Received: by mail-wr1-x441.google.com with SMTP id w15so4446745wrv.10 for ; Tue, 07 Apr 2020 08:51:22 -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 :mime-version:content-transfer-encoding; bh=VJ6+jJuK9aM49AP9y9RG5kZxMwVILHzFOXjQWpNENXw=; b=E7cVgqrmx8m42zTAkUJ3leJxd5Zh9dPKamAXLo1ffqZ6Slnpe2RS+diupvVwo4VcDj Lm1YuGw2ImaGRPIrf+INC5+7o0WIQCdYdiuk1mjOubKpoLqpnjzzCYyOxm6NWco1WfsG haVz/7irjlwr8VXVZQqWmivLQqL3TscBXMdrTHPexT5rceZWhhk2/8JjoYx5zxuyrXlG +rt9sSNjsv+5EPDsuFyuVl/rY6emTU4DbQrov9YMcxP8TI6qJ4gBaHblF1FsreZRT2p3 pUaH5FZ0zJI+BwdkvljGYQRiK2dyYtqgfV571LCFpwbFq0hNLH/5u754Epxn2xkIL85X zTZA== 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:mime-version:content-transfer-encoding; bh=VJ6+jJuK9aM49AP9y9RG5kZxMwVILHzFOXjQWpNENXw=; b=RVRy9RYyzt19iIjbkqoi1Yv872NpMKpgCXwbHECzNcVTRaWF3DbBzJhDR5sPB81TaW nMSw5TR2j2oXkOIWkSsFL7I8SfzCiQ1x/SW8BCxE0UuPWsCLdz4gOWlwgn2TzFgvJNA3 l8B/C772LqgeOZTlbrqnHl43PbO1wzk7lrVRNO4oaOUHUNseUMQ77200ww3pTdC0ZuOl P4+CRILPcB2R52t8nfI6PlR0+g0ktK9zztBSkSkDldlSdcuIsHDmIbC98IUTdXgflrQW n8YnqOR7Ws2TTK5c5xgSJpu4ByjFnmB1qbosLG7b7Kpiwza8V7SFrcC8yQuF3LdUJlR9 HnIw== X-Gm-Message-State: AGi0Pua/vf0Hu7HkWkrjVLiB+eWkd/C/EtaptnWcmtEliO85jDw40Z8u aEpXcTFIY8Rd0RCnu/w6sQatmQ== X-Received: by 2002:a5d:6452:: with SMTP id d18mr3336077wrw.405.1586274681427; Tue, 07 Apr 2020 08:51:21 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i1sm2871571wmb.33.2020.04.07.08.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 08:51:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 854881FF8F; Tue, 7 Apr 2020 16:51:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/13] linux-user: protect fcntl64 with an #ifdef Date: Tue, 7 Apr 2020 16:51:08 +0100 Message-Id: <20200407155118.20139-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200407155118.20139-1-alex.bennee@linaro.org> References: <20200407155118.20139-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Riku Voipio , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Checking TARGET_ABI_BITS is sketchy - we should check for the presence of the define to be sure. Also clean up the white space while we are there. Signed-off-by: Alex Bennée Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20200403191150.863-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5af55fca781..b679bc6b136 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11331,11 +11331,11 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, This is a hint, so ignoring and returning success is ok. */ return 0; #endif -#if TARGET_ABI_BITS == 32 +#ifdef TARGET_NR_fcntl64 case TARGET_NR_fcntl64: { - int cmd; - struct flock64 fl; + int cmd; + struct flock64 fl; from_flock64_fn *copyfrom = copy_from_user_flock64; to_flock64_fn *copyto = copy_to_user_flock64; @@ -11346,7 +11346,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, } #endif - cmd = target_to_host_fcntl_cmd(arg2); + cmd = target_to_host_fcntl_cmd(arg2); if (cmd == -TARGET_EINVAL) { return cmd; }