From patchwork Fri Apr 3 19:11:40 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: 185181 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp915584ilr; Fri, 3 Apr 2020 12:14:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLWvvXaZhxexSYfmNoqN3Zyyj3XeNDMUNUoCwI5SsekKhXbp58EbR4m4DDhHha+h3oY3O1R X-Received: by 2002:ac8:f85:: with SMTP id b5mr9736033qtk.158.1585941256200; Fri, 03 Apr 2020 12:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585941256; cv=none; d=google.com; s=arc-20160816; b=CiWI6Q2iS7n6LMciJxhsoxfCaPbpDv3IRVqgzK19CwT4g3FMFr8acPdMTiRbotDA96 QKgrBWOLfAm/1aFQWRVhzJaRVscMKVBqoyocooI+dPF4yswi0T49W6PXAa2EJjL/C6eg +T/srbr/1hOihSU0KWlk8yK/pRh4ClrBRPZwYrwC9W6cz8/mtaGFNcsupVoXk+Y6dxNG oD7RNxkIIhRyjPKaP/1qxyb4fL+ZS+zR8qKqqJdhbwdYRjYc3Hvf1GRw74vUrzgxXZVV Ohg9F/ku+Ndqc5fmHl/auI/kgR1fgVTsQoe72ZSFahmIb6sHk8f9oI6Q8LLzPYiSRQx4 gZCA== 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=9yYReGEoMkqsfZWblGMzvHlMGSzTNisl1Y211B1bnEY=; b=GSTPnpg9Ej06hq5ZzFAe3f8rm7sUq86IwPU/D+U78fc00VtM4jXYi9CuXqg3rlMRAd bXFclx4GnIxytcwIchfVOCOWFdJM6WKc61RIazl0BSmR8YaA5MKaDkHWIXkLewF+OUV3 5+l0l0xT36PErHPoyZK+Hk/xtbOehEwbCKHsOnJmKXNgYg0ePxeZdJvMa8ejjSqBeLxj CFBChY7HGbqIwJCPM1iya4lD55w4vbSyKE8KsFK8gXTowRYsyhZVKxFw/BQZu7v8rhFJ 2XKR/r7kgoBOotsUSnRIMnUPWsP8DRUD86TU1iwuw9aHDXIwrydzdkOZc6Hlh4xsYFhO gADQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=K5NNnLA8; 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 s12si6026182qth.9.2020.04.03.12.14.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Apr 2020 12:14:16 -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=K5NNnLA8; 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]:60154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKRlf-0006uC-Os for patch@linaro.org; Fri, 03 Apr 2020 15:14:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40411) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKRjT-0003GB-5y for qemu-devel@nongnu.org; Fri, 03 Apr 2020 15:12:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKRjS-000284-59 for qemu-devel@nongnu.org; Fri, 03 Apr 2020 15:11:59 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:39787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jKRjR-00022w-UO for qemu-devel@nongnu.org; Fri, 03 Apr 2020 15:11:58 -0400 Received: by mail-wm1-x342.google.com with SMTP id e9so8904410wme.4 for ; Fri, 03 Apr 2020 12:11:56 -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=9yYReGEoMkqsfZWblGMzvHlMGSzTNisl1Y211B1bnEY=; b=K5NNnLA8kQ8cHlQxExClBCwKnhdlLhBVE/KiPCZLBWC7OV0Ye9YRL4HMB0BNPgkHOk AB+OFaWl6BtYt9R7R9o/ykTr7SU8tykYfVrwo1NebcRsrl3UTeXItTsWo2LlRB6suiR2 8N2hy/ICndn/3hLTMMSkXrm/SeFnMbDWYlotLSrl3V0ccOxbLqJPp6Tlc05gw9i+ijW3 s1aq//oJ1IDWdfjjBftYFlf1bFVA8ixQyRtsdX+wz0o5ZjuAOq/08C5umO15A+UAifec sgADKKoDVtbe6y5XqGlopGhguRyYP62/6Ho6mFIND5iylHj4Kp7Y0YGj4XtmGPT4JqtM 1bww== 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=9yYReGEoMkqsfZWblGMzvHlMGSzTNisl1Y211B1bnEY=; b=UuNB7ar7mlv64jOdhjiiY5t0e75LdK6zx4mezRve+ng/ZIfWWxIsHtS7YclEZpt+WF XGa0x5se2i56wEq/o6wIN3rtMnvWub6J9cAVarIw3h55jK9sGf99LpnkASX+qKGWDMAI xrsBTYVygMNQW7FAG8KVuRYlp0kZzy644BYH4aW/L0qHlTiG4DGG/0bSnPrfBYg2unyD CFpA9M/apLPEP3YDAi4c2gdV39/fJt5z1tCqfwTfiVo/NK+uJmsZBfGDP99YcQwmtVWr pvjgcAcQNCiXGWGoNa/SJsjshFW9AC72jGTgf6iIzcDtJzaOuGrjHQ7cg6aCRxjWTHSJ 116Q== X-Gm-Message-State: AGi0PuYo1EPKV2kysy3nOjB+hY2NInkOwq0GDnsc61FhBLIiSEdkPI+B h3W/EFOk8EtboWAPZb+lnv0ZKA== X-Received: by 2002:a7b:c2a1:: with SMTP id c1mr9774878wmk.138.1585941115898; Fri, 03 Apr 2020 12:11:55 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w15sm2587012wra.25.2020.04.03.12.11.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 12:11:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C29BC1FF8C; Fri, 3 Apr 2020 20:11:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 02/12] linux-user: protect fcntl64 with an #ifdef Date: Fri, 3 Apr 2020 20:11:40 +0100 Message-Id: <20200403191150.863-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200403191150.863-1-alex.bennee@linaro.org> References: <20200403191150.863-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::342 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?= , 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 --- linux-user/syscall.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 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; }