All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jesse Taube <jesse@rivosinc.com>
Cc: oe-kbuild-all@lists.linux.dev, Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_acpi_apei_v1 37/55] arch/riscv/kernel/process.c:239:33: error: 'struct thread_struct' has no member named 'ptrace_bps'
Date: Tue, 12 Aug 2025 00:50:10 +0800	[thread overview]
Message-ID: <202508120012.FPjjnE3u-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-08-11 16:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508120012.FPjjnE3u-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anup@brainfault.org \
    --cc=jesse@rivosinc.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.