All of lore.kernel.org
 help / color / mirror / Atom feed
* [avpatel:riscv_acpi_apei_v1 37/55] arch/riscv/kernel/process.c:239:33: error: 'struct thread_struct' has no member named 'ptrace_bps'
@ 2025-08-11 16:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-11 16:50 UTC (permalink / raw)
  To: Jesse Taube; +Cc: oe-kbuild-all, Anup Patel

tree:   https://github.com/avpatel/linux.git riscv_acpi_apei_v1
head:   eaca137f211dcb260f7eb52d983ddad7f27277f3
commit: a54622884fd10596bc5494e332437afa09369d2a [37/55] riscv: ptrace: Add hw breakpoint support
config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20250812/202508120012.FPjjnE3u-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250812/202508120012.FPjjnE3u-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/202508120012.FPjjnE3u-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   arch/riscv/kernel/process.c: In function 'copy_thread':
>> arch/riscv/kernel/process.c:239:33: error: 'struct thread_struct' has no member named 'ptrace_bps'
     239 |                 memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
         |                                 ^
   arch/riscv/kernel/process.c:239:65: error: 'struct thread_struct' has no member named 'ptrace_bps'
     239 |                 memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
         |                                                                 ^
--
   arch/riscv/kernel/ptrace.c: In function 'arch_ptrace':
>> arch/riscv/kernel/ptrace.c:443:31: warning: unused variable 'datap' [-Wunused-variable]
     443 |         unsigned long __user *datap = (unsigned long __user *) data;
         |                               ^~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HAVE_MIXED_BREAKPOINTS_REGS
   Depends on [n]: HAVE_HW_BREAKPOINT [=n]
   Selected by [y]:
   - RISCV [=y]


vim +239 arch/riscv/kernel/process.c

   225	
   226	int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
   227	{
   228		unsigned long clone_flags = args->flags;
   229		unsigned long usp = args->stack;
   230		unsigned long tls = args->tls;
   231		struct pt_regs *childregs = task_pt_regs(p);
   232	
   233		/* Ensure all threads in this mm have the same pointer masking mode. */
   234		if (IS_ENABLED(CONFIG_RISCV_ISA_SUPM) && p->mm && (clone_flags & CLONE_VM))
   235			set_bit(MM_CONTEXT_LOCK_PMLEN, &p->mm->context.flags);
   236	
   237		memset(&p->thread.s, 0, sizeof(p->thread.s));
   238		if (IS_ENABLED(CONFIG_HAVE_HW_BREAKPOINT))
 > 239			memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
   240	
   241		/* p->thread holds context to be restored by __switch_to() */
   242		if (unlikely(args->fn)) {
   243			/* Kernel thread */
   244			memset(childregs, 0, sizeof(struct pt_regs));
   245			/* Supervisor/Machine, irqs on: */
   246			childregs->status = SR_PP | SR_PIE;
   247	
   248			p->thread.s[0] = (unsigned long)args->fn;
   249			p->thread.s[1] = (unsigned long)args->fn_arg;
   250			p->thread.ra = (unsigned long)ret_from_fork_kernel_asm;
   251		} else {
   252			*childregs = *(current_pt_regs());
   253			/* Turn off status.VS */
   254			riscv_v_vstate_off(childregs);
   255			if (usp) /* User fork */
   256				childregs->sp = usp;
   257			if (clone_flags & CLONE_SETTLS)
   258				childregs->tp = tls;
   259			childregs->a0 = 0; /* Return value of fork() */
   260			p->thread.ra = (unsigned long)ret_from_fork_user_asm;
   261		}
   262		p->thread.riscv_v_flags = 0;
   263		if (has_vector() || has_xtheadvector())
   264			riscv_v_thread_alloc(p);
   265		p->thread.sp = (unsigned long)childregs; /* kernel sp */
   266		return 0;
   267	}
   268	

-- 
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:[~2025-08-11 16:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 16:50 [avpatel:riscv_acpi_apei_v1 37/55] arch/riscv/kernel/process.c:239:33: error: 'struct thread_struct' has no member named 'ptrace_bps' 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.