* [jolsa-perf:bpf/optimized_usdt_3 21/24] kernel/events/uprobes.c:2522:undefined reference to `arch_uprobe_optimize'
@ 2024-11-03 4:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-03 4:33 UTC (permalink / raw)
To: Jiri Olsa; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/optimized_usdt_3
head: 2e0575143d13814d04f02a33a4110989ccdbf3a3
commit: 0200936b03cfee067eb7db4b44079104b561b726 [21/24] uprobes/x86: Add support to optimize uprobes
config: powerpc-randconfig-003-20241103 (https://download.01.org/0day-ci/archive/20241103/202411031222.d41XHGa9-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241103/202411031222.d41XHGa9-lkp@intel.com/reproduce)
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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411031222.d41XHGa9-lkp@intel.com/
All errors (new ones prefixed by >>):
powerpc-linux-ld: kernel/events/uprobes.o: in function `handle_swbp':
>> kernel/events/uprobes.c:2522:(.text+0x76f8): undefined reference to `arch_uprobe_optimize'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [y]:
- RESOURCE_KUNIT_TEST [=y] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y]
vim +2522 kernel/events/uprobes.c
2457
2458 /*
2459 * Run handler and ask thread to singlestep.
2460 * Ensure all non-fatal signals cannot interrupt thread while it singlesteps.
2461 */
2462 static void handle_swbp(struct pt_regs *regs)
2463 {
2464 struct uprobe *uprobe;
2465 unsigned long bp_vaddr;
2466 int is_swbp;
2467
2468 bp_vaddr = uprobe_get_swbp_addr(regs);
2469 if (bp_vaddr == uprobe_get_trampoline_vaddr())
2470 return uprobe_handle_trampoline(regs);
2471
2472 rcu_read_lock_trace();
2473
2474 uprobe = find_active_uprobe_rcu(bp_vaddr, &is_swbp);
2475 if (!uprobe) {
2476 if (is_swbp > 0) {
2477 /* No matching uprobe; signal SIGTRAP. */
2478 force_sig(SIGTRAP);
2479 } else {
2480 /*
2481 * Either we raced with uprobe_unregister() or we can't
2482 * access this memory. The latter is only possible if
2483 * another thread plays with our ->mm. In both cases
2484 * we can simply restart. If this vma was unmapped we
2485 * can pretend this insn was not executed yet and get
2486 * the (correct) SIGSEGV after restart.
2487 */
2488 instruction_pointer_set(regs, bp_vaddr);
2489 }
2490 goto out;
2491 }
2492
2493 /* change it in advance for ->handler() and restart */
2494 instruction_pointer_set(regs, bp_vaddr);
2495
2496 /*
2497 * TODO: move copy_insn/etc into _register and remove this hack.
2498 * After we hit the bp, _unregister + _register can install the
2499 * new and not-yet-analyzed uprobe at the same address, restart.
2500 */
2501 if (unlikely(!test_bit(UPROBE_COPY_INSN, &uprobe->flags)))
2502 goto out;
2503
2504 /*
2505 * Pairs with the smp_wmb() in prepare_uprobe().
2506 *
2507 * Guarantees that if we see the UPROBE_COPY_INSN bit set, then
2508 * we must also see the stores to &uprobe->arch performed by the
2509 * prepare_uprobe() call.
2510 */
2511 smp_rmb();
2512
2513 /* Tracing handlers use ->utask to communicate with fetch methods */
2514 if (!get_utask())
2515 goto out;
2516
2517 if (arch_uprobe_ignore(&uprobe->arch, regs))
2518 goto out;
2519
2520 handler_chain(uprobe, regs);
2521
> 2522 arch_uprobe_optimize(&uprobe->arch, bp_vaddr);
2523
2524 if (arch_uprobe_skip_sstep(&uprobe->arch, regs))
2525 goto out;
2526
2527 if (pre_ssout(uprobe, regs, bp_vaddr))
2528 goto out;
2529
2530 out:
2531 /* arch_uprobe_skip_sstep() succeeded, or restart if can't singlestep */
2532 rcu_read_unlock_trace();
2533 }
2534
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-03 4:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-03 4:33 [jolsa-perf:bpf/optimized_usdt_3 21/24] kernel/events/uprobes.c:2522:undefined reference to `arch_uprobe_optimize' 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.