git: 55df3e814f61 - stable/13 - sys: rename td_coredump to td_remotereq
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Jan 2023 03:23:41 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=55df3e814f61ed28d497af8f8b640bf18e1de94f
commit 55df3e814f61ed28d497af8f8b640bf18e1de94f
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-11-30 08:48:24 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-01-20 03:20:35 +0000
sys: rename td_coredump to td_remotereq
Tested by: pho
(cherry picked from commit e6feeae2f915c76275b83b7365ae966a8f8dd016)
---
sys/kern/kern_sig.c | 12 ++++++------
sys/kern/sys_process.c | 8 ++++----
sys/sys/proc.h | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 8f35747b4687..df9ca8076a64 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -2565,12 +2565,12 @@ ptrace_coredump(struct thread *td)
MPASS(td == curthread);
p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
- if ((td->td_dbgflags & TDB_COREDUMPRQ) == 0)
+ if ((td->td_dbgflags & TDB_COREDUMPREQ) == 0)
return;
KASSERT((p->p_flag & P_STOPPED_TRACE) != 0, ("not stopped"));
- tcq = td->td_coredump;
- KASSERT(tcq != NULL, ("td_coredump is NULL"));
+ tcq = td->td_remotereq;
+ KASSERT(tcq != NULL, ("td_remotereq is NULL"));
if (p->p_sysent->sv_coredump == NULL) {
tcq->tc_error = ENOSYS;
@@ -2586,8 +2586,8 @@ ptrace_coredump(struct thread *td)
vn_rangelock_unlock(tcq->tc_vp, rl_cookie);
PROC_LOCK(p);
wake:
- td->td_dbgflags &= ~TDB_COREDUMPRQ;
- td->td_coredump = NULL;
+ td->td_dbgflags &= ~TDB_COREDUMPREQ;
+ td->td_remotereq = NULL;
wakeup(p);
}
@@ -2721,7 +2721,7 @@ stopme:
td->td_dbgflags |= TDB_SSWITCH;
thread_suspend_switch(td, p);
td->td_dbgflags &= ~TDB_SSWITCH;
- if ((td->td_dbgflags & TDB_COREDUMPRQ) != 0) {
+ if ((td->td_dbgflags & TDB_COREDUMPREQ) != 0) {
PROC_SUNLOCK(p);
ptrace_coredump(td);
PROC_SLOCK(p);
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 2876283ce388..b8f5fda8ade3 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -1561,7 +1561,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
error = EBUSY;
goto coredump_cleanup_locked;
}
- KASSERT((td2->td_dbgflags & TDB_COREDUMPRQ) == 0,
+ KASSERT((td2->td_dbgflags & TDB_COREDUMPREQ) == 0,
("proc %d tid %d req coredump", p->p_pid, td2->td_tid));
tcq->tc_vp = fp->f_vnode;
@@ -1571,10 +1571,10 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
tcq->tc_flags |= SVC_NOCOMPRESS;
if ((pc->pc_flags & PC_ALL) != 0)
tcq->tc_flags |= SVC_ALL;
- td2->td_coredump = tcq;
- td2->td_dbgflags |= TDB_COREDUMPRQ;
+ td2->td_remotereq = tcq;
+ td2->td_dbgflags |= TDB_COREDUMPREQ;
thread_run_flash(td2);
- while ((td2->td_dbgflags & TDB_COREDUMPRQ) != 0)
+ while ((td2->td_dbgflags & TDB_COREDUMPREQ) != 0)
msleep(p, &p->p_mtx, PPAUSE, "crdmp", 0);
error = tcq->tc_error;
coredump_cleanup_locked:
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index cd1b530095e9..861f81232927 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -376,7 +376,7 @@ struct thread {
int td_oncpu; /* (t) Which cpu we are on. */
void *td_lkpi_task; /* LinuxKPI task struct pointer */
int td_pmcpend;
- void *td_coredump; /* (c) coredump request. */
+ void *td_remotereq; /* (c) dbg remote request. */
off_t td_ktr_io_lim; /* (k) limit for ktrace file size */
#ifdef EPOCH_TRACE
SLIST_HEAD(, epoch_tracker) td_epochs;
@@ -487,7 +487,7 @@ do { \
#define TDB_FSTP 0x00001000 /* The thread is PT_ATTACH leader */
#define TDB_STEP 0x00002000 /* (x86) PSL_T set for PT_STEP */
#define TDB_SSWITCH 0x00004000 /* Suspended in ptracestop */
-#define TDB_COREDUMPRQ 0x00008000 /* Coredump request */
+#define TDB_COREDUMPREQ 0x00008000 /* Coredump request */
/*
* "Private" flags kept in td_pflags: