Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6e26aab9
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6e26aab9
编写于
12月 23, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
parisc: switch to generic sigaltstack
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
0aa0203f
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
6 addition
and
97 deletion
+6
-97
arch/parisc/Kconfig
arch/parisc/Kconfig
+1
-0
arch/parisc/kernel/entry.S
arch/parisc/kernel/entry.S
+0
-38
arch/parisc/kernel/signal.c
arch/parisc/kernel/signal.c
+4
-15
arch/parisc/kernel/signal32.c
arch/parisc/kernel/signal32.c
+0
-35
arch/parisc/kernel/signal32.h
arch/parisc/kernel/signal32.h
+0
-8
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/syscall_table.S
+1
-1
未找到文件。
arch/parisc/Kconfig
浏览文件 @
6e26aab9
...
...
@@ -23,6 +23,7 @@ config PARISC
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_RELA
select CLONE_BACKWARDS
select GENERIC_SIGALTSTACK
help
The PA-RISC microprocessor is designed by Hewlett-Packard and used
...
...
arch/parisc/kernel/entry.S
浏览文件 @
6e26aab9
...
...
@@ -1748,44 +1748,6 @@ ENTRY(sys_rt_sigreturn_wrapper)
LDREG
PT_GR28
(%
r1
),%
r28
/*
reload
original
r28
for
syscall_exit
*/
ENDPROC
(
sys_rt_sigreturn_wrapper
)
ENTRY
(
sys_sigaltstack_wrapper
)
/
*
Get
the
user
stack
pointer
*/
LDREG
TI_TASK
-
THREAD_SZ_ALGN
-
FRAME_SIZE
(%
r30
),%
r1
ldo
TASK_REGS
(%
r1
),%
r24
/*
get
pt
regs
*/
LDREG
TASK_PT_GR30
(%
r24
),%
r24
STREG
%
r2
,
-
RP_OFFSET
(%
r30
)
#ifdef CONFIG_64BIT
ldo
FRAME_SIZE
(%
r30
),
%
r30
BL
do_sigaltstack
,%
r2
ldo
-
16
(%
r30
),%
r29
/*
Reference
param
save
area
*/
#else
BL
do_sigaltstack
,%
r2
ldo
FRAME_SIZE
(%
r30
),
%
r30
#endif
ldo
-
FRAME_SIZE
(%
r30
),
%
r30
LDREG
-
RP_OFFSET
(%
r30
),
%
r2
bv
%
r0
(%
r2
)
nop
ENDPROC
(
sys_sigaltstack_wrapper
)
#ifdef CONFIG_64BIT
ENTRY
(
sys32_sigaltstack_wrapper
)
/
*
Get
the
user
stack
pointer
*/
LDREG
TI_TASK
-
THREAD_SZ_ALGN
-
FRAME_SIZE
(%
r30
),%
r24
LDREG
TASK_PT_GR30
(%
r24
),%
r24
STREG
%
r2
,
-
RP_OFFSET
(%
r30
)
ldo
FRAME_SIZE
(%
r30
),
%
r30
BL
do_sigaltstack32
,%
r2
ldo
-
16
(%
r30
),%
r29
/*
Reference
param
save
area
*/
ldo
-
FRAME_SIZE
(%
r30
),
%
r30
LDREG
-
RP_OFFSET
(%
r30
),
%
r2
bv
%
r0
(%
r2
)
nop
ENDPROC
(
sys32_sigaltstack_wrapper
)
#endif
ENTRY
(
syscall_exit
)
/
*
NOTE
:
HP
-
UX
syscalls
also
come
through
here
*
after
hpux_syscall_exit
fixes
up
return
...
...
arch/parisc/kernel/signal.c
浏览文件 @
6e26aab9
...
...
@@ -143,7 +143,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
goto
give_sigsegv
;
DBG
(
1
,
"sys_rt_sigreturn: usp %#08lx stack 0x%p
\n
"
,
usp
,
&
compat_frame
->
uc
.
uc_stack
);
if
(
do_sigaltstack32
(
&
compat_frame
->
uc
.
uc_stack
,
NULL
,
usp
)
==
-
EFAULT
)
if
(
compat_restore_altstack
(
&
compat_frame
->
uc
.
uc_stack
)
)
goto
give_sigsegv
;
}
else
#endif
...
...
@@ -154,7 +154,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
goto
give_sigsegv
;
DBG
(
1
,
"sys_rt_sigreturn: usp %#08lx stack 0x%p
\n
"
,
usp
,
&
frame
->
uc
.
uc_stack
);
if
(
do_sigaltstack
(
&
frame
->
uc
.
uc_stack
,
NULL
,
usp
)
==
-
EFAULT
)
if
(
restore_altstack
(
&
frame
->
uc
.
uc_stack
)
)
goto
give_sigsegv
;
}
...
...
@@ -260,15 +260,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
if
(
is_compat_task
())
{
DBG
(
1
,
"setup_rt_frame: frame->info = 0x%p
\n
"
,
&
compat_frame
->
info
);
err
|=
copy_siginfo_to_user32
(
&
compat_frame
->
info
,
info
);
DBG
(
1
,
"SETUP_RT_FRAME: 1
\n
"
);
compat_val
=
(
compat_int_t
)
current
->
sas_ss_sp
;
err
|=
__put_user
(
compat_val
,
&
compat_frame
->
uc
.
uc_stack
.
ss_sp
);
DBG
(
1
,
"SETUP_RT_FRAME: 2
\n
"
);
compat_val
=
(
compat_int_t
)
current
->
sas_ss_size
;
err
|=
__put_user
(
compat_val
,
&
compat_frame
->
uc
.
uc_stack
.
ss_size
);
DBG
(
1
,
"SETUP_RT_FRAME: 3
\n
"
);
compat_val
=
sas_ss_flags
(
regs
->
gr
[
30
]);
err
|=
__put_user
(
compat_val
,
&
compat_frame
->
uc
.
uc_stack
.
ss_flags
);
err
|=
__compat_save_altstack
(
&
compat_frame
->
uc
.
uc_stack
,
regs
->
gr
[
30
]);
DBG
(
1
,
"setup_rt_frame: frame->uc = 0x%p
\n
"
,
&
compat_frame
->
uc
);
DBG
(
1
,
"setup_rt_frame: frame->uc.uc_mcontext = 0x%p
\n
"
,
&
compat_frame
->
uc
.
uc_mcontext
);
err
|=
setup_sigcontext32
(
&
compat_frame
->
uc
.
uc_mcontext
,
...
...
@@ -280,10 +272,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
{
DBG
(
1
,
"setup_rt_frame: frame->info = 0x%p
\n
"
,
&
frame
->
info
);
err
|=
copy_siginfo_to_user
(
&
frame
->
info
,
info
);
err
|=
__put_user
(
current
->
sas_ss_sp
,
&
frame
->
uc
.
uc_stack
.
ss_sp
);
err
|=
__put_user
(
current
->
sas_ss_size
,
&
frame
->
uc
.
uc_stack
.
ss_size
);
err
|=
__put_user
(
sas_ss_flags
(
regs
->
gr
[
30
]),
&
frame
->
uc
.
uc_stack
.
ss_flags
);
err
|=
__save_altstack
(
&
frame
->
uc
.
uc_stack
,
regs
->
gr
[
30
]);
DBG
(
1
,
"setup_rt_frame: frame->uc = 0x%p
\n
"
,
&
frame
->
uc
);
DBG
(
1
,
"setup_rt_frame: frame->uc.uc_mcontext = 0x%p
\n
"
,
&
frame
->
uc
.
uc_mcontext
);
err
|=
setup_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
regs
,
in_syscall
);
...
...
arch/parisc/kernel/signal32.c
浏览文件 @
6e26aab9
...
...
@@ -148,41 +148,6 @@ sys32_rt_sigaction(int sig, const struct sigaction32 __user *act, struct sigacti
return
ret
;
}
int
do_sigaltstack32
(
const
compat_stack_t
__user
*
uss32
,
compat_stack_t
__user
*
uoss32
,
unsigned
long
sp
)
{
compat_stack_t
ss32
,
oss32
;
stack_t
ss
,
oss
;
stack_t
*
ssp
=
NULL
,
*
ossp
=
NULL
;
int
ret
;
if
(
uss32
)
{
if
(
copy_from_user
(
&
ss32
,
uss32
,
sizeof
ss32
))
return
-
EFAULT
;
ss
.
ss_sp
=
(
void
__user
*
)(
unsigned
long
)
ss32
.
ss_sp
;
ss
.
ss_flags
=
ss32
.
ss_flags
;
ss
.
ss_size
=
ss32
.
ss_size
;
ssp
=
&
ss
;
}
if
(
uoss32
)
ossp
=
&
oss
;
KERNEL_SYSCALL
(
ret
,
do_sigaltstack
,
(
const
stack_t
__user
*
)
ssp
,
(
stack_t
__user
*
)
ossp
,
sp
);
if
(
!
ret
&&
uoss32
)
{
oss32
.
ss_sp
=
(
unsigned
int
)(
unsigned
long
)
oss
.
ss_sp
;
oss32
.
ss_flags
=
oss
.
ss_flags
;
oss32
.
ss_size
=
oss
.
ss_size
;
if
(
copy_to_user
(
uoss32
,
&
oss32
,
sizeof
*
uoss32
))
return
-
EFAULT
;
}
return
ret
;
}
long
restore_sigcontext32
(
struct
compat_sigcontext
__user
*
sc
,
struct
compat_regfile
__user
*
rf
,
struct
pt_regs
*
regs
)
...
...
arch/parisc/kernel/signal32.h
浏览文件 @
6e26aab9
...
...
@@ -23,12 +23,6 @@
typedef
compat_uptr_t
compat_sighandler_t
;
typedef
struct
compat_sigaltstack
{
compat_uptr_t
ss_sp
;
compat_int_t
ss_flags
;
compat_size_t
ss_size
;
}
compat_stack_t
;
/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */
...
...
@@ -102,8 +96,6 @@ struct compat_rt_sigframe {
void
sigset_32to64
(
sigset_t
*
s64
,
compat_sigset_t
*
s32
);
void
sigset_64to32
(
compat_sigset_t
*
s32
,
sigset_t
*
s64
);
int
do_sigaltstack32
(
const
compat_stack_t
__user
*
uss32
,
compat_stack_t
__user
*
uoss32
,
unsigned
long
sp
);
long
restore_sigcontext32
(
struct
compat_sigcontext
__user
*
sc
,
struct
compat_regfile
__user
*
rf
,
struct
pt_regs
*
regs
);
...
...
arch/parisc/kernel/syscall_table.S
浏览文件 @
6e26aab9
...
...
@@ -255,7 +255,7 @@
ENTRY_SAME
(
mremap
)
ENTRY_SAME
(
setresuid
)
ENTRY_SAME
(
getresuid
)
/*
165
*/
ENTRY_
DIFF
(
sigaltstack_wrapper
)
ENTRY_
COMP
(
sigaltstack
)
ENTRY_SAME
(
ni_syscall
)
/*
query_module
*/
ENTRY_SAME
(
poll
)
/
*
structs
contain
pointers
and
an
in_addr
...
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录