* [sashal-linux-stable:queue-5.4 99/132] drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:130:4: error: implicit declaration of function 'kfree_sensitive'; did you mean
@ 2021-03-20 4:40 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-20 4:40 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6114 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: d2c5af89e80c5b71f1da59879464a930947306a2
commit: 0e90a65d5e66810afc4d1a60a234138f90badb1e [99/132] crypto: sun4i-ss - IV register does not work on A10 and A13
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=0e90a65d5e66810afc4d1a60a234138f90badb1e
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 0e90a65d5e66810afc4d1a60a234138f90badb1e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c: In function 'sun4i_ss_opti_poll':
>> drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:130:4: error: implicit declaration of function 'kfree_sensitive'; did you mean 'kvfree_sensitive'? [-Werror=implicit-function-declaration]
130 | kfree_sensitive(backup_iv);
| ^~~~~~~~~~~~~~~
| kvfree_sensitive
cc1: some warnings being treated as errors
vim +130 drivers/crypto/sunxi-ss/sun4i-ss-cipher.c
14
15 static int noinline_for_stack sun4i_ss_opti_poll(struct skcipher_request *areq)
16 {
17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
18 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm);
19 struct sun4i_ss_ctx *ss = op->ss;
20 unsigned int ivsize = crypto_skcipher_ivsize(tfm);
21 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq);
22 u32 mode = ctx->mode;
23 void *backup_iv = NULL;
24 /* when activating SS, the default FIFO space is SS_RX_DEFAULT(32) */
25 u32 rx_cnt = SS_RX_DEFAULT;
26 u32 tx_cnt = 0;
27 u32 spaces;
28 u32 v;
29 int err = 0;
30 unsigned int i;
31 unsigned int ileft = areq->cryptlen;
32 unsigned int oleft = areq->cryptlen;
33 unsigned int todo;
34 unsigned long pi = 0, po = 0; /* progress for in and out */
35 bool miter_err;
36 struct sg_mapping_iter mi, mo;
37 unsigned int oi, oo; /* offset for in and out */
38 unsigned long flags;
39
40 if (!areq->cryptlen)
41 return 0;
42
43 if (!areq->src || !areq->dst) {
44 dev_err_ratelimited(ss->dev, "ERROR: Some SGs are NULL\n");
45 return -EINVAL;
46 }
47
48 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) {
49 backup_iv = kzalloc(ivsize, GFP_KERNEL);
50 if (!backup_iv)
51 return -ENOMEM;
52 scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0);
53 }
54
55 spin_lock_irqsave(&ss->slock, flags);
56
57 for (i = 0; i < op->keylen / 4; i++)
58 writesl(ss->base + SS_KEY0 + i * 4, &op->key[i], 1);
59
60 if (areq->iv) {
61 for (i = 0; i < 4 && i < ivsize / 4; i++) {
62 v = *(u32 *)(areq->iv + i * 4);
63 writesl(ss->base + SS_IV0 + i * 4, &v, 1);
64 }
65 }
66 writel(mode, ss->base + SS_CTL);
67
68
69 ileft = areq->cryptlen / 4;
70 oleft = areq->cryptlen / 4;
71 oi = 0;
72 oo = 0;
73 do {
74 if (ileft) {
75 sg_miter_start(&mi, areq->src, sg_nents(areq->src),
76 SG_MITER_FROM_SG | SG_MITER_ATOMIC);
77 if (pi)
78 sg_miter_skip(&mi, pi);
79 miter_err = sg_miter_next(&mi);
80 if (!miter_err || !mi.addr) {
81 dev_err_ratelimited(ss->dev, "ERROR: sg_miter return null\n");
82 err = -EINVAL;
83 goto release_ss;
84 }
85 todo = min(rx_cnt, ileft);
86 todo = min_t(size_t, todo, (mi.length - oi) / 4);
87 if (todo) {
88 ileft -= todo;
89 writesl(ss->base + SS_RXFIFO, mi.addr + oi, todo);
90 oi += todo * 4;
91 }
92 if (oi == mi.length) {
93 pi += mi.length;
94 oi = 0;
95 }
96 sg_miter_stop(&mi);
97 }
98
99 spaces = readl(ss->base + SS_FCSR);
100 rx_cnt = SS_RXFIFO_SPACES(spaces);
101 tx_cnt = SS_TXFIFO_SPACES(spaces);
102
103 sg_miter_start(&mo, areq->dst, sg_nents(areq->dst),
104 SG_MITER_TO_SG | SG_MITER_ATOMIC);
105 if (po)
106 sg_miter_skip(&mo, po);
107 miter_err = sg_miter_next(&mo);
108 if (!miter_err || !mo.addr) {
109 dev_err_ratelimited(ss->dev, "ERROR: sg_miter return null\n");
110 err = -EINVAL;
111 goto release_ss;
112 }
113 todo = min(tx_cnt, oleft);
114 todo = min_t(size_t, todo, (mo.length - oo) / 4);
115 if (todo) {
116 oleft -= todo;
117 readsl(ss->base + SS_TXFIFO, mo.addr + oo, todo);
118 oo += todo * 4;
119 }
120 if (oo == mo.length) {
121 oo = 0;
122 po += mo.length;
123 }
124 sg_miter_stop(&mo);
125 } while (oleft);
126
127 if (areq->iv) {
128 if (mode & SS_DECRYPTION) {
129 memcpy(areq->iv, backup_iv, ivsize);
> 130 kfree_sensitive(backup_iv);
131 } else {
132 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize,
133 ivsize, 0);
134 }
135 }
136
137 release_ss:
138 writel(0, ss->base + SS_CTL);
139 spin_unlock_irqrestore(&ss->slock, flags);
140 return err;
141 }
142
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48609 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-20 4:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-20 4:40 [sashal-linux-stable:queue-5.4 99/132] drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:130:4: error: implicit declaration of function 'kfree_sensitive'; did you mean kernel test robot
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.