From patchwork Tue Oct 31 12:53:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117607 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3919718edm; Tue, 31 Oct 2017 05:54:38 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Ru/ZU/p+HyYlcqfsfiflqAt4g38ERNdkEoRyMn6uXwbic2btsO6tFxnmxLNLG78KkV6A4C X-Received: by 10.129.155.22 with SMTP id s22mr1081746ywg.491.1509454478687; Tue, 31 Oct 2017 05:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454478; cv=none; d=google.com; s=arc-20160816; b=v3dR5ns5i5mXhKyCPxEAeYo/JtDmsyoQf+UFBhFliBiLufSGfaatFPq44gDwFVtE0I DPs/2rX9Fmng7GkeiSI5wQZspTqVoT6e6ChfyS+43Naf3maQIvpS8PHU+YgjuWFAbzby T49SweMLPlmywZ1PcD1tiUK56TdZQeiB0Nv0R6GkRYPLMpdYoiYxYSke9go2CWVicZy+ B8CA5ncydZDAsNIoskUZA6aJ+ppEsKl070REakuQPq2MF2cjzPAdC5tyCek16SEPdLNk TmJUY+pceg4NEnscQ0U4JpzCOwmfzRKIMP1gGBmUC9kqMalRBF4419lAA91lh2GSa/d+ YltQ== 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=SNsX0Nnv6Gi+dUFh7/FhZJAC8ikPuC2y0mY46JXBado=; b=mSmfNTZp2Cc6NrS6/7tFysVjf/8LXIW5eaK71qZXZI0EZ8jlj6p/lQfpYHAXIJUkTa 4RFVN5DoIo4nhUNIExIrxgcYTJhbXoLqWXekQgVaGYKnjYt46fuzTrhzqXQUq//St2cg qUzVKcMkoX6foGmDYPvAuQnE+Oh+9QmqIzhcQh7qge8pBYgZt7xCcboC2cQ0g8BMBkAZ k5p+V7nWZkGKh00EmOFoJ/03pLYFTV2GeIAGqcnuBIBB8KlYmuxSTic1vNhFGEq/ttlq wgzBO/56nFKFwyXgC8prllWzfskLteUeZ6Lqzzj3ABuIo8YuimBgeEy2d4vyysvZT9fj UEdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Y/Vjhh8K; 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 s11si368692ywg.624.2017.10.31.05.54.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:54:38 -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=Y/Vjhh8K; 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]:45497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W3y-0002La-3b for patch@linaro.org; Tue, 31 Oct 2017 08:54:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W3d-0002LU-Si for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W3c-00058B-U0 for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:17 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:45902) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W3c-000581-NY for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:16 -0400 Received: by mail-wm0-x241.google.com with SMTP id y80so15474218wmd.0 for ; Tue, 31 Oct 2017 05:54:16 -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=SNsX0Nnv6Gi+dUFh7/FhZJAC8ikPuC2y0mY46JXBado=; b=Y/Vjhh8KH38306biMZDqbIViO9edtAXmLGHcumJkOfZlgheidkvcpy2jSnJC3iFW8q AuYkKT2hdA5UFYyQAtloNREXrdqffrb8TCAMEjMOrrZNwtP8HwE46YXms9EAomfmrqEI dOrXl6HHmFLJAzErzypKSMj8yI13IF7ygeRrI= 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=SNsX0Nnv6Gi+dUFh7/FhZJAC8ikPuC2y0mY46JXBado=; b=Uioouyboxh/9C1ylLkkvYM5befIhKj0B0L57rtWuaEPJGv9zDUGbpZHx2nfk/Fb3px hyQQxUUdZtOWxbzq4NmQzmZQN5YqYFm4I4bu03ZKCBuUl98oWGQPLZb7Ghk/EI5/Wtlj FOofOf96NOxO+M8koLgXg+qAfc9h4ZTF/1+hYxcSaAH7KOA1kB5T9jRIQDPnesbbhMjn pENz4lMNxMey+sJLOo/VcaiNpwjPs5eG4tsNjKOC+uVUxu34T4hKEughNN9PrgMuqYEB 8S1wQ9NVseW3A7IHnwoFije+CCMsPpORofUAysTEWn7QGNmuYX7nRNqFc8U+7MRjCPRd APJg== X-Gm-Message-State: AMCzsaWglVWG/+gnhQoeG7O/K7eI0+F4fpK1jn6+UeX39qXRJAC2EXRM LCL/aP9jBJZ+qQcEirMqCBBdgQ+HDyY= X-Received: by 10.28.93.200 with SMTP id r191mr1258815wmb.141.1509454455279; Tue, 31 Oct 2017 05:54:15 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:52 +0100 Message-Id: <20171031125358.23377-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH 1/7] linux-user: Restrict usage of sa_restorer 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: riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Reading and writing to an sa_restorer member that isn't supposed to exist corrupts user memory. Introduce TARGET_ARCH_HAS_SA_RESTORER, similar to the kernel's __ARCH_HAS_SA_RESTORER. Reported-by: Helge Deller Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 13 +++++++++++++ linux-user/signal.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) -- 2.13.6 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 450960bb54..e366183419 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -445,6 +445,7 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SA_RESTART 2u #define TARGET_SA_NODEFER 0x20u #define TARGET_SA_RESETHAND 4u +#define TARGET_ARCH_HAS_SA_RESTORER 1 #elif defined(TARGET_MIPS) #define TARGET_SA_NOCLDSTOP 0x00000001 #define TARGET_SA_NOCLDWAIT 0x00010000 @@ -483,6 +484,10 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SA_RESTORER 0x04000000 #endif +#ifdef TARGET_SA_RESTORER +#define TARGET_ARCH_HAS_SA_RESTORER 1 +#endif + #if defined(TARGET_ALPHA) #define TARGET_SIGHUP 1 @@ -718,19 +723,27 @@ struct target_sigaction { abi_ulong _sa_handler; #endif target_sigset_t sa_mask; +#ifdef TARGET_ARCH_HAS_SA_RESTORER + /* ??? This is always present, but ignored unless O32. */ + abi_ulong sa_restorer; +#endif }; #else struct target_old_sigaction { abi_ulong _sa_handler; abi_ulong sa_mask; abi_ulong sa_flags; +#ifdef TARGET_ARCH_HAS_SA_RESTORER abi_ulong sa_restorer; +#endif }; struct target_sigaction { abi_ulong _sa_handler; abi_ulong sa_flags; +#ifdef TARGET_ARCH_HAS_SA_RESTORER abi_ulong sa_restorer; +#endif target_sigset_t sa_mask; }; #endif diff --git a/linux-user/signal.c b/linux-user/signal.c index 7a238aaea1..cf35473671 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -777,7 +777,7 @@ int do_sigaction(int sig, const struct target_sigaction *act, if (oact) { __put_user(k->_sa_handler, &oact->_sa_handler); __put_user(k->sa_flags, &oact->sa_flags); -#if !defined(TARGET_MIPS) +#ifdef TARGET_ARCH_HAS_SA_RESTORER __put_user(k->sa_restorer, &oact->sa_restorer); #endif /* Not swapped. */ @@ -787,7 +787,7 @@ int do_sigaction(int sig, const struct target_sigaction *act, /* FIXME: This is not threadsafe. */ __get_user(k->_sa_handler, &act->_sa_handler); __get_user(k->sa_flags, &act->sa_flags); -#if !defined(TARGET_MIPS) +#ifdef TARGET_ARCH_HAS_SA_RESTORER __get_user(k->sa_restorer, &act->sa_restorer); #endif /* To be swapped in target_to_host_sigset. */ From patchwork Tue Oct 31 12:53:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117618 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3880023qgn; Tue, 31 Oct 2017 05:59:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S6C5qhgl2/k9n1oZ6NMSA+AyGYkLpUz7+2ohqMGpddlZD89M+Fg7WeoqtmVNQqmo7Cq0qb X-Received: by 10.13.217.142 with SMTP id b136mr1103458ywe.51.1509454788951; Tue, 31 Oct 2017 05:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454788; cv=none; d=google.com; s=arc-20160816; b=bbV1syxz5LnjQNj81hfW84NHUO236WDxQyqW7KhthIg+oMbQs2NyaHcfpHSkpblh6r EpR7ivGKz33J6IO7NU2HwArMZFby+pYD7Maq5rUqxlDt7Zh74/LQT2sKS6RlmwvKBr77 o4+hn5qnsVjCiwsm+zMQB+jLlFRfEO1MQBRn3IiUZbmr2My2kFwga7XC6COmEbkK+fnE uP3Rt2QY10K5ziQY0nb8fewcG31udZTllY+1EtVaYbRr0+stBJ5+2XH8Bqo50DccbXBx pw4n8s3WwcGeY3tthHGJ9zeSl2ke9hZBCQFvHbQWqy5I3jYx56dtXOpKk7pCjiYmKG2j KEpA== 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=wFvLjOSh78taI7tVkXdsj4h4Z5eFp/zbg0IXzUCQrhQ=; b=0P4j9VM1fCaTSXrTpol4GgkS207ybRlPEag9PX6csoKz/KLMFWSv+NU8vmnQjSwWkV GcD8upzAdx0U5vn71QyHtSbccS3Qx6swLmqikHLBo21KA4aLaf4tdZ0pH8rZqBvKzFI6 i/+uYyCbojE1hBJGAxRk6Gghk8XUYRM8TiqZjuTtjxZHLjMwVJRUtNznj93RNWC/ROfm 0TAWgfLgJO795OZgolXqnP3u2JXl8d2XmCGjm8gdwq84CjX4kEmPzWGImXhp5U0vYZRp ujfXIxD9JWsyM+7aInLuKAjQtYRxs69n5VPBdigcQIU4y9g+Il/oIufpjT0Rlz9pc8iF yX2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=V4wS4uqt; 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 b63si372029ywf.299.2017.10.31.05.59.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:59:48 -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=V4wS4uqt; 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]:45523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W8y-0006Pf-H1 for patch@linaro.org; Tue, 31 Oct 2017 08:59:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W3g-0002Lz-Tj for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W3g-00059U-1d for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:20 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:54617) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W3f-00058q-R0 for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:19 -0400 Received: by mail-wr0-x243.google.com with SMTP id o44so15815789wrf.11 for ; Tue, 31 Oct 2017 05:54:19 -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=wFvLjOSh78taI7tVkXdsj4h4Z5eFp/zbg0IXzUCQrhQ=; b=V4wS4uqtoRWw2gnkclQqCUNr1UehkjQGHluYSfpZNHi7+fcawfjuhbPgBC4MFYsNhd tjJVmKvAoTwLzLIpnf32VxGj/n7LOqjK7qSt4myZtzHqaYJCuzw9o168H3JM8GrKGXox iur7xD2qfwkPEniXkpSqGZWZCEB9/cWb8RvAg= 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=wFvLjOSh78taI7tVkXdsj4h4Z5eFp/zbg0IXzUCQrhQ=; b=PK40+94NZMZR27yIiELL5DKWGEjG9o1/BTp54ruBuG4PxaMDaOQqovA/Nc+OpbD56W Ky+wLH4++sUZbKc5gCMcTUi0Ui0AMieYmgTajELUh8Ky7JODTRTUG/EWj63et4+oYR+F w314Va9vLBIbe9fWgHl5BhspRJe09g7qO65IBtFWhfZ6dJK6nHLfyctetj4sVRl0NqCo /3VQytT6LT6WiFanzTDrYAZ28j0e1Yi0MB+M79C7edmdsfQYgqVqrIliTqJR3q1gE1DQ 98iQXUANNfyZYVdenWNjBipiHmVs1L0lSk/EKkmnO74nqZoxfy+ul5VIwmamN+YXhpbo nEzg== X-Gm-Message-State: AMCzsaWNyjK4WIEo/vFQN3mxlUVn9fvI0g4qkeCr3zmMLDHgYrZYqyfz MidnvD2r+uXvZIIX58VSHygzpYoIQNY= X-Received: by 10.223.136.218 with SMTP id g26mr1870336wrg.86.1509454458505; Tue, 31 Oct 2017 05:54:18 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:53 +0100 Message-Id: <20171031125358.23377-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH 2/7] linux-user/hppa: Fix TARGET_SA_* defines 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: Helge Deller , riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Reviewed-by: Laurent Vivier Signed-off-by: Helge Deller Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.13.6 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index e366183419..38339ecb9a 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -473,6 +473,14 @@ int do_sigaction(int sig, const struct target_sigaction *act, #define TARGET_SA_RESETHAND 0x00000010 #define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */ #define TARGET_SA_SIGINFO 0x00000040 +#elif defined(TARGET_HPPA) +#define TARGET_SA_ONSTACK 0x00000001 +#define TARGET_SA_RESETHAND 0x00000004 +#define TARGET_SA_NOCLDSTOP 0x00000008 +#define TARGET_SA_SIGINFO 0x00000010 +#define TARGET_SA_NODEFER 0x00000020 +#define TARGET_SA_RESTART 0x00000040 +#define TARGET_SA_NOCLDWAIT 0x00000080 #else #define TARGET_SA_NOCLDSTOP 0x00000001 #define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ From patchwork Tue Oct 31 12:53:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117611 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3877789qgn; Tue, 31 Oct 2017 05:57:34 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TCuMxOR5gJsuH+wF+BMB5puck9VgvbMOhpbubjnSeDM52KnI6nUMxb2A1HDJnCWEPlvCvk X-Received: by 10.129.117.9 with SMTP id q9mr1159182ywc.79.1509454654376; Tue, 31 Oct 2017 05:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454654; cv=none; d=google.com; s=arc-20160816; b=EVbUvD+KvPjaUfBZEUp5uOiWe2jh8HmlYq21EcAZKsWI0yhuW6ywMcXhmJrbeZd+Nx EHBwbseL5f0T10Tn/3TJc1mQwh4+HNbIrxL/edVMvLNCBIIAdLbaqxZ8jjxNrGYvfx8S AY0c8fMYGt8Lm/bLE+e4gvMqW4lH2siYeeBOQ1/DjogTE/WLFCYDGgDbtH911GOL/Nd7 8IKf6ek2K2gIFfpi5/BeHqFnE7v0IVZWQCj0MYpQSd7xI820MGK/fm/T34/S4m+9dvzH sSXLIuiepA8y9ftd+v57QUS9Cygt0soSdd0JFSmbv3Lr5RDB03BN+t/h2szZa0lb55ba tkSg== 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=pud2nUSXV0rBPAM+RZaQSzlUNb/w+5/NQMqlaRilYb8=; b=QX/jk8WjsPr9oG83MFrik5QZo2XLrczdDX81N/mJsPE0SF/QiQUYFBknN2XShN4P+y Z0E72ivliAG2ZlaLoYigQIhcaTbBTnEKR7b4Bz0u1/0eSaz0OqAF8ie8nq92rL7ilDqB 3uPSNArzxXx+RxRyza1oKBA9KpDkd+LydjI7+krD9GEKSIVk3icBrDmd9ap2VlZ/i2i5 upw1Dw9tkOPHwpgrNQmPiDY3ojROLF9tpFb8LzjIqRnPq/ZY9oQiatwSzvfGgLNIkfld rxQgKMrXWQRZUiLEDG4eBT+dlOipB+EqJBfQU/IOwVsc+Nrv8flrd2Jo4DHmkRJOw49j U5Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W1UZWN+o; 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 n75si386615yba.332.2017.10.31.05.57.34 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:57:34 -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=W1UZWN+o; 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]:45511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W6n-0004NQ-VQ for patch@linaro.org; Tue, 31 Oct 2017 08:57:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W3o-0002Rw-W9 for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W3k-0005Ew-CG for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:29 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:44709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W3k-0005Ea-2b for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:24 -0400 Received: by mail-wr0-x243.google.com with SMTP id z55so15871182wrz.1 for ; Tue, 31 Oct 2017 05:54:23 -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=pud2nUSXV0rBPAM+RZaQSzlUNb/w+5/NQMqlaRilYb8=; b=W1UZWN+oC7wu27WZXjwfYd7qNCO4BSkY/M31d+aGviSbow/xZcTP7PmzoBsBG5zMFs DZfCgF/vtWPlkX2VDvRR1dOsbPyfYmSD200c2sp/ErU4r24cw2VXLmWRyL7GUmxT3EQH M03TzSZvq9S2ab6GiMmyT6ia2FsbjBbFu1/OA= 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=pud2nUSXV0rBPAM+RZaQSzlUNb/w+5/NQMqlaRilYb8=; b=jfBjtzVN9MRsV+b1/V4Ddi2DnM50cELSlVxWZHAc1xIeA1oig8VM+IaeOU3r8fzbLC 5ibJJWxKxdmV//fy/i2V5XDECAbYnIqgUOwROCqlHNn/XE/pqKMaRBz9U0/lb4/U+Srx dP6hmifgRX6o9XVV6JUKtBdTTxaGRireQGD+feXKcGKQp4Ag2tuFjpS8/ehuYSHCH5ai ZxOUyJt3u5IUXRnX7n3wnK+RRnKgFV6b+RQoNX1LWXFn/s41XjoGv5X7efYUoSztfION TKL7AEgwvHtZL3ezsHSBGqrxO5481CadjZ5OGrzuuB/e01PuRnXom3tCZ9FiGdMwGjc5 lMVw== X-Gm-Message-State: AMCzsaU18cJqL9/npd9X9gDimPYLZv+yxn48HtkDZ1x/SY4mQQpDnNVe GYlIEjKhZG82dQVJfjgwOA4+LzjIfLw= X-Received: by 10.223.179.20 with SMTP id j20mr1885364wrd.116.1509454462861; Tue, 31 Oct 2017 05:54:22 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:54 +0100 Message-Id: <20171031125358.23377-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH 3/7] linux-user/hppa: Fix cpu_clone_regs 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: riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson By failing to return from the syscall in the child, the child issues another clone syscall and hilarity ensues. Signed-off-by: Richard Henderson --- linux-user/hppa/target_cpu.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.13.6 diff --git a/linux-user/hppa/target_cpu.h b/linux-user/hppa/target_cpu.h index 1a5cecad3c..e50522eae9 100644 --- a/linux-user/hppa/target_cpu.h +++ b/linux-user/hppa/target_cpu.h @@ -24,7 +24,11 @@ static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp) if (newsp) { env->gr[30] = newsp; } + /* Indicate child in return value. */ env->gr[28] = 0; + /* Return from the syscall. */ + env->iaoq_f = env->gr[31]; + env->iaoq_b = env->gr[31] + 4; } static inline void cpu_set_tls(CPUHPPAState *env, target_ulong newtls) From patchwork Tue Oct 31 12:53:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117608 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3920006edm; Tue, 31 Oct 2017 05:54:55 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S7H+JNeD/Wx+GsXOpjgvSnZ4bryOrT/au5ySmad1+r00tal6adFI/aJ5kLd/b0kzhV+ydC X-Received: by 10.37.130.11 with SMTP id q11mr1075627ybk.50.1509454495312; Tue, 31 Oct 2017 05:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454495; cv=none; d=google.com; s=arc-20160816; b=jOa6xNuEs0EIqCtxwlsWKSp1qecvAD5KZ5THiDnDGnQCDOVr/hLtsuaXHV6JYso2cS aeIwkAVuaSzgyPo1YQdEIejts/lNOwc8drZV1TnpVsZktd4GJbXf2OdGQMKPDxlenPpl UIgZlOcTOAdv+/gUqbyNeEh0M+FhxoiQBheEmGY+OJgLnfwRM8SVtcRQw4PUqQlt4edV bZSzND2Gh55nO+L0Pz+TGuZDyiVW/JvoSiDAFIuOgJ2O2Kz1L0h6zPpsqGggDf/Y7G1s 5VjQGPmZJvB4q3VlmAckzvC5zQXNnVv2p+5deX4zuPubKZYgthuOfnwtxX5RGy3M5BJg AX2w== 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=6TxTxzmYwZgPKEnJsbw9Yo1WCbkLvbcJozeUBVQvW+s=; b=m+KaSJcI1hSExQy3PT/DfRHCaeVT1ApTcQeE7i1tVNSSVaDR0FJPpnYm0W2XowuE2N nNYhZBXm6enLhMCtv6TDbROMSJ8MMX4mk+2p9Dc4SZjwrf9PWlVD1jHbEpjvV0DMkWEj orruDzIvVTZJz1ny66QanfpdWnuuxnqUxcrsQCnt6Z1GWhZypG2w+djPlyt+UawTku9B OrkNxt60Fh87N4viclUjIa0hd13YP66WDWIcLDhtrfdV0/cpVY8VICB9HRpPSd6TLhtY GZmQVE4A+Drms8KWpk6jB3PHGtAETC/AKfAuJjIgiIlE7pjoAprIw1SI1B88aqWlk1oZ 0amA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jahZpum1; 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 c131si378121ywb.297.2017.10.31.05.54.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:54:55 -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=jahZpum1; 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]:45500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W4E-0002TG-Jx for patch@linaro.org; Tue, 31 Oct 2017 08:54:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W3q-0002ST-2Z for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W3p-0005IN-8k for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:30 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:56568) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W3p-0005HD-1g for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:29 -0400 Received: by mail-wm0-x242.google.com with SMTP id z3so22985882wme.5 for ; Tue, 31 Oct 2017 05:54:28 -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=6TxTxzmYwZgPKEnJsbw9Yo1WCbkLvbcJozeUBVQvW+s=; b=jahZpum12CZ6FjHBpcMSdlaKg7pfqoZUTsF7cDLpVPUpmv6zPTdQVeK1XSEQO4JWk5 TLaTvmz2dXY8lYRotTXwTrNA5D3UHd9OmgFGwpp/iXMMD1Q7E+h7xNS9Ea147unNKGLj akXEUK+/RQ2JpuSI71PQ7XC7qfErJVJUaD6jY= 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=6TxTxzmYwZgPKEnJsbw9Yo1WCbkLvbcJozeUBVQvW+s=; b=PP2CVYxMpxP4tft6mVo+bGApSnsNFYWe9f4i++kCFLwSJ11HkdCl7KhOFEnSZZWRjs 2GPiF1EpcQiN7DMQzMuFnIzOq2jkJ6kD17kvC1LDwo19bSOUfYsKfclXWtoWj4LoFwjW PXkZeYrV7i8CIKe4pS6hgUMHKJaE71vqEHNFTN3m+BSAQxN4va3r+7vZh89AFhdkSIPn wBJpbwqVKZYdWN2Ekl6sbE1e4m6e6QbWrvv3F2oWyeLfbCPU1iR1G4Gzw6HRIVY6APyV e3G07P99JI4V+AEmxSQI0BtQ5kN3nkHxWrlRLk6dbNem+RSqBz6W4JcX9vgJSsGo33sl /nvQ== X-Gm-Message-State: AMCzsaXRjKTRZwNtdNTQl4A2+SMKUSPmCNXifeTHr2IYwi3GEyN6Vz4s Smztl84bwcUnr2dfCr1uPWh4I+bNHQU= X-Received: by 10.28.103.4 with SMTP id b4mr2047307wmc.70.1509454467741; Tue, 31 Oct 2017 05:54:27 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:55 +0100 Message-Id: <20171031125358.23377-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH 4/7] linux-user/hppa: Fix typo for TARGET_NR_epoll_wait 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: Helge Deller , riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Reviewed-by: Laurent Vivier Signed-off-by: Helge Deller Message-Id: <20170311100543.GA29669@ls3530.fritz.box> Signed-off-by: Richard Henderson --- linux-user/hppa/syscall_nr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.6 diff --git a/linux-user/hppa/syscall_nr.h b/linux-user/hppa/syscall_nr.h index 0f396fa1e2..55bdf71d50 100644 --- a/linux-user/hppa/syscall_nr.h +++ b/linux-user/hppa/syscall_nr.h @@ -228,7 +228,7 @@ #define TARGET_NR_lookup_dcookie 223 #define TARGET_NR_epoll_create 224 #define TARGET_NR_epoll_ctl 225 -#define TARGET_NR_epill_wait 226 +#define TARGET_NR_epoll_wait 226 #define TARGET_NR_remap_file_pages 227 #define TARGET_NR_semtimedop 228 #define TARGET_NR_mq_open 229 From patchwork Tue Oct 31 12:53:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117609 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3920200edm; Tue, 31 Oct 2017 05:55:08 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RsAZc9akvhYbkADuFwR6OR4SNuTG0IJdbNati/EgFYKyThZfswmeh1PC/nT/hE5VHZCjx4 X-Received: by 10.129.131.135 with SMTP id t129mr1083106ywf.33.1509454508148; Tue, 31 Oct 2017 05:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454508; cv=none; d=google.com; s=arc-20160816; b=GxXSAwJu3kOn4M+9sdzu7veVmZLO463K1UPhbf4p16Mq6BfgJvxXIlp+HyNye4MtWt Cl6Yn6gg0VGRsLB6CY7ikB5+VZJEL6MHoPyOSAesQKuZL6OX9GkVHFoOfBEbEIb6mvhG yXMUo7zJqJIkyZ7kLe0KaT1y+mCpQRpts9Ux7wbN1BzdL4AcqpnVcudnfQHzFr9yINEl /ji/wK3X6Hn2t6pkszqFxkWn3r/gzJAz6y3Y5Cm0oiKCicjd4FQdWkxoA7+gaaM7hPj9 mxzRptjAqbZgVJaz3puVuAIzQ9lMBHpXXClu83zlN3HAXC1/PGrFh2t1jg+S6TVFSMYx 4SZg== 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=LR7eUZczssc2NlogUPo0YhRaOLDBKqKPuwYxdVCLnrk=; b=sgb3Xwbrc15DItafOx/C6ZDrn03Q/IWQSvG3V05IigqNxW3bwnjyvEENNQyQyIsfQc LfUcRqKz8Tn5RXr6FyX9i6HnccS2U8qsw8/MCfACF2jwl7LNf4nkIj457IcV8W/RLK7D a8yJ0IT8T6/RTE0JrzykRgTq5qhAEeCfF6gosMkGq12dTI7KZANUo9KwBVHFD8Ijnexm BN6sT6fY8bT47gRt47sHhMr+p7cz8XAOoHChKHmvavSxw5U46voTT3L4gMSqj+jWFzTt jhGEhyxOq15HCxH6TeOCVeasA5aOQg9gFKf27GkT3RfEO2sm0pVjnvrz6u0TepYdf+bC WxWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Qv2XIaiE; 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 a18si368291ybh.278.2017.10.31.05.55.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:55:08 -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=Qv2XIaiE; 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]:45501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W4R-0002b6-Gc for patch@linaro.org; Tue, 31 Oct 2017 08:55:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W42-0002Yg-Bc for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W3y-0005TL-6i for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:42 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:48434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W3x-0005Rg-VZ for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:38 -0400 Received: by mail-wr0-x241.google.com with SMTP id 15so15849621wrb.5 for ; Tue, 31 Oct 2017 05:54:37 -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=LR7eUZczssc2NlogUPo0YhRaOLDBKqKPuwYxdVCLnrk=; b=Qv2XIaiE6KmwPm5HbE/ZLdnnfQVvgzuSXMzQ3w8dx1HwYr8ZLzUMdJLHmPm7PS8jKU L42YPbz0JtEndvNvokpLhJSNLlvICAVBCgq3jvyHPXCkSs9WQLtAxf1peIPByuyDYdxE i/zKpiTNzOdX+tCJyEDWuEG7ukkteh/PJgPyo= 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=LR7eUZczssc2NlogUPo0YhRaOLDBKqKPuwYxdVCLnrk=; b=pNG6WEAlPu3VV8QFktU4yCDFEbshAjKwlqBiJsofjJozRjohqK8EAtEu/ZVubcRN35 xIn7vIPHLrh1CmTQqz+F+7KQ+31Hcnv9TEpUkvn6chfmpxSpmqUtpowhwgMHuLTTjAOi wPPOloZKRqXC7Co6zoJJwegnLcIbCaSxXMwJ6WAbr5J+dOp8OUA/cplwCJy6v8MC9xYl IvX7kctSfjKfnYIiXGlmXOtKSHuPlTfb+HL7jK2MG7GVlWSsMWnoSFxEDY9I+qBRukYc ZZ/IizU2wfKBjZwiB4vF1dhZugC83ajKQHbYexxkZ1CkA6yNO8jVNMn/iynHDDhXN4bI kv6w== X-Gm-Message-State: AMCzsaUe8q5lvtDRR5Rjz5r4KvBGnGr21QkjBfjQpkq8VhmOUYowYAGL wdy8AVUq13pVGIQRh7uxJwEo3nG6h8I= X-Received: by 10.223.135.90 with SMTP id 26mr1692088wrz.114.1509454476620; Tue, 31 Oct 2017 05:54:36 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:56 +0100 Message-Id: <20171031125358.23377-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH 5/7] linux-user/hppa: Fix TARGET_MAP_TYPE 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: Helge Deller , riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller TARGET_MAP_TYPE needs to be 0x03 instead of 0x0f on the hppa architecture, otherwise it conflicts with MAP_FIXED which is 0x04. Signed-off-by: Helge Deller Signed-off-by: Richard Henderson Message-ID: <20170311175019.GA7195@ls3530.fritz.box> --- linux-user/syscall_defs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.13.6 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 38339ecb9a..a6ed30d70e 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1336,7 +1336,11 @@ struct target_winsize { /* Common */ #define TARGET_MAP_SHARED 0x01 /* Share changes */ #define TARGET_MAP_PRIVATE 0x02 /* Changes are private */ -#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ +#if defined(TARGET_HPPA) +#define TARGET_MAP_TYPE 0x03 /* Mask for type of mapping */ +#else +#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ +#endif /* Target specific */ #if defined(TARGET_MIPS) From patchwork Tue Oct 31 12:53:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117612 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3878189qgn; Tue, 31 Oct 2017 05:57:59 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SCvypyAXILOFiXg9yf1/B+o+hZcdYenuS3ohAyNqMb6U+YKlBSbT/vgJ0BSwgrJDQK1stV X-Received: by 10.37.135.71 with SMTP id e7mr1124050ybn.519.1509454679492; Tue, 31 Oct 2017 05:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454679; cv=none; d=google.com; s=arc-20160816; b=f5X+DEDvoxLN5qrD2xHx8Dc4SNVnToThSkEuZWIIMoiaYDsHyx5jP/nAiPrOzQJVte T39cBpGsbcbWk19qjj5OI0ofe9TYoqW8hBQIpejbmfi+6pQvVZwun8DmTHCw66j8JAAw 86Bts2GtTZ7zeI9UKtOh1zf76MpokLImIK26jp/qOHcecfYUWflITTfk4n0GyRUxq1kX zKcJnbsHS8uz1KLmT0NuuQPiZiWRyqeVyGE4z0pMDaaX+XG5W6ni56AUmhhxYv/MChJi H0X15egaLhqrI/kj9XqgpinevLnqm4kga8oURCxq66GvNFORIzkp7pcaNCpUTLakDVHP Ds8g== 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=QiasWCH2faLjDVvv1Jal0hWpQ+zIP1464d6sqFz5Xow=; b=rm/9Np3gY065acm+0w5o1czs8nuU+4w77hBl+YSroeqZOl1BbelsBzv5u0xoppl8qL Qc8+n8geSBmtDRc6FAQ894m0Cdb/1MF70AiBvEbsYHHMmk3mBkCwhx2T3rKrE9d5Posa hW5jUhBApMLu68vxvqXigbUT/6qb1B08etFUF6JG2CX4oHrXwChrwdA0PaY7zWIdPkGM s1SDhdmfW8O6huhvc5nUA6cpCC6KdYhHPCTymtWNKsBGm7AEj5WS3dbU1vh4osLeAR/Z 98+zdLWMJ+uAYTmxF9NjoDF6bIgjXH16UcId6/zRJD/wOR8YXRPBa5nr9JrNRHeir7Lr DMkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DYFZXBMl; 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 l206si368914ybc.728.2017.10.31.05.57.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:57:59 -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=DYFZXBMl; 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]:45518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W7D-00055Z-1N for patch@linaro.org; Tue, 31 Oct 2017 08:57:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W48-0002e6-2b for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W47-0005gv-C8 for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:48 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:49911) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W47-0005ej-5G for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:47 -0400 Received: by mail-wr0-x244.google.com with SMTP id g90so15837954wrd.6 for ; Tue, 31 Oct 2017 05:54:46 -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=QiasWCH2faLjDVvv1Jal0hWpQ+zIP1464d6sqFz5Xow=; b=DYFZXBMlczQTAD1PFyUcjJDRs9H26FBQq3AkhTrCar7A0nsCTban3eYW37+apbmtSk diP6csu65t0TNRogvfbRGLcHKCCD1o12n0PNGSgv7Q2ngXrDGE8DPOhnXVmjxhegA5/R 6H5ws+P4Szju+zxRVZHhpSCgR2epegQV9CVYU= 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=QiasWCH2faLjDVvv1Jal0hWpQ+zIP1464d6sqFz5Xow=; b=bkGUFUTNQrp3oDPYZnAcCke46j4o7dKbMdJjMmzKF5ymzOosidLV29drV/RehI3HDJ jSx/Zl4ODdJU2e79HIvCKaBgxhPYPptdRtmWkoV9y2vHVXJElhixDJzVeavNjFRSR+Zp tWE5UkH1c0xzXwbsG5fJvSOvdcyAH4lNup2JKGQDWJlEGORUgBqrwl6nRF1TL7U2so4R T0rdLcMBGbum+leXG2xe0IIXNPKpQeuqj8BxaOhG2+AMzUvUD7Ywzyqwo2gg9nNCWx8g iEoIcYxnAcxF6Mj4rnqe+j0EcJHfXNVnTIoKqTjacrU40x0sdm4e2XTE7zUdOiPucTAl qcMQ== X-Gm-Message-State: AMCzsaV8JERrv+KR3TCSvWkdQzqWz5kT34AbDgfEnDlGYUY3Dwgm7vpP otCEANSoauf8bEFXQnIMD5n1x6g8KIo= X-Received: by 10.223.199.205 with SMTP id y13mr1866895wrg.71.1509454485802; Tue, 31 Oct 2017 05:54:45 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:57 +0100 Message-Id: <20171031125358.23377-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 Subject: [Qemu-devel] [PATCH 6/7] linux-user/hppa: Fix TARGET_F_RDLCK, TARGET_F_WRLCK, TARGET_F_UNLCK 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: Helge Deller , riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Signed-off-by: Helge Deller Signed-off-by: Richard Henderson Message-ID: <20170311175019.GA7195@ls3530.fritz.box> --- linux-user/syscall_defs.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.13.6 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index a6ed30d70e..daa2a57398 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2361,6 +2361,9 @@ struct target_statfs64 { #define TARGET_F_SETOWN 24 /* for sockets. */ #define TARGET_F_GETOWN 23 /* for sockets. */ #elif defined(TARGET_HPPA) +#define TARGET_F_RDLCK 1 +#define TARGET_F_WRLCK 2 +#define TARGET_F_UNLCK 3 #define TARGET_F_GETLK 5 #define TARGET_F_SETLK 6 #define TARGET_F_SETLKW 7 From patchwork Tue Oct 31 12:53:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117615 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3878713qgn; Tue, 31 Oct 2017 05:58:30 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QdnVLK+qxbaAvcHOZhG+aoUVmuEnpJukiXPaJeUDCSaOTRiLDwIrn8Z2Vh1qc+7EDOyb2C X-Received: by 10.129.79.138 with SMTP id d132mr1158705ywb.236.1509454710625; Tue, 31 Oct 2017 05:58:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509454710; cv=none; d=google.com; s=arc-20160816; b=rzePXpgYBP9xRwg4Ue+j14lyvfV+j9MxLxNhOm1LdalBpd9gc2VmVc+unnu8C0L46/ W5f51LlcWk1q+Z0lxtIgfZrGeF1+vkmuxwHUfbpx7ppGnl6AqL4hbOIuhnNi8zbmTmmq wRKu6IfGTMJbOu8t2Dx9ZYEeymxr+uVbGppZ6do52O2nlaR64Y1a0yzn+IzjAr/Mlfb1 XoPLSwGYzhUrvouKfeYcMBZpVtFK3EZ5UqXib3Ss2DJ/A0dhXHj/pnwkOu+6yz+Iq5EY R8gY68xCPZtpDSl/wbd6yl/eegUDbAVu0cY8UvBzprFa9HtKJOoJD3i4kmPL3POgC9sR 4ibQ== 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=vD13FTzuXbae9Y0y8QpT+6+21XwdxoOPpK+uK9cl8ug=; b=xDlHbHPFjgRjkK6ksrHJp2QAmFSQIqf4CVWr61LzE/x4VNpcuS7cGvL4HaFbiScKOw fxM+yJvqWz2qYCSmGNrxzkaNt80u/aDTQwOqAUTwEXuE/0b4auQqVKhXEDIMs8nM99Sj BX+aDNIR8EACdpvdLHULWUhT53aaUjHurntBMF6N+ofUi7O56yUpRgnQNhlPJYRrIiIg IjT7ziky6dI/hSynKqvzbL/LC1kQAkkGxMQqEswoA9Qzrm7sLZmzuorLOhtiVPr2dLDO +X+vXU8s2p+xxZSbIizMFHyfhYle843JDXR4gTYoaHRW2fg7oYD6PNQCbUJoieccDZng B+Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BqpmewK/; 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 a62si374013yba.322.2017.10.31.05.58.30 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Oct 2017 05:58:30 -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=BqpmewK/; 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]:45519 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W7i-0005RX-4P for patch@linaro.org; Tue, 31 Oct 2017 08:58:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9W4K-0002pL-4k for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:55:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9W4F-0005yU-Vd for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:55:00 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:49956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e9W4F-0005wc-M1 for qemu-devel@nongnu.org; Tue, 31 Oct 2017 08:54:55 -0400 Received: by mail-wm0-x244.google.com with SMTP id b189so22240446wmd.4 for ; Tue, 31 Oct 2017 05:54:55 -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=vD13FTzuXbae9Y0y8QpT+6+21XwdxoOPpK+uK9cl8ug=; b=BqpmewK/fN9g/6+cMVAiaS7HQlG2mAVIJfHflQuGQp46FsCt4Rx2XBDGhJaX6mYt3L dtFMJiEexStsr4zzOHAI6smix6UwuyRJVMMiI/5WZR7a6D7Lh9FGK7IYjOcWHTonMyIw gnKcpQUWufF4455VGmhdiNFwcOMs3XfVjwz98= 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=vD13FTzuXbae9Y0y8QpT+6+21XwdxoOPpK+uK9cl8ug=; b=eMPDXBNudrXg4j+zozMlraNWaKdBqUhOtSv4AZJ8bMfdIizfr5dZdZoAmdOm6khmGa ZjZ26Ig463mRud1KkXnvQc6pOaM2m71Yc404I4H8ht9WzWdmPxks+GTrLHIVI4h3qqhp OfsGKZqgLV3lK0TEsgPyh3NkO4CFGjrrqNocPZhahpmaOMwdg7QY55nT3F6SIuVLePj/ FEVrDGVjPYXUVX9D1hz5WuygXrJW0PtPIRVX7CVd++QUYCmApxnc3y9xYtsOxtZ9b2g3 2zHlsIGdM8uGh8SL1yRy4orMx9+qOloQEhiqCJFe0+7q1xsDmS5cH4AR+UaaDiyVmIoR YHYA== X-Gm-Message-State: AMCzsaVWpX/hnzUgqJbvSuuy9hU9HbVw5vZ3467JjBLpIefMeizfKBdw 14UM5KCDweGVZGHTHC1zxN4a3Qsgqdk= X-Received: by 10.28.92.208 with SMTP id q199mr1671558wmb.96.1509454494366; Tue, 31 Oct 2017 05:54:54 -0700 (PDT) Received: from cloudburst.twiddle.net.ASUS (p57A4515F.dip0.t-ipconnect.de. [87.164.81.95]) by smtp.gmail.com with ESMTPSA id e131sm999011wmg.15.2017.10.31.05.54.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2017 05:54:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 31 Oct 2017 13:53:58 +0100 Message-Id: <20171031125358.23377-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031125358.23377-1-richard.henderson@linaro.org> References: <20171031125358.23377-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PATCH 7/7] linux-user: Handle TARGET_MAP_STACK and TARGET_MAP_HUGETLB 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: Helge Deller , riku.voipio@iki.fi, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Helge Deller Add the missing defines and for TARGET_MAP_STACK and TARGET_MAP_HUGETLB for alpha, mips, ppc, x86, hppa. Fix the mmap_flags translation table to translate MAP_HUGETLB between host and target architecture, and to drop MAP_STACK. Signed-off-by: Helge Deller Message-Id: <20170311183016.GA20514@ls3530.fritz.box> [rth: Drop MAP_STACK instead of translating it, since it is ignored in the kernel anyway. Fix tabs to spaces.] Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 10 ++++++++++ linux-user/syscall.c | 31 ++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 11 deletions(-) -- 2.13.6 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index daa2a57398..bec3680b94 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1353,6 +1353,8 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x0400 /* don't check for reservations */ #define TARGET_MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */ +#define TARGET_MAP_STACK 0x40000 /* ignored */ +#define TARGET_MAP_HUGETLB 0x80000 /* create a huge page mapping */ #elif defined(TARGET_PPC) #define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ #define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ @@ -1363,6 +1365,8 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x0040 /* don't check for reservations */ #define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */ +#define TARGET_MAP_STACK 0x20000 /* ignored */ +#define TARGET_MAP_HUGETLB 0x40000 /* create a huge page mapping */ #elif defined(TARGET_ALPHA) #define TARGET_MAP_ANONYMOUS 0x10 /* don't use a file */ #define TARGET_MAP_FIXED 0x100 /* Interpret addr exactly */ @@ -1373,6 +1377,8 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x10000 /* no check for reservations */ #define TARGET_MAP_POPULATE 0x20000 /* pop (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x40000 /* do not block on IO */ +#define TARGET_MAP_STACK 0x80000 /* ignored */ +#define TARGET_MAP_HUGETLB 0x100000 /* create a huge page mapping */ #elif defined(TARGET_HPPA) #define TARGET_MAP_ANONYMOUS 0x10 /* don't use a file */ #define TARGET_MAP_FIXED 0x04 /* Interpret addr exactly */ @@ -1383,6 +1389,8 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x04000 /* no check for reservations */ #define TARGET_MAP_POPULATE 0x10000 /* pop (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */ +#define TARGET_MAP_STACK 0x40000 /* ignored */ +#define TARGET_MAP_HUGETLB 0x80000 /* create a huge page mapping */ #else #define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ #define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ @@ -1393,6 +1401,8 @@ struct target_winsize { #define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ #define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ #define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */ +#define TARGET_MAP_STACK 0x20000 /* ignored */ +#define TARGET_MAP_HUGETLB 0x40000 /* create a huge page mapping */ #define TARGET_MAP_UNINITIALIZED 0x4000000 /* for anonymous mmap, memory could be uninitialized */ #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d4497dec5d..8047bf3aac 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5872,17 +5872,26 @@ static const StructEntry struct_termios_def = { }; static bitmask_transtbl mmap_flags_tbl[] = { - { TARGET_MAP_SHARED, TARGET_MAP_SHARED, MAP_SHARED, MAP_SHARED }, - { TARGET_MAP_PRIVATE, TARGET_MAP_PRIVATE, MAP_PRIVATE, MAP_PRIVATE }, - { TARGET_MAP_FIXED, TARGET_MAP_FIXED, MAP_FIXED, MAP_FIXED }, - { TARGET_MAP_ANONYMOUS, TARGET_MAP_ANONYMOUS, MAP_ANONYMOUS, MAP_ANONYMOUS }, - { TARGET_MAP_GROWSDOWN, TARGET_MAP_GROWSDOWN, MAP_GROWSDOWN, MAP_GROWSDOWN }, - { TARGET_MAP_DENYWRITE, TARGET_MAP_DENYWRITE, MAP_DENYWRITE, MAP_DENYWRITE }, - { TARGET_MAP_EXECUTABLE, TARGET_MAP_EXECUTABLE, MAP_EXECUTABLE, MAP_EXECUTABLE }, - { TARGET_MAP_LOCKED, TARGET_MAP_LOCKED, MAP_LOCKED, MAP_LOCKED }, - { TARGET_MAP_NORESERVE, TARGET_MAP_NORESERVE, MAP_NORESERVE, - MAP_NORESERVE }, - { 0, 0, 0, 0 } + { TARGET_MAP_SHARED, TARGET_MAP_SHARED, MAP_SHARED, MAP_SHARED }, + { TARGET_MAP_PRIVATE, TARGET_MAP_PRIVATE, MAP_PRIVATE, MAP_PRIVATE }, + { TARGET_MAP_FIXED, TARGET_MAP_FIXED, MAP_FIXED, MAP_FIXED }, + { TARGET_MAP_ANONYMOUS, TARGET_MAP_ANONYMOUS, + MAP_ANONYMOUS, MAP_ANONYMOUS }, + { TARGET_MAP_GROWSDOWN, TARGET_MAP_GROWSDOWN, + MAP_GROWSDOWN, MAP_GROWSDOWN }, + { TARGET_MAP_DENYWRITE, TARGET_MAP_DENYWRITE, + MAP_DENYWRITE, MAP_DENYWRITE }, + { TARGET_MAP_EXECUTABLE, TARGET_MAP_EXECUTABLE, + MAP_EXECUTABLE, MAP_EXECUTABLE }, + { TARGET_MAP_LOCKED, TARGET_MAP_LOCKED, MAP_LOCKED, MAP_LOCKED }, + { TARGET_MAP_NORESERVE, TARGET_MAP_NORESERVE, + MAP_NORESERVE, MAP_NORESERVE }, + { TARGET_MAP_HUGETLB, TARGET_MAP_HUGETLB, MAP_HUGETLB, MAP_HUGETLB }, + /* MAP_STACK had been ignored by the kernel for quite some time. + Recognize it for the target insofar as we do not want to pass + it through to the host. */ + { TARGET_MAP_STACK, TARGET_MAP_STACK, 0, 0 }, + { 0, 0, 0, 0 } }; #if defined(TARGET_I386)