mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 46 participants
  • 21973 discussions
[openeuler:OLK-6.6 3542/3542] arch/x86/kvm/svm/csv.c:1196: warning: Function parameter or member 'kvm' not described in 'csv3_launch_encrypt_data_alt_1'
by kernel test robot 15 Dec '25

15 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 81b22958142c03b02c766c79cd1554ebfa142be4 commit: ee5362bc5977e41a88aee1c46a6580295baa0285 [3542/3542] KVM: SVM: CSV: Support issue non-4K aligned CSV3_CMD_LAUNCH_ENCRYPT_DATA and more than once config: x86_64-randconfig-016-20251215 (https://download.01.org/0day-ci/archive/20251215/202512151455.kuVXZCXz-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512151455.kuVXZCXz-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512151455.kuVXZCXz-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/x86/kvm/svm/csv.c:1196: warning: Function parameter or member 'kvm' not described in 'csv3_launch_encrypt_data_alt_1' >> arch/x86/kvm/svm/csv.c:1196: warning: Function parameter or member 'argp' not described in 'csv3_launch_encrypt_data_alt_1' >> arch/x86/kvm/svm/csv.c:1319: warning: Function parameter or member 'kvm' not described in '__csv3_launch_encrypt_data' >> arch/x86/kvm/svm/csv.c:1319: warning: Function parameter or member 'argp' not described in '__csv3_launch_encrypt_data' >> arch/x86/kvm/svm/csv.c:1319: warning: Function parameter or member 'params' not described in '__csv3_launch_encrypt_data' >> arch/x86/kvm/svm/csv.c:1319: warning: Function parameter or member 'src_buf' not described in '__csv3_launch_encrypt_data' >> arch/x86/kvm/svm/csv.c:1319: warning: Function parameter or member 'start_pgoff' not described in '__csv3_launch_encrypt_data' >> arch/x86/kvm/svm/csv.c:1319: warning: Function parameter or member 'end_pgoff' not described in '__csv3_launch_encrypt_data' >> arch/x86/kvm/svm/csv.c:1436: warning: Function parameter or member 'kvm' not described in 'csv3_launch_encrypt_data_alt_2' >> arch/x86/kvm/svm/csv.c:1436: warning: Function parameter or member 'argp' not described in 'csv3_launch_encrypt_data_alt_2' arch/x86/kvm/svm/csv.c:2305: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Return negative error code on fail, arch/x86/kvm/svm/csv.c:2936: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * When userspace recognizes these extensions, it is suggested that the userspace arch/x86/kvm/svm/csv.c:2986: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Return 0 means KVM accept the negotiation from userspace. Both the vim +1196 arch/x86/kvm/svm/csv.c e23a88d66dd209 Xin Jiang 2023-08-10 1189 ee5362bc5977e4 hanliyang 2024-09-27 1190 /** ee5362bc5977e4 hanliyang 2024-09-27 1191 * csv3_launch_encrypt_data_alt_1 - The legacy handler to encrypt CSV3 ee5362bc5977e4 hanliyang 2024-09-27 1192 * guest's memory before VMRUN. ee5362bc5977e4 hanliyang 2024-09-27 1193 */ ee5362bc5977e4 hanliyang 2024-09-27 1194 static int csv3_launch_encrypt_data_alt_1(struct kvm *kvm, ee5362bc5977e4 hanliyang 2024-09-27 1195 struct kvm_sev_cmd *argp) e23a88d66dd209 Xin Jiang 2023-08-10 @1196 { e23a88d66dd209 Xin Jiang 2023-08-10 1197 struct kvm_csv_info *csv = &to_kvm_svm_csv(kvm)->csv_info; e23a88d66dd209 Xin Jiang 2023-08-10 1198 struct kvm_csv3_launch_encrypt_data params; e23a88d66dd209 Xin Jiang 2023-08-10 1199 struct csv3_data_launch_encrypt_data *encrypt_data = NULL; e23a88d66dd209 Xin Jiang 2023-08-10 1200 struct encrypt_data_block *blocks = NULL; e23a88d66dd209 Xin Jiang 2023-08-10 1201 u8 *data = NULL; e23a88d66dd209 Xin Jiang 2023-08-10 1202 u32 offset; e23a88d66dd209 Xin Jiang 2023-08-10 1203 u32 num_entries, num_entries_in_block; e23a88d66dd209 Xin Jiang 2023-08-10 1204 u32 num_blocks, num_blocks_max; e23a88d66dd209 Xin Jiang 2023-08-10 1205 u32 i, n; e23a88d66dd209 Xin Jiang 2023-08-10 1206 unsigned long pfn, pfn_sme_mask; e23a88d66dd209 Xin Jiang 2023-08-10 1207 int ret = 0; e23a88d66dd209 Xin Jiang 2023-08-10 1208 e23a88d66dd209 Xin Jiang 2023-08-10 1209 if (copy_from_user(&params, (void __user *)(uintptr_t)argp->data, e23a88d66dd209 Xin Jiang 2023-08-10 1210 sizeof(params))) { e23a88d66dd209 Xin Jiang 2023-08-10 1211 ret = -EFAULT; e23a88d66dd209 Xin Jiang 2023-08-10 1212 goto exit; e23a88d66dd209 Xin Jiang 2023-08-10 1213 } e23a88d66dd209 Xin Jiang 2023-08-10 1214 e23a88d66dd209 Xin Jiang 2023-08-10 1215 if ((params.len & ~PAGE_MASK) || !params.len || !params.uaddr) { e23a88d66dd209 Xin Jiang 2023-08-10 1216 ret = -EINVAL; e23a88d66dd209 Xin Jiang 2023-08-10 1217 goto exit; e23a88d66dd209 Xin Jiang 2023-08-10 1218 } e23a88d66dd209 Xin Jiang 2023-08-10 1219 e57b75759a2c62 hanliyang 2024-09-26 1220 /* e57b75759a2c62 hanliyang 2024-09-26 1221 * If userspace request to invoke CSV3_CMD_SET_GUEST_PRIVATE_MEMORY e57b75759a2c62 hanliyang 2024-09-26 1222 * explicitly, we should not calls to csv3_set_guest_private_memory() e57b75759a2c62 hanliyang 2024-09-26 1223 * here. e57b75759a2c62 hanliyang 2024-09-26 1224 */ e57b75759a2c62 hanliyang 2024-09-26 1225 if (!(csv->inuse_ext & KVM_CAP_HYGON_COCO_EXT_CSV3_SET_PRIV_MEM)) { e23a88d66dd209 Xin Jiang 2023-08-10 1226 /* Allocate all the guest memory from CMA */ e57b75759a2c62 hanliyang 2024-09-26 1227 ret = csv3_set_guest_private_memory(kvm, argp); e23a88d66dd209 Xin Jiang 2023-08-10 1228 if (ret) e23a88d66dd209 Xin Jiang 2023-08-10 1229 goto exit; e57b75759a2c62 hanliyang 2024-09-26 1230 } e23a88d66dd209 Xin Jiang 2023-08-10 1231 e23a88d66dd209 Xin Jiang 2023-08-10 1232 num_entries = params.len / PAGE_SIZE; e23a88d66dd209 Xin Jiang 2023-08-10 1233 num_entries_in_block = ARRAY_SIZE(blocks->entry); e23a88d66dd209 Xin Jiang 2023-08-10 1234 num_blocks = (num_entries + num_entries_in_block - 1) / num_entries_in_block; e23a88d66dd209 Xin Jiang 2023-08-10 1235 num_blocks_max = ARRAY_SIZE(encrypt_data->data_blocks); e23a88d66dd209 Xin Jiang 2023-08-10 1236 e23a88d66dd209 Xin Jiang 2023-08-10 1237 if (num_blocks >= num_blocks_max) { e23a88d66dd209 Xin Jiang 2023-08-10 1238 ret = -EINVAL; e23a88d66dd209 Xin Jiang 2023-08-10 1239 goto exit; e23a88d66dd209 Xin Jiang 2023-08-10 1240 } e23a88d66dd209 Xin Jiang 2023-08-10 1241 e23a88d66dd209 Xin Jiang 2023-08-10 1242 data = vzalloc(params.len); e23a88d66dd209 Xin Jiang 2023-08-10 1243 if (!data) { e23a88d66dd209 Xin Jiang 2023-08-10 1244 ret = -ENOMEM; e23a88d66dd209 Xin Jiang 2023-08-10 1245 goto exit; e23a88d66dd209 Xin Jiang 2023-08-10 1246 } e23a88d66dd209 Xin Jiang 2023-08-10 1247 if (copy_from_user(data, (void __user *)params.uaddr, params.len)) { e23a88d66dd209 Xin Jiang 2023-08-10 1248 ret = -EFAULT; e23a88d66dd209 Xin Jiang 2023-08-10 1249 goto data_free; e23a88d66dd209 Xin Jiang 2023-08-10 1250 } e23a88d66dd209 Xin Jiang 2023-08-10 1251 e23a88d66dd209 Xin Jiang 2023-08-10 1252 blocks = vzalloc(num_blocks * sizeof(*blocks)); e23a88d66dd209 Xin Jiang 2023-08-10 1253 if (!blocks) { e23a88d66dd209 Xin Jiang 2023-08-10 1254 ret = -ENOMEM; e23a88d66dd209 Xin Jiang 2023-08-10 1255 goto data_free; e23a88d66dd209 Xin Jiang 2023-08-10 1256 } e23a88d66dd209 Xin Jiang 2023-08-10 1257 e23a88d66dd209 Xin Jiang 2023-08-10 1258 for (offset = 0, i = 0, n = 0; offset < params.len; offset += PAGE_SIZE) { e23a88d66dd209 Xin Jiang 2023-08-10 1259 pfn = vmalloc_to_pfn(offset + data); e23a88d66dd209 Xin Jiang 2023-08-10 1260 pfn_sme_mask = __sme_set(pfn << PAGE_SHIFT) >> PAGE_SHIFT; e23a88d66dd209 Xin Jiang 2023-08-10 1261 if (offset && ((blocks[n].entry[i].pfn + 1) == pfn_sme_mask)) e23a88d66dd209 Xin Jiang 2023-08-10 1262 blocks[n].entry[i].npages += 1; e23a88d66dd209 Xin Jiang 2023-08-10 1263 else { e23a88d66dd209 Xin Jiang 2023-08-10 1264 if (offset) { e23a88d66dd209 Xin Jiang 2023-08-10 1265 i = (i + 1) % num_entries_in_block; e23a88d66dd209 Xin Jiang 2023-08-10 1266 n = (i == 0) ? (n + 1) : n; e23a88d66dd209 Xin Jiang 2023-08-10 1267 } e23a88d66dd209 Xin Jiang 2023-08-10 1268 blocks[n].entry[i].pfn = pfn_sme_mask; e23a88d66dd209 Xin Jiang 2023-08-10 1269 blocks[n].entry[i].npages = 1; e23a88d66dd209 Xin Jiang 2023-08-10 1270 } e23a88d66dd209 Xin Jiang 2023-08-10 1271 } e23a88d66dd209 Xin Jiang 2023-08-10 1272 e23a88d66dd209 Xin Jiang 2023-08-10 1273 encrypt_data = kzalloc(sizeof(*encrypt_data), GFP_KERNEL); e23a88d66dd209 Xin Jiang 2023-08-10 1274 if (!encrypt_data) { e23a88d66dd209 Xin Jiang 2023-08-10 1275 ret = -ENOMEM; e23a88d66dd209 Xin Jiang 2023-08-10 1276 goto block_free; e23a88d66dd209 Xin Jiang 2023-08-10 1277 } e23a88d66dd209 Xin Jiang 2023-08-10 1278 e23a88d66dd209 Xin Jiang 2023-08-10 1279 encrypt_data->handle = csv->sev->handle; e23a88d66dd209 Xin Jiang 2023-08-10 1280 encrypt_data->length = params.len; e23a88d66dd209 Xin Jiang 2023-08-10 1281 encrypt_data->gpa = params.gpa; e23a88d66dd209 Xin Jiang 2023-08-10 1282 for (i = 0; i <= n; i++) { e23a88d66dd209 Xin Jiang 2023-08-10 1283 encrypt_data->data_blocks[i] = e23a88d66dd209 Xin Jiang 2023-08-10 1284 __sme_set(vmalloc_to_pfn((void *)blocks + i * sizeof(*blocks)) << PAGE_SHIFT); e23a88d66dd209 Xin Jiang 2023-08-10 1285 } e23a88d66dd209 Xin Jiang 2023-08-10 1286 e23a88d66dd209 Xin Jiang 2023-08-10 1287 clflush_cache_range(data, params.len); e23a88d66dd209 Xin Jiang 2023-08-10 1288 ret = hygon_kvm_hooks.sev_issue_cmd(kvm, CSV3_CMD_LAUNCH_ENCRYPT_DATA, e23a88d66dd209 Xin Jiang 2023-08-10 1289 encrypt_data, &argp->error); e23a88d66dd209 Xin Jiang 2023-08-10 1290 e23a88d66dd209 Xin Jiang 2023-08-10 1291 kfree(encrypt_data); e23a88d66dd209 Xin Jiang 2023-08-10 1292 block_free: e23a88d66dd209 Xin Jiang 2023-08-10 1293 vfree(blocks); e23a88d66dd209 Xin Jiang 2023-08-10 1294 data_free: e23a88d66dd209 Xin Jiang 2023-08-10 1295 vfree(data); e23a88d66dd209 Xin Jiang 2023-08-10 1296 exit: e23a88d66dd209 Xin Jiang 2023-08-10 1297 return ret; e23a88d66dd209 Xin Jiang 2023-08-10 1298 } e23a88d66dd209 Xin Jiang 2023-08-10 1299 ee5362bc5977e4 hanliyang 2024-09-27 1300 #define MAX_ENTRIES_PER_BLOCK \ ee5362bc5977e4 hanliyang 2024-09-27 1301 (sizeof(((struct encrypt_data_block *)0)->entry) / \ ee5362bc5977e4 hanliyang 2024-09-27 1302 sizeof(((struct encrypt_data_block *)0)->entry[0])) ee5362bc5977e4 hanliyang 2024-09-27 1303 #define MAX_BLOCKS_PER_CSV3_LUP_DATA \ ee5362bc5977e4 hanliyang 2024-09-27 1304 (sizeof(((struct csv3_data_launch_encrypt_data *)0)->data_blocks) / \ ee5362bc5977e4 hanliyang 2024-09-27 1305 sizeof(((struct csv3_data_launch_encrypt_data *)0)->data_blocks[0])) ee5362bc5977e4 hanliyang 2024-09-27 1306 #define MAX_ENTRIES_PER_CSV3_LUP_DATA \ ee5362bc5977e4 hanliyang 2024-09-27 1307 (MAX_BLOCKS_PER_CSV3_LUP_DATA * MAX_ENTRIES_PER_BLOCK) ee5362bc5977e4 hanliyang 2024-09-27 1308 ee5362bc5977e4 hanliyang 2024-09-27 1309 /** ee5362bc5977e4 hanliyang 2024-09-27 1310 * __csv3_launch_encrypt_data - The helper for handler ee5362bc5977e4 hanliyang 2024-09-27 1311 * csv3_launch_encrypt_data_alt_2. ee5362bc5977e4 hanliyang 2024-09-27 1312 */ ee5362bc5977e4 hanliyang 2024-09-27 1313 static int __csv3_launch_encrypt_data(struct kvm *kvm, ee5362bc5977e4 hanliyang 2024-09-27 1314 struct kvm_sev_cmd *argp, ee5362bc5977e4 hanliyang 2024-09-27 1315 struct kvm_csv3_launch_encrypt_data *params, ee5362bc5977e4 hanliyang 2024-09-27 1316 void *src_buf, ee5362bc5977e4 hanliyang 2024-09-27 1317 unsigned int start_pgoff, ee5362bc5977e4 hanliyang 2024-09-27 1318 unsigned int end_pgoff) ee5362bc5977e4 hanliyang 2024-09-27 @1319 { ee5362bc5977e4 hanliyang 2024-09-27 1320 struct kvm_csv_info *csv = &to_kvm_svm_csv(kvm)->csv_info; ee5362bc5977e4 hanliyang 2024-09-27 1321 struct csv3_data_launch_encrypt_data *data = NULL; ee5362bc5977e4 hanliyang 2024-09-27 1322 struct encrypt_data_block *block = NULL; ee5362bc5977e4 hanliyang 2024-09-27 1323 struct page **pages = NULL; ee5362bc5977e4 hanliyang 2024-09-27 1324 unsigned long len, remain_len; ee5362bc5977e4 hanliyang 2024-09-27 1325 unsigned long pfn, pfn_sme_mask, last_pfn; ee5362bc5977e4 hanliyang 2024-09-27 1326 unsigned int pgoff = start_pgoff; ee5362bc5977e4 hanliyang 2024-09-27 1327 int i, j; ee5362bc5977e4 hanliyang 2024-09-27 1328 int ret = -ENOMEM; ee5362bc5977e4 hanliyang 2024-09-27 1329 ee5362bc5977e4 hanliyang 2024-09-27 1330 /* Alloc command buffer for CSV3_CMD_LAUNCH_ENCRYPT_DATA command */ ee5362bc5977e4 hanliyang 2024-09-27 1331 data = kzalloc(sizeof(*data), GFP_KERNEL_ACCOUNT); ee5362bc5977e4 hanliyang 2024-09-27 1332 if (!data) ee5362bc5977e4 hanliyang 2024-09-27 1333 return -ENOMEM; ee5362bc5977e4 hanliyang 2024-09-27 1334 ee5362bc5977e4 hanliyang 2024-09-27 1335 /* Alloc pages for data_blocks[] in the command buffer */ ee5362bc5977e4 hanliyang 2024-09-27 1336 len = ARRAY_SIZE(data->data_blocks) * sizeof(struct page *); ee5362bc5977e4 hanliyang 2024-09-27 1337 pages = kzalloc(len, GFP_KERNEL_ACCOUNT); ee5362bc5977e4 hanliyang 2024-09-27 1338 if (!pages) ee5362bc5977e4 hanliyang 2024-09-27 1339 goto e_free_data; ee5362bc5977e4 hanliyang 2024-09-27 1340 ee5362bc5977e4 hanliyang 2024-09-27 1341 for (i = 0; i < ARRAY_SIZE(data->data_blocks); i++) { ee5362bc5977e4 hanliyang 2024-09-27 1342 pages[i] = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO); ee5362bc5977e4 hanliyang 2024-09-27 1343 if (!pages[i]) ee5362bc5977e4 hanliyang 2024-09-27 1344 goto e_free_pages; ee5362bc5977e4 hanliyang 2024-09-27 1345 } ee5362bc5977e4 hanliyang 2024-09-27 1346 ee5362bc5977e4 hanliyang 2024-09-27 1347 i = 0; ee5362bc5977e4 hanliyang 2024-09-27 1348 while (i < ARRAY_SIZE(data->data_blocks) && pgoff < end_pgoff) { ee5362bc5977e4 hanliyang 2024-09-27 1349 block = (struct encrypt_data_block *)page_to_virt(pages[i]); ee5362bc5977e4 hanliyang 2024-09-27 1350 ee5362bc5977e4 hanliyang 2024-09-27 1351 j = 0; ee5362bc5977e4 hanliyang 2024-09-27 1352 last_pfn = 0; ee5362bc5977e4 hanliyang 2024-09-27 1353 while (j < ARRAY_SIZE(block->entry) && pgoff < end_pgoff) { ee5362bc5977e4 hanliyang 2024-09-27 1354 pfn = vmalloc_to_pfn(src_buf + (pgoff << PAGE_SHIFT)); ee5362bc5977e4 hanliyang 2024-09-27 1355 pfn_sme_mask = __sme_set(pfn << PAGE_SHIFT) >> PAGE_SHIFT; ee5362bc5977e4 hanliyang 2024-09-27 1356 ee5362bc5977e4 hanliyang 2024-09-27 1357 /* ee5362bc5977e4 hanliyang 2024-09-27 1358 * One entry can record a number of contiguous physical ee5362bc5977e4 hanliyang 2024-09-27 1359 * pages. If the current page is not adjacent to the ee5362bc5977e4 hanliyang 2024-09-27 1360 * previous physical page, we should record the page to ee5362bc5977e4 hanliyang 2024-09-27 1361 * the next entry. If entries of current block is used ee5362bc5977e4 hanliyang 2024-09-27 1362 * up, we should try the next block. ee5362bc5977e4 hanliyang 2024-09-27 1363 */ ee5362bc5977e4 hanliyang 2024-09-27 1364 if (last_pfn && (last_pfn + 1 == pfn)) { ee5362bc5977e4 hanliyang 2024-09-27 1365 block->entry[j].npages++; ee5362bc5977e4 hanliyang 2024-09-27 1366 } else if (j < (ARRAY_SIZE(block->entry) - 1)) { ee5362bc5977e4 hanliyang 2024-09-27 1367 /* @last_pfn == 0 means fill in entry[0] */ ee5362bc5977e4 hanliyang 2024-09-27 1368 if (likely(last_pfn != 0)) ee5362bc5977e4 hanliyang 2024-09-27 1369 j++; ee5362bc5977e4 hanliyang 2024-09-27 1370 block->entry[j].pfn = pfn_sme_mask; ee5362bc5977e4 hanliyang 2024-09-27 1371 block->entry[j].npages = 1; ee5362bc5977e4 hanliyang 2024-09-27 1372 } else { ee5362bc5977e4 hanliyang 2024-09-27 1373 break; ee5362bc5977e4 hanliyang 2024-09-27 1374 } ee5362bc5977e4 hanliyang 2024-09-27 1375 ee5362bc5977e4 hanliyang 2024-09-27 1376 /* ee5362bc5977e4 hanliyang 2024-09-27 1377 * Succeed to record one page, increase the page offset. ee5362bc5977e4 hanliyang 2024-09-27 1378 * We also record the pfn of current page so that we can ee5362bc5977e4 hanliyang 2024-09-27 1379 * record the contiguous physical pages into one entry. ee5362bc5977e4 hanliyang 2024-09-27 1380 */ ee5362bc5977e4 hanliyang 2024-09-27 1381 last_pfn = pfn; ee5362bc5977e4 hanliyang 2024-09-27 1382 pgoff++; ee5362bc5977e4 hanliyang 2024-09-27 1383 } ee5362bc5977e4 hanliyang 2024-09-27 1384 ee5362bc5977e4 hanliyang 2024-09-27 1385 i++; ee5362bc5977e4 hanliyang 2024-09-27 1386 } ee5362bc5977e4 hanliyang 2024-09-27 1387 ee5362bc5977e4 hanliyang 2024-09-27 1388 if (pgoff < end_pgoff) { ee5362bc5977e4 hanliyang 2024-09-27 1389 pr_err("CSV3: Fail to fill in LAUNCH_ENCRYPT_DATA command!\n"); ee5362bc5977e4 hanliyang 2024-09-27 1390 goto e_free_pages; ee5362bc5977e4 hanliyang 2024-09-27 1391 } ee5362bc5977e4 hanliyang 2024-09-27 1392 ee5362bc5977e4 hanliyang 2024-09-27 1393 len = (end_pgoff - start_pgoff) << PAGE_SHIFT; ee5362bc5977e4 hanliyang 2024-09-27 1394 clflush_cache_range(src_buf + (start_pgoff << PAGE_SHIFT), len); ee5362bc5977e4 hanliyang 2024-09-27 1395 ee5362bc5977e4 hanliyang 2024-09-27 1396 /* Fill in command buffer */ ee5362bc5977e4 hanliyang 2024-09-27 1397 data->handle = csv->sev->handle; ee5362bc5977e4 hanliyang 2024-09-27 1398 ee5362bc5977e4 hanliyang 2024-09-27 1399 if (start_pgoff == 0) { ee5362bc5977e4 hanliyang 2024-09-27 1400 data->gpa = params->gpa; ee5362bc5977e4 hanliyang 2024-09-27 1401 len -= params->gpa & ~PAGE_MASK; ee5362bc5977e4 hanliyang 2024-09-27 1402 } else { ee5362bc5977e4 hanliyang 2024-09-27 1403 data->gpa = (params->gpa & PAGE_MASK) + (start_pgoff << PAGE_SHIFT); ee5362bc5977e4 hanliyang 2024-09-27 1404 } ee5362bc5977e4 hanliyang 2024-09-27 1405 remain_len = params->len - (data->gpa - params->gpa); ee5362bc5977e4 hanliyang 2024-09-27 1406 ee5362bc5977e4 hanliyang 2024-09-27 1407 data->length = (len <= remain_len) ? len : remain_len; ee5362bc5977e4 hanliyang 2024-09-27 1408 ee5362bc5977e4 hanliyang 2024-09-27 1409 for (j = 0; j < i; j++) ee5362bc5977e4 hanliyang 2024-09-27 1410 data->data_blocks[j] = __sme_set(page_to_phys(pages[j])); ee5362bc5977e4 hanliyang 2024-09-27 1411 ee5362bc5977e4 hanliyang 2024-09-27 1412 /* Issue command */ ee5362bc5977e4 hanliyang 2024-09-27 1413 ret = hygon_kvm_hooks.sev_issue_cmd(kvm, CSV3_CMD_LAUNCH_ENCRYPT_DATA, ee5362bc5977e4 hanliyang 2024-09-27 1414 data, &argp->error); ee5362bc5977e4 hanliyang 2024-09-27 1415 ee5362bc5977e4 hanliyang 2024-09-27 1416 e_free_pages: ee5362bc5977e4 hanliyang 2024-09-27 1417 for (i = 0; i < ARRAY_SIZE(data->data_blocks); i++) { ee5362bc5977e4 hanliyang 2024-09-27 1418 if (pages[i]) ee5362bc5977e4 hanliyang 2024-09-27 1419 __free_page(pages[i]); ee5362bc5977e4 hanliyang 2024-09-27 1420 } ee5362bc5977e4 hanliyang 2024-09-27 1421 kfree(pages); ee5362bc5977e4 hanliyang 2024-09-27 1422 e_free_data: ee5362bc5977e4 hanliyang 2024-09-27 1423 kfree(data); ee5362bc5977e4 hanliyang 2024-09-27 1424 ee5362bc5977e4 hanliyang 2024-09-27 1425 return ret; ee5362bc5977e4 hanliyang 2024-09-27 1426 } ee5362bc5977e4 hanliyang 2024-09-27 1427 :::::: The code at line 1196 was first introduced by commit :::::: e23a88d66dd209d8c87df6b19e15ea8ddd9b7915 KVM: SVM: CSV: Add KVM_CSV3_LAUNCH_ENCRYPT_DATA command :::::: TO: Xin Jiang <jiangxin(a)hygon.cn> :::::: CC: hanliyang <hanliyang(a)hygon.cn> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3542/3542] drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:5: warning: no previous prototype for function 'tdm_service_run'
by kernel test robot 15 Dec '25

15 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 81b22958142c03b02c766c79cd1554ebfa142be4 commit: 3ad98583441f7c8a2553e1e8d6340ed4397033e2 [3542/3542] crypto: tdm: Support dynamic protection for SCT and IDT by HYGON TDM config: x86_64-randconfig-012-20251215 (https://download.01.org/0day-ci/archive/20251215/202512151453.5SnEFp7c-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512151453.5SnEFp7c-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512151453.5SnEFp7c-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/crypto/ccp/hygon/tdm-kernel-guard.c:15: In file included from include/linux/kallsyms.h:13: In file included from include/linux/mm.h:2242: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:5: warning: no previous prototype for function 'tdm_service_run' [-Wmissing-prototypes] 151 | int tdm_service_run(struct tdm_security_enhance *data) | ^ drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 151 | int tdm_service_run(struct tdm_security_enhance *data) | ^ | static >> drivers/crypto/ccp/hygon/tdm-kernel-guard.c:212:5: warning: no previous prototype for function 'tdm_service_exit' [-Wmissing-prototypes] 212 | int tdm_service_exit(struct tdm_security_enhance *data) | ^ drivers/crypto/ccp/hygon/tdm-kernel-guard.c:212:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 212 | int tdm_service_exit(struct tdm_security_enhance *data) | ^ | static drivers/crypto/ccp/hygon/tdm-kernel-guard.c:308:23: error: use of undeclared identifier 'NR_syscalls' 308 | eh_objs[SCT].size = NR_syscalls * sizeof(char *); | ^ 3 warnings and 1 error generated. vim +/tdm_service_run +151 drivers/crypto/ccp/hygon/tdm-kernel-guard.c 150 > 151 int tdm_service_run(struct tdm_security_enhance *data) 152 { 153 int ret = 0; 154 struct addr_range_info *addr_range = NULL; 155 156 // Allocate memory for addr_range 157 addr_range = kzalloc(sizeof(struct addr_range_info) + sizeof(struct addr_info), GFP_KERNEL); 158 if (!addr_range) { 159 ret = -DYN_ERR_MEM; 160 pr_err("addr_range kzalloc memory failed\n"); 161 goto end; 162 } 163 164 // Fill in addr_range 165 addr_range->count = 1; 166 addr_range->addr[0].addr_start = data->vaddr; 167 addr_range->addr[0].length = data->size; 168 data->mem_range = addr_range; 169 170 // Context configuration 171 data->context |= TASK_CREATE_VADDR; 172 173 // Allocate memory for authcode 174 data->authcode = kzalloc(sizeof(struct authcode_2b) + AUTHCODE_MAX, GFP_KERNEL); 175 if (!data->authcode) { 176 ret = -DYN_ERR_MEM; 177 pr_err("authcode_2b kzalloc memory failed\n"); 178 goto free_addr_range_info; 179 } 180 181 data->authcode->len = AUTHCODE_MAX; 182 183 // Measurement data configuration 184 data->mdata.hash_algo = HASH_ALGO_SM3; 185 data->mdata.period_ms = 0; 186 ret = calc_expected_hash((uint8_t *)data->vaddr, data->size, 187 data->mdata.expected_measurement); 188 if (ret) { 189 pr_err("calculate expected hash failed!\n"); 190 goto free_authcode; 191 } 192 193 // Create and start tdm task 194 ret = tdm_task_create_and_run(data); 195 if (ret) { 196 pr_err("tdm_task_create_and_run failed!\n"); 197 goto free_authcode; 198 } 199 200 return ret; 201 202 free_authcode: 203 kfree(data->authcode); 204 data->authcode = NULL; 205 free_addr_range_info: 206 kfree(data->mem_range); 207 data->mem_range = NULL; 208 end: 209 return ret; 210 } 211 > 212 int tdm_service_exit(struct tdm_security_enhance *data) 213 { 214 int ret = 0; 215 int task_status = 0; 216 217 task_status = psp_startstop_measure_task(data->task_id, data->authcode, false); 218 if (task_status < 0) { 219 ret = task_status; 220 pr_err("task_id %d stop failed with 0x%x\n", data->task_id, ret); 221 goto end; 222 } 223 224 // Waiting for the task to end 225 msleep(40); 226 227 psp_destroy_measure_task(data->task_id, data->authcode); 228 229 kfree(data->authcode); 230 data->authcode = NULL; 231 kfree(data->mem_range); 232 data->mem_range = NULL; 233 end: 234 return ret; 235 } 236 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3542/3542] drivers/net/ethernet/huawei/hinic/hinic_mbox.c:373: warning: expecting prototype for hinic_unregister_ppf_mbox_cb(). Prototype was for hinic_unregister_pf_mbox_cb() instead
by kernel test robot 15 Dec '25

15 Dec '25
Hi Zhou, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 81b22958142c03b02c766c79cd1554ebfa142be4 commit: 9c1c9598010fbb9daa1e2a67d23830092fb6246a [3542/3542] net/hinic: Update Huawei Intelligent Network Card Driver: hinic config: x86_64-buildonly-randconfig-005-20251215 (https://download.01.org/0day-ci/archive/20251215/202512151406.uDEczUki-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512151406.uDEczUki-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512151406.uDEczUki-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/huawei/hinic/hinic_main.c:18: In file included from include/linux/pci.h:1663: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2193: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ drivers/net/ethernet/huawei/hinic/hinic_main.c:204:9: error: call to undeclared function 'vlan_dev_priv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 204 | ret = vlan_dev_priv(ndev)->real_dev; | ^ >> drivers/net/ethernet/huawei/hinic/hinic_main.c:204:30: error: member reference type 'int' is not a pointer 204 | ret = vlan_dev_priv(ndev)->real_dev; | ~~~~~~~~~~~~~~~~~~~ ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:206:30: error: member reference type 'int' is not a pointer 206 | ret = vlan_dev_priv(ret)->real_dev; | ~~~~~~~~~~~~~~~~~~ ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:182:5: warning: no previous prototype for function 'hinic_netdev_event' [-Wmissing-prototypes] 182 | int hinic_netdev_event(struct notifier_block *notifier, | ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 182 | int hinic_netdev_event(struct notifier_block *notifier, | ^ | static drivers/net/ethernet/huawei/hinic/hinic_main.c:3058:6: warning: no previous prototype for function 'nic_event' [-Wmissing-prototypes] 3058 | void nic_event(struct hinic_lld_dev *lld_dev, void *adapter, | ^ drivers/net/ethernet/huawei/hinic/hinic_main.c:3058:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3058 | void nic_event(struct hinic_lld_dev *lld_dev, void *adapter, | ^ | static 3 warnings and 3 errors generated. -- drivers/net/ethernet/huawei/hinic/hinic_eqs.c:321: warning: Function parameter or member 'hwe_cb' not described in 'hinic_aeq_register_hw_cb' drivers/net/ethernet/huawei/hinic/hinic_eqs.c:321: warning: Excess function parameter 'hw_cb' description in 'hinic_aeq_register_hw_cb' drivers/net/ethernet/huawei/hinic/hinic_eqs.c:369: warning: Function parameter or member 'aeq_swe_cb' not described in 'hinic_aeq_register_swe_cb' drivers/net/ethernet/huawei/hinic/hinic_eqs.c:369: warning: expecting prototype for hinic_aeq_register_sw_cb(). Prototype was for hinic_aeq_register_swe_cb() instead >> drivers/net/ethernet/huawei/hinic/hinic_eqs.c:391: warning: expecting prototype for hinic_aeq_unregister_sw_cb(). Prototype was for hinic_aeq_unregister_swe_cb() instead >> drivers/net/ethernet/huawei/hinic/hinic_eqs.c:417: warning: expecting prototype for hinic_ceq_register_sw_cb(). Prototype was for hinic_ceq_register_cb() instead -- >> drivers/net/ethernet/huawei/hinic/hinic_mbox.c:373: warning: expecting prototype for hinic_unregister_ppf_mbox_cb(). Prototype was for hinic_unregister_pf_mbox_cb() instead drivers/net/ethernet/huawei/hinic/hinic_mbox.c:411: warning: expecting prototype for hinic_unregister_ppf_mbox_cb(). Prototype was for hinic_unregister_ppf_to_pf_mbox_cb() instead -- drivers/net/ethernet/huawei/hinic/hinic_hwif.c:581: warning: Function parameter or member 'intr_reg_base' not described in 'hinic_init_hwif' drivers/net/ethernet/huawei/hinic/hinic_hwif.c:581: warning: Function parameter or member 'db_base_phy' not described in 'hinic_init_hwif' drivers/net/ethernet/huawei/hinic/hinic_hwif.c:581: warning: Function parameter or member 'db_base' not described in 'hinic_init_hwif' drivers/net/ethernet/huawei/hinic/hinic_hwif.c:581: warning: Function parameter or member 'dwqe_mapping' not described in 'hinic_init_hwif' >> drivers/net/ethernet/huawei/hinic/hinic_hwif.c:717: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * get function id from register,used by sriov hot migration process drivers/net/ethernet/huawei/hinic/hinic_hwif.c:802: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * get function id, used by sriov hot migratition process. vim +373 drivers/net/ethernet/huawei/hinic/hinic_mbox.c 9c1c9598010fbb drivers/net/ethernet/huawei/hinic/hinic_mbox.c Zhou Shuai 2024-03-13 365 9c1c9598010fbb drivers/net/ethernet/huawei/hinic/hinic_mbox.c Zhou Shuai 2024-03-13 366 /** 9c1c9598010fbb drivers/net/ethernet/huawei/hinic/hinic_mbox.c Zhou Shuai 2024-03-13 367 * hinic_unregister_ppf_mbox_cb - unregister the mbox callback for pf a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 368 * @hwdev: the pointer to hw device a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 369 * @mod: specific mod that the callback will handle a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 370 */ a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 371 void hinic_unregister_pf_mbox_cb(struct hinic_hwdev *hwdev, a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 372 enum hinic_mod_type mod) a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 @373 { a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 374 struct hinic_mbox_func_to_func *func_to_func = hwdev->func_to_func; a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 375 a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 376 clear_bit(HINIC_PF_MBOX_CB_REG, &func_to_func->pf_mbox_cb_state[mod]); a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 377 a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 378 while (test_bit(HINIC_PF_MBOX_CB_RUNNING, a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 379 &func_to_func->pf_mbox_cb_state[mod])) a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 380 usleep_range(900, 1000); a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 381 a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 382 func_to_func->pf_mbox_cb[mod] = NULL; a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 383 } a425b6e1c69ba9 drivers/net/ethernet/huawei/hinic/hinic_hw_mbox.c Luo bin 2020-04-25 384 :::::: The code at line 373 was first introduced by commit :::::: a425b6e1c69ba907b72b737a4d44f8cfbc43ce3c hinic: add mailbox function support :::::: TO: Luo bin <luobin9(a)huawei.com> :::::: CC: David S. Miller <davem(a)davemloft.net> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3542/3542] arch/x86/kernel/cpu/proc.c:63:5: warning: no previous prototype for function 'show_cpuinfo'
by kernel test robot 15 Dec '25

15 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 549c32bcd16ff65ec78f30270d68abe28dfddcc8 commit: 9d3b0e8891b8b3450a7cd6d1367946a1c69e4eb9 [3542/3542] bpf: Add cpuinfo_x86 iterator target config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20251215/202512151347.pYQgm67P-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512151347.pYQgm67P-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512151347.pYQgm67P-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/x86/kernel/cpu/proc.c:63:5: warning: no previous prototype for function 'show_cpuinfo' [-Wmissing-prototypes] 63 | int show_cpuinfo(struct seq_file *m, void *v) | ^ arch/x86/kernel/cpu/proc.c:63:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 63 | int show_cpuinfo(struct seq_file *m, void *v) | ^ | static 1 warning generated. vim +/show_cpuinfo +63 arch/x86/kernel/cpu/proc.c 62 > 63 int show_cpuinfo(struct seq_file *m, void *v) 64 { 65 struct cpuinfo_x86 *c = v; 66 unsigned int cpu; 67 int i; 68 69 cpu = c->cpu_index; 70 seq_printf(m, "processor\t: %u\n" 71 "vendor_id\t: %s\n" 72 "cpu family\t: %d\n" 73 "model\t\t: %u\n" 74 "model name\t: %s\n", 75 cpu, 76 c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", 77 c->x86, 78 c->x86_model, 79 c->x86_model_id[0] ? c->x86_model_id : "unknown"); 80 81 if (c->x86_stepping || c->cpuid_level >= 0) 82 seq_printf(m, "stepping\t: %d\n", c->x86_stepping); 83 else 84 seq_puts(m, "stepping\t: unknown\n"); 85 if (c->microcode) 86 seq_printf(m, "microcode\t: 0x%x\n", c->microcode); 87 88 if (cpu_has(c, X86_FEATURE_TSC)) { 89 unsigned int freq = arch_freq_get_on_cpu(cpu); 90 91 seq_printf(m, "cpu MHz\t\t: %u.%03u\n", freq / 1000, (freq % 1000)); 92 } 93 94 /* Cache size */ 95 if (c->x86_cache_size) 96 seq_printf(m, "cache size\t: %u KB\n", c->x86_cache_size); 97 98 show_cpuinfo_core(m, c, cpu); 99 show_cpuinfo_misc(m, c); 100 101 seq_puts(m, "flags\t\t:"); 102 for (i = 0; i < 32*NCAPINTS; i++) 103 if (cpu_has(c, i) && x86_cap_flags[i] != NULL) { 104 if (c->x86_vendor == X86_VENDOR_HYGON) 105 seq_printf(m, " %s", i == X86_FEATURE_SEV ? "csv" : 106 (i == X86_FEATURE_SEV_ES ? "csv2" : 107 x86_cap_flags[i])); 108 else 109 seq_printf(m, " %s", x86_cap_flags[i]); 110 } 111 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3542/3542] drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:459:6: error: no previous prototype for 'sxe_debugfs_entries_exit'
by kernel test robot 15 Dec '25

15 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 549c32bcd16ff65ec78f30270d68abe28dfddcc8 commit: dd013ad487534c1838afc2f55efdb5daec15aace [3542/3542] Ethernet: Linkdata: Supports Linkdata ethernet Controllers config: x86_64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20251215/202512150524.N6WnCpPL-lkp@…) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150524.N6WnCpPL-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512150524.N6WnCpPL-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_xdp.c:410:6: error: no previous prototype for 'sxe_txrx_ring_enable' [-Werror=missing-prototypes] 410 | void sxe_txrx_ring_enable(struct sxe_adapter *adapter, u32 ring_idx) | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:432:6: error: no previous prototype for 'sxe_debugfs_entries_init' [-Werror=missing-prototypes] 432 | void sxe_debugfs_entries_init(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:459:6: error: no previous prototype for 'sxe_debugfs_entries_exit' [-Werror=missing-prototypes] 459 | void sxe_debugfs_entries_exit(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:465:6: error: no previous prototype for 'sxe_debugfs_init' [-Werror=missing-prototypes] 465 | void sxe_debugfs_init(void) | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:470:6: error: no previous prototype for 'sxe_debugfs_exit' [-Werror=missing-prototypes] 470 | void sxe_debugfs_exit(void) | ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2022:5: error: no previous prototype for 'sxe_reg_test' [-Werror=missing-prototypes] 2022 | int sxe_reg_test(struct sxe_adapter *adapter) | ^~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2644:5: error: no previous prototype for 'sxe_phys_id_set' [-Werror=missing-prototypes] 2644 | int sxe_phys_id_set(struct net_device *netdev, enum ethtool_phys_id_state state) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c: In function 'sxe_get_module_eeprom': drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2736:47: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 2736 | LOG_ERROR("read sfp failed\n"); | ^ cc1: all warnings being treated as errors -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:230:6: error: no previous prototype for 'sxe_hw_no_snoop_disable' [-Werror=missing-prototypes] 230 | void sxe_hw_no_snoop_disable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:262:6: error: no previous prototype for 'sxe_hw_uc_addr_pool_del' [-Werror=missing-prototypes] 262 | void sxe_hw_uc_addr_pool_del(struct sxe_hw *hw, u32 rar_idx, u32 pool_idx) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:283:5: error: no previous prototype for 'sxe_hw_uc_addr_pool_enable' [-Werror=missing-prototypes] 283 | s32 sxe_hw_uc_addr_pool_enable(struct sxe_hw *hw, u8 rar_idx, u8 pool_idx) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:337:5: error: no previous prototype for 'sxe_hw_nic_reset' [-Werror=missing-prototypes] 337 | s32 sxe_hw_nic_reset(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:367:6: error: no previous prototype for 'sxe_hw_pf_rst_done_set' [-Werror=missing-prototypes] 367 | void sxe_hw_pf_rst_done_set(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:735:5: error: no previous prototype for 'sxe_hw_pending_irq_read_clear' [-Werror=missing-prototypes] 735 | u32 sxe_hw_pending_irq_read_clear(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:740:6: error: no previous prototype for 'sxe_hw_pending_irq_write_clear' [-Werror=missing-prototypes] 740 | void sxe_hw_pending_irq_write_clear(struct sxe_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:745:5: error: no previous prototype for 'sxe_hw_irq_cause_get' [-Werror=missing-prototypes] 745 | u32 sxe_hw_irq_cause_get(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:765:6: error: no previous prototype for 'sxe_hw_ring_irq_auto_disable' [-Werror=missing-prototypes] 765 | void sxe_hw_ring_irq_auto_disable(struct sxe_hw *hw, bool is_msix) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:775:6: error: no previous prototype for 'sxe_hw_irq_general_reg_set' [-Werror=missing-prototypes] 775 | void sxe_hw_irq_general_reg_set(struct sxe_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:780:5: error: no previous prototype for 'sxe_hw_irq_general_reg_get' [-Werror=missing-prototypes] 780 | u32 sxe_hw_irq_general_reg_get(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:790:6: error: no previous prototype for 'sxe_hw_event_irq_map' [-Werror=missing-prototypes] 790 | void sxe_hw_event_irq_map(struct sxe_hw *hw, u8 offset, u16 irq_idx) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:806:6: error: no previous prototype for 'sxe_hw_ring_irq_map' [-Werror=missing-prototypes] 806 | void sxe_hw_ring_irq_map(struct sxe_hw *hw, bool is_tx, u16 reg_idx, | ^~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:823:6: error: no previous prototype for 'sxe_hw_ring_irq_interval_set' [-Werror=missing-prototypes] 823 | void sxe_hw_ring_irq_interval_set(struct sxe_hw *hw, u16 irq_idx, u32 interval) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:838:6: error: no previous prototype for 'sxe_hw_event_irq_auto_clear_set' [-Werror=missing-prototypes] 838 | void sxe_hw_event_irq_auto_clear_set(struct sxe_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:843:6: error: no previous prototype for 'sxe_hw_specific_irq_disable' [-Werror=missing-prototypes] 843 | void sxe_hw_specific_irq_disable(struct sxe_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:848:6: error: no previous prototype for 'sxe_hw_specific_irq_enable' [-Werror=missing-prototypes] 848 | void sxe_hw_specific_irq_enable(struct sxe_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:876:6: error: no previous prototype for 'sxe_hw_all_irq_disable' [-Werror=missing-prototypes] 876 | void sxe_hw_all_irq_disable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:994:5: error: no previous prototype for 'sxe_hw_link_speed_get' [-Werror=missing-prototypes] 994 | u32 sxe_hw_link_speed_get(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1014:6: error: no previous prototype for 'sxe_hw_link_speed_set' [-Werror=missing-prototypes] 1014 | void sxe_hw_link_speed_set(struct sxe_hw *hw, u32 speed) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1033:6: error: no previous prototype for 'sxe_hw_is_link_state_up' [-Werror=missing-prototypes] 1033 | bool sxe_hw_is_link_state_up(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1055:6: error: no previous prototype for 'sxe_hw_mac_pad_enable' [-Werror=missing-prototypes] 1055 | void sxe_hw_mac_pad_enable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1064:5: error: no previous prototype for 'sxe_hw_fc_enable' [-Werror=missing-prototypes] 1064 | s32 sxe_hw_fc_enable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1135:6: error: no previous prototype for 'sxe_fc_autoneg_localcap_set' [-Werror=missing-prototypes] 1135 | void sxe_fc_autoneg_localcap_set(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1164:5: error: no previous prototype for 'sxe_hw_pfc_enable' [-Werror=missing-prototypes] 1164 | s32 sxe_hw_pfc_enable(struct sxe_hw *hw, u8 tc_idx) | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1256:6: error: no previous prototype for 'sxe_hw_crc_configure' [-Werror=missing-prototypes] 1256 | void sxe_hw_crc_configure(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1264:6: error: no previous prototype for 'sxe_hw_loopback_switch' [-Werror=missing-prototypes] 1264 | void sxe_hw_loopback_switch(struct sxe_hw *hw, bool is_enable) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1276:6: error: no previous prototype for 'sxe_hw_mac_txrx_enable' [-Werror=missing-prototypes] 1276 | void sxe_hw_mac_txrx_enable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1285:6: error: no previous prototype for 'sxe_hw_mac_max_frame_set' [-Werror=missing-prototypes] 1285 | void sxe_hw_mac_max_frame_set(struct sxe_hw *hw, u32 max_frame) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1298:5: error: no previous prototype for 'sxe_hw_mac_max_frame_get' [-Werror=missing-prototypes] 1298 | u32 sxe_hw_mac_max_frame_get(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1330:6: error: no previous prototype for 'sxe_hw_fc_tc_high_water_mark_set' [-Werror=missing-prototypes] 1330 | void sxe_hw_fc_tc_high_water_mark_set(struct sxe_hw *hw, u8 tc_idx, u32 mark) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1335:6: error: no previous prototype for 'sxe_hw_fc_tc_low_water_mark_set' [-Werror=missing-prototypes] 1335 | void sxe_hw_fc_tc_low_water_mark_set(struct sxe_hw *hw, u8 tc_idx, u32 mark) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1340:6: error: no previous prototype for 'sxe_hw_is_fc_autoneg_disabled' [-Werror=missing-prototypes] 1340 | bool sxe_hw_is_fc_autoneg_disabled(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1345:6: error: no previous prototype for 'sxe_hw_fc_autoneg_disable_set' [-Werror=missing-prototypes] 1345 | void sxe_hw_fc_autoneg_disable_set(struct sxe_hw *hw, bool is_disabled) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1360:6: error: no previous prototype for 'sxe_hw_fc_requested_mode_set' [-Werror=missing-prototypes] 1360 | void sxe_hw_fc_requested_mode_set(struct sxe_hw *hw, enum sxe_fc_mode mode) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1388:5: error: no previous prototype for 'sxe_hw_rx_mode_get' [-Werror=missing-prototypes] 1388 | u32 sxe_hw_rx_mode_get(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1393:5: error: no previous prototype for 'sxe_hw_pool_rx_mode_get' [-Werror=missing-prototypes] 1393 | u32 sxe_hw_pool_rx_mode_get(struct sxe_hw *hw, u16 pool_idx) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1398:6: error: no previous prototype for 'sxe_hw_rx_mode_set' [-Werror=missing-prototypes] 1398 | void sxe_hw_rx_mode_set(struct sxe_hw *hw, u32 filter_ctrl) | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1403:6: error: no previous prototype for 'sxe_hw_pool_rx_mode_set' [-Werror=missing-prototypes] 1403 | void sxe_hw_pool_rx_mode_set(struct sxe_hw *hw, u32 vmolr, u16 pool_idx) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1408:6: error: no previous prototype for 'sxe_hw_rx_lro_enable' [-Werror=missing-prototypes] 1408 | void sxe_hw_rx_lro_enable(struct sxe_hw *hw, bool is_enable) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1420:6: error: no previous prototype for 'sxe_hw_rx_nfs_filter_disable' [-Werror=missing-prototypes] 1420 | void sxe_hw_rx_nfs_filter_disable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1428:6: error: no previous prototype for 'sxe_hw_rx_udp_frag_checksum_disable' [-Werror=missing-prototypes] 1428 | void sxe_hw_rx_udp_frag_checksum_disable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1437:6: error: no previous prototype for 'sxe_hw_fc_mac_addr_set' [-Werror=missing-prototypes] 1437 | void sxe_hw_fc_mac_addr_set(struct sxe_hw *hw, u8 *mac_addr) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1449:5: error: no previous prototype for 'sxe_hw_uc_addr_add' [-Werror=missing-prototypes] 1449 | s32 sxe_hw_uc_addr_add(struct sxe_hw *hw, u32 rar_idx, u8 *addr, u32 pool_idx) | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1484:5: error: no previous prototype for 'sxe_hw_uc_addr_del' [-Werror=missing-prototypes] 1484 | s32 sxe_hw_uc_addr_del(struct sxe_hw *hw, u32 index) | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1510:6: error: no previous prototype for 'sxe_hw_mta_hash_table_set' [-Werror=missing-prototypes] 1510 | void sxe_hw_mta_hash_table_set(struct sxe_hw *hw, u8 index, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1515:6: error: no previous prototype for 'sxe_hw_mta_hash_table_update' [-Werror=missing-prototypes] 1515 | void sxe_hw_mta_hash_table_update(struct sxe_hw *hw, u8 reg_idx, u8 bit_idx) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1525:5: error: no previous prototype for 'sxe_hw_mc_filter_get' [-Werror=missing-prototypes] 1525 | u32 sxe_hw_mc_filter_get(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1530:6: error: no previous prototype for 'sxe_hw_mc_filter_enable' [-Werror=missing-prototypes] 1530 | void sxe_hw_mc_filter_enable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1554:6: error: no previous prototype for 'sxe_hw_uc_addr_clear' [-Werror=missing-prototypes] 1554 | void sxe_hw_uc_addr_clear(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1587:6: error: no previous prototype for 'sxe_hw_vt_ctrl_cfg' [-Werror=missing-prototypes] 1587 | void sxe_hw_vt_ctrl_cfg(struct sxe_hw *hw, u8 default_pool) | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1601:6: error: no previous prototype for 'sxe_hw_vt_disable' [-Werror=missing-prototypes] 1601 | void sxe_hw_vt_disable(struct sxe_hw *hw) | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1675:5: error: no previous prototype for 'sxe_hw_vlan_pool_filter_read' [-Werror=missing-prototypes] 1675 | u32 sxe_hw_vlan_pool_filter_read(struct sxe_hw *hw, u16 reg_index) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1697:6: error: no previous prototype for 'sxe_hw_vlan_filter_array_write' [-Werror=missing-prototypes] 1697 | void sxe_hw_vlan_filter_array_write(struct sxe_hw *hw, u16 reg_index, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1702:5: error: no previous prototype for 'sxe_hw_vlan_filter_array_read' [-Werror=missing-prototypes] 1702 | u32 sxe_hw_vlan_filter_array_read(struct sxe_hw *hw, u16 reg_index) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:1707:6: error: no previous prototype for 'sxe_hw_vlan_filter_switch' [-Werror=missing-prototypes] 1707 | void sxe_hw_vlan_filter_switch(struct sxe_hw *hw, bool is_enable) -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:136:5: error: no previous prototype for 'sxe_msi_irq_init' [-Werror=missing-prototypes] 136 | int sxe_msi_irq_init(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:182:6: error: no previous prototype for 'sxe_disable_dcb' [-Werror=missing-prototypes] 182 | void sxe_disable_dcb(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:212:6: error: no previous prototype for 'sxe_disable_rss' [-Werror=missing-prototypes] 212 | void sxe_disable_rss(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:729:6: error: no previous prototype for 'sxe_lsc_irq_handler' [-Werror=missing-prototypes] 729 | void sxe_lsc_irq_handler(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:745:6: error: no previous prototype for 'sxe_mailbox_irq_handler' [-Werror=missing-prototypes] 745 | void sxe_mailbox_irq_handler(struct sxe_adapter *adapter) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:70:6: error: no previous prototype for 'sxe_allow_inval_mac' [-Werror=missing-prototypes] 70 | bool sxe_allow_inval_mac(void) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_phy.c:733:5: error: no previous prototype for 'sxe_multispeed_sfp_link_configure' [-Werror=missing-prototypes] 733 | s32 sxe_multispeed_sfp_link_configure(struct sxe_adapter *adapter, u32 speed) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_rx_proc.c:1431:6: error: no previous prototype for 'sxe_headers_cleanup' [-Werror=missing-prototypes] 1431 | bool sxe_headers_cleanup(struct sxe_ring *rx_ring, | ^~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_rx_proc.c:1569:6: error: no previous prototype for 'sxe_rx_buffer_page_offset_update' [-Werror=missing-prototypes] 1569 | void sxe_rx_buffer_page_offset_update(struct sxe_ring *rx_ring, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c: In function 'sxe_vf_uc_addr_del': >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c:766:13: error: variable 'ret' set but not used [-Werror=unused-but-set-variable] 766 | s32 ret; | ^~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c: At top level: >> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c:1552:6: error: no previous prototype for 'sxe_set_vf_link_enable' [-Werror=missing-prototypes] 1552 | void sxe_set_vf_link_enable(struct sxe_adapter *adapter, s32 vf_idx, s32 state) | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors -- drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:160:6: error: no previous prototype for 'sxevf_hw_stop' [-Werror=missing-prototypes] 160 | void sxevf_hw_stop(struct sxevf_hw *hw) | ^~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:187:6: error: no previous prototype for 'sxevf_msg_write' [-Werror=missing-prototypes] 187 | void sxevf_msg_write(struct sxevf_hw *hw, u8 index, u32 msg) | ^~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:196:5: error: no previous prototype for 'sxevf_msg_read' [-Werror=missing-prototypes] 196 | u32 sxevf_msg_read(struct sxevf_hw *hw, u8 index) | ^~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:206:5: error: no previous prototype for 'sxevf_mailbox_read' [-Werror=missing-prototypes] 206 | u32 sxevf_mailbox_read(struct sxevf_hw *hw) | ^~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:211:6: error: no previous prototype for 'sxevf_mailbox_write' [-Werror=missing-prototypes] 211 | void sxevf_mailbox_write(struct sxevf_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:216:6: error: no previous prototype for 'sxevf_pf_req_irq_trigger' [-Werror=missing-prototypes] 216 | void sxevf_pf_req_irq_trigger(struct sxevf_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:221:6: error: no previous prototype for 'sxevf_pf_ack_irq_trigger' [-Werror=missing-prototypes] 221 | void sxevf_pf_ack_irq_trigger(struct sxevf_hw *hw) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:226:6: error: no previous prototype for 'sxevf_event_irq_map' [-Werror=missing-prototypes] 226 | void sxevf_event_irq_map(struct sxevf_hw *hw, u16 vector) | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:240:6: error: no previous prototype for 'sxevf_specific_irq_enable' [-Werror=missing-prototypes] 240 | void sxevf_specific_irq_enable(struct sxevf_hw *hw, u32 value) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:245:6: error: no previous prototype for 'sxevf_irq_enable' [-Werror=missing-prototypes] 245 | void sxevf_irq_enable(struct sxevf_hw *hw, u32 mask) | ^~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:251:6: error: no previous prototype for 'sxevf_irq_disable' [-Werror=missing-prototypes] 251 | void sxevf_irq_disable(struct sxevf_hw *hw) | ^~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:259:6: error: no previous prototype for 'sxevf_hw_ring_irq_map' [-Werror=missing-prototypes] 259 | void sxevf_hw_ring_irq_map(struct sxevf_hw *hw, bool is_tx, u16 hw_ring_idx, | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:276:6: error: no previous prototype for 'sxevf_ring_irq_interval_set' [-Werror=missing-prototypes] 276 | void sxevf_ring_irq_interval_set(struct sxevf_hw *hw, u16 irq_idx, u32 interval) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:313:6: error: no previous prototype for 'sxevf_hw_reset' [-Werror=missing-prototypes] 313 | void sxevf_hw_reset(struct sxevf_hw *hw) | ^~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:324:5: error: no previous prototype for 'sxevf_link_state_get' [-Werror=missing-prototypes] 324 | u32 sxevf_link_state_get(struct sxevf_hw *hw) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:539:6: error: no previous prototype for 'sxevf_tx_ring_switch' [-Werror=missing-prototypes] 539 | void sxevf_tx_ring_switch(struct sxevf_hw *hw, u8 reg_idx, bool is_on) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:594:6: error: no previous prototype for 'sxevf_rx_ring_switch' [-Werror=missing-prototypes] 594 | void sxevf_rx_ring_switch(struct sxevf_hw *hw, u8 reg_idx, bool is_on) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:626:6: error: no previous prototype for 'sxevf_rx_ring_desc_configure' [-Werror=missing-prototypes] 626 | void sxevf_rx_ring_desc_configure(struct sxevf_hw *hw, u32 desc_mem_len, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:640:6: error: no previous prototype for 'sxevf_rx_rcv_ctl_configure' [-Werror=missing-prototypes] 640 | void sxevf_rx_rcv_ctl_configure(struct sxevf_hw *hw, u8 reg_idx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:697:6: error: no previous prototype for 'sxevf_32bit_counter_update' [-Werror=missing-prototypes] 697 | void sxevf_32bit_counter_update(struct sxevf_hw *hw, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:710:6: error: no previous prototype for 'sxevf_36bit_counter_update' [-Werror=missing-prototypes] 710 | void sxevf_36bit_counter_update(struct sxevf_hw *hw, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:726:6: error: no previous prototype for 'sxevf_packet_stats_get' [-Werror=missing-prototypes] 726 | void sxevf_packet_stats_get(struct sxevf_hw *hw, struct sxevf_hw_stats *stats) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:740:6: error: no previous prototype for 'sxevf_stats_init_value_get' [-Werror=missing-prototypes] 740 | void sxevf_stats_init_value_get(struct sxevf_hw *hw, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors .. vim +/sxe_debugfs_entries_exit +459 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c 458 > 459 void sxe_debugfs_entries_exit(struct sxe_adapter *adapter) 460 { 461 debugfs_remove_recursive(adapter->debugfs_entries); 462 adapter->debugfs_entries = NULL; 463 } 464 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10] firewire: net: fix use after free in fwnet_finish_incoming_packet()
by Xia Fukun 15 Dec '25

15 Dec '25
From: Zhang Shurong <zhang_shurong(a)foxmail.com> mainline inclusion from mainline-v6.17-rc7 commit 3ff256751a2853e1ffaa36958ff933ccc98c6cb5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICYQPN CVE: CVE-2023-53432 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- The netif_rx() function frees the skb so we can't dereference it to save the skb->len. Signed-off-by: Zhang Shurong <zhang_shurong(a)foxmail.com> Link: https://lore.kernel.org/r/tencent_3B3D24B66ED66A6BB73CC0E63C6A14E45109@qq.c… Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp> Conflicts: drivers/firewire/net.c [Context differences.] Signed-off-by: Xia Fukun <xiafukun(a)huawei.com> --- drivers/firewire/net.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 715e491dfbc3..8504e95ede90 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -489,7 +489,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net, bool is_broadcast, u16 ether_type) { struct fwnet_device *dev; - int status; + int status, len; __be64 guid; switch (ether_type) { @@ -546,13 +546,15 @@ static int fwnet_finish_incoming_packet(struct net_device *net, } skb->protocol = protocol; } + + len = skb->len; status = netif_rx(skb); if (status == NET_RX_DROP) { net->stats.rx_errors++; net->stats.rx_dropped++; } else { net->stats.rx_packets++; - net->stats.rx_bytes += skb->len; + net->stats.rx_bytes += len; } return 0; -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] mm: migrate: add dma copy offloading for hugetlb
by Zeng Heng 15 Dec '25

15 Dec '25
From: Tong Tiangen <tongtiangen(a)huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IDBGTZ CVE: NA ------------------------------- Large memory migration imposes significant overhead on the CPU. This patch introduces enhancements to the page migration by offloading the copy to UDMA hardware which based on the DMA engine framework, and a new migration mode has been introduced, If DMA migration fails, it will fall back to CPU migration. DMA migration supports both asynchronous and synchronous modes for subsequent debugging purposes. Signed-off-by: Tong Tiangen <tongtiangen(a)huawei.com> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- arch/arm64/configs/openeuler_defconfig | 1 + include/linux/migrate_mode.h | 2 + include/linux/mm.h | 8 ++ mm/Kconfig | 7 ++ mm/Makefile | 1 + mm/migrate.c | 5 + mm/migrate_dma.c | 143 +++++++++++++++++++++++++ 7 files changed, 167 insertions(+) create mode 100644 mm/migrate_dma.c diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index b9a451bd7d65..44e1c0debb1a 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -1186,6 +1186,7 @@ CONFIG_COMPACTION=y CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 CONFIG_PAGE_REPORTING=y CONFIG_MIGRATION=y +CONFIG_MIGRATE_PAGES_DMA_OFFLOADING=y CONFIG_DEVICE_MIGRATION=y CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y CONFIG_ARCH_ENABLE_THP_MIGRATION=y diff --git a/include/linux/migrate_mode.h b/include/linux/migrate_mode.h index 0f577f932bb4..4c992bc66575 100644 --- a/include/linux/migrate_mode.h +++ b/include/linux/migrate_mode.h @@ -19,6 +19,8 @@ enum migrate_mode { MIGRATE_SYNC_NO_COPY, }; +#define MIGRATE_ASYNC_DMA_OFFLOADING (10) + enum migrate_reason { MR_COMPACTION, MR_MEMORY_FAILURE, diff --git a/include/linux/mm.h b/include/linux/mm.h index c0040a2014c4..036822cb1b9d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1330,6 +1330,14 @@ void put_pages_list(struct list_head *pages); void split_page(struct page *page, unsigned int order); void folio_copy(struct folio *dst, struct folio *src); int folio_mc_copy(struct folio *dst, struct folio *src); +#ifdef CONFIG_MIGRATE_PAGES_DMA_OFFLOADING +int folio_dma_copy(struct folio *dst, struct folio *src); +#else +static inline int folio_dma_copy(struct folio *dst, struct folio *src) +{ + return -ENODEV; +} +#endif unsigned long nr_free_buffer_pages(void); diff --git a/mm/Kconfig b/mm/Kconfig index 4eb0642b71e5..9408a3ca7f4c 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -696,6 +696,13 @@ config MIGRATION pages as migration can relocate pages to satisfy a huge page allocation instead of reclaiming. +config MIGRATE_PAGES_DMA_OFFLOADING + bool "Support to use DMA channels for page migration" + depends on DMA_ENGINE + default y + help + Allows kernel to use dma offloading for page migraton. + config DEVICE_MIGRATION def_bool MIGRATION && ZONE_DEVICE diff --git a/mm/Makefile b/mm/Makefile index e45cdeda47b7..dd81f8c33e03 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_FAILSLAB) += failslab.o obj-$(CONFIG_FAIL_PAGE_ALLOC) += fail_page_alloc.o obj-$(CONFIG_MEMTEST) += memtest.o obj-$(CONFIG_MIGRATION) += migrate.o +obj-$(CONFIG_MIGRATE_PAGES_DMA_OFFLOADING) += migrate_dma.o obj-$(CONFIG_NUMA) += memory-tiers.o obj-$(CONFIG_DEVICE_MIGRATION) += migrate_device.o obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o diff --git a/mm/migrate.c b/mm/migrate.c index 4edd29d9a041..8b1058b28175 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -583,6 +583,11 @@ static int folio_migrate_mc_copy(struct folio *dst, struct folio *src, if (mode == MIGRATE_SYNC_NO_COPY) return 0; + if (mode == MIGRATE_ASYNC_DMA_OFFLOADING && folio_test_hugetlb(src)) + /* if dma offloading fail, fallback */ + if (!folio_dma_copy(dst, src)) + return 0; + return folio_mc_copy(dst, src); } diff --git a/mm/migrate_dma.c b/mm/migrate_dma.c new file mode 100644 index 000000000000..c6ff6f1258aa --- /dev/null +++ b/mm/migrate_dma.c @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Support to use DMA channels for page migration. + * + * Copyright (C) 2025 Huawei Limited + */ + +#include <linux/dmaengine.h> +#include <linux/dma-mapping.h> + +/* DMA channel track its transfers done */ +struct dma_channel_work { + struct dma_chan *chan; + enum dma_status status; + struct completion done; +}; + +static void folios_dma_copy_completion_callback(void *param, + const struct dmaengine_result *result) +{ + struct dma_channel_work *chan_work = param; + + if (result) { + enum dmaengine_tx_result dma_res = result->result; + + if (dma_res == DMA_TRANS_NOERROR) + chan_work->status = DMA_COMPLETE; + else + chan_work->status = DMA_ERROR; + } + + complete(&chan_work->done); +} + +static int process_folio_dma_transfer(struct dma_channel_work *chan_work, + struct folio *src, struct folio *dst) +{ + struct dma_chan *chan = chan_work->chan; + struct device *dev = dmaengine_get_dma_device(chan); + enum dma_ctrl_flags flags = DMA_CTRL_ACK; + struct dma_async_tx_descriptor *tx; + dma_addr_t src_handle, dst_handle; + size_t size = folio_size(src); + int ret; + + flags |= DMA_PREP_INTERRUPT; + + src_handle = dma_map_page(dev, &src->page, 0, size, DMA_TO_DEVICE); + if (dma_mapping_error(dev, src_handle)) { + pr_err("map dma src page error.\n"); + return -ENOMEM; + } + + dst_handle = dma_map_page(dev, &dst->page, 0, size, DMA_FROM_DEVICE); + if (dma_mapping_error(dev, dst_handle)) { + pr_err("map dma dst page error.\n"); + ret = -ENOMEM; + goto out_unmap; + } + + tx = dmaengine_prep_dma_memcpy(chan, dst_handle, src_handle, + size, flags); + if (unlikely(!tx)) { + pr_err("prep dma memcpy error.\n"); + ret = -EBUSY; + goto out_unmap_all; + } + + tx->callback_result = folios_dma_copy_completion_callback; + tx->callback_param = chan_work; + init_completion(&chan_work->done); + chan_work->status = DMA_ERROR; + + if (dma_submit_error(dmaengine_submit(tx))) { + pr_err("dma submit error.\n"); + ret = -EINVAL; + goto out_unmap_all; + } + + dma_async_issue_pending(chan); + if (!wait_for_completion_timeout(&chan_work->done, + msecs_to_jiffies(1000))) { + ret = -ETIMEDOUT; + goto out_unmap_all; + } + + ret = (chan_work->status == DMA_COMPLETE) ? 0 : -EPROTO; + +out_unmap_all: + dma_unmap_page(dev, dst_handle, size, DMA_FROM_DEVICE); +out_unmap: + dma_unmap_page(dev, src_handle, size, DMA_TO_DEVICE); + + return ret; +} + +static bool folio_dma_chan_filter(struct dma_chan *chan, void *param) +{ + return !strcmp(dev_name(chan->device->dev), "ub_dma_device"); +} + +int folio_dma_copy(struct folio *dst, struct folio *src) +{ + struct dma_channel_work *chan_work; + struct dma_slave_config dma_cfg; + struct dma_chan *chan; + dma_cap_mask_t mask; + int ret = -ENODEV; + + dma_cap_zero(mask); + dma_cap_set(DMA_MEMCPY, mask); + chan = dma_request_channel(mask, folio_dma_chan_filter, NULL); + if (!chan) { + pr_err("failed to allocate dma channel.\n"); + return ret; + } + + memset(&dma_cfg, 0, sizeof(dma_cfg)); + dma_cfg.direction = DMA_MEM_TO_MEM; + ret = dmaengine_slave_config(chan, &dma_cfg); + if (ret) { + pr_err("failed to config dma channel.\n"); + goto out_release; + } + + chan_work = kmalloc(sizeof(*chan_work), GFP_KERNEL); + if (unlikely(!chan_work)) { + pr_err("failed to allocate memory for chan work.\n"); + goto out_release; + } + + chan_work->chan = chan; + ret = process_folio_dma_transfer(chan_work, src, dst); + if (unlikely(ret)) + pr_err("failed to process folio dma transfer.\n"); + + kfree(chan_work); +out_release: + dma_release_channel(chan); + + return ret; +} +EXPORT_SYMBOL(folio_dma_copy); -- 2.25.1
2 1
0 0
[openeuler:OLK-6.6 3541/3541] kernel/livepatch/core.c:216:13: warning: no previous prototype for function 'arch_klp_skip_resolve'
by kernel test robot 15 Dec '25

15 Dec '25
Hi laokz, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: b8f3220637be1736c165c289c634f27841ac4e01 [3541/3541] livepatch: add arch hook before doing klp_resolve_symbols config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150919.EC4St0LR-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150919.EC4St0LR-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512150919.EC4St0LR-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/livepatch/core.c:97:12: warning: no previous prototype for function 'arch_klp_init_func' [-Wmissing-prototypes] 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ kernel/livepatch/core.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ | static >> kernel/livepatch/core.c:216:13: warning: no previous prototype for function 'arch_klp_skip_resolve' [-Wmissing-prototypes] 216 | bool __weak arch_klp_skip_resolve(unsigned int type) | ^ kernel/livepatch/core.c:216:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 216 | bool __weak arch_klp_skip_resolve(unsigned int type) | ^ | static kernel/livepatch/core.c:1767:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1767 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1767:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1767 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static kernel/livepatch/core.c:2022:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 2022 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:2022:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2022 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static kernel/livepatch/core.c:2027:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 2027 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:2027:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2027 | void __weak arch_klp_mem_free(void *mem) | ^ | static kernel/livepatch/core.c:2032:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 2032 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:2032:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2032 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:2036:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 2036 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:2036:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2036 | void __weak arch_klp_code_modify_post_process(void) | ^ | static kernel/livepatch/core.c:2049:12: warning: no previous prototype for function 'arch_klp_check_breakpoint' [-Wmissing-prototypes] 2049 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2049:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2049 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static kernel/livepatch/core.c:2063:13: warning: no previous prototype for function 'arch_klp_set_brk_func' [-Wmissing-prototypes] 2063 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ kernel/livepatch/core.c:2063:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2063 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ | static 9 warnings generated. vim +/arch_klp_skip_resolve +216 kernel/livepatch/core.c 214 215 #ifdef CONFIG_LIVEPATCH_WO_FTRACE > 216 bool __weak arch_klp_skip_resolve(unsigned int type) 217 { 218 return false; 219 } 220 #endif 221 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/sched/fair.c:143:14: sparse: sparse: symbol 'sysctl_overload_detect_period' was not declared. Should it be static?
by kernel test robot 15 Dec '25

15 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: a3c9f2da0a35df4e41751556be4308f57bdaf3d6 [3541/3541] sched: Introduce handle priority reversion mechanism config: arm64-randconfig-r113-20251213 (https://download.01.org/0day-ci/archive/20251215/202512150649.o2WPQrCa-lkp@…) compiler: aarch64-linux-gcc (GCC) 12.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150649.o2WPQrCa-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512150649.o2WPQrCa-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> kernel/sched/fair.c:143:14: sparse: sparse: symbol 'sysctl_overload_detect_period' was not declared. Should it be static? >> kernel/sched/fair.c:144:14: sparse: sparse: symbol 'sysctl_offline_wait_interval' was not declared. Should it be static? kernel/sched/fair.c:1236:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_entity const *se @@ got struct sched_entity [noderef] __rcu * @@ kernel/sched/fair.c:1236:34: sparse: expected struct sched_entity const *se kernel/sched/fair.c:1236:34: sparse: got struct sched_entity [noderef] __rcu * kernel/sched/fair.c:3019:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu * @@ kernel/sched/fair.c:3019:13: sparse: expected struct task_struct *tsk kernel/sched/fair.c:3019:13: sparse: got struct task_struct [noderef] __rcu * kernel/sched/fair.c:12477:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12477:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12477:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:5766:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:5766:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:5766:22: sparse: struct task_struct * kernel/sched/fair.c:7809:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:7809:20: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:7809:20: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8014:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:8014:9: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/fair.c:8014:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8113:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8113:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8113:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:8333:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:8333:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:8333:22: sparse: struct task_struct * kernel/sched/fair.c:8687:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8687:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8687:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:9680:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:9680:40: sparse: expected struct sched_domain *child kernel/sched/fair.c:9680:40: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:10317:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:10317:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:10317:22: sparse: struct task_struct * kernel/sched/fair.c:11749:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11749:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:11749:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:11406:44: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *sd_parent @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11406:44: sparse: expected struct sched_domain *sd_parent kernel/sched/fair.c:11406:44: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:11845:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11845:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:11845:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:2965:9: sparse: sparse: context imbalance in 'task_numa_placement' - different lock contexts for basic block kernel/sched/fair.c:7047:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:7047:28: sparse: expected struct sched_domain *sd kernel/sched/fair.c:7047:28: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:7053:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:7053:28: sparse: expected struct sched_domain *sd kernel/sched/fair.c:7053:28: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:7060:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:7060:28: sparse: expected struct sched_domain *sd kernel/sched/fair.c:7060:28: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:7068:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:7068:17: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/fair.c:7068:17: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c: note: in included file: kernel/sched/sched.h:2309:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2309:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2309:9: sparse: struct task_struct * kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * vim +/sysctl_overload_detect_period +143 kernel/sched/fair.c 139 140 static DEFINE_PER_CPU_SHARED_ALIGNED(struct list_head, qos_throttled_cfs_rq); 141 static DEFINE_PER_CPU_SHARED_ALIGNED(struct hrtimer, qos_overload_timer); 142 static DEFINE_PER_CPU(int, qos_cpu_overload); > 143 unsigned int sysctl_overload_detect_period = 5000; /* in ms */ > 144 unsigned int sysctl_offline_wait_interval = 100; /* in ms */ 145 static int one_thousand = 1000; 146 static int hundred_thousand = 100000; 147 static int unthrottle_qos_cfs_rqs(int cpu); 148 #endif 149 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/livepatch/core.c:97:12: warning: no previous prototype for function 'arch_klp_init_func'
by kernel test robot 15 Dec '25

15 Dec '25
Hi Zheng, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: eabc33c6f2c91168537f10e9275b0921c9f78c45 [3541/3541] livepatch/ppc64: Implement livepatch without ftrace for ppc64be config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150621.RknROZUX-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150621.RknROZUX-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512150621.RknROZUX-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/livepatch/core.c:97:12: warning: no previous prototype for function 'arch_klp_init_func' [-Wmissing-prototypes] 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ kernel/livepatch/core.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ | static kernel/livepatch/core.c:1756:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1756 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1756:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1756 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static kernel/livepatch/core.c:2011:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 2011 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:2011:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2011 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static kernel/livepatch/core.c:2016:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 2016 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:2016:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2016 | void __weak arch_klp_mem_free(void *mem) | ^ | static kernel/livepatch/core.c:2021:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 2021 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:2021:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2021 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:2025:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 2025 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:2025:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2025 | void __weak arch_klp_code_modify_post_process(void) | ^ | static kernel/livepatch/core.c:2038:12: warning: no previous prototype for function 'arch_klp_check_breakpoint' [-Wmissing-prototypes] 2038 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2038:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2038 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static kernel/livepatch/core.c:2052:13: warning: no previous prototype for function 'arch_klp_set_brk_func' [-Wmissing-prototypes] 2052 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ kernel/livepatch/core.c:2052:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2052 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ | static 8 warnings generated. vim +/arch_klp_init_func +97 kernel/livepatch/core.c 96 > 97 int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) 98 { 99 return 0; 100 } 101 #endif /* CONFIG_LIVEPATCH_FTRACE */ 102 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • ...
  • 2198
  • Older →

HyperKitty Powered by HyperKitty