Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
739674fb
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
739674fb
编写于
6月 26, 2009
作者:
J
Jan Engelhardt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
netfilter: xtables: constify args in compat copying functions
Signed-off-by:
N
Jan Engelhardt
<
jengelh@medozas.de
>
上级
b402405d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
22 addition
and
22 deletion
+22
-22
include/linux/netfilter/x_tables.h
include/linux/netfilter/x_tables.h
+6
-6
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/arp_tables.c
+2
-2
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ip_tables.c
+2
-2
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/netfilter/ipt_ULOG.c
+2
-2
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6_tables.c
+2
-2
net/netfilter/x_tables.c
net/netfilter/x_tables.c
+4
-4
net/netfilter/xt_hashlimit.c
net/netfilter/xt_hashlimit.c
+2
-2
net/netfilter/xt_limit.c
net/netfilter/xt_limit.c
+2
-2
未找到文件。
include/linux/netfilter/x_tables.h
浏览文件 @
739674fb
...
...
@@ -286,8 +286,8 @@ struct xt_match {
void
(
*
destroy
)(
const
struct
xt_mtdtor_param
*
);
#ifdef CONFIG_COMPAT
/* Called when userspace align differs from kernel space one */
void
(
*
compat_from_user
)(
void
*
dst
,
void
*
src
);
int
(
*
compat_to_user
)(
void
__user
*
dst
,
void
*
src
);
void
(
*
compat_from_user
)(
void
*
dst
,
const
void
*
src
);
int
(
*
compat_to_user
)(
void
__user
*
dst
,
const
void
*
src
);
#endif
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct
module
*
me
;
...
...
@@ -328,8 +328,8 @@ struct xt_target {
void
(
*
destroy
)(
const
struct
xt_tgdtor_param
*
);
#ifdef CONFIG_COMPAT
/* Called when userspace align differs from kernel space one */
void
(
*
compat_from_user
)(
void
*
dst
,
void
*
src
);
int
(
*
compat_to_user
)(
void
__user
*
dst
,
void
*
src
);
void
(
*
compat_from_user
)(
void
*
dst
,
const
void
*
src
);
int
(
*
compat_to_user
)(
void
__user
*
dst
,
const
void
*
src
);
#endif
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct
module
*
me
;
...
...
@@ -593,13 +593,13 @@ extern short xt_compat_calc_jump(u_int8_t af, unsigned int offset);
extern
int
xt_compat_match_offset
(
const
struct
xt_match
*
match
);
extern
int
xt_compat_match_from_user
(
struct
xt_entry_match
*
m
,
void
**
dstptr
,
unsigned
int
*
size
);
extern
int
xt_compat_match_to_user
(
struct
xt_entry_match
*
m
,
extern
int
xt_compat_match_to_user
(
const
struct
xt_entry_match
*
m
,
void
__user
**
dstptr
,
unsigned
int
*
size
);
extern
int
xt_compat_target_offset
(
const
struct
xt_target
*
target
);
extern
void
xt_compat_target_from_user
(
struct
xt_entry_target
*
t
,
void
**
dstptr
,
unsigned
int
*
size
);
extern
int
xt_compat_target_to_user
(
struct
xt_entry_target
*
t
,
extern
int
xt_compat_target_to_user
(
const
struct
xt_entry_target
*
t
,
void
__user
**
dstptr
,
unsigned
int
*
size
);
#endif
/* CONFIG_COMPAT */
...
...
net/ipv4/netfilter/arp_tables.c
浏览文件 @
739674fb
...
...
@@ -842,7 +842,7 @@ static int copy_entries_to_user(unsigned int total_size,
}
#ifdef CONFIG_COMPAT
static
void
compat_standard_from_user
(
void
*
dst
,
void
*
src
)
static
void
compat_standard_from_user
(
void
*
dst
,
const
void
*
src
)
{
int
v
=
*
(
compat_int_t
*
)
src
;
...
...
@@ -851,7 +851,7 @@ static void compat_standard_from_user(void *dst, void *src)
memcpy
(
dst
,
&
v
,
sizeof
(
v
));
}
static
int
compat_standard_to_user
(
void
__user
*
dst
,
void
*
src
)
static
int
compat_standard_to_user
(
void
__user
*
dst
,
const
void
*
src
)
{
compat_int_t
cv
=
*
(
int
*
)
src
;
...
...
net/ipv4/netfilter/ip_tables.c
浏览文件 @
739674fb
...
...
@@ -1047,7 +1047,7 @@ copy_entries_to_user(unsigned int total_size,
}
#ifdef CONFIG_COMPAT
static
void
compat_standard_from_user
(
void
*
dst
,
void
*
src
)
static
void
compat_standard_from_user
(
void
*
dst
,
const
void
*
src
)
{
int
v
=
*
(
compat_int_t
*
)
src
;
...
...
@@ -1056,7 +1056,7 @@ static void compat_standard_from_user(void *dst, void *src)
memcpy
(
dst
,
&
v
,
sizeof
(
v
));
}
static
int
compat_standard_to_user
(
void
__user
*
dst
,
void
*
src
)
static
int
compat_standard_to_user
(
void
__user
*
dst
,
const
void
*
src
)
{
compat_int_t
cv
=
*
(
int
*
)
src
;
...
...
net/ipv4/netfilter/ipt_ULOG.c
浏览文件 @
739674fb
...
...
@@ -338,7 +338,7 @@ struct compat_ipt_ulog_info {
char
prefix
[
ULOG_PREFIX_LEN
];
};
static
void
ulog_tg_compat_from_user
(
void
*
dst
,
void
*
src
)
static
void
ulog_tg_compat_from_user
(
void
*
dst
,
const
void
*
src
)
{
const
struct
compat_ipt_ulog_info
*
cl
=
src
;
struct
ipt_ulog_info
l
=
{
...
...
@@ -351,7 +351,7 @@ static void ulog_tg_compat_from_user(void *dst, void *src)
memcpy
(
dst
,
&
l
,
sizeof
(
l
));
}
static
int
ulog_tg_compat_to_user
(
void
__user
*
dst
,
void
*
src
)
static
int
ulog_tg_compat_to_user
(
void
__user
*
dst
,
const
void
*
src
)
{
const
struct
ipt_ulog_info
*
l
=
src
;
struct
compat_ipt_ulog_info
cl
=
{
...
...
net/ipv6/netfilter/ip6_tables.c
浏览文件 @
739674fb
...
...
@@ -1079,7 +1079,7 @@ copy_entries_to_user(unsigned int total_size,
}
#ifdef CONFIG_COMPAT
static
void
compat_standard_from_user
(
void
*
dst
,
void
*
src
)
static
void
compat_standard_from_user
(
void
*
dst
,
const
void
*
src
)
{
int
v
=
*
(
compat_int_t
*
)
src
;
...
...
@@ -1088,7 +1088,7 @@ static void compat_standard_from_user(void *dst, void *src)
memcpy
(
dst
,
&
v
,
sizeof
(
v
));
}
static
int
compat_standard_to_user
(
void
__user
*
dst
,
void
*
src
)
static
int
compat_standard_to_user
(
void
__user
*
dst
,
const
void
*
src
)
{
compat_int_t
cv
=
*
(
int
*
)
src
;
...
...
net/netfilter/x_tables.c
浏览文件 @
739674fb
...
...
@@ -485,8 +485,8 @@ int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
}
EXPORT_SYMBOL_GPL
(
xt_compat_match_from_user
);
int
xt_compat_match_to_user
(
struct
xt_entry_match
*
m
,
void
__user
**
dstptr
,
unsigned
int
*
size
)
int
xt_compat_match_to_user
(
const
struct
xt_entry_match
*
m
,
void
__user
**
dstptr
,
unsigned
int
*
size
)
{
const
struct
xt_match
*
match
=
m
->
u
.
kernel
.
match
;
struct
compat_xt_entry_match
__user
*
cm
=
*
dstptr
;
...
...
@@ -588,8 +588,8 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
}
EXPORT_SYMBOL_GPL
(
xt_compat_target_from_user
);
int
xt_compat_target_to_user
(
struct
xt_entry_target
*
t
,
void
__user
**
dstptr
,
unsigned
int
*
size
)
int
xt_compat_target_to_user
(
const
struct
xt_entry_target
*
t
,
void
__user
**
dstptr
,
unsigned
int
*
size
)
{
const
struct
xt_target
*
target
=
t
->
u
.
kernel
.
target
;
struct
compat_xt_entry_target
__user
*
ct
=
*
dstptr
;
...
...
net/netfilter/xt_hashlimit.c
浏览文件 @
739674fb
...
...
@@ -775,7 +775,7 @@ struct compat_xt_hashlimit_info {
compat_uptr_t
master
;
};
static
void
hashlimit_mt_compat_from_user
(
void
*
dst
,
void
*
src
)
static
void
hashlimit_mt_compat_from_user
(
void
*
dst
,
const
void
*
src
)
{
int
off
=
offsetof
(
struct
compat_xt_hashlimit_info
,
hinfo
);
...
...
@@ -783,7 +783,7 @@ static void hashlimit_mt_compat_from_user(void *dst, void *src)
memset
(
dst
+
off
,
0
,
sizeof
(
struct
compat_xt_hashlimit_info
)
-
off
);
}
static
int
hashlimit_mt_compat_to_user
(
void
__user
*
dst
,
void
*
src
)
static
int
hashlimit_mt_compat_to_user
(
void
__user
*
dst
,
const
void
*
src
)
{
int
off
=
offsetof
(
struct
compat_xt_hashlimit_info
,
hinfo
);
...
...
net/netfilter/xt_limit.c
浏览文件 @
739674fb
...
...
@@ -148,7 +148,7 @@ struct compat_xt_rateinfo {
/* To keep the full "prev" timestamp, the upper 32 bits are stored in the
* master pointer, which does not need to be preserved. */
static
void
limit_mt_compat_from_user
(
void
*
dst
,
void
*
src
)
static
void
limit_mt_compat_from_user
(
void
*
dst
,
const
void
*
src
)
{
const
struct
compat_xt_rateinfo
*
cm
=
src
;
struct
xt_rateinfo
m
=
{
...
...
@@ -162,7 +162,7 @@ static void limit_mt_compat_from_user(void *dst, void *src)
memcpy
(
dst
,
&
m
,
sizeof
(
m
));
}
static
int
limit_mt_compat_to_user
(
void
__user
*
dst
,
void
*
src
)
static
int
limit_mt_compat_to_user
(
void
__user
*
dst
,
const
void
*
src
)
{
const
struct
xt_rateinfo
*
m
=
src
;
struct
compat_xt_rateinfo
cm
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录