[PATCH v1 19/38] arm64/sme: Implement vector length configuration prctl()s
kernel test robot
lkp at intel.com
Thu Sep 30 22:20:12 PDT 2021
Hi Mark,
I love your patch! Yet something to improve:
[auto build test ERROR on 8694e5e6388695195a32bd5746635ca166a8df56]
url: https://github.com/0day-ci/linux/commits/Mark-Brown/arm64-sme-Initial-support-for-the-Scalable-Matrix-Extension/20211001-021749
base: 8694e5e6388695195a32bd5746635ca166a8df56
config: arc-randconfig-r043-20210930 (attached as .config)
compiler: arc-elf-gcc (GCC) 11.2.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/0day-ci/linux/commit/f3b1bea56a1628668cc399d8eaae7ea4cacd8186
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mark-Brown/arm64-sme-Initial-support-for-the-Scalable-Matrix-Extension/20211001-021749
git checkout f3b1bea56a1628668cc399d8eaae7ea4cacd8186
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
kernel/sys.c: In function '__do_sys_prctl':
>> kernel/sys.c:2467:25: error: implicit declaration of function 'SME_SET_VL'; did you mean 'SVE_SET_VL'? [-Werror=implicit-function-declaration]
2467 | error = SME_SET_VL(arg2);
| ^~~~~~~~~~
| SVE_SET_VL
>> kernel/sys.c:2470:25: error: implicit declaration of function 'SME_GET_VL'; did you mean 'SVE_GET_VL'? [-Werror=implicit-function-declaration]
2470 | error = SME_GET_VL();
| ^~~~~~~~~~
| SVE_GET_VL
In file included from include/linux/perf_event.h:25,
from kernel/sys.c:17:
At top level:
arch/arc/include/asm/perf_event.h:126:27: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +2467 kernel/sys.c
2263
2264 SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
2265 unsigned long, arg4, unsigned long, arg5)
2266 {
2267 struct task_struct *me = current;
2268 unsigned char comm[sizeof(me->comm)];
2269 long error;
2270
2271 error = security_task_prctl(option, arg2, arg3, arg4, arg5);
2272 if (error != -ENOSYS)
2273 return error;
2274
2275 error = 0;
2276 switch (option) {
2277 case PR_SET_PDEATHSIG:
2278 if (!valid_signal(arg2)) {
2279 error = -EINVAL;
2280 break;
2281 }
2282 me->pdeath_signal = arg2;
2283 break;
2284 case PR_GET_PDEATHSIG:
2285 error = put_user(me->pdeath_signal, (int __user *)arg2);
2286 break;
2287 case PR_GET_DUMPABLE:
2288 error = get_dumpable(me->mm);
2289 break;
2290 case PR_SET_DUMPABLE:
2291 if (arg2 != SUID_DUMP_DISABLE && arg2 != SUID_DUMP_USER) {
2292 error = -EINVAL;
2293 break;
2294 }
2295 set_dumpable(me->mm, arg2);
2296 break;
2297
2298 case PR_SET_UNALIGN:
2299 error = SET_UNALIGN_CTL(me, arg2);
2300 break;
2301 case PR_GET_UNALIGN:
2302 error = GET_UNALIGN_CTL(me, arg2);
2303 break;
2304 case PR_SET_FPEMU:
2305 error = SET_FPEMU_CTL(me, arg2);
2306 break;
2307 case PR_GET_FPEMU:
2308 error = GET_FPEMU_CTL(me, arg2);
2309 break;
2310 case PR_SET_FPEXC:
2311 error = SET_FPEXC_CTL(me, arg2);
2312 break;
2313 case PR_GET_FPEXC:
2314 error = GET_FPEXC_CTL(me, arg2);
2315 break;
2316 case PR_GET_TIMING:
2317 error = PR_TIMING_STATISTICAL;
2318 break;
2319 case PR_SET_TIMING:
2320 if (arg2 != PR_TIMING_STATISTICAL)
2321 error = -EINVAL;
2322 break;
2323 case PR_SET_NAME:
2324 comm[sizeof(me->comm) - 1] = 0;
2325 if (strncpy_from_user(comm, (char __user *)arg2,
2326 sizeof(me->comm) - 1) < 0)
2327 return -EFAULT;
2328 set_task_comm(me, comm);
2329 proc_comm_connector(me);
2330 break;
2331 case PR_GET_NAME:
2332 get_task_comm(comm, me);
2333 if (copy_to_user((char __user *)arg2, comm, sizeof(comm)))
2334 return -EFAULT;
2335 break;
2336 case PR_GET_ENDIAN:
2337 error = GET_ENDIAN(me, arg2);
2338 break;
2339 case PR_SET_ENDIAN:
2340 error = SET_ENDIAN(me, arg2);
2341 break;
2342 case PR_GET_SECCOMP:
2343 error = prctl_get_seccomp();
2344 break;
2345 case PR_SET_SECCOMP:
2346 error = prctl_set_seccomp(arg2, (char __user *)arg3);
2347 break;
2348 case PR_GET_TSC:
2349 error = GET_TSC_CTL(arg2);
2350 break;
2351 case PR_SET_TSC:
2352 error = SET_TSC_CTL(arg2);
2353 break;
2354 case PR_TASK_PERF_EVENTS_DISABLE:
2355 error = perf_event_task_disable();
2356 break;
2357 case PR_TASK_PERF_EVENTS_ENABLE:
2358 error = perf_event_task_enable();
2359 break;
2360 case PR_GET_TIMERSLACK:
2361 if (current->timer_slack_ns > ULONG_MAX)
2362 error = ULONG_MAX;
2363 else
2364 error = current->timer_slack_ns;
2365 break;
2366 case PR_SET_TIMERSLACK:
2367 if (arg2 <= 0)
2368 current->timer_slack_ns =
2369 current->default_timer_slack_ns;
2370 else
2371 current->timer_slack_ns = arg2;
2372 break;
2373 case PR_MCE_KILL:
2374 if (arg4 | arg5)
2375 return -EINVAL;
2376 switch (arg2) {
2377 case PR_MCE_KILL_CLEAR:
2378 if (arg3 != 0)
2379 return -EINVAL;
2380 current->flags &= ~PF_MCE_PROCESS;
2381 break;
2382 case PR_MCE_KILL_SET:
2383 current->flags |= PF_MCE_PROCESS;
2384 if (arg3 == PR_MCE_KILL_EARLY)
2385 current->flags |= PF_MCE_EARLY;
2386 else if (arg3 == PR_MCE_KILL_LATE)
2387 current->flags &= ~PF_MCE_EARLY;
2388 else if (arg3 == PR_MCE_KILL_DEFAULT)
2389 current->flags &=
2390 ~(PF_MCE_EARLY|PF_MCE_PROCESS);
2391 else
2392 return -EINVAL;
2393 break;
2394 default:
2395 return -EINVAL;
2396 }
2397 break;
2398 case PR_MCE_KILL_GET:
2399 if (arg2 | arg3 | arg4 | arg5)
2400 return -EINVAL;
2401 if (current->flags & PF_MCE_PROCESS)
2402 error = (current->flags & PF_MCE_EARLY) ?
2403 PR_MCE_KILL_EARLY : PR_MCE_KILL_LATE;
2404 else
2405 error = PR_MCE_KILL_DEFAULT;
2406 break;
2407 case PR_SET_MM:
2408 error = prctl_set_mm(arg2, arg3, arg4, arg5);
2409 break;
2410 case PR_GET_TID_ADDRESS:
2411 error = prctl_get_tid_address(me, (int __user * __user *)arg2);
2412 break;
2413 case PR_SET_CHILD_SUBREAPER:
2414 me->signal->is_child_subreaper = !!arg2;
2415 if (!arg2)
2416 break;
2417
2418 walk_process_tree(me, propagate_has_child_subreaper, NULL);
2419 break;
2420 case PR_GET_CHILD_SUBREAPER:
2421 error = put_user(me->signal->is_child_subreaper,
2422 (int __user *)arg2);
2423 break;
2424 case PR_SET_NO_NEW_PRIVS:
2425 if (arg2 != 1 || arg3 || arg4 || arg5)
2426 return -EINVAL;
2427
2428 task_set_no_new_privs(current);
2429 break;
2430 case PR_GET_NO_NEW_PRIVS:
2431 if (arg2 || arg3 || arg4 || arg5)
2432 return -EINVAL;
2433 return task_no_new_privs(current) ? 1 : 0;
2434 case PR_GET_THP_DISABLE:
2435 if (arg2 || arg3 || arg4 || arg5)
2436 return -EINVAL;
2437 error = !!test_bit(MMF_DISABLE_THP, &me->mm->flags);
2438 break;
2439 case PR_SET_THP_DISABLE:
2440 if (arg3 || arg4 || arg5)
2441 return -EINVAL;
2442 if (mmap_write_lock_killable(me->mm))
2443 return -EINTR;
2444 if (arg2)
2445 set_bit(MMF_DISABLE_THP, &me->mm->flags);
2446 else
2447 clear_bit(MMF_DISABLE_THP, &me->mm->flags);
2448 mmap_write_unlock(me->mm);
2449 break;
2450 case PR_MPX_ENABLE_MANAGEMENT:
2451 case PR_MPX_DISABLE_MANAGEMENT:
2452 /* No longer implemented: */
2453 return -EINVAL;
2454 case PR_SET_FP_MODE:
2455 error = SET_FP_MODE(me, arg2);
2456 break;
2457 case PR_GET_FP_MODE:
2458 error = GET_FP_MODE(me);
2459 break;
2460 case PR_SVE_SET_VL:
2461 error = SVE_SET_VL(arg2);
2462 break;
2463 case PR_SVE_GET_VL:
2464 error = SVE_GET_VL();
2465 break;
2466 case PR_SME_SET_VL:
> 2467 error = SME_SET_VL(arg2);
2468 break;
2469 case PR_SME_GET_VL:
> 2470 error = SME_GET_VL();
2471 break;
2472 case PR_GET_SPECULATION_CTRL:
2473 if (arg3 || arg4 || arg5)
2474 return -EINVAL;
2475 error = arch_prctl_spec_ctrl_get(me, arg2);
2476 break;
2477 case PR_SET_SPECULATION_CTRL:
2478 if (arg4 || arg5)
2479 return -EINVAL;
2480 error = arch_prctl_spec_ctrl_set(me, arg2, arg3);
2481 break;
2482 case PR_PAC_RESET_KEYS:
2483 if (arg3 || arg4 || arg5)
2484 return -EINVAL;
2485 error = PAC_RESET_KEYS(me, arg2);
2486 break;
2487 case PR_PAC_SET_ENABLED_KEYS:
2488 if (arg4 || arg5)
2489 return -EINVAL;
2490 error = PAC_SET_ENABLED_KEYS(me, arg2, arg3);
2491 break;
2492 case PR_PAC_GET_ENABLED_KEYS:
2493 if (arg2 || arg3 || arg4 || arg5)
2494 return -EINVAL;
2495 error = PAC_GET_ENABLED_KEYS(me);
2496 break;
2497 case PR_SET_TAGGED_ADDR_CTRL:
2498 if (arg3 || arg4 || arg5)
2499 return -EINVAL;
2500 error = SET_TAGGED_ADDR_CTRL(arg2);
2501 break;
2502 case PR_GET_TAGGED_ADDR_CTRL:
2503 if (arg2 || arg3 || arg4 || arg5)
2504 return -EINVAL;
2505 error = GET_TAGGED_ADDR_CTRL();
2506 break;
2507 case PR_SET_IO_FLUSHER:
2508 if (!capable(CAP_SYS_RESOURCE))
2509 return -EPERM;
2510
2511 if (arg3 || arg4 || arg5)
2512 return -EINVAL;
2513
2514 if (arg2 == 1)
2515 current->flags |= PR_IO_FLUSHER;
2516 else if (!arg2)
2517 current->flags &= ~PR_IO_FLUSHER;
2518 else
2519 return -EINVAL;
2520 break;
2521 case PR_GET_IO_FLUSHER:
2522 if (!capable(CAP_SYS_RESOURCE))
2523 return -EPERM;
2524
2525 if (arg2 || arg3 || arg4 || arg5)
2526 return -EINVAL;
2527
2528 error = (current->flags & PR_IO_FLUSHER) == PR_IO_FLUSHER;
2529 break;
2530 case PR_SET_SYSCALL_USER_DISPATCH:
2531 error = set_syscall_user_dispatch(arg2, arg3, arg4,
2532 (char __user *) arg5);
2533 break;
2534 #ifdef CONFIG_SCHED_CORE
2535 case PR_SCHED_CORE:
2536 error = sched_core_share_pid(arg2, arg3, arg4, arg5);
2537 break;
2538 #endif
2539 default:
2540 error = -EINVAL;
2541 break;
2542 }
2543 return error;
2544 }
2545
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 28992 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211001/c2a4e99a/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list