Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
035f901e
L
linux
项目概览
xiphi1978
/
linux
通知
2
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,发现更多精彩内容 >>
提交
035f901e
编写于
7月 05, 2017
作者:
H
Herbert Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge the crypto tree to pull in fixes for the next merge window.
上级
bcf741cb
019d62db
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
47 addition
and
43 deletion
+47
-43
crypto/asymmetric_keys/public_key.c
crypto/asymmetric_keys/public_key.c
+1
-1
crypto/drbg.c
crypto/drbg.c
+2
-3
crypto/gcm.c
crypto/gcm.c
+2
-4
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg.c
+4
-6
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi.c
+4
-6
drivers/crypto/caam/caamhash.c
drivers/crypto/caam/caamhash.c
+16
-16
drivers/crypto/caam/caampkc.c
drivers/crypto/caam/caampkc.c
+2
-2
drivers/infiniband/sw/rxe/rxe.h
drivers/infiniband/sw/rxe/rxe.h
+4
-1
fs/btrfs/hash.c
fs/btrfs/hash.c
+4
-1
fs/f2fs/f2fs.h
fs/f2fs/f2fs.h
+4
-1
lib/libcrc32c.c
lib/libcrc32c.c
+4
-2
未找到文件。
crypto/asymmetric_keys/public_key.c
浏览文件 @
035f901e
...
...
@@ -141,7 +141,7 @@ int public_key_verify_signature(const struct public_key *pkey,
* signature and returns that to us.
*/
ret
=
crypto_akcipher_verify
(
req
);
if
(
ret
==
-
EINPROGRESS
)
{
if
(
(
ret
==
-
EINPROGRESS
)
||
(
ret
==
-
EBUSY
)
)
{
wait_for_completion
(
&
compl
.
completion
);
ret
=
compl
.
err
;
}
...
...
crypto/drbg.c
浏览文件 @
035f901e
...
...
@@ -1768,9 +1768,8 @@ static int drbg_kcapi_sym_ctr(struct drbg_state *drbg,
break
;
case
-
EINPROGRESS
:
case
-
EBUSY
:
ret
=
wait_for_completion_interruptible
(
&
drbg
->
ctr_completion
);
if
(
!
ret
&&
!
drbg
->
ctr_async_err
)
{
wait_for_completion
(
&
drbg
->
ctr_completion
);
if
(
!
drbg
->
ctr_async_err
)
{
reinit_completion
(
&
drbg
->
ctr_completion
);
break
;
}
...
...
crypto/gcm.c
浏览文件 @
035f901e
...
...
@@ -152,9 +152,7 @@ static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key,
err
=
crypto_skcipher_encrypt
(
&
data
->
req
);
if
(
err
==
-
EINPROGRESS
||
err
==
-
EBUSY
)
{
err
=
wait_for_completion_interruptible
(
&
data
->
result
.
completion
);
if
(
!
err
)
wait_for_completion
(
&
data
->
result
.
completion
);
err
=
data
->
result
.
err
;
}
...
...
drivers/crypto/caam/caamalg.c
浏览文件 @
035f901e
...
...
@@ -1187,8 +1187,8 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req,
struct
crypto_aead
*
aead
=
crypto_aead_reqtfm
(
req
);
struct
caam_ctx
*
ctx
=
crypto_aead_ctx
(
aead
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
src_nents
,
mapped_src_nents
,
dst_nents
=
0
,
mapped_dst_nents
=
0
;
struct
aead_edesc
*
edesc
;
int
sec4_sg_index
,
sec4_sg_len
,
sec4_sg_bytes
;
...
...
@@ -1475,8 +1475,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request
struct
crypto_ablkcipher
*
ablkcipher
=
crypto_ablkcipher_reqtfm
(
req
);
struct
caam_ctx
*
ctx
=
crypto_ablkcipher_ctx
(
ablkcipher
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
src_nents
,
mapped_src_nents
,
dst_nents
=
0
,
mapped_dst_nents
=
0
;
struct
ablkcipher_edesc
*
edesc
;
...
...
@@ -1681,8 +1680,7 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc(
struct
crypto_ablkcipher
*
ablkcipher
=
crypto_ablkcipher_reqtfm
(
req
);
struct
caam_ctx
*
ctx
=
crypto_ablkcipher_ctx
(
ablkcipher
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
src_nents
,
mapped_src_nents
,
dst_nents
,
mapped_dst_nents
;
struct
ablkcipher_edesc
*
edesc
;
...
...
drivers/crypto/caam/caamalg_qi.c
浏览文件 @
035f901e
...
...
@@ -555,8 +555,8 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req,
struct
caam_aead_alg
*
alg
=
container_of
(
crypto_aead_alg
(
aead
),
typeof
(
*
alg
),
aead
);
struct
device
*
qidev
=
ctx
->
qidev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
src_nents
,
mapped_src_nents
,
dst_nents
=
0
,
mapped_dst_nents
=
0
;
struct
aead_edesc
*
edesc
;
dma_addr_t
qm_sg_dma
,
iv_dma
=
0
;
...
...
@@ -808,8 +808,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request
struct
crypto_ablkcipher
*
ablkcipher
=
crypto_ablkcipher_reqtfm
(
req
);
struct
caam_ctx
*
ctx
=
crypto_ablkcipher_ctx
(
ablkcipher
);
struct
device
*
qidev
=
ctx
->
qidev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
src_nents
,
mapped_src_nents
,
dst_nents
=
0
,
mapped_dst_nents
=
0
;
struct
ablkcipher_edesc
*
edesc
;
...
...
@@ -953,8 +952,7 @@ static struct ablkcipher_edesc *ablkcipher_giv_edesc_alloc(
struct
crypto_ablkcipher
*
ablkcipher
=
crypto_ablkcipher_reqtfm
(
req
);
struct
caam_ctx
*
ctx
=
crypto_ablkcipher_ctx
(
ablkcipher
);
struct
device
*
qidev
=
ctx
->
qidev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
src_nents
,
mapped_src_nents
,
dst_nents
,
mapped_dst_nents
;
struct
ablkcipher_edesc
*
edesc
;
...
...
drivers/crypto/caam/caamhash.c
浏览文件 @
035f901e
...
...
@@ -719,8 +719,8 @@ static int ahash_update_ctx(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
u8
*
buf
=
current_buf
(
state
);
int
*
buflen
=
current_buflen
(
state
);
u8
*
next_buf
=
alt_buf
(
state
);
...
...
@@ -849,8 +849,8 @@ static int ahash_final_ctx(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
buflen
=
*
current_buflen
(
state
);
u32
*
desc
;
int
sec4_sg_bytes
,
sec4_sg_src_index
;
...
...
@@ -926,8 +926,8 @@ static int ahash_finup_ctx(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
buflen
=
*
current_buflen
(
state
);
u32
*
desc
;
int
sec4_sg_src_index
;
...
...
@@ -1013,8 +1013,8 @@ static int ahash_digest(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
u32
*
desc
;
int
digestsize
=
crypto_ahash_digestsize
(
ahash
);
int
src_nents
,
mapped_nents
;
...
...
@@ -1093,8 +1093,8 @@ static int ahash_final_no_ctx(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
u8
*
buf
=
current_buf
(
state
);
int
buflen
=
*
current_buflen
(
state
);
u32
*
desc
;
...
...
@@ -1154,8 +1154,8 @@ static int ahash_update_no_ctx(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
u8
*
buf
=
current_buf
(
state
);
int
*
buflen
=
current_buflen
(
state
);
u8
*
next_buf
=
alt_buf
(
state
);
...
...
@@ -1280,8 +1280,8 @@ static int ahash_finup_no_ctx(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
buflen
=
*
current_buflen
(
state
);
u32
*
desc
;
int
sec4_sg_bytes
,
sec4_sg_src_index
,
src_nents
,
mapped_nents
;
...
...
@@ -1370,8 +1370,8 @@ static int ahash_update_first(struct ahash_request *req)
struct
caam_hash_ctx
*
ctx
=
crypto_ahash_ctx
(
ahash
);
struct
caam_hash_state
*
state
=
ahash_request_ctx
(
req
);
struct
device
*
jrdev
=
ctx
->
jrdev
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
u8
*
next_buf
=
alt_buf
(
state
);
int
*
next_buflen
=
alt_buflen
(
state
);
int
to_hash
;
...
...
drivers/crypto/caam/caampkc.c
浏览文件 @
035f901e
...
...
@@ -173,8 +173,8 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
struct
caam_rsa_ctx
*
ctx
=
akcipher_tfm_ctx
(
tfm
);
struct
device
*
dev
=
ctx
->
dev
;
struct
rsa_edesc
*
edesc
;
gfp_t
flags
=
(
req
->
base
.
flags
&
(
CRYPTO_TFM_REQ_MAY_BACKLOG
|
CRYPTO_TFM_REQ_MAY_SLEEP
))
?
GFP_KERNEL
:
GFP_ATOMIC
;
gfp_t
flags
=
(
req
->
base
.
flags
&
CRYPTO_TFM_REQ_MAY_SLEEP
)
?
GFP_KERNEL
:
GFP_ATOMIC
;
int
sgc
;
int
sec4_sg_index
,
sec4_sg_len
=
0
,
sec4_sg_bytes
;
int
src_nents
,
dst_nents
;
...
...
drivers/infiniband/sw/rxe/rxe.h
浏览文件 @
035f901e
...
...
@@ -68,6 +68,7 @@
static
inline
u32
rxe_crc32
(
struct
rxe_dev
*
rxe
,
u32
crc
,
void
*
next
,
size_t
len
)
{
u32
retval
;
int
err
;
SHASH_DESC_ON_STACK
(
shash
,
rxe
->
tfm
);
...
...
@@ -81,7 +82,9 @@ static inline u32 rxe_crc32(struct rxe_dev *rxe,
return
crc32_le
(
crc
,
next
,
len
);
}
return
*
(
u32
*
)
shash_desc_ctx
(
shash
);
retval
=
*
(
u32
*
)
shash_desc_ctx
(
shash
);
barrier_data
(
shash_desc_ctx
(
shash
));
return
retval
;
}
int
rxe_set_mtu
(
struct
rxe_dev
*
rxe
,
unsigned
int
dev_mtu
);
...
...
fs/btrfs/hash.c
浏览文件 @
035f901e
...
...
@@ -38,6 +38,7 @@ u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length)
{
SHASH_DESC_ON_STACK
(
shash
,
tfm
);
u32
*
ctx
=
(
u32
*
)
shash_desc_ctx
(
shash
);
u32
retval
;
int
err
;
shash
->
tfm
=
tfm
;
...
...
@@ -47,5 +48,7 @@ u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length)
err
=
crypto_shash_update
(
shash
,
address
,
length
);
BUG_ON
(
err
);
return
*
ctx
;
retval
=
*
ctx
;
barrier_data
(
ctx
);
return
retval
;
}
fs/f2fs/f2fs.h
浏览文件 @
035f901e
...
...
@@ -1078,6 +1078,7 @@ static inline u32 f2fs_crc32(struct f2fs_sb_info *sbi, const void *address,
{
SHASH_DESC_ON_STACK
(
shash
,
sbi
->
s_chksum_driver
);
u32
*
ctx
=
(
u32
*
)
shash_desc_ctx
(
shash
);
u32
retval
;
int
err
;
shash
->
tfm
=
sbi
->
s_chksum_driver
;
...
...
@@ -1087,7 +1088,9 @@ static inline u32 f2fs_crc32(struct f2fs_sb_info *sbi, const void *address,
err
=
crypto_shash_update
(
shash
,
address
,
length
);
BUG_ON
(
err
);
return
*
ctx
;
retval
=
*
ctx
;
barrier_data
(
ctx
);
return
retval
;
}
static
inline
bool
f2fs_crc_valid
(
struct
f2fs_sb_info
*
sbi
,
__u32
blk_crc
,
...
...
lib/libcrc32c.c
浏览文件 @
035f901e
...
...
@@ -43,7 +43,7 @@ static struct crypto_shash *tfm;
u32
crc32c
(
u32
crc
,
const
void
*
address
,
unsigned
int
length
)
{
SHASH_DESC_ON_STACK
(
shash
,
tfm
);
u32
*
ctx
=
(
u32
*
)
shash_desc_ctx
(
shash
);
u32
ret
,
*
ctx
=
(
u32
*
)
shash_desc_ctx
(
shash
);
int
err
;
shash
->
tfm
=
tfm
;
...
...
@@ -53,7 +53,9 @@ u32 crc32c(u32 crc, const void *address, unsigned int length)
err
=
crypto_shash_update
(
shash
,
address
,
length
);
BUG_ON
(
err
);
return
*
ctx
;
ret
=
*
ctx
;
barrier_data
(
ctx
);
return
ret
;
}
EXPORT_SYMBOL
(
crc32c
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录