summaryrefslogtreecommitdiff
path: root/usr/src/lib/libproc/common/Pcontrol.h
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-08-18 11:32:58 -0400
committerDan McDonald <danmcd@joyent.com>2021-08-18 11:32:58 -0400
commit7592d4373f888df2586fe68fed485e6911bc1bed (patch)
treeb01a0b0779f9fc0c1f459020bc2dee9655ec42bc /usr/src/lib/libproc/common/Pcontrol.h
parentf3fe11ae4095c266424f0708a6bd1672584fa999 (diff)
parent4772ec9f4bc326d705888dcda49bcc395df74999 (diff)
downloadillumos-joyent-7592d4373f888df2586fe68fed485e6911bc1bed.tar.gz
[illumos-gate merge]
commit 4772ec9f4bc326d705888dcda49bcc395df74999 13983 onu could support updating on Helios commit 998cfd7bd13f4dffec51769e903ceec265afce6f 13988 libproc leaks zoneroot commit 9148a91fab5cca2666b01bab18514159f4480f9e 13989 libproc can leak core CTF data commit 50d4d24e9f62b588d2123e06f654ecb230e4857c 13987 libproc could use standard lists Conflicts: manifest
Diffstat (limited to 'usr/src/lib/libproc/common/Pcontrol.h')
-rw-r--r--usr/src/lib/libproc/common/Pcontrol.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr/src/lib/libproc/common/Pcontrol.h b/usr/src/lib/libproc/common/Pcontrol.h
index 6121a7e79b..d701140173 100644
--- a/usr/src/lib/libproc/common/Pcontrol.h
+++ b/usr/src/lib/libproc/common/Pcontrol.h
@@ -27,6 +27,7 @@
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright 2018 Joyent, Inc.
* Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2021 Oxide Computer Company
*/
#ifndef _PCONTROL_H
@@ -48,6 +49,7 @@
#include <libproc.h>
#include <thread.h>
#include <sys/secflags.h>
+#include <sys/list.h>
#ifdef __cplusplus
extern "C" {
@@ -94,7 +96,7 @@ typedef struct sym_tbl { /* symbol table */
} sym_tbl_t;
typedef struct file_info { /* symbol information for a mapped file */
- plist_t file_list; /* linked list */
+ list_node_t file_list; /* linked list */
char file_pname[PATH_MAX]; /* name from prmap_t */
struct map_info *file_map; /* primary (text) mapping */
int file_ref; /* references from map_info_t structures */
@@ -137,7 +139,7 @@ typedef struct map_info { /* description of an address space mapping */
} map_info_t;
typedef struct lwp_info { /* per-lwp information from core file */
- plist_t lwp_list; /* linked list */
+ list_node_t lwp_list; /* linked list */
lwpid_t lwp_id; /* lwp identifier */
lwpsinfo_t lwp_psinfo; /* /proc/<pid>/lwp/<lwpid>/lwpsinfo data */
lwpstatus_t lwp_status; /* /proc/<pid>/lwp/<lwpid>/lwpstatus data */
@@ -150,7 +152,7 @@ typedef struct lwp_info { /* per-lwp information from core file */
} lwp_info_t;
typedef struct fd_info {
- plist_t fd_list; /* linked list */
+ list_node_t fd_list; /* linked list */
prfdinfo_t *fd_info; /* fd info */
} fd_info_t;
@@ -158,9 +160,8 @@ typedef struct core_info { /* information specific to core files */
char core_dmodel; /* data model for core file */
char core_osabi; /* ELF OS ABI */
int core_errno; /* error during initialization if != 0 */
- plist_t core_lwp_head; /* head of list of lwp info */
+ list_t core_lwp_head; /* head of list of lwp info */
lwp_info_t *core_lwp; /* current lwp information */
- uint_t core_nlwp; /* number of lwp's in list */
off64_t core_size; /* size of core file in bytes */
char *core_platform; /* platform string from core file */
struct utsname *core_uts; /* uname(2) data from core file */
@@ -225,7 +226,7 @@ struct ps_prochandle {
size_t map_count; /* number of mappings */
size_t map_alloc; /* number of mappings allocated */
uint_t num_files; /* number of file elements in file_info */
- plist_t file_head; /* head of mapped files w/ symbol table info */
+ list_t file_head; /* head of mapped files w/ symbol table info */
char *execname; /* name of the executable file */
auxv_t *auxv; /* the process's aux vector */
int nauxv; /* number of aux vector entries */
@@ -236,8 +237,7 @@ struct ps_prochandle {
uintptr_t *ucaddrs; /* ucontext-list addresses */
uint_t ucnelems; /* number of elements in the ucaddrs list */
char *zoneroot; /* cached path to zone root */
- plist_t fd_head; /* head of file desc info list */
- int num_fd; /* number of file descs in list */
+ list_t fd_head; /* head of file desc info list */
uintptr_t map_missing; /* first missing mapping in core due to sig */
siginfo_t killinfo; /* signal that interrupted core dump */
psinfo_t spymaster; /* agent LWP's spymaster, if any */
@@ -275,6 +275,7 @@ extern int dupfd(int, int);
extern int set_minfd(void);
extern int Pscantext(struct ps_prochandle *);
extern void Pinitsym(struct ps_prochandle *);
+extern void Pinitfd(struct ps_prochandle *);
extern void Preadauxvec(struct ps_prochandle *);
extern void optimize_symtab(sym_tbl_t *);
extern void Pbuild_file_symtab(struct ps_prochandle *, file_info_t *);