Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
70c70d97
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
70c70d97
编写于
8月 26, 2010
作者:
N
Nicolas Pitre
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: SECCOMP support
Signed-off-by:
N
Nicolas Pitre
<
nicolas.pitre@linaro.org
>
上级
087aaffc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
40 addition
and
2 deletion
+40
-2
arch/arm/Kconfig
arch/arm/Kconfig
+14
-0
arch/arm/include/asm/seccomp.h
arch/arm/include/asm/seccomp.h
+11
-0
arch/arm/include/asm/thread_info.h
arch/arm/include/asm/thread_info.h
+2
-0
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-common.S
+13
-2
未找到文件。
arch/arm/Kconfig
浏览文件 @
70c70d97
...
...
@@ -1463,6 +1463,20 @@ config UACCESS_WITH_MEMCPY
However, if the CPU data cache is using a write-allocate mode,
this option is unlikely to provide any performance gain.
config SECCOMP
bool
prompt "Enable seccomp to safely compute untrusted bytecode"
---help---
This kernel feature is useful for number crunching applications
that may need to compute untrusted bytecode during their
execution. By using pipes or other transports made available to
the process as file descriptors supporting the read/write
syscalls, it's possible to isolate those applications in
their own address space using seccomp. Once seccomp is
enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
and the task is only allowed to execute a few safe syscalls
defined by each seccomp mode.
config CC_STACKPROTECTOR
bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
help
...
...
arch/arm/include/asm/seccomp.h
0 → 100644
浏览文件 @
70c70d97
#ifndef _ASM_ARM_SECCOMP_H
#define _ASM_ARM_SECCOMP_H
#include <linux/unistd.h>
#define __NR_seccomp_read __NR_read
#define __NR_seccomp_write __NR_write
#define __NR_seccomp_exit __NR_exit
#define __NR_seccomp_sigreturn __NR_rt_sigreturn
#endif
/* _ASM_ARM_SECCOMP_H */
arch/arm/include/asm/thread_info.h
浏览文件 @
70c70d97
...
...
@@ -144,6 +144,7 @@ extern void vfp_flush_hwstate(struct thread_info *);
#define TIF_MEMDIE 18
/* is terminating due to OOM killer */
#define TIF_FREEZE 19
#define TIF_RESTORE_SIGMASK 20
#define TIF_SECCOMP 21
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
...
...
@@ -153,6 +154,7 @@ extern void vfp_flush_hwstate(struct thread_info *);
#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
#define _TIF_FREEZE (1 << TIF_FREEZE)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_SECCOMP (1 << TIF_SECCOMP)
/*
* Change these and you break ASM code in entry-common.S
...
...
arch/arm/kernel/entry-common.S
浏览文件 @
70c70d97
...
...
@@ -295,7 +295,6 @@ ENTRY(vector_swi)
get_thread_info
tsk
adr
tbl
,
sys_call_table
@
load
syscall
table
pointer
ldr
ip
,
[
tsk
,
#
TI_FLAGS
]
@
check
for
syscall
tracing
#if defined(CONFIG_OABI_COMPAT)
/
*
...
...
@@ -312,8 +311,20 @@ ENTRY(vector_swi)
eor
scno
,
scno
,
#
__NR_SYSCALL_BASE
@
check
OS
number
#endif
ldr
r10
,
[
tsk
,
#
TI_FLAGS
]
@
check
for
syscall
tracing
stmdb
sp
!,
{
r4
,
r5
}
@
push
fifth
and
sixth
args
tst
ip
,
#
_TIF_SYSCALL_TRACE
@
are
we
tracing
syscalls
?
#ifdef CONFIG_SECCOMP
tst
r10
,
#
_TIF_SECCOMP
beq
1
f
mov
r0
,
scno
bl
__secure_computing
add
r0
,
sp
,
#
S_R0
+
S_OFF
@
pointer
to
regs
ldmia
r0
,
{
r0
-
r3
}
@
have
to
reload
r0
-
r3
1
:
#endif
tst
r10
,
#
_TIF_SYSCALL_TRACE
@
are
we
tracing
syscalls
?
bne
__sys_trace
cmp
scno
,
#
NR_syscalls
@
check
upper
syscall
limit
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录