From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [kees:kspp/cfi/x86 62/69] arch/x86/crypto/serpent_sse2_glue.c:28:13: error: conflicting types for '__serpent_encrypt'
Date: Tue, 12 Nov 2019 06:20:38 +0800 [thread overview]
Message-ID: <201911120635.qn9ZgiYt%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 9567 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/cfi/x86
head: 3baeecfdeffc3ae699b0282859a8098b376b8f05
commit: ba9c9f5af635769783d4d235b9129788f22d6418 [62/69] crypto: x86/serpent: Use new glue function macros
config: i386-randconfig-a002-201945 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
git checkout ba9c9f5af635769783d4d235b9129788f22d6418
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/crypto/serpent_sse2_glue.c:26:0:
>> arch/x86/crypto/serpent_sse2_glue.c:28:13: error: conflicting types for '__serpent_encrypt'
CRYPTO_FUNC(__serpent_encrypt);
^
arch/x86/include/asm/crypto/glue_helper.h:27:17: note: in definition of macro 'CRYPTO_FUNC'
asmlinkage void func(void *ctx, u8 *dst, const u8 *src);
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:24:0:
include/crypto/serpent.h:25:6: note: previous declaration of '__serpent_encrypt' was here
void __serpent_encrypt(void *ctx, u8 *dst, const u8 *src);
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:26:0:
>> arch/x86/crypto/serpent_sse2_glue.c:29:13: error: conflicting types for '__serpent_decrypt'
CRYPTO_FUNC(__serpent_decrypt);
^
arch/x86/include/asm/crypto/glue_helper.h:27:17: note: in definition of macro 'CRYPTO_FUNC'
asmlinkage void func(void *ctx, u8 *dst, const u8 *src);
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:24:0:
include/crypto/serpent.h:26:6: note: previous declaration of '__serpent_decrypt' was here
void __serpent_decrypt(void *ctx, u8 *dst, const u8 *src);
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:26:0:
>> arch/x86/crypto/serpent_sse2_glue.c:31:13: error: conflicting types for 'serpent_enc_blk_xway'
CRYPTO_FUNC(serpent_enc_blk_xway);
^
arch/x86/include/asm/crypto/glue_helper.h:27:17: note: in definition of macro 'CRYPTO_FUNC'
asmlinkage void func(void *ctx, u8 *dst, const u8 *src);
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:25:0:
arch/x86/include/asm/crypto/serpent-sse2.h:17:20: note: previous definition of 'serpent_enc_blk_xway' was here
static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:26:0:
>> arch/x86/crypto/serpent_sse2_glue.c:32:13: error: conflicting types for 'serpent_dec_blk_xway'
CRYPTO_FUNC(serpent_dec_blk_xway);
^
arch/x86/include/asm/crypto/glue_helper.h:27:17: note: in definition of macro 'CRYPTO_FUNC'
asmlinkage void func(void *ctx, u8 *dst, const u8 *src);
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:25:0:
arch/x86/include/asm/crypto/serpent-sse2.h:29:20: note: previous definition of 'serpent_dec_blk_xway' was here
static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
^
>> arch/x86/crypto/serpent_sse2_glue.c:88:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fn_u = { .ecb = serpent_enc_blk_xway }
^
arch/x86/crypto/serpent_sse2_glue.c:88:20: note: (near initialization for 'serpent_enc.funcs[0].fn_u.ecb')
arch/x86/crypto/serpent_sse2_glue.c:91:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fn_u = { .ecb = __serpent_encrypt }
^
arch/x86/crypto/serpent_sse2_glue.c:91:20: note: (near initialization for 'serpent_enc.funcs[1].fn_u.ecb')
arch/x86/crypto/serpent_sse2_glue.c:114:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fn_u = { .ecb = serpent_dec_blk_xway }
^
arch/x86/crypto/serpent_sse2_glue.c:114:20: note: (near initialization for 'serpent_dec.funcs[0].fn_u.ecb')
arch/x86/crypto/serpent_sse2_glue.c:117:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fn_u = { .ecb = __serpent_decrypt }
^
arch/x86/crypto/serpent_sse2_glue.c:117:20: note: (near initialization for 'serpent_dec.funcs[1].fn_u.ecb')
arch/x86/crypto/serpent_sse2_glue.c: In function 'cbc_encrypt':
>> arch/x86/crypto/serpent_sse2_glue.c:146:37: error: passing argument 1 of 'glue_cbc_encrypt_req_128bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
return glue_cbc_encrypt_req_128bit(__serpent_encrypt,
^
In file included from arch/x86/crypto/serpent_sse2_glue.c:26:0:
arch/x86/include/asm/crypto/glue_helper.h:129:12: note: expected 'common_glue_func_t {aka void (* const)(void *, unsigned char *, const unsigned char *)}' but argument is of type 'void (__attribute__((regparm(0))) *)(void *, u8 *, const u8 *)'
extern int glue_cbc_encrypt_req_128bit(const common_glue_func_t fn,
^
cc1: some warnings being treated as errors
vim +/__serpent_encrypt +28 arch/x86/crypto/serpent_sse2_glue.c
> 24 #include <crypto/serpent.h>
> 25 #include <asm/crypto/serpent-sse2.h>
> 26 #include <asm/crypto/glue_helper.h>
27
> 28 CRYPTO_FUNC(__serpent_encrypt);
> 29 CRYPTO_FUNC(__serpent_decrypt);
30 CRYPTO_FUNC_WRAP_CBC(__serpent_decrypt);
> 31 CRYPTO_FUNC(serpent_enc_blk_xway);
> 32 CRYPTO_FUNC(serpent_dec_blk_xway);
33
34 static int serpent_setkey_skcipher(struct crypto_skcipher *tfm,
35 const u8 *key, unsigned int keylen)
36 {
37 return __serpent_setkey(crypto_skcipher_ctx(tfm), key, keylen);
38 }
39
40 static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src)
41 {
42 u128 ivs[SERPENT_PARALLEL_BLOCKS - 1];
43 unsigned int j;
44
45 for (j = 0; j < SERPENT_PARALLEL_BLOCKS - 1; j++)
46 ivs[j] = src[j];
47
48 serpent_dec_blk_xway(ctx, (u8 *)dst, (u8 *)src);
49
50 for (j = 0; j < SERPENT_PARALLEL_BLOCKS - 1; j++)
51 u128_xor(dst + (j + 1), dst + (j + 1), ivs + j);
52 }
53
54 static void serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src, le128 *iv)
55 {
56 be128 ctrblk;
57
58 le128_to_be128(&ctrblk, iv);
59 le128_inc(iv);
60
61 __serpent_encrypt(ctx, (u8 *)&ctrblk, (u8 *)&ctrblk);
62 u128_xor(dst, src, (u128 *)&ctrblk);
63 }
64
65 static void serpent_crypt_ctr_xway(void *ctx, u128 *dst, const u128 *src,
66 le128 *iv)
67 {
68 be128 ctrblks[SERPENT_PARALLEL_BLOCKS];
69 unsigned int i;
70
71 for (i = 0; i < SERPENT_PARALLEL_BLOCKS; i++) {
72 if (dst != src)
73 dst[i] = src[i];
74
75 le128_to_be128(&ctrblks[i], iv);
76 le128_inc(iv);
77 }
78
79 serpent_enc_blk_xway_xor(ctx, (u8 *)dst, (u8 *)ctrblks);
80 }
81
82 static const struct common_glue_ctx serpent_enc = {
83 .num_funcs = 2,
84 .fpu_blocks_limit = SERPENT_PARALLEL_BLOCKS,
85
86 .funcs = { {
87 .num_blocks = SERPENT_PARALLEL_BLOCKS,
> 88 .fn_u = { .ecb = serpent_enc_blk_xway }
89 }, {
90 .num_blocks = 1,
91 .fn_u = { .ecb = __serpent_encrypt }
92 } }
93 };
94
95 static const struct common_glue_ctx serpent_ctr = {
96 .num_funcs = 2,
97 .fpu_blocks_limit = SERPENT_PARALLEL_BLOCKS,
98
99 .funcs = { {
100 .num_blocks = SERPENT_PARALLEL_BLOCKS,
101 .fn_u = { .ctr = serpent_crypt_ctr_xway }
102 }, {
103 .num_blocks = 1,
104 .fn_u = { .ctr = serpent_crypt_ctr }
105 } }
106 };
107
108 static const struct common_glue_ctx serpent_dec = {
109 .num_funcs = 2,
110 .fpu_blocks_limit = SERPENT_PARALLEL_BLOCKS,
111
112 .funcs = { {
113 .num_blocks = SERPENT_PARALLEL_BLOCKS,
> 114 .fn_u = { .ecb = serpent_dec_blk_xway }
115 }, {
116 .num_blocks = 1,
117 .fn_u = { .ecb = __serpent_decrypt }
118 } }
119 };
120
121 static const struct common_glue_ctx serpent_dec_cbc = {
122 .num_funcs = 2,
123 .fpu_blocks_limit = SERPENT_PARALLEL_BLOCKS,
124
125 .funcs = { {
126 .num_blocks = SERPENT_PARALLEL_BLOCKS,
127 .fn_u = { .cbc = serpent_decrypt_cbc_xway }
128 }, {
129 .num_blocks = 1,
130 .fn_u = { .cbc = __serpent_decrypt_cbc }
131 } }
132 };
133
134 static int ecb_encrypt(struct skcipher_request *req)
135 {
136 return glue_ecb_req_128bit(&serpent_enc, req);
137 }
138
139 static int ecb_decrypt(struct skcipher_request *req)
140 {
141 return glue_ecb_req_128bit(&serpent_dec, req);
142 }
143
144 static int cbc_encrypt(struct skcipher_request *req)
145 {
> 146 return glue_cbc_encrypt_req_128bit(__serpent_encrypt,
147 req);
148 }
149
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32153 bytes --]
reply other threads:[~2019-11-11 22:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201911120635.qn9ZgiYt%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.