From nobody Sat Nov 1 22:27:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527740528713697.3517409899426; Wed, 30 May 2018 21:22:08 -0700 (PDT) Received: from localhost ([::1]:41949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOF6F-0001OO-S5 for importer@patchew.org; Thu, 31 May 2018 00:22:07 -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) 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) 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-Google-Smtp-Source: ADUXVKJRxEQtGpfm9ZPo+aqSZ9W6+SF3rLbUIE+jBJCyP6sxrVZfcaMJBs2qbtZGa2Sb0OLI8yGd4w== X-Received: by 2002:a62:d74d:: with SMTP id v13-v6mr326445pfl.0.1527740307041; Wed, 30 May 2018 21:18:27 -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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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(-) diff --git a/linux-user/openrisc/target_syscall.h b/linux-user/openrisc/tar= get_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 =20 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; }; =20 #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" =20 -struct target_sigcontext { +typedef struct target_sigcontext { struct target_pt_regs regs; abi_ulong oldmask; - abi_ulong usp; -}; +} target_sigcontext; =20 -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; =20 -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; =20 -/* 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 *s= c) { - unsigned int err =3D 0; - unsigned long old_usp; + int i; + abi_ulong v; =20 - /* Alwys make any pending restarted system call return -EINTR */ - current_thread_info()->restart_block.fn =3D 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 =3D 0; i < 32; ++i) { + __get_user(v, &sc->regs.gpr[i]); + cpu_set_gpr(env, i, v); } + __get_user(env->pc, &sc->regs.pc); =20 - /* make sure the U-flag is set so user-mode cannot fool us */ - - regs->sr &=3D ~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] =3D 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 =20 /* Set up a signal frame. */ =20 -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 =3D cpu_get_gpr(regs, 1); + int i; =20 - /* copy the regs. they are first in sc so we can use sc directly */ + for (i =3D 0; i < 32; ++i) { + __put_user(cpu_get_gpr(env, i), &sc->regs.gpr[i]); + } =20 - /*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 =3D 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); } =20 -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); } =20 static inline abi_ulong get_sigframe(struct target_sigaction *ka, - CPUOpenRISCState *regs, + CPUOpenRISCState *env, size_t frame_size) { - unsigned long sp =3D get_sp_from_cpustate(regs); + target_ulong sp =3D get_sp_from_cpustate(env); int onsigstack =3D on_sig_stack(sp); =20 - /* redzone */ - sp =3D target_sigsp(sp, ka); - + /* Honor redzone now. If we swap to signal stack, no need to waste + * the 128 bytes by subtracting afterward. + */ + sp =3D target_sigsp(sp - 128, ka); sp =3D align_sigframe(sp - frame_size); =20 - /* - * 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; } =20 @@ -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 =3D 0; abi_ulong frame_addr; - unsigned long return_ip; - struct target_rt_sigframe *frame; - abi_ulong info_addr, uc_addr; + target_rt_sigframe *frame; =20 frame_addr =3D 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; } =20 - info_addr =3D frame_addr + offsetof(struct target_rt_sigframe, info); - __put_user(info_addr, &frame->pinfo); - uc_addr =3D frame_addr + offsetof(struct target_rt_sigframe, uc); - __put_user(uc_addr, &frame->puc); + tswap_siginfo(&frame->info, info); =20 - if (ka->sa_flags & SA_SIGINFO) { - tswap_siginfo(&frame->info, info); - } - - /*err |=3D __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); =20 - /*err |=3D copy_to_user(frame->uc.tuc_sigmask, set, sizeof(*set));*/ - - /* trampoline - the desired return ip is the retcode itself */ - return_ip =3D (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); =20 /* Set up registers for signal handler */ - env->pc =3D (unsigned long)ka->_sa_handler; /* what we enter NOW */ - cpu_set_gpr(env, 9, (unsigned long)return_ip); /* what we enter LA= TER */ - 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); =20 + /* For debugging convenience, set ppc to the insn that faulted. */ + env->ppc =3D env->pc; + /* When setting the PC for the signal handler, exit delay slot. */ + env->pc =3D ka->_sa_handler; + env->dflag =3D 0; return; =20 give_sigsegv: @@ -208,16 +144,34 @@ give_sigsegv: force_sigsegv(sig); } =20 -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 =3D 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_st= ack), + 0, frame_addr) =3D=3D -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; } =20 -#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 =3D OPENRISC_CPU(cs); =20 cpu->env.pc =3D value; + cpu->env.dflag =3D 0; } =20 static bool openrisc_cpu_has_work(CPUState *cs) --=20 2.17.0 From nobody Sat Nov 1 22:27:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15277404164871008.8284323885449; Wed, 30 May 2018 21:20:16 -0700 (PDT) Received: from localhost ([::1]:41934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOF4J-0007tb-Gt for importer@patchew.org; Thu, 31 May 2018 00:20:07 -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) 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) 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-Google-Smtp-Source: ADUXVKJFBrbvI0wa8AdXwTIwSjkQfgLZIusMOheAzPCjwDkdY5kpfgOLjeAkD9FyyKHqX2cJPrHWQA== X-Received: by 2002:a62:230b:: with SMTP id j11-v6mr5276055pfj.177.1527740308587; Wed, 30 May 2018 21:18:28 -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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier --- linux-user/openrisc/target_signal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/targ= et_signal.h index 2a4e00b035..901097972a 100644 --- a/linux-user/openrisc/target_signal.h +++ b/linux-user/openrisc/target_signal.h @@ -7,8 +7,8 @@ =20 typedef struct target_sigaltstack { abi_long ss_sp; + abi_int ss_flags; abi_ulong ss_size; - abi_long ss_flags; } target_stack_t; =20 /* sigaltstack controls */ --=20 2.17.0