Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
c0897856
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c0897856
编写于
6月 24, 2006
作者:
R
Russell King
提交者:
Russell King
6月 24, 2006
浏览文件
操作
浏览文件
下载
差异文件
Merge signal handler branch
上级
e11c910b
85fe0681
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
160 addition
and
126 deletion
+160
-126
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+82
-125
include/asm-arm/ucontext.h
include/asm-arm/ucontext.h
+78
-1
未找到文件。
arch/arm/kernel/signal.c
浏览文件 @
c0897856
...
...
@@ -134,17 +134,6 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
#ifdef CONFIG_IWMMXT
/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */
#define IWMMXT_STORAGE_SIZE (0x98 + 8)
#define IWMMXT_MAGIC0 0x12ef842a
#define IWMMXT_MAGIC1 0x1c07ca71
struct
iwmmxt_sigframe
{
unsigned
long
magic0
;
unsigned
long
magic1
;
unsigned
long
storage
[
0x98
/
4
];
};
static
int
preserve_iwmmxt_context
(
struct
iwmmxt_sigframe
*
frame
)
{
char
kbuf
[
sizeof
(
*
frame
)
+
8
];
...
...
@@ -152,8 +141,8 @@ static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame)
/* the iWMMXt context must be 64 bit aligned */
kframe
=
(
struct
iwmmxt_sigframe
*
)((
unsigned
long
)(
kbuf
+
8
)
&
~
7
);
kframe
->
magic
0
=
IWMMXT_MAGIC0
;
kframe
->
magic1
=
IWMMXT_MAGIC1
;
kframe
->
magic
=
IWMMXT_MAGIC
;
kframe
->
size
=
IWMMXT_STORAGE_SIZE
;
iwmmxt_task_copy
(
current_thread_info
(),
&
kframe
->
storage
);
return
__copy_to_user
(
frame
,
kframe
,
sizeof
(
*
frame
));
}
...
...
@@ -167,8 +156,8 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame)
kframe
=
(
struct
iwmmxt_sigframe
*
)((
unsigned
long
)(
kbuf
+
8
)
&
~
7
);
if
(
__copy_from_user
(
kframe
,
frame
,
sizeof
(
*
frame
)))
return
-
1
;
if
(
kframe
->
magic
0
!=
IWMMXT_MAGIC0
||
kframe
->
magic1
!=
IWMMXT_MAGIC1
)
if
(
kframe
->
magic
!=
IWMMXT_MAGIC
||
kframe
->
size
!=
IWMMXT_STORAGE_SIZE
)
return
-
1
;
iwmmxt_task_restore
(
current_thread_info
(),
&
kframe
->
storage
);
return
0
;
...
...
@@ -176,71 +165,62 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame)
#endif
/*
* Auxiliary signal frame. This saves stuff like FP state.
* The layout of this structure is not part of the user ABI.
*/
struct
aux_sigframe
{
#ifdef CONFIG_IWMMXT
struct
iwmmxt_sigframe
iwmmxt
;
#endif
#ifdef CONFIG_VFP
union
vfp_state
vfp
;
#endif
};
/*
* Do a signal return; undo the signal stack. These are aligned to 64-bit.
*/
struct
sigframe
{
struct
sigcontext
sc
;
unsigned
long
extramask
[
_NSIG_WORDS
-
1
];
struct
ucontext
uc
;
unsigned
long
retcode
[
2
];
struct
aux_sigframe
aux
__attribute__
((
aligned
(
8
)));
};
struct
rt_sigframe
{
struct
siginfo
__user
*
pinfo
;
void
__user
*
puc
;
struct
siginfo
info
;
struct
ucontext
uc
;
unsigned
long
retcode
[
2
];
struct
aux_sigframe
aux
__attribute__
((
aligned
(
8
)));
struct
sigframe
sig
;
};
static
int
restore_sigcontext
(
struct
pt_regs
*
regs
,
struct
sigcontext
__user
*
sc
,
struct
aux_sigframe
__user
*
aux
)
static
int
restore_sigframe
(
struct
pt_regs
*
regs
,
struct
sigframe
__user
*
sf
)
{
int
err
=
0
;
struct
aux_sigframe
__user
*
aux
;
sigset_t
set
;
int
err
;
err
=
__copy_from_user
(
&
set
,
&
sf
->
uc
.
uc_sigmask
,
sizeof
(
set
));
if
(
err
==
0
)
{
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
}
__get_user_error
(
regs
->
ARM_r0
,
&
s
c
->
arm_r0
,
err
);
__get_user_error
(
regs
->
ARM_r1
,
&
s
c
->
arm_r1
,
err
);
__get_user_error
(
regs
->
ARM_r2
,
&
s
c
->
arm_r2
,
err
);
__get_user_error
(
regs
->
ARM_r3
,
&
s
c
->
arm_r3
,
err
);
__get_user_error
(
regs
->
ARM_r4
,
&
s
c
->
arm_r4
,
err
);
__get_user_error
(
regs
->
ARM_r5
,
&
s
c
->
arm_r5
,
err
);
__get_user_error
(
regs
->
ARM_r6
,
&
s
c
->
arm_r6
,
err
);
__get_user_error
(
regs
->
ARM_r7
,
&
s
c
->
arm_r7
,
err
);
__get_user_error
(
regs
->
ARM_r8
,
&
s
c
->
arm_r8
,
err
);
__get_user_error
(
regs
->
ARM_r9
,
&
s
c
->
arm_r9
,
err
);
__get_user_error
(
regs
->
ARM_r10
,
&
s
c
->
arm_r10
,
err
);
__get_user_error
(
regs
->
ARM_fp
,
&
s
c
->
arm_fp
,
err
);
__get_user_error
(
regs
->
ARM_ip
,
&
s
c
->
arm_ip
,
err
);
__get_user_error
(
regs
->
ARM_sp
,
&
s
c
->
arm_sp
,
err
);
__get_user_error
(
regs
->
ARM_lr
,
&
s
c
->
arm_lr
,
err
);
__get_user_error
(
regs
->
ARM_pc
,
&
s
c
->
arm_pc
,
err
);
__get_user_error
(
regs
->
ARM_cpsr
,
&
s
c
->
arm_cpsr
,
err
);
__get_user_error
(
regs
->
ARM_r0
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r0
,
err
);
__get_user_error
(
regs
->
ARM_r1
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r1
,
err
);
__get_user_error
(
regs
->
ARM_r2
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r2
,
err
);
__get_user_error
(
regs
->
ARM_r3
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r3
,
err
);
__get_user_error
(
regs
->
ARM_r4
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r4
,
err
);
__get_user_error
(
regs
->
ARM_r5
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r5
,
err
);
__get_user_error
(
regs
->
ARM_r6
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r6
,
err
);
__get_user_error
(
regs
->
ARM_r7
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r7
,
err
);
__get_user_error
(
regs
->
ARM_r8
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r8
,
err
);
__get_user_error
(
regs
->
ARM_r9
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r9
,
err
);
__get_user_error
(
regs
->
ARM_r10
,
&
s
f
->
uc
.
uc_mcontext
.
arm_r10
,
err
);
__get_user_error
(
regs
->
ARM_fp
,
&
s
f
->
uc
.
uc_mcontext
.
arm_fp
,
err
);
__get_user_error
(
regs
->
ARM_ip
,
&
s
f
->
uc
.
uc_mcontext
.
arm_ip
,
err
);
__get_user_error
(
regs
->
ARM_sp
,
&
s
f
->
uc
.
uc_mcontext
.
arm_sp
,
err
);
__get_user_error
(
regs
->
ARM_lr
,
&
s
f
->
uc
.
uc_mcontext
.
arm_lr
,
err
);
__get_user_error
(
regs
->
ARM_pc
,
&
s
f
->
uc
.
uc_mcontext
.
arm_pc
,
err
);
__get_user_error
(
regs
->
ARM_cpsr
,
&
s
f
->
uc
.
uc_mcontext
.
arm_cpsr
,
err
);
err
|=
!
valid_user_regs
(
regs
);
aux
=
(
struct
aux_sigframe
__user
*
)
sf
->
uc
.
uc_regspace
;
#ifdef CONFIG_IWMMXT
if
(
err
==
0
&&
test_thread_flag
(
TIF_USING_IWMMXT
))
err
|=
restore_iwmmxt_context
(
&
aux
->
iwmmxt
);
#endif
#ifdef CONFIG_VFP
// if (err == 0)
// err |= vfp_restore_state(&
aux->
vfp);
// err |= vfp_restore_state(&
sf->aux.
vfp);
#endif
return
err
;
...
...
@@ -249,7 +229,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
asmlinkage
int
sys_sigreturn
(
struct
pt_regs
*
regs
)
{
struct
sigframe
__user
*
frame
;
sigset_t
set
;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
...
...
@@ -266,19 +245,8 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
if
(
!
access_ok
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
goto
badframe
;
if
(
__get_user
(
set
.
sig
[
0
],
&
frame
->
sc
.
oldmask
)
||
(
_NSIG_WORDS
>
1
&&
__copy_from_user
(
&
set
.
sig
[
1
],
&
frame
->
extramask
,
sizeof
(
frame
->
extramask
))))
goto
badframe
;
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
if
(
restore_sig
context
(
regs
,
&
frame
->
sc
,
&
frame
->
aux
))
if
(
restore_sig
frame
(
regs
,
frame
))
goto
badframe
;
/* Send SIGTRAP if we're single-stepping */
...
...
@@ -297,7 +265,6 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
asmlinkage
int
sys_rt_sigreturn
(
struct
pt_regs
*
regs
)
{
struct
rt_sigframe
__user
*
frame
;
sigset_t
set
;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
...
...
@@ -314,19 +281,11 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
if
(
!
access_ok
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
goto
badframe
;
if
(
__copy_from_user
(
&
set
,
&
frame
->
uc
.
uc_sigmask
,
sizeof
(
set
)))
goto
badframe
;
sigdelsetmask
(
&
set
,
~
_BLOCKABLE
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
current
->
blocked
=
set
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
,
&
frame
->
aux
))
if
(
restore_sigframe
(
regs
,
&
frame
->
sig
))
goto
badframe
;
if
(
do_sigaltstack
(
&
frame
->
uc
.
uc_stack
,
NULL
,
regs
->
ARM_sp
)
==
-
EFAULT
)
if
(
do_sigaltstack
(
&
frame
->
sig
.
uc
.
uc_stack
,
NULL
,
regs
->
ARM_sp
)
==
-
EFAULT
)
goto
badframe
;
/* Send SIGTRAP if we're single-stepping */
...
...
@@ -343,42 +302,46 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
}
static
int
setup_sigcontext
(
struct
sigcontext
__user
*
sc
,
struct
aux_sigframe
__user
*
aux
,
struct
pt_regs
*
regs
,
unsigned
long
mask
)
setup_sigframe
(
struct
sigframe
__user
*
sf
,
struct
pt_regs
*
regs
,
sigset_t
*
set
)
{
struct
aux_sigframe
__user
*
aux
;
int
err
=
0
;
__put_user_error
(
regs
->
ARM_r0
,
&
sc
->
arm_r0
,
err
);
__put_user_error
(
regs
->
ARM_r1
,
&
sc
->
arm_r1
,
err
);
__put_user_error
(
regs
->
ARM_r2
,
&
sc
->
arm_r2
,
err
);
__put_user_error
(
regs
->
ARM_r3
,
&
sc
->
arm_r3
,
err
);
__put_user_error
(
regs
->
ARM_r4
,
&
sc
->
arm_r4
,
err
);
__put_user_error
(
regs
->
ARM_r5
,
&
sc
->
arm_r5
,
err
);
__put_user_error
(
regs
->
ARM_r6
,
&
sc
->
arm_r6
,
err
);
__put_user_error
(
regs
->
ARM_r7
,
&
sc
->
arm_r7
,
err
);
__put_user_error
(
regs
->
ARM_r8
,
&
sc
->
arm_r8
,
err
);
__put_user_error
(
regs
->
ARM_r9
,
&
sc
->
arm_r9
,
err
);
__put_user_error
(
regs
->
ARM_r10
,
&
sc
->
arm_r10
,
err
);
__put_user_error
(
regs
->
ARM_fp
,
&
sc
->
arm_fp
,
err
);
__put_user_error
(
regs
->
ARM_ip
,
&
sc
->
arm_ip
,
err
);
__put_user_error
(
regs
->
ARM_sp
,
&
sc
->
arm_sp
,
err
);
__put_user_error
(
regs
->
ARM_lr
,
&
sc
->
arm_lr
,
err
);
__put_user_error
(
regs
->
ARM_pc
,
&
sc
->
arm_pc
,
err
);
__put_user_error
(
regs
->
ARM_cpsr
,
&
sc
->
arm_cpsr
,
err
);
__put_user_error
(
current
->
thread
.
trap_no
,
&
sc
->
trap_no
,
err
);
__put_user_error
(
current
->
thread
.
error_code
,
&
sc
->
error_code
,
err
);
__put_user_error
(
current
->
thread
.
address
,
&
sc
->
fault_address
,
err
);
__put_user_error
(
mask
,
&
sc
->
oldmask
,
err
);
__put_user_error
(
regs
->
ARM_r0
,
&
sf
->
uc
.
uc_mcontext
.
arm_r0
,
err
);
__put_user_error
(
regs
->
ARM_r1
,
&
sf
->
uc
.
uc_mcontext
.
arm_r1
,
err
);
__put_user_error
(
regs
->
ARM_r2
,
&
sf
->
uc
.
uc_mcontext
.
arm_r2
,
err
);
__put_user_error
(
regs
->
ARM_r3
,
&
sf
->
uc
.
uc_mcontext
.
arm_r3
,
err
);
__put_user_error
(
regs
->
ARM_r4
,
&
sf
->
uc
.
uc_mcontext
.
arm_r4
,
err
);
__put_user_error
(
regs
->
ARM_r5
,
&
sf
->
uc
.
uc_mcontext
.
arm_r5
,
err
);
__put_user_error
(
regs
->
ARM_r6
,
&
sf
->
uc
.
uc_mcontext
.
arm_r6
,
err
);
__put_user_error
(
regs
->
ARM_r7
,
&
sf
->
uc
.
uc_mcontext
.
arm_r7
,
err
);
__put_user_error
(
regs
->
ARM_r8
,
&
sf
->
uc
.
uc_mcontext
.
arm_r8
,
err
);
__put_user_error
(
regs
->
ARM_r9
,
&
sf
->
uc
.
uc_mcontext
.
arm_r9
,
err
);
__put_user_error
(
regs
->
ARM_r10
,
&
sf
->
uc
.
uc_mcontext
.
arm_r10
,
err
);
__put_user_error
(
regs
->
ARM_fp
,
&
sf
->
uc
.
uc_mcontext
.
arm_fp
,
err
);
__put_user_error
(
regs
->
ARM_ip
,
&
sf
->
uc
.
uc_mcontext
.
arm_ip
,
err
);
__put_user_error
(
regs
->
ARM_sp
,
&
sf
->
uc
.
uc_mcontext
.
arm_sp
,
err
);
__put_user_error
(
regs
->
ARM_lr
,
&
sf
->
uc
.
uc_mcontext
.
arm_lr
,
err
);
__put_user_error
(
regs
->
ARM_pc
,
&
sf
->
uc
.
uc_mcontext
.
arm_pc
,
err
);
__put_user_error
(
regs
->
ARM_cpsr
,
&
sf
->
uc
.
uc_mcontext
.
arm_cpsr
,
err
);
__put_user_error
(
current
->
thread
.
trap_no
,
&
sf
->
uc
.
uc_mcontext
.
trap_no
,
err
);
__put_user_error
(
current
->
thread
.
error_code
,
&
sf
->
uc
.
uc_mcontext
.
error_code
,
err
);
__put_user_error
(
current
->
thread
.
address
,
&
sf
->
uc
.
uc_mcontext
.
fault_address
,
err
);
__put_user_error
(
set
->
sig
[
0
],
&
sf
->
uc
.
uc_mcontext
.
oldmask
,
err
);
err
|=
__copy_to_user
(
&
sf
->
uc
.
uc_sigmask
,
set
,
sizeof
(
*
set
));
aux
=
(
struct
aux_sigframe
__user
*
)
sf
->
uc
.
uc_regspace
;
#ifdef CONFIG_IWMMXT
if
(
err
==
0
&&
test_thread_flag
(
TIF_USING_IWMMXT
))
err
|=
preserve_iwmmxt_context
(
&
aux
->
iwmmxt
);
#endif
#ifdef CONFIG_VFP
// if (err == 0)
// err |= vfp_save_state(&
aux->
vfp);
// err |= vfp_save_state(&
sf->aux.
vfp);
#endif
__put_user_error
(
0
,
&
aux
->
end_magic
,
err
);
return
err
;
}
...
...
@@ -487,13 +450,12 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg
if
(
!
frame
)
return
1
;
err
|=
setup_sigcontext
(
&
frame
->
sc
,
&
frame
->
aux
,
regs
,
set
->
sig
[
0
]);
if
(
_NSIG_WORDS
>
1
)
{
err
|=
__copy_to_user
(
frame
->
extramask
,
&
set
->
sig
[
1
],
sizeof
(
frame
->
extramask
));
}
/*
* Set uc.uc_flags to a value which sc.trap_no would never have.
*/
__put_user_error
(
0x5ac3c35a
,
&
frame
->
uc
.
uc_flags
,
err
);
err
|=
setup_sigframe
(
frame
,
regs
,
set
);
if
(
err
==
0
)
err
=
setup_return
(
regs
,
ka
,
frame
->
retcode
,
frame
,
usig
);
...
...
@@ -511,25 +473,20 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
if
(
!
frame
)
return
1
;
__put_user_error
(
&
frame
->
info
,
&
frame
->
pinfo
,
err
);
__put_user_error
(
&
frame
->
uc
,
&
frame
->
puc
,
err
);
err
|=
copy_siginfo_to_user
(
&
frame
->
info
,
info
);
__put_user_error
(
0
,
&
frame
->
uc
.
uc_flags
,
err
);
__put_user_error
(
NULL
,
&
frame
->
uc
.
uc_link
,
err
);
__put_user_error
(
0
,
&
frame
->
sig
.
uc
.
uc_flags
,
err
);
__put_user_error
(
NULL
,
&
frame
->
sig
.
uc
.
uc_link
,
err
);
memset
(
&
stack
,
0
,
sizeof
(
stack
));
stack
.
ss_sp
=
(
void
__user
*
)
current
->
sas_ss_sp
;
stack
.
ss_flags
=
sas_ss_flags
(
regs
->
ARM_sp
);
stack
.
ss_size
=
current
->
sas_ss_size
;
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_stack
,
&
stack
,
sizeof
(
stack
));
err
|=
setup_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
&
frame
->
aux
,
regs
,
set
->
sig
[
0
]);
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_sigmask
,
set
,
sizeof
(
*
set
));
err
|=
__copy_to_user
(
&
frame
->
sig
.
uc
.
uc_stack
,
&
stack
,
sizeof
(
stack
));
err
|=
setup_sigframe
(
&
frame
->
sig
,
regs
,
set
);
if
(
err
==
0
)
err
=
setup_return
(
regs
,
ka
,
frame
->
retcode
,
frame
,
usig
);
err
=
setup_return
(
regs
,
ka
,
frame
->
sig
.
retcode
,
frame
,
usig
);
if
(
err
==
0
)
{
/*
...
...
@@ -538,7 +495,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
* -- Peter Maydell <pmaydell@chiark.greenend.org.uk> 2000-12-06
*/
regs
->
ARM_r1
=
(
unsigned
long
)
&
frame
->
info
;
regs
->
ARM_r2
=
(
unsigned
long
)
&
frame
->
uc
;
regs
->
ARM_r2
=
(
unsigned
long
)
&
frame
->
sig
.
uc
;
}
return
err
;
...
...
include/asm-arm/ucontext.h
浏览文件 @
c0897856
#ifndef _ASMARM_UCONTEXT_H
#define _ASMARM_UCONTEXT_H
#include <asm/fpstate.h>
/*
* struct sigcontext only has room for the basic registers, but struct
* ucontext now has room for all registers which need to be saved and
* restored. Coprocessor registers are stored in uc_regspace. Each
* coprocessor's saved state should start with a documented 32-bit magic
* number, followed by a 32-bit word giving the coproccesor's saved size.
* uc_regspace may be expanded if necessary, although this takes some
* coordination with glibc.
*/
struct
ucontext
{
unsigned
long
uc_flags
;
struct
ucontext
*
uc_link
;
stack_t
uc_stack
;
struct
sigcontext
uc_mcontext
;
sigset_t
uc_sigmask
;
/* mask last for extensibility */
sigset_t
uc_sigmask
;
/* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
int
__unused
[
32
-
(
sizeof
(
sigset_t
)
/
sizeof
(
int
))];
/* Last for extensibility. Eight byte aligned because some
coprocessors require eight byte alignment. */
unsigned
long
uc_regspace
[
128
]
__attribute__
((
__aligned__
(
8
)));
};
#ifdef __KERNEL__
/*
* Coprocessor save state. The magic values and specific
* coprocessor's layouts are part of the userspace ABI. Each one of
* these should be a multiple of eight bytes and aligned to eight
* bytes, to prevent unpredictable padding in the signal frame.
*/
#ifdef CONFIG_IWMMXT
/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */
#define IWMMXT_MAGIC 0x12ef842a
#define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8)
struct
iwmmxt_sigframe
{
unsigned
long
magic
;
unsigned
long
size
;
struct
iwmmxt_struct
storage
;
}
__attribute__
((
__aligned__
(
8
)));
#endif
/* CONFIG_IWMMXT */
#ifdef CONFIG_VFP
#if __LINUX_ARM_ARCH__ < 6
/* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra
* word after the registers, and a word of padding at the end for
* alignment. */
#define VFP_MAGIC 0x56465001
#define VFP_STORAGE_SIZE 152
#else
#define VFP_MAGIC 0x56465002
#define VFP_STORAGE_SIZE 144
#endif
struct
vfp_sigframe
{
unsigned
long
magic
;
unsigned
long
size
;
union
vfp_state
storage
;
};
#endif
/* CONFIG_VFP */
/*
* Auxiliary signal frame. This saves stuff like FP state.
* The layout of this structure is not part of the user ABI,
* because the config options aren't. uc_regspace is really
* one of these.
*/
struct
aux_sigframe
{
#ifdef CONFIG_IWMMXT
struct
iwmmxt_sigframe
iwmmxt
;
#endif
#if 0 && defined CONFIG_VFP /* Not yet saved. */
struct vfp_sigframe vfp;
#endif
/* Something that isn't a valid magic number for any coprocessor. */
unsigned
long
end_magic
;
}
__attribute__
((
__aligned__
(
8
)));
#endif
#endif
/* !_ASMARM_UCONTEXT_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录