From nobody Fri Jan 20 03:23:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NylFp0Hlnz30vj1; Fri, 20 Jan 2023 03:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NylFn5WYGz3nS5; Fri, 20 Jan 2023 03:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674185021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cCqtjI5gcKoM7VJ13Swg5VB/8rP35cFDg1fTHXRmZKY=; b=mvwHdcoenIOuI6JXm4Xp/p1EUcHUr5rk1OVHDY4p5DNiZqSmEx2Oy/o6HYznQCTOpc6uWg CAikcYYoorS92afABX6vvMi1Jva/URR8xJozE+ii5JaoHhNUX8qWILYXvMnLlLH5rKuT9Y +3NO5Lv2aAf5PmlVmX0g/ubsl3t9LWS4HauwwnY4Teh/wXobORRBGNvS5mlsKBbydYdH6/ yfkqOcegAvaOPIFA/Nu6a8PZLpZFN2JbPuMiFMgMfyOsFtbK5eo16j3oVMnNKuXBZQg77o Ebrt0HL2srU4O1UNDRqTxAzs0hsnh6RLiFzB6unJQyAF71cYanwaliU9D65qXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674185021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cCqtjI5gcKoM7VJ13Swg5VB/8rP35cFDg1fTHXRmZKY=; b=p6MqGUrccraCkmuux29urK7Tz7nbM5kHoXDu9UPMxWSW0+zZeYbFVlyv0ydfVSPtCwEoMO aP38/pZnMHf7bus+xGHeFCzsZ32DbhtK9jWLekruEjF+SA53fks06CBU+ReI5Ht4ZlS21d VX2oWJAvjff7iTRIxYIWc9jwh4AP6MwTIvyyOa5ZK0KfXV8HLXFaOopzCM0XXutKy/POFP +7OHa13lgYpjfzt267uMEpUVygPGRBGCthsvHcg9340FzOj//yu282K3QRypPpC/8kuccw 5M8OCzWb6Z1QftQXtFqbJJlXwwK8FNxeUhf5oB8K+z1ueGjZ3eOl4R1CVHOmLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674185021; a=rsa-sha256; cv=none; b=TilHi+ueWJitE86O07Qyj1R7Rh+6X7bcjEPI8IZDRFa9QmDTd5sj8QME+e0jtrQg8E7hCD hLqV+hooJb2Ldu/zP1i5Jh/p9XwbySqVGOYikYnFmpmCWNHQpcVk7gR2mguxY6iL52mSmR eSJbrYtBcF64UdrE0lkirP5XD3hfZ9/R5Zlj8rs+MpQxD2MTRoPY01D6FvBiym/jwKmwte LC6dk/oZ2PEyePjCksCs7m+hqm+3pSFEoadNzUC9obnZg+ibq5mHL+6PW7difUvNwsWwJZ 0+RUBKGD8c+TSrZRmMCwI/B5KbePpuKzZcJ7LNydrXwL670zRhsspN9ipjYHaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NylFn4c3LzFf1; Fri, 20 Jan 2023 03:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30K3Nfhx042508; Fri, 20 Jan 2023 03:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30K3NfrX042507; Fri, 20 Jan 2023 03:23:41 GMT (envelope-from git) Date: Fri, 20 Jan 2023 03:23:41 GMT Message-Id: <202301200323.30K3NfrX042507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 55df3e814f61 - stable/13 - sys: rename td_coredump to td_remotereq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 55df3e814f61ed28d497af8f8b640bf18e1de94f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=55df3e814f61ed28d497af8f8b640bf18e1de94f commit 55df3e814f61ed28d497af8f8b640bf18e1de94f Author: Konstantin Belousov AuthorDate: 2022-11-30 08:48:24 +0000 Commit: Konstantin Belousov 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: