Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
78c2f0b8
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看板
提交
78c2f0b8
编写于
10月 22, 2007
作者:
J
Jens Axboe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[SG] Update crypto/ to sg helpers
Signed-off-by:
N
Jens Axboe
<
jens.axboe@oracle.com
>
上级
9b61764b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
10 addition
and
9 deletion
+10
-9
crypto/digest.c
crypto/digest.c
+1
-1
crypto/hmac.c
crypto/hmac.c
+2
-1
crypto/scatterwalk.c
crypto/scatterwalk.c
+1
-1
crypto/scatterwalk.h
crypto/scatterwalk.h
+3
-3
crypto/tcrypt.c
crypto/tcrypt.c
+2
-2
crypto/xcbc.c
crypto/xcbc.c
+1
-1
未找到文件。
crypto/digest.c
浏览文件 @
78c2f0b8
...
@@ -41,7 +41,7 @@ static int update2(struct hash_desc *desc,
...
@@ -41,7 +41,7 @@ static int update2(struct hash_desc *desc,
return
0
;
return
0
;
for
(;;)
{
for
(;;)
{
struct
page
*
pg
=
sg
->
page
;
struct
page
*
pg
=
sg
_page
(
sg
)
;
unsigned
int
offset
=
sg
->
offset
;
unsigned
int
offset
=
sg
->
offset
;
unsigned
int
l
=
sg
->
length
;
unsigned
int
l
=
sg
->
length
;
...
...
crypto/hmac.c
浏览文件 @
78c2f0b8
...
@@ -159,7 +159,8 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
...
@@ -159,7 +159,8 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
desc
.
flags
=
pdesc
->
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
;
desc
.
flags
=
pdesc
->
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
;
sg_set_buf
(
sg1
,
ipad
,
bs
);
sg_set_buf
(
sg1
,
ipad
,
bs
);
sg1
[
1
].
page
=
(
void
*
)
sg
;
sg_set_page
(
&
sg
[
1
],
(
void
*
)
sg
);
sg1
[
1
].
length
=
0
;
sg1
[
1
].
length
=
0
;
sg_set_buf
(
sg2
,
opad
,
bs
+
ds
);
sg_set_buf
(
sg2
,
opad
,
bs
+
ds
);
...
...
crypto/scatterwalk.c
浏览文件 @
78c2f0b8
...
@@ -54,7 +54,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
...
@@ -54,7 +54,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
if
(
out
)
{
if
(
out
)
{
struct
page
*
page
;
struct
page
*
page
;
page
=
walk
->
sg
->
page
+
((
walk
->
offset
-
1
)
>>
PAGE_SHIFT
);
page
=
sg_page
(
walk
->
sg
)
+
((
walk
->
offset
-
1
)
>>
PAGE_SHIFT
);
flush_dcache_page
(
page
);
flush_dcache_page
(
page
);
}
}
...
...
crypto/scatterwalk.h
浏览文件 @
78c2f0b8
...
@@ -22,13 +22,13 @@
...
@@ -22,13 +22,13 @@
static
inline
struct
scatterlist
*
scatterwalk_sg_next
(
struct
scatterlist
*
sg
)
static
inline
struct
scatterlist
*
scatterwalk_sg_next
(
struct
scatterlist
*
sg
)
{
{
return
(
++
sg
)
->
length
?
sg
:
(
void
*
)
sg
->
page
;
return
(
++
sg
)
->
length
?
sg
:
(
void
*
)
sg_page
(
sg
)
;
}
}
static
inline
unsigned
long
scatterwalk_samebuf
(
struct
scatter_walk
*
walk_in
,
static
inline
unsigned
long
scatterwalk_samebuf
(
struct
scatter_walk
*
walk_in
,
struct
scatter_walk
*
walk_out
)
struct
scatter_walk
*
walk_out
)
{
{
return
!
(((
walk_in
->
sg
->
page
-
walk_out
->
sg
->
page
)
<<
PAGE_SHIFT
)
+
return
!
(((
sg_page
(
walk_in
->
sg
)
-
sg_page
(
walk_out
->
sg
)
)
<<
PAGE_SHIFT
)
+
(
int
)(
walk_in
->
offset
-
walk_out
->
offset
));
(
int
)(
walk_in
->
offset
-
walk_out
->
offset
));
}
}
...
@@ -60,7 +60,7 @@ static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk,
...
@@ -60,7 +60,7 @@ static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk,
static
inline
struct
page
*
scatterwalk_page
(
struct
scatter_walk
*
walk
)
static
inline
struct
page
*
scatterwalk_page
(
struct
scatter_walk
*
walk
)
{
{
return
walk
->
sg
->
page
+
(
walk
->
offset
>>
PAGE_SHIFT
);
return
sg_page
(
walk
->
sg
)
+
(
walk
->
offset
>>
PAGE_SHIFT
);
}
}
static
inline
void
scatterwalk_unmap
(
void
*
vaddr
,
int
out
)
static
inline
void
scatterwalk_unmap
(
void
*
vaddr
,
int
out
)
...
...
crypto/tcrypt.c
浏览文件 @
78c2f0b8
...
@@ -317,7 +317,7 @@ static void test_cipher(char *algo, int enc,
...
@@ -317,7 +317,7 @@ static void test_cipher(char *algo, int enc,
goto
out
;
goto
out
;
}
}
q
=
kmap
(
sg
[
0
].
page
)
+
sg
[
0
].
offset
;
q
=
kmap
(
sg
_page
(
&
sg
[
0
])
)
+
sg
[
0
].
offset
;
hexdump
(
q
,
cipher_tv
[
i
].
rlen
);
hexdump
(
q
,
cipher_tv
[
i
].
rlen
);
printk
(
"%s
\n
"
,
printk
(
"%s
\n
"
,
...
@@ -390,7 +390,7 @@ static void test_cipher(char *algo, int enc,
...
@@ -390,7 +390,7 @@ static void test_cipher(char *algo, int enc,
temp
=
0
;
temp
=
0
;
for
(
k
=
0
;
k
<
cipher_tv
[
i
].
np
;
k
++
)
{
for
(
k
=
0
;
k
<
cipher_tv
[
i
].
np
;
k
++
)
{
printk
(
"page %u
\n
"
,
k
);
printk
(
"page %u
\n
"
,
k
);
q
=
kmap
(
sg
[
k
].
page
)
+
sg
[
k
].
offset
;
q
=
kmap
(
sg
_page
(
&
sg
[
k
])
)
+
sg
[
k
].
offset
;
hexdump
(
q
,
cipher_tv
[
i
].
tap
[
k
]);
hexdump
(
q
,
cipher_tv
[
i
].
tap
[
k
]);
printk
(
"%s
\n
"
,
printk
(
"%s
\n
"
,
memcmp
(
q
,
cipher_tv
[
i
].
result
+
temp
,
memcmp
(
q
,
cipher_tv
[
i
].
result
+
temp
,
...
...
crypto/xcbc.c
浏览文件 @
78c2f0b8
...
@@ -120,7 +120,7 @@ static int crypto_xcbc_digest_update2(struct hash_desc *pdesc,
...
@@ -120,7 +120,7 @@ static int crypto_xcbc_digest_update2(struct hash_desc *pdesc,
do
{
do
{
struct
page
*
pg
=
sg
[
i
].
page
;
struct
page
*
pg
=
sg
_page
(
&
sg
[
i
])
;
unsigned
int
offset
=
sg
[
i
].
offset
;
unsigned
int
offset
=
sg
[
i
].
offset
;
unsigned
int
slen
=
sg
[
i
].
length
;
unsigned
int
slen
=
sg
[
i
].
length
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录