linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was
2048 previously.

Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
Tom Musta 2014-08-12 13:53:40 -05:00 committed by Riku Voipio
parent 67d6d829cd
commit 0903c8be9e
18 changed files with 34 additions and 1 deletions

View file

@ -8,3 +8,4 @@ struct target_pt_regs {
#define UNAME_MACHINE "aarch64"
#define UNAME_MINIMUM_RELEASE "3.8.0"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048

View file

@ -252,3 +252,4 @@ struct target_pt_regs {
#define TARGET_UAC_NOPRINT 1
#define TARGET_UAC_NOFIX 2
#define TARGET_UAC_SIGBUS 4
#define TARGET_MINSIGSTKSZ 4096

View file

@ -44,3 +44,5 @@ struct target_pt_regs {
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048

View file

@ -39,5 +39,6 @@ struct target_pt_regs {
};
#define TARGET_CLONE_BACKWARDS2
#define TARGET_MINSIGSTKSZ 2048
#endif

View file

@ -147,3 +147,4 @@ struct target_vm86plus_struct {
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048

View file

@ -18,4 +18,6 @@ struct target_pt_regs {
#define UNAME_MACHINE "m68k"
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_MINSIGSTKSZ 2048
void do_m68k_simcall(CPUM68KState *, int);

View file

@ -49,5 +49,6 @@ struct target_pt_regs {
};
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048
#endif

View file

@ -228,3 +228,4 @@ struct target_pt_regs {
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048

View file

@ -225,3 +225,4 @@ struct target_pt_regs {
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048

View file

@ -23,3 +23,5 @@ struct target_pt_regs {
#define UNAME_MACHINE "openrisc"
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_MINSIGSTKSZ 2048

View file

@ -69,3 +69,5 @@ struct target_revectored_struct {
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 2048

View file

@ -24,3 +24,4 @@ struct target_pt_regs {
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_CLONE_BACKWARDS2
#define TARGET_MINSIGSTKSZ 2048

View file

@ -11,3 +11,5 @@ struct target_pt_regs {
#define UNAME_MACHINE "sh4"
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_MINSIGSTKSZ 2048

View file

@ -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 = TARGET_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
ret = -TARGET_EFAULT;
if (!lock_user_struct(VERIFY_READ, uss, uss_addr, 1)) {
@ -642,8 +651,9 @@ abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong uoss_addr, abi_ulong sp)
ss.ss_sp = 0;
} else {
ret = -TARGET_ENOMEM;
if (ss.ss_size < MINSIGSTKSZ)
if (ss.ss_size < minstacksize) {
goto out;
}
}
target_sigaltstack_used.ss_sp = ss.ss_sp;

View file

@ -15,3 +15,4 @@ struct target_pt_regs {
* and copy_thread().
*/
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 4096

View file

@ -16,3 +16,4 @@ struct target_pt_regs {
* and copy_thread().
*/
#define TARGET_CLONE_BACKWARDS
#define TARGET_MINSIGSTKSZ 4096

View file

@ -53,4 +53,6 @@ struct target_pt_regs {
#define UNAME_MACHINE "UniCore-II"
#define UNAME_MINIMUM_RELEASE "2.6.32"
#define TARGET_MINSIGSTKSZ 2048
#endif /* __UC32_SYSCALL_H__ */

View file

@ -97,3 +97,4 @@ struct target_msqid64_ds {
#define TARGET_ARCH_SET_FS 0x1002
#define TARGET_ARCH_GET_FS 0x1003
#define TARGET_ARCH_GET_GS 0x1004
#define TARGET_MINSIGSTKSZ 2048