From patchwork Thu May 31 04:18:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 137319 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6114056lji; Wed, 30 May 2018 21:21:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLKjuBwAK50Nrrdz1adMn31KWtUDbj6XS9G2ziD2//XQFKDZpXwhkcNUYV18pkwFd9D0ULd X-Received: by 2002:a37:3095:: with SMTP id w143-v6mr4935202qkw.71.1527740466513; Wed, 30 May 2018 21:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527740466; cv=none; d=google.com; s=arc-20160816; b=aHeN7s84ahMkV5Vcpb1FRT8rEbpsmMGVcdHuUTI41tqs3rrRc+jOeZnPZxVtNd43SU 3GKR4Ha7T2fWIyvrn7ebDspUjRCizgSThKriEpd4W4JmuyilmEN87EKU8y7UfBFsdQKX eZJQzWj3/EaDZM8l4eJ8QZGQe3UIw+s0LJRRqMqmcWiEnzoqh4754djZ9L35LX3kaZzd Ri70ORr5nm5FzM+1cygmkbouaEuQTLMCbWFM6K9CHdoH9hmlnik/i9ZQ1PDE7MVHYY6O 7sVisSqAcmOyoZ95VZV5un6rxz6tqTVf9+IZcELj5kF3Jmlc2zf6fjXqSAksG04T/iEF nBjQ== 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=A5m2+Kmj77WFMT5HnXa+KiroIv1VgrK1VTQNbui1C+4=; b=DSIZyEYmKCrrFz2lvB1jEksj+WmMRqV7ZfewdldYzWv8f3h/v7IyZ/o+qIcF+AL8j0 YrEssBtE1Uifp5j5WVbRNWOjb96wQBa+Rjv84CeDIksE/LuzusmUc+LXRtNoRvAcRKwN h+cJEFnClrOUvhNmpk6XYxcnrBaZrMEQZn8+JQZkQBiA3TkIPob8rkj9iGLgVBGG3cMq hBnz+DDrwkobQHpglu2T1/TrfE7VVM51SRWhHVCWZm+bh3tbloodqVCH1JFW9Y/AVg1u hdtGpSdSQPY+/jEYaLHjktTF3VZmQG8wEfsprPs6dm/VmE8pE0Eg6rNwC7g2l52cJ3Rx v8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RYdDf7zU; 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 d25-v6si8342812qto.282.2018.05.30.21.21.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 May 2018 21:21:06 -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=RYdDf7zU; 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]:41944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOF5G-0000cv-0H for patch@linaro.org; Thu, 31 May 2018 00:21:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOF2k-0007CT-HJ for qemu-devel@nongnu.org; Thu, 31 May 2018 00:18:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOF2i-0004Ca-Lc for qemu-devel@nongnu.org; Thu, 31 May 2018 00:18:30 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:43160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOF2i-0004C2-C8 for qemu-devel@nongnu.org; Thu, 31 May 2018 00:18:28 -0400 Received: by mail-pf0-x244.google.com with SMTP id j20-v6so10096316pff.10 for ; Wed, 30 May 2018 21:18: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=A5m2+Kmj77WFMT5HnXa+KiroIv1VgrK1VTQNbui1C+4=; b=RYdDf7zUp2i8ZouyCCzNk/kxyO/LmAwo1AUuZdGfXjmyZOtoF+VkmoSErTL8U3foG4 ZbJt+buKbZdLPpmC2PoGfhGSvjl07idsmbRX4bb2N4uEo6QeGA6MOAoOC0qlT1/8p3t0 RKMpMEFf3XXnb3X2ELGliL+YP9rqKzR0NUecs= 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=A5m2+Kmj77WFMT5HnXa+KiroIv1VgrK1VTQNbui1C+4=; b=eXg01XVqvXZ+bEPgrd9BDSY3tinZFtDCTRpQTfUNCSP5U4HCjXb9c2QHw3Mh3vNtX5 FFMGJWmQ+lx8lUV0O26NWKBli9dgz1QYdTWKc+3HSKgq5thEzZseiR/Q84ouX7wvBF3p BWt7mx11DAIhV3tXVg56mOJQ3fkl5c2fRiaXyn8uuFqO7NSLKi138VAlvyS7ILnp1GXN BmNnnSeQr4oK3WQ1+poOugg//goRljJ9Q3in1Dd8/XqnF5fUts4u95ABjdk3+1HcMR7v N0aF2/139vb+cVN1o7KOslddKEDpzBT64qeM+9OtMDGEYmDbdRBh+q/qYXBTP9tI6E7r /Gbw== X-Gm-Message-State: ALKqPwd2dbu2QDn2py7+6eibcvxR5w+yVb7uqfxqOLFAR7ZevXeNp7EJ 8Ejl+8oY4cIxnCMNDDaBGpXLZhITp5s= X-Received: by 2002:a62:d74d:: with SMTP id v13-v6mr326445pfl.0.1527740307041; Wed, 30 May 2018 21:18:27 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id 65-v6sm72638476pgj.22.2018.05.30.21.18.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 21:18:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 30 May 2018 21:18:21 -0700 Message-Id: <20180531041822.5761-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531041822.5761-1-richard.henderson@linaro.org> References: <20180531041822.5761-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH 1/2] linux-user: Implement signals for openrisc 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: shorne@gmail.com, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" All of the existing code was boilerplate from elsewhere, and would crash the guest upon the first signal. Signed-off-by: Richard Henderson --- linux-user/openrisc/target_syscall.h | 23 +-- linux-user/openrisc/signal.c | 210 +++++++++++---------------- linux-user/signal.c | 2 +- target/openrisc/cpu.c | 1 + 4 files changed, 87 insertions(+), 149 deletions(-) -- 2.17.0 diff --git a/linux-user/openrisc/target_syscall.h b/linux-user/openrisc/target_syscall.h index 03104f80af..f21fab3192 100644 --- a/linux-user/openrisc/target_syscall.h +++ b/linux-user/openrisc/target_syscall.h @@ -2,26 +2,9 @@ #define OPENRISC_TARGET_SYSCALL_H struct target_pt_regs { - union { - struct { - /* Named registers */ - uint32_t sr; /* Stored in place of r0 */ - target_ulong sp; /* r1 */ - }; - struct { - /* Old style */ - target_ulong offset[2]; - target_ulong gprs[30]; - }; - struct { - /* New style */ - target_ulong gpr[32]; - }; - }; - target_ulong pc; - target_ulong orig_gpr11; /* For restarting system calls */ - uint32_t syscallno; /* Syscall number (used by strace) */ - target_ulong dummy; /* Cheap alignment fix */ + abi_ulong gpr[32]; + abi_ulong pc; + abi_ulong sr; }; #define UNAME_MACHINE "openrisc" diff --git a/linux-user/openrisc/signal.c b/linux-user/openrisc/signal.c index ecf2897ccd..387fa63174 100644 --- a/linux-user/openrisc/signal.c +++ b/linux-user/openrisc/signal.c @@ -22,125 +22,79 @@ #include "signal-common.h" #include "linux-user/trace.h" -struct target_sigcontext { +typedef struct target_sigcontext { struct target_pt_regs regs; abi_ulong oldmask; - abi_ulong usp; -}; +} target_sigcontext; -struct target_ucontext { +typedef struct target_ucontext { abi_ulong tuc_flags; abi_ulong tuc_link; target_stack_t tuc_stack; - struct target_sigcontext tuc_mcontext; + target_sigcontext tuc_mcontext; target_sigset_t tuc_sigmask; /* mask last for extensibility */ -}; +} target_ucontext; -struct target_rt_sigframe { - abi_ulong pinfo; - uint64_t puc; +typedef struct target_rt_sigframe { struct target_siginfo info; - struct target_sigcontext sc; - struct target_ucontext uc; - unsigned char retcode[16]; /* trampoline code */ -}; + target_ucontext uc; + uint32_t retcode[4]; /* trampoline code */ +} target_rt_sigframe; -/* This is the asm-generic/ucontext.h version */ -#if 0 -static int restore_sigcontext(CPUOpenRISCState *regs, - struct target_sigcontext *sc) +static void restore_sigcontext(CPUOpenRISCState *env, target_sigcontext *sc) { - unsigned int err = 0; - unsigned long old_usp; + int i; + abi_ulong v; - /* Alwys make any pending restarted system call return -EINTR */ - current_thread_info()->restart_block.fn = do_no_restart_syscall; - - /* restore the regs from &sc->regs (same as sc, since regs is first) - * (sc is already checked for VERIFY_READ since the sigframe was - * checked in sys_sigreturn previously) - */ - - if (copy_from_user(regs, &sc, sizeof(struct target_pt_regs))) { - goto badframe; + for (i = 0; i < 32; ++i) { + __get_user(v, &sc->regs.gpr[i]); + cpu_set_gpr(env, i, v); } + __get_user(env->pc, &sc->regs.pc); - /* make sure the U-flag is set so user-mode cannot fool us */ - - regs->sr &= ~SR_SM; - - /* restore the old USP as it was before we stacked the sc etc. - * (we cannot just pop the sigcontext since we aligned the sp and - * stuff after pushing it) - */ - - __get_user(old_usp, &sc->usp); - phx_signal("old_usp 0x%lx", old_usp); - - __PHX__ REALLY /* ??? */ - wrusp(old_usp); - regs->gpr[1] = old_usp; - - /* TODO: the other ports use regs->orig_XX to disable syscall checks - * after this completes, but we don't use that mechanism. maybe we can - * use it now ? - */ - - return err; - -badframe: - return 1; + /* Make sure the supervisor flag is clear. */ + __get_user(v, &sc->regs.sr); + cpu_set_sr(env, v & ~SR_SM); } -#endif /* Set up a signal frame. */ -static void setup_sigcontext(struct target_sigcontext *sc, - CPUOpenRISCState *regs, - unsigned long mask) +static void setup_sigcontext(target_sigcontext *sc, CPUOpenRISCState *env) { - unsigned long usp = cpu_get_gpr(regs, 1); + int i; - /* copy the regs. they are first in sc so we can use sc directly */ + for (i = 0; i < 32; ++i) { + __put_user(cpu_get_gpr(env, i), &sc->regs.gpr[i]); + } - /*copy_to_user(&sc, regs, sizeof(struct target_pt_regs));*/ - - /* Set the frametype to CRIS_FRAME_NORMAL for the execution of - the signal handler. The frametype will be restored to its previous - value in restore_sigcontext. */ - /*regs->frametype = CRIS_FRAME_NORMAL;*/ - - /* then some other stuff */ - __put_user(mask, &sc->oldmask); - __put_user(usp, &sc->usp); + __put_user(env->pc, &sc->regs.pc); + __put_user(cpu_get_sr(env), &sc->regs.sr); } -static inline unsigned long align_sigframe(unsigned long sp) +static inline target_ulong align_sigframe(target_ulong sp) { - return sp & ~3UL; + return QEMU_ALIGN_DOWN(sp, 4); } static inline abi_ulong get_sigframe(struct target_sigaction *ka, - CPUOpenRISCState *regs, + CPUOpenRISCState *env, size_t frame_size) { - unsigned long sp = get_sp_from_cpustate(regs); + target_ulong sp = get_sp_from_cpustate(env); int onsigstack = on_sig_stack(sp); - /* redzone */ - sp = target_sigsp(sp, ka); - + /* Honor redzone now. If we swap to signal stack, no need to waste + * the 128 bytes by subtracting afterward. + */ + sp = target_sigsp(sp - 128, ka); sp = align_sigframe(sp - frame_size); - /* - * If we are on the alternate signal stack and would overflow it, don't. + /* If we are on the alternate signal stack and would overflow it, don't. * Return an always-bogus address instead so we will die with SIGSEGV. */ - - if (onsigstack && !likely(on_sig_stack(sp))) { + if (onsigstack && !on_sig_stack(sp)) { return -1L; } - return sp; } @@ -148,11 +102,8 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, target_siginfo_t *info, target_sigset_t *set, CPUOpenRISCState *env) { - int err = 0; abi_ulong frame_addr; - unsigned long return_ip; - struct target_rt_sigframe *frame; - abi_ulong info_addr, uc_addr; + target_rt_sigframe *frame; frame_addr = get_sigframe(ka, env, sizeof(*frame)); trace_user_setup_rt_frame(env, frame_addr); @@ -160,47 +111,32 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, goto give_sigsegv; } - info_addr = frame_addr + offsetof(struct target_rt_sigframe, info); - __put_user(info_addr, &frame->pinfo); - uc_addr = frame_addr + offsetof(struct target_rt_sigframe, uc); - __put_user(uc_addr, &frame->puc); + tswap_siginfo(&frame->info, info); - if (ka->sa_flags & SA_SIGINFO) { - tswap_siginfo(&frame->info, info); - } - - /*err |= __clear_user(&frame->uc, offsetof(ucontext_t, uc_mcontext));*/ __put_user(0, &frame->uc.tuc_flags); __put_user(0, &frame->uc.tuc_link); + target_save_altstack(&frame->uc.tuc_stack, env); - setup_sigcontext(&frame->sc, env, set->sig[0]); + setup_sigcontext(&frame->uc.tuc_mcontext, env); - /*err |= copy_to_user(frame->uc.tuc_sigmask, set, sizeof(*set));*/ - - /* trampoline - the desired return ip is the retcode itself */ - return_ip = (unsigned long)&frame->retcode; - /* This is l.ori r11,r0,__NR_sigreturn, l.sys 1 */ - __put_user(0xa960, (short *)(frame->retcode + 0)); - __put_user(TARGET_NR_rt_sigreturn, (short *)(frame->retcode + 2)); - __put_user(0x20000001, (unsigned long *)(frame->retcode + 4)); - __put_user(0x15000000, (unsigned long *)(frame->retcode + 8)); - - if (err) { - goto give_sigsegv; - } - - /* TODO what is the current->exec_domain stuff and invmap ? */ + /* This is l.ori r11,r0,__NR_sigreturn; l.sys 1; l.nop; l.nop */ + __put_user(0xa9600000 | TARGET_NR_rt_sigreturn, frame->retcode + 0); + __put_user(0x20000001, frame->retcode + 1); + __put_user(0x15000000, frame->retcode + 2); + __put_user(0x15000000, frame->retcode + 3); /* Set up registers for signal handler */ - env->pc = (unsigned long)ka->_sa_handler; /* what we enter NOW */ - cpu_set_gpr(env, 9, (unsigned long)return_ip); /* what we enter LATER */ - cpu_set_gpr(env, 3, (unsigned long)sig); /* arg 1: signo */ - cpu_set_gpr(env, 4, (unsigned long)&frame->info); /* arg 2: (siginfo_t*) */ - cpu_set_gpr(env, 5, (unsigned long)&frame->uc); /* arg 3: ucontext */ - - /* actually move the usp to reflect the stacked frame */ - cpu_set_gpr(env, 1, (unsigned long)frame); + cpu_set_gpr(env, 9, frame_addr + offsetof(target_rt_sigframe, retcode)); + cpu_set_gpr(env, 3, sig); + cpu_set_gpr(env, 4, frame_addr + offsetof(target_rt_sigframe, info)); + cpu_set_gpr(env, 5, frame_addr + offsetof(target_rt_sigframe, uc)); + cpu_set_gpr(env, 1, frame_addr); + /* For debugging convenience, set ppc to the insn that faulted. */ + env->ppc = env->pc; + /* When setting the PC for the signal handler, exit delay slot. */ + env->pc = ka->_sa_handler; + env->dflag = 0; return; give_sigsegv: @@ -208,16 +144,34 @@ give_sigsegv: force_sigsegv(sig); } -long do_sigreturn(CPUOpenRISCState *env) -{ - trace_user_do_sigreturn(env, 0); - fprintf(stderr, "do_sigreturn: not implemented\n"); - return -TARGET_ENOSYS; -} - long do_rt_sigreturn(CPUOpenRISCState *env) { + abi_ulong frame_addr = cpu_get_gpr(env, 1); + target_rt_sigframe *frame; + sigset_t set; + trace_user_do_rt_sigreturn(env, 0); - fprintf(stderr, "do_rt_sigreturn: not implemented\n"); - return -TARGET_ENOSYS; + if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) { + goto badframe; + } + if (frame_addr & 3) { + goto badframe; + } + + target_to_host_sigset(&set, &frame->uc.tuc_sigmask); + set_sigmask(&set); + + restore_sigcontext(env, &frame->uc.tuc_mcontext); + if (do_sigaltstack(frame_addr + offsetof(target_rt_sigframe, uc.tuc_stack), + 0, frame_addr) == -EFAULT) { + goto badframe; + } + + unlock_user_struct(frame, frame_addr, 0); + return cpu_get_gpr(env, 11); + + badframe: + unlock_user_struct(frame, frame_addr, 0); + force_sig(TARGET_SIGSEGV); + return 0; } diff --git a/linux-user/signal.c b/linux-user/signal.c index 01de433e3a..a8d1f7a284 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -237,7 +237,7 @@ int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset) return 0; } -#if !defined(TARGET_OPENRISC) && !defined(TARGET_NIOS2) +#if !defined(TARGET_NIOS2) /* Just set the guest's signal mask to the specified value; the * caller is assumed to have called block_signals() already. */ diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index d1ef4c737c..7648a74636 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -28,6 +28,7 @@ static void openrisc_cpu_set_pc(CPUState *cs, vaddr value) OpenRISCCPU *cpu = OPENRISC_CPU(cs); cpu->env.pc = value; + cpu->env.dflag = 0; } static bool openrisc_cpu_has_work(CPUState *cs) From patchwork Thu May 31 04:18:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 137318 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6113834lji; Wed, 30 May 2018 21:20:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIs4HHNgVnuqWNBcVimyt1LXl/4aaWpuIDAsTbimz/CCWv9xjA7rxPHZa5et8RpPD5cGaBC X-Received: by 2002:a37:500a:: with SMTP id e10-v6mr4724911qkb.68.1527740445897; Wed, 30 May 2018 21:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527740445; cv=none; d=google.com; s=arc-20160816; b=Obj7EUH8n9ntA6uG/oNdG2P5Pl2Qw3OtqYIXZvv+BO90lDND86owvsFejb90aIAxUG OjIc1Cg43IXNHyQeqobi9bnk5wnZGVfcIfVMSln7PIQjCUbmq/TtHB2LIEk/j7RmRbOF 2ILkpM9vffq7Calpm59S1ASHfKtMrYGbJJm6kDWuAqq6WtGR91FyQi5Lru3AT5/iK2sG eMcs+pW7QU/Lt2fLlJUgE8b0sWMpdBeJjmj0pBYGnClS9cdX056jBwmsbJD296Aj+2Zh Gw1EXn2o9gPCob4IKV1zNZ+nRY8XjTrDACaMEE17qnLruvFESqaTfE3lLvf3TMWz5vq/ fwqA== 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=c1oLl3R4di38qWYxhM3UuKanhvglajK1IvlgjvLbhh0=; b=nkyKGBzP5zZV76Blq/dKb8NmkbL8njFkYLQVeWQ+kA6SJ99S3ZZ6DZE52IzbFA/l3s mPCyB14w0vqmr9C9zRcJZbyImD2KFSqhDj3s56Upbuk14zFe1pgQXq7EeNHug8MzIzyP ftwVC2HDZtk/OJtvz0N3QSunIZkfUFcG9B30FF1yRILNZ2frzguTJpXOOfABYlPIvzVx HT4WP8jfA+k4vZI+Mi91XAH2XSpBbmLybdJmYlwnh3tcV6W88GOO2ulZ1aVS0Io27qHQ BtIIgvju/zSsKoGrTmFK2Mf7ZwNd0oLZAn8ENtsKrnle1OzkESqNXedzbDWwFFkcmLq+ ajsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZXltY/DP; 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 e68-v6si2062210qkd.394.2018.05.30.21.20.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 May 2018 21:20:45 -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=ZXltY/DP; 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]:41934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOF4v-0007tb-CA for patch@linaro.org; Thu, 31 May 2018 00:20:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOF2k-0007CU-U7 for qemu-devel@nongnu.org; Thu, 31 May 2018 00:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOF2k-0004D9-34 for qemu-devel@nongnu.org; Thu, 31 May 2018 00:18:30 -0400 Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:41414) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOF2j-0004Cu-TN for qemu-devel@nongnu.org; Thu, 31 May 2018 00:18:30 -0400 Received: by mail-pg0-x234.google.com with SMTP id d14-v6so9103768pgv.8 for ; Wed, 30 May 2018 21:18:29 -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=c1oLl3R4di38qWYxhM3UuKanhvglajK1IvlgjvLbhh0=; b=ZXltY/DPfOabc54gcKmSbd+l0eu2fuGX46bmPKSTLPeuUhkjKtqLzWzuWawQosIwSJ zvd50D3VYkWC9S9/8OEPZ7u1Log7/gjEbXIJoZR5J3Pp0NGlvKA1NzEoCy9BmxK4cXLe wWcnUBu90z8gul2CbmVgnCct6sSkcsOuIBGZM= 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=c1oLl3R4di38qWYxhM3UuKanhvglajK1IvlgjvLbhh0=; b=LtcMTq7O9XqDgdUaKKRIzkhzWeAQJTFyRtobWnT9hVOMxFtypUjh2ZJBAXPVsd8yuR x6wiSLH26/lC+Q/VyGDeUHbJJX5gS7UkC8jX3RYWcVGaOvsiaVzXga6d4upL1xN7wtYk CWNcsszvJ4uZaiwlnxRoygcBqCMIBbgjEm7wjrGyM9Tp+KENnjMpvy3L6ABO4eWYLCWi layXBWl3ofx3QYTLRBv+Pp50gthyFDDm6a9X6pAXAQCnbK8X2l2orO136hfJnv+Ytp3a I1yiH+1Ui1zjj5k6wOD7QvzaXP6Nwoq5x62r63PFNk6M1rpzj/myZ5WxPTjW6T0anVRI FYiQ== X-Gm-Message-State: ALKqPwfmDtamETLjIiLV+7vpwqv2fOifS8fQVULjD0Vh218DPoukfOrj U5DyYSyl2PsntpkOh7Cp50DZCmNqcDs= X-Received: by 2002:a62:230b:: with SMTP id j11-v6mr5276055pfj.177.1527740308587; Wed, 30 May 2018 21:18:28 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id 65-v6sm72638476pgj.22.2018.05.30.21.18.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 21:18:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 30 May 2018 21:18:22 -0700 Message-Id: <20180531041822.5761-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531041822.5761-1-richard.henderson@linaro.org> References: <20180531041822.5761-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::234 Subject: [Qemu-devel] [PATCH 2/2] linux-user: Fix struct sigaltstack for openrisc 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: shorne@gmail.com, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- linux-user/openrisc/target_signal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0 Reviewed-by: Laurent Vivier diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/target_signal.h index 2a4e00b035..901097972a 100644 --- a/linux-user/openrisc/target_signal.h +++ b/linux-user/openrisc/target_signal.h @@ -7,8 +7,8 @@ typedef struct target_sigaltstack { abi_long ss_sp; + abi_int ss_flags; abi_ulong ss_size; - abi_long ss_flags; } target_stack_t; /* sigaltstack controls */