Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFFDDC742B2 for ; Fri, 12 Jul 2019 11:39:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8C362084B for ; Fri, 12 Jul 2019 11:39:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8C362084B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rt-rk.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hltu4-00018c-Il for qemu-devel@archiver.kernel.org; Fri, 12 Jul 2019 07:39:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53595) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlttH-0006GQ-Ly for qemu-devel@nongnu.org; Fri, 12 Jul 2019 07:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlttG-00059L-7y for qemu-devel@nongnu.org; Fri, 12 Jul 2019 07:39:03 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:57830 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlttF-0003Z9-Ss for qemu-devel@nongnu.org; Fri, 12 Jul 2019 07:39:02 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id D5B671A1FE9; Fri, 12 Jul 2019 13:37:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id A052D1A1FE2; Fri, 12 Jul 2019 13:37:55 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Fri, 12 Jul 2019 13:37:46 +0200 Message-Id: <1562931470-3700-2-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1562931470-3700-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1562931470-3700-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH for 4.1 v2] linux-user: Fix structure target_ucontext for MIPS 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: arikalo@wavecomp.com, sw@weilnetz.de, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Aleksandar Markovic Structure ucontext for MIPS is defined in the following way in Linux kernel: (arch/mips/include/uapi/asm/ucontext.h, lines 54-64) struct ucontext { /* Historic fields matching asm-generic */ unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; sigset_t uc_sigmask; /* Extended context structures may follow ucontext */ unsigned long long uc_extcontext[0]; }; Fix the structure target_ucontext for MIPS to reflect the definition above, except the correction for field uc_extcontext, which will follow at some later time. Fixes: 94c5495d Reported-by: Dragan Mladjenovic Signed-off-by: Aleksandar Markovic Reviewed-by: Laurent Vivier --- v2: rectified a commit message mistake with s/target_sigset_t/target_ucontext --- linux-user/mips/signal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/linux-user/mips/signal.c b/linux-user/mips/signal.c index 6aa303e..455a8a2 100644 --- a/linux-user/mips/signal.c +++ b/linux-user/mips/signal.c @@ -71,10 +71,9 @@ struct sigframe { }; struct target_ucontext { - target_ulong tuc_flags; - target_ulong tuc_link; + abi_ulong tuc_flags; + abi_ulong tuc_link; target_stack_t tuc_stack; - target_ulong pad0; struct target_sigcontext tuc_mcontext; target_sigset_t tuc_sigmask; }; -- 2.7.4