[ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 39/59] fs/netfs/crypto.c:208:1: warning: the frame size of 1056 bytes is larger than 1024 bytes
From: kernel test robot
Date: Wed Jun 01 2022 - 19:05:37 EST
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head: 22ecc2fcdab4616e624408911ec1d54644e82030
commit: b5b1a16a9c1a2ff8c62ef0c952b5672b3c78800c [39/59] netfs: Perform content encryption
config: arm-randconfig-r001-20220531 (https://download.01.org/0day-ci/archive/20220602/202206020658.yKznmUUi-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.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://github.com/ammarfaizi2/linux-block/commit/b5b1a16a9c1a2ff8c62ef0c952b5672b3c78800c
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-linked-list
git checkout b5b1a16a9c1a2ff8c62ef0c952b5672b3c78800c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash fs/netfs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
fs/netfs/crypto.c: In function 'netfs_encrypt':
>> fs/netfs/crypto.c:208:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
208 | }
| ^
vim +208 fs/netfs/crypto.c
133
134 /*
135 * Prepare a write request for writing. We encrypt from wreq->buffer to
136 * wreq->buffer2.
137 */
138 bool netfs_encrypt(struct netfs_io_request *wreq)
139 {
140 struct netfs_i_context *ctx = netfs_i_context(wreq->inode);
141 struct scatterlist source_sg[16], dest_sg[16];
142 unsigned int n_source, n_dest;
143 size_t n, chunk, bsize = 1UL << ctx->crypto_bshift;
144 loff_t pos;
145 int ret;
146
147 _enter("");
148
149 trace_netfs_rreq(wreq, netfs_rreq_trace_encrypt);
150
151 pos = wreq->start;
152 n = wreq->len;
153 _debug("ENCRYPT %llx-%llx", pos, pos + n - 1);
154
155 for (; n > 0; n -= chunk, pos += chunk) {
156 chunk = min(n, bsize);
157
158 switch (wreq->buffering) {
159 case NETFS_ENC_BUFFER_TO_BOUNCE:
160 ret = netfs_xarray_to_sglist(&wreq->buffer, pos, chunk,
161 source_sg, ARRAY_SIZE(source_sg));
162 break;
163 case NETFS_ENC_DIRECT_TO_BOUNCE:
164 ret = netfs_iter_to_sglist(&wreq->direct_iter, chunk,
165 dest_sg, ARRAY_SIZE(dest_sg));
166 break;
167 case NETFS_COPY_ENC_BOUNCE:
168 ret = netfs_xarray_to_sglist(&wreq->bounce, pos, chunk,
169 source_sg, ARRAY_SIZE(source_sg));
170 break;
171 default:
172 BUG();
173 }
174 if (ret < 0)
175 goto error;
176 n_source = ret;
177
178 switch (wreq->buffering) {
179 case NETFS_ENC_BUFFER_TO_BOUNCE:
180 case NETFS_ENC_DIRECT_TO_BOUNCE:
181 ret = netfs_xarray_to_sglist(&wreq->bounce, pos, chunk,
182 dest_sg, ARRAY_SIZE(dest_sg));
183 break;
184 case NETFS_COPY_ENC_BOUNCE:
185 memcpy(dest_sg, source_sg, sizeof(dest_sg));
186 ret = n_source;
187 break;
188 default:
189 BUG();
190 }
191 if (ret < 0)
192 goto error;
193 n_dest = ret;
194
195 ret = ctx->ops->encrypt_block(wreq, pos, chunk,
196 source_sg, n_source, dest_sg, n_dest);
197 if (ret < 0)
198 goto error_failed;
199 }
200
201 return true;
202
203 error_failed:
204 trace_netfs_failure(wreq, NULL, ret, netfs_fail_encryption);
205 error:
206 wreq->error = ret;
207 return false;
> 208 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp