All of lore.kernel.org
 help / color / mirror / Atom feed
* [peterz-queue:sched/core-sched 22/23] kernel/sys.c:2539: undefined reference to `sched_core_share_pid'
@ 2021-03-27  6:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-27  6:35 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 10287 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched
head:   f6bccc60adac0dfbc283bbe623ff65e7c0de9aff
commit: a8d0c2b1ff866566bb8d301a60b2956a6f9dc8a6 [22/23] sched: prctl() cookie manipulation for core scheduling
config: x86_64-randconfig-r022-20210326 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=a8d0c2b1ff866566bb8d301a60b2956a6f9dc8a6
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue sched/core-sched
        git checkout a8d0c2b1ff866566bb8d301a60b2956a6f9dc8a6
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: kernel/fork.o: in function `__put_task_struct':
   kernel/fork.c:740: undefined reference to `sched_core_free'
   ld: kernel/sys.o: in function `__do_sys_prctl':
>> kernel/sys.c:2539: undefined reference to `sched_core_share_pid'
>> ld: kernel/sys.c:2539: undefined reference to `sched_core_share_pid'
   ld: kernel/sched/core.o: in function `sched_fork':
   kernel/sched/core.c:4115: undefined reference to `sched_core_fork'
   ld: kernel/sched/core.o: in function `sched_exec':
>> kernel/sched/core.c:4766: undefined reference to `sched_core_exec'

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for ADI_AXI_ADC
   Depends on IIO && HAS_IOMEM && OF
   Selected by
   - AD9467 && IIO && SPI


vim +2539 kernel/sys.c

  2282	
  2283	SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
  2284			unsigned long, arg4, unsigned long, arg5)
  2285	{
  2286		struct task_struct *me = current;
  2287		unsigned char comm[sizeof(me->comm)];
  2288		long error;
  2289	
  2290		error = security_task_prctl(option, arg2, arg3, arg4, arg5);
  2291		if (error != -ENOSYS)
  2292			return error;
  2293	
  2294		error = 0;
  2295		switch (option) {
  2296		case PR_SET_PDEATHSIG:
  2297			if (!valid_signal(arg2)) {
  2298				error = -EINVAL;
  2299				break;
  2300			}
  2301			me->pdeath_signal = arg2;
  2302			break;
  2303		case PR_GET_PDEATHSIG:
  2304			error = put_user(me->pdeath_signal, (int __user *)arg2);
  2305			break;
  2306		case PR_GET_DUMPABLE:
  2307			error = get_dumpable(me->mm);
  2308			break;
  2309		case PR_SET_DUMPABLE:
  2310			if (arg2 != SUID_DUMP_DISABLE && arg2 != SUID_DUMP_USER) {
  2311				error = -EINVAL;
  2312				break;
  2313			}
  2314			set_dumpable(me->mm, arg2);
  2315			break;
  2316	
  2317		case PR_SET_UNALIGN:
  2318			error = SET_UNALIGN_CTL(me, arg2);
  2319			break;
  2320		case PR_GET_UNALIGN:
  2321			error = GET_UNALIGN_CTL(me, arg2);
  2322			break;
  2323		case PR_SET_FPEMU:
  2324			error = SET_FPEMU_CTL(me, arg2);
  2325			break;
  2326		case PR_GET_FPEMU:
  2327			error = GET_FPEMU_CTL(me, arg2);
  2328			break;
  2329		case PR_SET_FPEXC:
  2330			error = SET_FPEXC_CTL(me, arg2);
  2331			break;
  2332		case PR_GET_FPEXC:
  2333			error = GET_FPEXC_CTL(me, arg2);
  2334			break;
  2335		case PR_GET_TIMING:
  2336			error = PR_TIMING_STATISTICAL;
  2337			break;
  2338		case PR_SET_TIMING:
  2339			if (arg2 != PR_TIMING_STATISTICAL)
  2340				error = -EINVAL;
  2341			break;
  2342		case PR_SET_NAME:
  2343			comm[sizeof(me->comm) - 1] = 0;
  2344			if (strncpy_from_user(comm, (char __user *)arg2,
  2345					      sizeof(me->comm) - 1) < 0)
  2346				return -EFAULT;
  2347			set_task_comm(me, comm);
  2348			proc_comm_connector(me);
  2349			break;
  2350		case PR_GET_NAME:
  2351			get_task_comm(comm, me);
  2352			if (copy_to_user((char __user *)arg2, comm, sizeof(comm)))
  2353				return -EFAULT;
  2354			break;
  2355		case PR_GET_ENDIAN:
  2356			error = GET_ENDIAN(me, arg2);
  2357			break;
  2358		case PR_SET_ENDIAN:
  2359			error = SET_ENDIAN(me, arg2);
  2360			break;
  2361		case PR_GET_SECCOMP:
  2362			error = prctl_get_seccomp();
  2363			break;
  2364		case PR_SET_SECCOMP:
  2365			error = prctl_set_seccomp(arg2, (char __user *)arg3);
  2366			break;
  2367		case PR_GET_TSC:
  2368			error = GET_TSC_CTL(arg2);
  2369			break;
  2370		case PR_SET_TSC:
  2371			error = SET_TSC_CTL(arg2);
  2372			break;
  2373		case PR_TASK_PERF_EVENTS_DISABLE:
  2374			error = perf_event_task_disable();
  2375			break;
  2376		case PR_TASK_PERF_EVENTS_ENABLE:
  2377			error = perf_event_task_enable();
  2378			break;
  2379		case PR_GET_TIMERSLACK:
  2380			if (current->timer_slack_ns > ULONG_MAX)
  2381				error = ULONG_MAX;
  2382			else
  2383				error = current->timer_slack_ns;
  2384			break;
  2385		case PR_SET_TIMERSLACK:
  2386			if (arg2 <= 0)
  2387				current->timer_slack_ns =
  2388						current->default_timer_slack_ns;
  2389			else
  2390				current->timer_slack_ns = arg2;
  2391			break;
  2392		case PR_MCE_KILL:
  2393			if (arg4 | arg5)
  2394				return -EINVAL;
  2395			switch (arg2) {
  2396			case PR_MCE_KILL_CLEAR:
  2397				if (arg3 != 0)
  2398					return -EINVAL;
  2399				current->flags &= ~PF_MCE_PROCESS;
  2400				break;
  2401			case PR_MCE_KILL_SET:
  2402				current->flags |= PF_MCE_PROCESS;
  2403				if (arg3 == PR_MCE_KILL_EARLY)
  2404					current->flags |= PF_MCE_EARLY;
  2405				else if (arg3 == PR_MCE_KILL_LATE)
  2406					current->flags &= ~PF_MCE_EARLY;
  2407				else if (arg3 == PR_MCE_KILL_DEFAULT)
  2408					current->flags &=
  2409							~(PF_MCE_EARLY|PF_MCE_PROCESS);
  2410				else
  2411					return -EINVAL;
  2412				break;
  2413			default:
  2414				return -EINVAL;
  2415			}
  2416			break;
  2417		case PR_MCE_KILL_GET:
  2418			if (arg2 | arg3 | arg4 | arg5)
  2419				return -EINVAL;
  2420			if (current->flags & PF_MCE_PROCESS)
  2421				error = (current->flags & PF_MCE_EARLY) ?
  2422					PR_MCE_KILL_EARLY : PR_MCE_KILL_LATE;
  2423			else
  2424				error = PR_MCE_KILL_DEFAULT;
  2425			break;
  2426		case PR_SET_MM:
  2427			error = prctl_set_mm(arg2, arg3, arg4, arg5);
  2428			break;
  2429		case PR_GET_TID_ADDRESS:
  2430			error = prctl_get_tid_address(me, (int __user * __user *)arg2);
  2431			break;
  2432		case PR_SET_CHILD_SUBREAPER:
  2433			me->signal->is_child_subreaper = !!arg2;
  2434			if (!arg2)
  2435				break;
  2436	
  2437			walk_process_tree(me, propagate_has_child_subreaper, NULL);
  2438			break;
  2439		case PR_GET_CHILD_SUBREAPER:
  2440			error = put_user(me->signal->is_child_subreaper,
  2441					 (int __user *)arg2);
  2442			break;
  2443		case PR_SET_NO_NEW_PRIVS:
  2444			if (arg2 != 1 || arg3 || arg4 || arg5)
  2445				return -EINVAL;
  2446	
  2447			task_set_no_new_privs(current);
  2448			break;
  2449		case PR_GET_NO_NEW_PRIVS:
  2450			if (arg2 || arg3 || arg4 || arg5)
  2451				return -EINVAL;
  2452			return task_no_new_privs(current) ? 1 : 0;
  2453		case PR_GET_THP_DISABLE:
  2454			if (arg2 || arg3 || arg4 || arg5)
  2455				return -EINVAL;
  2456			error = !!test_bit(MMF_DISABLE_THP, &me->mm->flags);
  2457			break;
  2458		case PR_SET_THP_DISABLE:
  2459			if (arg3 || arg4 || arg5)
  2460				return -EINVAL;
  2461			if (mmap_write_lock_killable(me->mm))
  2462				return -EINTR;
  2463			if (arg2)
  2464				set_bit(MMF_DISABLE_THP, &me->mm->flags);
  2465			else
  2466				clear_bit(MMF_DISABLE_THP, &me->mm->flags);
  2467			mmap_write_unlock(me->mm);
  2468			break;
  2469		case PR_MPX_ENABLE_MANAGEMENT:
  2470		case PR_MPX_DISABLE_MANAGEMENT:
  2471			/* No longer implemented: */
  2472			return -EINVAL;
  2473		case PR_SET_FP_MODE:
  2474			error = SET_FP_MODE(me, arg2);
  2475			break;
  2476		case PR_GET_FP_MODE:
  2477			error = GET_FP_MODE(me);
  2478			break;
  2479		case PR_SVE_SET_VL:
  2480			error = SVE_SET_VL(arg2);
  2481			break;
  2482		case PR_SVE_GET_VL:
  2483			error = SVE_GET_VL();
  2484			break;
  2485		case PR_GET_SPECULATION_CTRL:
  2486			if (arg3 || arg4 || arg5)
  2487				return -EINVAL;
  2488			error = arch_prctl_spec_ctrl_get(me, arg2);
  2489			break;
  2490		case PR_SET_SPECULATION_CTRL:
  2491			if (arg4 || arg5)
  2492				return -EINVAL;
  2493			error = arch_prctl_spec_ctrl_set(me, arg2, arg3);
  2494			break;
  2495		case PR_PAC_RESET_KEYS:
  2496			if (arg3 || arg4 || arg5)
  2497				return -EINVAL;
  2498			error = PAC_RESET_KEYS(me, arg2);
  2499			break;
  2500		case PR_SET_TAGGED_ADDR_CTRL:
  2501			if (arg3 || arg4 || arg5)
  2502				return -EINVAL;
  2503			error = SET_TAGGED_ADDR_CTRL(arg2);
  2504			break;
  2505		case PR_GET_TAGGED_ADDR_CTRL:
  2506			if (arg2 || arg3 || arg4 || arg5)
  2507				return -EINVAL;
  2508			error = GET_TAGGED_ADDR_CTRL();
  2509			break;
  2510		case PR_SET_IO_FLUSHER:
  2511			if (!capable(CAP_SYS_RESOURCE))
  2512				return -EPERM;
  2513	
  2514			if (arg3 || arg4 || arg5)
  2515				return -EINVAL;
  2516	
  2517			if (arg2 == 1)
  2518				current->flags |= PR_IO_FLUSHER;
  2519			else if (!arg2)
  2520				current->flags &= ~PR_IO_FLUSHER;
  2521			else
  2522				return -EINVAL;
  2523			break;
  2524		case PR_GET_IO_FLUSHER:
  2525			if (!capable(CAP_SYS_RESOURCE))
  2526				return -EPERM;
  2527	
  2528			if (arg2 || arg3 || arg4 || arg5)
  2529				return -EINVAL;
  2530	
  2531			error = (current->flags & PR_IO_FLUSHER) == PR_IO_FLUSHER;
  2532			break;
  2533		case PR_SET_SYSCALL_USER_DISPATCH:
  2534			error = set_syscall_user_dispatch(arg2, arg3, arg4,
  2535							  (char __user *) arg5);
  2536			break;
  2537	#ifdef CONFIG_SCHED_CORE
  2538		case PR_SCHED_CORE:
> 2539			error = sched_core_share_pid(arg2, arg3, arg4, arg5);
  2540			break;
  2541	#endif
  2542		default:
  2543			error = -EINVAL;
  2544			break;
  2545		}
  2546		return error;
  2547	}
  2548	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33702 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-27  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27  6:35 [peterz-queue:sched/core-sched 22/23] kernel/sys.c:2539: undefined reference to `sched_core_share_pid' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.