Index: lib/libprocstat/libprocstat.h =================================================================== --- lib/libprocstat/libprocstat.h +++ lib/libprocstat/libprocstat.h @@ -72,6 +72,7 @@ #define PS_FST_TYPE_NONE 12 #define PS_FST_TYPE_PROCDESC 13 #define PS_FST_TYPE_DEV 14 +#define PS_FST_TYPE_DMABUF 15 /* * Special descriptor numbers. Index: lib/libprocstat/libprocstat.c =================================================================== --- lib/libprocstat/libprocstat.c +++ lib/libprocstat/libprocstat.c @@ -622,6 +622,10 @@ type = PS_FST_TYPE_DEV; data = file.f_data; break; + case DTYPE_DMABUF: + type = PS_FST_TYPE_DMABUF; + data = file.f_data; + break; default: continue; } @@ -714,6 +718,7 @@ { KF_TYPE_SHM, PS_FST_TYPE_SHM }, { KF_TYPE_SOCKET, PS_FST_TYPE_SOCKET }, { KF_TYPE_VNODE, PS_FST_TYPE_VNODE }, + { KF_TYPE_DMABUF, PS_FST_TYPE_DMABUF }, { KF_TYPE_UNKNOWN, PS_FST_TYPE_UNKNOWN } }; #define NKFTYPES (sizeof(kftypes2fst) / sizeof(*kftypes2fst)) Index: sys/kern/kern_descrip.c =================================================================== --- sys/kern/kern_descrip.c +++ sys/kern/kern_descrip.c @@ -4282,6 +4282,8 @@ return ("levent"); case DTYPE_LINUXTFD: return ("ltimer"); + case DTYPE_DMABUF: + return ("dmabuf"); default: return ("unkn"); } Index: sys/sys/file.h =================================================================== --- sys/sys/file.h +++ sys/sys/file.h @@ -70,6 +70,7 @@ #define DTYPE_PROCDESC 12 /* process descriptor */ #define DTYPE_LINUXEFD 13 /* emulation eventfd type */ #define DTYPE_LINUXTFD 14 /* emulation timerfd type */ +#define DTYPE_DMABUF 15 /* DMA buffer */ #ifdef _KERNEL Index: sys/sys/user.h =================================================================== --- sys/sys/user.h +++ sys/sys/user.h @@ -263,6 +263,7 @@ #define KF_TYPE_PTS 10 #define KF_TYPE_PROCDESC 11 #define KF_TYPE_DEV 12 +#define KF_TYPE_DMABUF 13 #define KF_TYPE_UNKNOWN 255 #define KF_VTYPE_VNON 0 @@ -435,6 +436,12 @@ uint64_t kf_spareint64[32]; pid_t kf_pid; } kf_proc; + struct { + uint32_t kf_spareint[4]; + uint64_t kf_spareint64[30]; + char kf_dmabuf_exp_name[16]; + uint64_t kf_dmabuf_size; + } kf_dmabuf; } kf_un; }; uint16_t kf_status; /* Status flags. */ Index: usr.bin/procstat/procstat_files.c =================================================================== --- usr.bin/procstat/procstat_files.c +++ usr.bin/procstat/procstat_files.c @@ -419,6 +419,11 @@ xo_emit("{eq:fd_type/dev}"); break; + case PS_FST_TYPE_DMABUF: + str = "B"; + xo_emit("{eq:fd_type/dmabuf}"); + break; + case PS_FST_TYPE_NONE: str = "?"; xo_emit("{eq:fd_type/none}");