From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHERn-0005Cu-GC for qemu-devel@nongnu.org; Tue, 12 Aug 2014 11:57:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHERg-0007UC-0c for qemu-devel@nongnu.org; Tue, 12 Aug 2014 11:57:15 -0400 Message-ID: <53EA3952.1000501@suse.de> Date: Tue, 12 Aug 2014 17:57:06 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1407170739-12237-1-git-send-email-tommusta@gmail.com> <1407170739-12237-10-git-send-email-tommusta@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/12] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Tom Musta Cc: Riku Voipio , "qemu-ppc@nongnu.org" , QEMU Developers On 04.08.14 19:39, Peter Maydell wrote: > On 4 August 2014 17:45, Tom Musta wrote: >> The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was >> 2048 previously. > Alpha and SPARC also have a 4096 byte MINSIGSTKSZ... > >> Signed-off-by: Tom Musta >> >> diff --git a/linux-user/signal.c b/linux-user/signal.c >> index cdfcc52..b2a6e53 100644 >> --- a/linux-user/signal.c >> +++ b/linux-user/signal.c >> @@ -617,6 +617,15 @@ abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong uoss_addr, abi_ulong sp) >> { >> struct target_sigaltstack *uss; >> struct target_sigaltstack ss; >> + size_t minstacksize = MINSIGSTKSZ; >> + >> +#if defined(TARGET_PPC64) >> + /* ELF V2 for PPC64 has a 4K minimum stack size for signal handlers */ >> + struct image_info *image = ((TaskState *)thread_cpu->opaque)->info; >> + if (get_ppc64_abi(image) > 1) { >> + minstacksize = 4096; >> + } >> +#endif > Shouldn't we just define and use a TARGET_MINSIGSTKSZ ? > Checking against the host's MINSIGSTKSZ is wrong, I think. > > Again, define the TARGET_MINSIGSTKSZ in a file in > linux-user/$ARCH/, for all targets: > alpha, sparc, ppc64: 4096 > everything else: 2048 > (itanium is weird here but we don't support that for linux-user guests) and supporting ia64 is really hard, because it uses the full 64bit virtual address space which we can't provide on x86_64. Alex