Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial port of DTrace for Morello #2309

Open
wants to merge 47 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6690b99
dtrace: Remove an unused typedef
markjdb Nov 23, 2024
4b460d7
dtrace tests: Avoid hard-coding paths to required programs
markjdb Jan 22, 2025
375ded9
dtrace: Fix the definition of pc_t
markjdb Jan 22, 2025
2035a30
libdtrace: Use C99 designated initializers for dt_idops_t
markjdb Jan 22, 2025
06a1c6e
dtrace/arm64: Simplify variable declarations in the invop handler
markjdb Jan 22, 2025
6b0068f
dtrace: Use size_t instead of uintptr_t to represent buffer offsets
markjdb Jan 23, 2025
8a0fe9d
dtrace tests: Fix the ATF config variable name
markjdb Jan 23, 2025
ea90dbb
libdtrace: Generalize handling of data models a bit
markjdb Jan 25, 2025
8ad6b87
libdtrace: Use designators to initialize the opcode array
markjdb Jan 29, 2025
c8ad5e1
sdt: Stop defining probe and provider structures as arrays
markjdb Nov 19, 2024
07a7561
dtrace/arm64: Fix enumeration of FBT return probes
markjdb Jan 29, 2025
6b295f9
linker: Improve handling of ifunc symbols
markjdb Jan 29, 2025
1c82ae6
sdt: Use .chericap to store pointers
markjdb Nov 20, 2024
3ef81df
sdt: Avoid setting subobject bounds when adding tracepoint definitions
markjdb Nov 20, 2024
89938db
sdt: Make sure that tracepoints carry a valid capability for patching
markjdb Nov 26, 2024
3fa774a
dtrace/arm64: Add some support for FBT on Morello
markjdb Jan 22, 2025
09f86aa
dtrace: Remove COMPAT_FREEBSD64 hooks
markjdb Jan 22, 2025
d3d26ed
sys/tools/syscalls: Convert sysent probe parameters to intcap_t
markjdb Jan 22, 2025
30b3636
dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured
markjdb Jan 22, 2025
294cfdb
systrace: Use uintcap_t for probe arguments
markjdb Jan 22, 2025
809583f
systrace: Regenerate
markjdb Jan 22, 2025
ac8492f
sdt: Fix format strings for uintptr_t
markjdb Jan 23, 2025
5eea5d2
kinst: Use a vm_pointer_t to store a trampoine address
markjdb Jan 23, 2025
ad51be4
dtrace: Cast to ptraddr_t instead of uintptr_t where appropriate
markjdb Jan 24, 2025
e0a289f
dtrace: Make fuword* and copy(in|out) wrappers capability aware
markjdb Jan 24, 2025
ff2ccfa
dtrace: Avoid applying subobject bounds in dtrace_ecb_aggregation_cre…
markjdb Jan 24, 2025
3f45c07
libdtrace: Add a new data model for CHERI
markjdb Jan 24, 2025
5fbe282
dtrace: Extend use of the dtrace_uarg_t type
markjdb Jan 25, 2025
4450611
dtrace: Convert more incorrect uses of uintptr_t to size_t
markjdb Jan 25, 2025
d952d94
dtrace: Introduce dtrace_difval_t
markjdb Jan 25, 2025
f629227
dtrace: Return a uint64ptr_t from provider getarg routines
markjdb Jan 25, 2025
3eef650
dtrace tests: Exclude json and usdt tests for now
markjdb Jan 25, 2025
88d7794
ctfconvert: Teach the DWARF parser about intcap encodings
markjdb Jan 25, 2025
014fce9
dtrace: Add a new probe error type for CHERI exceptions
markjdb Jan 26, 2025
aa329c8
libdtrace: Add support for printing capabilities
markjdb Jan 26, 2025
316af71
dtrace: Improve a few MD subroutines
markjdb Jan 26, 2025
5a73f78
libdtrace: Use the right width for CPU registers
markjdb Jan 26, 2025
5f5aa50
dtrace: Add capability load and store DIF instructions
markjdb Jan 27, 2025
0d36ec4
libdtrace: Emit LDC and STC DIF instructions when appropriate
markjdb Jan 27, 2025
850a735
dtrace: Permit storing capability-sized values to the trace buffer
markjdb Jan 29, 2025
ba62ac3
dtrace: Fix handling of dynamic state in purecap kernels
markjdb Jan 29, 2025
27bb3b6
dtrace/arm64: Avoid calling memcpy() in dtrace_getarg()
markjdb Jan 29, 2025
e1917f3
dtrace/arm64: Handle purecap function prologues in kinst
markjdb Jan 29, 2025
e17ac4e
dtrace/arm64: Synthesize patchpoint capabilities
markjdb Jan 29, 2025
976f039
share/mk: Enable WITH_DTRACE by default
markjdb Feb 15, 2023
2d0c820
arm64: Enable KDTRACE_HOOKS in GENERIC-MORELLO
markjdb Feb 15, 2023
3003ee1
dtrace: Add a sysctl to block loading of dtrace.ko in CHERI kernels
markjdb Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#ifdef __FreeBSD__
#include <locale.h>
#include <spawn.h>
#include <stdbool.h>
#endif

#undef NORETURN /* needed because libxo redefines it */
Expand Down Expand Up @@ -81,7 +82,7 @@ typedef struct dtrace_cmd {
#define E_USAGE 2

static const char DTRACE_OPTSTR[] =
"3:6:aAb:Bc:CdD:ef:FGhHi:I:lL:m:n:o:Op:P:qs:SU:vVwx:X:Z";
"1:3:6:aAb:Bc:CdD:ef:FGhHi:I:lL:m:n:o:Op:P:qs:SU:vVwx:X:Z";

static char **g_argv;
static int g_argc;
Expand Down Expand Up @@ -150,7 +151,8 @@ usage(FILE *fp)

(void) fprintf(fp, "\n"
"\t-32 generate 32-bit D programs and ELF files\n"
"\t-64 generate 64-bit D programs and ELF files\n\n"
"\t-64 generate 64-bit D programs and ELF files\n"
"\t-128 generate 64-bit, 128-bit pointer D programs and ELF files\n\n"
"\t-a claim anonymous tracing state\n"
"\t-A generate driver.conf(4) directives for anonymous tracing\n"
"\t-b set trace buffer size\n"
Expand Down Expand Up @@ -1371,14 +1373,24 @@ main(int argc, char *argv[])
for (optind = 1; optind < argc; optind++) {
while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != -1) {
switch (c) {
case '1':
if (strcmp(optarg, "128") != 0) {
(void) fprintf(stderr,
"%s: illegal option -- 1%s\n",
argv[0], optarg);
return (usage(stderr));
}
g_oflags &= ~DTRACE_O_MODEL_MASK;
g_oflags |= DTRACE_O_P128;
break;
case '3':
if (strcmp(optarg, "2") != 0) {
(void) fprintf(stderr,
"%s: illegal option -- 3%s\n",
argv[0], optarg);
return (usage(stderr));
}
g_oflags &= ~DTRACE_O_LP64;
g_oflags &= ~DTRACE_O_MODEL_MASK;
g_oflags |= DTRACE_O_ILP32;
break;

Expand All @@ -1389,7 +1401,7 @@ main(int argc, char *argv[])
argv[0], optarg);
return (usage(stderr));
}
g_oflags &= ~DTRACE_O_ILP32;
g_oflags &= ~DTRACE_O_MODEL_MASK;
g_oflags |= DTRACE_O_LP64;
break;

Expand Down Expand Up @@ -1460,8 +1472,7 @@ main(int argc, char *argv[])
* files. We ignore certain errors since we'll catch them later when
* we actually process the object files.
*/
if (g_mode == DMODE_LINK &&
(g_oflags & (DTRACE_O_ILP32 | DTRACE_O_LP64)) == 0 &&
if (g_mode == DMODE_LINK && (g_oflags & DTRACE_O_MODEL_MASK) == 0 &&
elf_version(EV_CURRENT) != EV_NONE) {
int fd;
Elf *elf;
Expand Down Expand Up @@ -1491,9 +1502,13 @@ main(int argc, char *argv[])
fatal("can't mix 32-bit and 64-bit "
"object files\n");
}
g_oflags |= DTRACE_O_LP64;
if (ELF_IS_CHERI(&ehdr))
g_oflags |= DTRACE_O_P128;
else
g_oflags |= DTRACE_O_LP64;
} else if (ehdr.e_ident[EI_CLASS] == ELFCLASS32) {
if (g_oflags & DTRACE_O_LP64) {
if (g_oflags &
(DTRACE_O_LP64 | DTRACE_O_P128)) {
fatal("can't mix 32-bit and 64-bit "
"object files\n");
}
Expand Down
1 change: 1 addition & 0 deletions cddl/contrib/opensolaris/common/ctf/ctf_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
static const ctf_dmodel_t _libctf_models[] = {
{ "ILP32", CTF_MODEL_ILP32, 4, 1, 2, 4, 4 },
{ "LP64", CTF_MODEL_LP64, 8, 1, 2, 4, 8 },
{ "P128", CTF_MODEL_P128, 16, 1, 2, 4, 8 },
{ NULL, 0, 0, 0, 0, 0, 0 }
};

Expand Down
29 changes: 24 additions & 5 deletions cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ clp2(size_t x)

/*
* Lookup the correct load opcode to use for the specified node and CTF type.
* We determine the size and convert it to a 3-bit index. Our lookup table
* is constructed to use a 5-bit index, consisting of the 3-bit size 0-7, a
* We determine the size and convert it to a 4-bit index. Our lookup table
* is constructed to use a 6-bit index, consisting of the 4-bit size 0-15, a
* bit for the sign, and a bit for userland address. For example, a 4-byte
* signed load from userland would be at the following table index:
* user=1 sign=1 size=4 => binary index 11011 = decimal index 27
Expand All @@ -147,12 +147,20 @@ dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type)
static const uint_t ops[] = {
DIF_OP_LDUB, DIF_OP_LDUH, 0, DIF_OP_LDUW,
0, 0, 0, DIF_OP_LDX,
0, 0, 0, 0,
0, 0, 0, DIF_OP_LDC,
DIF_OP_LDSB, DIF_OP_LDSH, 0, DIF_OP_LDSW,
0, 0, 0, DIF_OP_LDX,
0, 0, 0, 0,
0, 0, 0, DIF_OP_LDC,
DIF_OP_ULDUB, DIF_OP_ULDUH, 0, DIF_OP_ULDUW,
0, 0, 0, DIF_OP_ULDX,
0, 0, 0, 0,
0, 0, 0, DIF_OP_ULDC,
DIF_OP_ULDSB, DIF_OP_ULDSH, 0, DIF_OP_ULDSW,
0, 0, 0, DIF_OP_ULDX,
0, 0, 0, 0,
0, 0, 0, DIF_OP_ULDC,
};

ctf_encoding_t e;
Expand All @@ -169,18 +177,19 @@ dt_cg_load(dt_node_t *dnp, ctf_file_t *ctfp, ctf_id_t type)
else
size = ctf_type_size(ctfp, type);

if (size < 1 || size > 8 || (size & (size - 1)) != 0) {
if (size < 1 || size > 16 || (size & (size - 1)) != 0) {
xyerror(D_UNKNOWN, "internal error -- cg cannot load "
"size %ld when passed by value\n", (long)size);
}

size--; /* convert size to 3-bit index */

if (dnp->dn_flags & DT_NF_SIGNED)
size |= 0x08;
if (dnp->dn_flags & DT_NF_USERLAND)
size |= 0x10;
if (dnp->dn_flags & DT_NF_USERLAND)
size |= 0x20;

assert(ops[size] != 0);
return (ops[size]);
}

Expand Down Expand Up @@ -445,6 +454,11 @@ dt_cg_store(dt_node_t *src, dt_irlist_t *dlp, dt_regset_t *drp, dt_node_t *dst)
case 8:
instr = DIF_INSTR_STORE(DIF_OP_STX, reg, dst->dn_reg);
break;
#if __has_feature(capabilities)
case 16:
instr = DIF_INSTR_STORE(DIF_OP_STC, reg, dst->dn_reg);
break;
#endif
default:
xyerror(D_UNKNOWN, "internal error -- cg cannot store "
"size %lu when passed by value\n", (ulong_t)size);
Expand Down Expand Up @@ -1421,6 +1435,11 @@ dt_cg_xlate_member(const char *name, ctf_id_t type, ulong_t off, void *arg)
case 8:
instr = DIF_INSTR_STORE(DIF_OP_STX, treg, reg);
break;
#if __has_feature(capabilities)
case 16:
instr = DIF_INSTR_STORE(DIF_OP_STC, treg, reg);
break;
#endif
default:
xyerror(D_UNKNOWN, "internal error -- unexpected "
"size: %lu\n", (ulong_t)size);
Expand Down
166 changes: 86 additions & 80 deletions cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,86 +348,92 @@ dt_dis(const dtrace_difo_t *dp, FILE *fp)
void (*op_func)(const dtrace_difo_t *, const char *,
dif_instr_t, FILE *);
} optab[] = {
{ "(illegal opcode)", dt_dis_str },
{ "or", dt_dis_log }, /* DIF_OP_OR */
{ "xor", dt_dis_log }, /* DIF_OP_XOR */
{ "and", dt_dis_log }, /* DIF_OP_AND */
{ "sll", dt_dis_log }, /* DIF_OP_SLL */
{ "srl", dt_dis_log }, /* DIF_OP_SRL */
{ "sub", dt_dis_log }, /* DIF_OP_SUB */
{ "add", dt_dis_log }, /* DIF_OP_ADD */
{ "mul", dt_dis_log }, /* DIF_OP_MUL */
{ "sdiv", dt_dis_log }, /* DIF_OP_SDIV */
{ "udiv", dt_dis_log }, /* DIF_OP_UDIV */
{ "srem", dt_dis_log }, /* DIF_OP_SREM */
{ "urem", dt_dis_log }, /* DIF_OP_UREM */
{ "not", dt_dis_r1rd }, /* DIF_OP_NOT */
{ "mov", dt_dis_r1rd }, /* DIF_OP_MOV */
{ "cmp", dt_dis_cmp }, /* DIF_OP_CMP */
{ "tst", dt_dis_tst }, /* DIF_OP_TST */
{ "ba", dt_dis_branch }, /* DIF_OP_BA */
{ "be", dt_dis_branch }, /* DIF_OP_BE */
{ "bne", dt_dis_branch }, /* DIF_OP_BNE */
{ "bg", dt_dis_branch }, /* DIF_OP_BG */
{ "bgu", dt_dis_branch }, /* DIF_OP_BGU */
{ "bge", dt_dis_branch }, /* DIF_OP_BGE */
{ "bgeu", dt_dis_branch }, /* DIF_OP_BGEU */
{ "bl", dt_dis_branch }, /* DIF_OP_BL */
{ "blu", dt_dis_branch }, /* DIF_OP_BLU */
{ "ble", dt_dis_branch }, /* DIF_OP_BLE */
{ "bleu", dt_dis_branch }, /* DIF_OP_BLEU */
{ "ldsb", dt_dis_load }, /* DIF_OP_LDSB */
{ "ldsh", dt_dis_load }, /* DIF_OP_LDSH */
{ "ldsw", dt_dis_load }, /* DIF_OP_LDSW */
{ "ldub", dt_dis_load }, /* DIF_OP_LDUB */
{ "lduh", dt_dis_load }, /* DIF_OP_LDUH */
{ "lduw", dt_dis_load }, /* DIF_OP_LDUW */
{ "ldx", dt_dis_load }, /* DIF_OP_LDX */
{ "ret", dt_dis_ret }, /* DIF_OP_RET */
{ "nop", dt_dis_str }, /* DIF_OP_NOP */
{ "setx", dt_dis_setx }, /* DIF_OP_SETX */
{ "sets", dt_dis_sets }, /* DIF_OP_SETS */
{ "scmp", dt_dis_cmp }, /* DIF_OP_SCMP */
{ "ldga", dt_dis_lda }, /* DIF_OP_LDGA */
{ "ldgs", dt_dis_ldv }, /* DIF_OP_LDGS */
{ "stgs", dt_dis_stv }, /* DIF_OP_STGS */
{ "ldta", dt_dis_lda }, /* DIF_OP_LDTA */
{ "ldts", dt_dis_ldv }, /* DIF_OP_LDTS */
{ "stts", dt_dis_stv }, /* DIF_OP_STTS */
{ "sra", dt_dis_log }, /* DIF_OP_SRA */
{ "call", dt_dis_call }, /* DIF_OP_CALL */
{ "pushtr", dt_dis_pushts }, /* DIF_OP_PUSHTR */
{ "pushtv", dt_dis_pushts }, /* DIF_OP_PUSHTV */
{ "popts", dt_dis_str }, /* DIF_OP_POPTS */
{ "flushts", dt_dis_str }, /* DIF_OP_FLUSHTS */
{ "ldgaa", dt_dis_ldv }, /* DIF_OP_LDGAA */
{ "ldtaa", dt_dis_ldv }, /* DIF_OP_LDTAA */
{ "stgaa", dt_dis_stv }, /* DIF_OP_STGAA */
{ "sttaa", dt_dis_stv }, /* DIF_OP_STTAA */
{ "ldls", dt_dis_ldv }, /* DIF_OP_LDLS */
{ "stls", dt_dis_stv }, /* DIF_OP_STLS */
{ "allocs", dt_dis_r1rd }, /* DIF_OP_ALLOCS */
{ "copys", dt_dis_log }, /* DIF_OP_COPYS */
{ "stb", dt_dis_store }, /* DIF_OP_STB */
{ "sth", dt_dis_store }, /* DIF_OP_STH */
{ "stw", dt_dis_store }, /* DIF_OP_STW */
{ "stx", dt_dis_store }, /* DIF_OP_STX */
{ "uldsb", dt_dis_load }, /* DIF_OP_ULDSB */
{ "uldsh", dt_dis_load }, /* DIF_OP_ULDSH */
{ "uldsw", dt_dis_load }, /* DIF_OP_ULDSW */
{ "uldub", dt_dis_load }, /* DIF_OP_ULDUB */
{ "ulduh", dt_dis_load }, /* DIF_OP_ULDUH */
{ "ulduw", dt_dis_load }, /* DIF_OP_ULDUW */
{ "uldx", dt_dis_load }, /* DIF_OP_ULDX */
{ "rldsb", dt_dis_load }, /* DIF_OP_RLDSB */
{ "rldsh", dt_dis_load }, /* DIF_OP_RLDSH */
{ "rldsw", dt_dis_load }, /* DIF_OP_RLDSW */
{ "rldub", dt_dis_load }, /* DIF_OP_RLDUB */
{ "rlduh", dt_dis_load }, /* DIF_OP_RLDUH */
{ "rlduw", dt_dis_load }, /* DIF_OP_RLDUW */
{ "rldx", dt_dis_load }, /* DIF_OP_RLDX */
{ "xlate", dt_dis_xlate }, /* DIF_OP_XLATE */
{ "xlarg", dt_dis_xlate }, /* DIF_OP_XLARG */
[0] = { "(illegal opcode)", dt_dis_str },
[DIF_OP_OR] = { "or", dt_dis_log },
[DIF_OP_XOR] = { "xor", dt_dis_log },
[DIF_OP_AND] = { "and", dt_dis_log },
[DIF_OP_SLL] = { "sll", dt_dis_log },
[DIF_OP_SRL] = { "srl", dt_dis_log },
[DIF_OP_SUB] = { "sub", dt_dis_log },
[DIF_OP_ADD] = { "add", dt_dis_log },
[DIF_OP_MUL] = { "mul", dt_dis_log },
[DIF_OP_SDIV] = { "sdiv", dt_dis_log },
[DIF_OP_UDIV] = { "udiv", dt_dis_log },
[DIF_OP_SREM] = { "srem", dt_dis_log },
[DIF_OP_UREM] = { "urem", dt_dis_log },
[DIF_OP_NOT] = { "not", dt_dis_r1rd },
[DIF_OP_MOV] = { "mov", dt_dis_r1rd },
[DIF_OP_CMP] = { "cmp", dt_dis_cmp },
[DIF_OP_TST] = { "tst", dt_dis_tst },
[DIF_OP_BA] = { "ba", dt_dis_branch },
[DIF_OP_BE] = { "be", dt_dis_branch },
[DIF_OP_BNE] = { "bne", dt_dis_branch },
[DIF_OP_BG] = { "bg", dt_dis_branch },
[DIF_OP_BGU] = { "bgu", dt_dis_branch },
[DIF_OP_BGE] = { "bge", dt_dis_branch },
[DIF_OP_BGEU] = { "bgeu", dt_dis_branch },
[DIF_OP_BL] = { "bl", dt_dis_branch },
[DIF_OP_BLU] = { "blu", dt_dis_branch },
[DIF_OP_BLE] = { "ble", dt_dis_branch },
[DIF_OP_BLEU] = { "bleu", dt_dis_branch },
[DIF_OP_LDSB] = { "ldsb", dt_dis_load },
[DIF_OP_LDSH] = { "ldsh", dt_dis_load },
[DIF_OP_LDSW] = { "ldsw", dt_dis_load },
[DIF_OP_LDUB] = { "ldub", dt_dis_load },
[DIF_OP_LDUH] = { "lduh", dt_dis_load },
[DIF_OP_LDUW] = { "lduw", dt_dis_load },
[DIF_OP_LDX] = { "ldx", dt_dis_load },
[DIF_OP_RET] = { "ret", dt_dis_ret },
[DIF_OP_NOP] = { "nop", dt_dis_str },
[DIF_OP_SETX] = { "setx", dt_dis_setx },
[DIF_OP_SETS] = { "sets", dt_dis_sets },
[DIF_OP_SCMP] = { "scmp", dt_dis_cmp },
[DIF_OP_LDGA] = { "ldga", dt_dis_lda },
[DIF_OP_LDGS] = { "ldgs", dt_dis_ldv },
[DIF_OP_STGS] = { "stgs", dt_dis_stv },
[DIF_OP_LDTA] = { "ldta", dt_dis_lda },
[DIF_OP_LDTS] = { "ldts", dt_dis_ldv },
[DIF_OP_STTS] = { "stts", dt_dis_stv },
[DIF_OP_SRA] = { "sra", dt_dis_log },
[DIF_OP_CALL] = { "call", dt_dis_call },
[DIF_OP_PUSHTR] = { "pushtr", dt_dis_pushts },
[DIF_OP_PUSHTV] = { "pushtv", dt_dis_pushts },
[DIF_OP_POPTS] = { "popts", dt_dis_str },
[DIF_OP_FLUSHTS] = { "flushts", dt_dis_str },
[DIF_OP_LDGAA] = { "ldgaa", dt_dis_ldv },
[DIF_OP_LDTAA] = { "ldtaa", dt_dis_ldv },
[DIF_OP_STGAA] = { "stgaa", dt_dis_stv },
[DIF_OP_STTAA] = { "sttaa", dt_dis_stv },
[DIF_OP_LDLS] = { "ldls", dt_dis_ldv },
[DIF_OP_STLS] = { "stls", dt_dis_stv },
[DIF_OP_ALLOCS] = { "allocs", dt_dis_r1rd },
[DIF_OP_COPYS] = { "copys", dt_dis_log },
[DIF_OP_STB] = { "stb", dt_dis_store },
[DIF_OP_STH] = { "sth", dt_dis_store },
[DIF_OP_STW] = { "stw", dt_dis_store },
[DIF_OP_STX] = { "stx", dt_dis_store },
[DIF_OP_ULDSB] = { "uldsb", dt_dis_load },
[DIF_OP_ULDSH] = { "uldsh", dt_dis_load },
[DIF_OP_ULDSW] = { "uldsw", dt_dis_load },
[DIF_OP_ULDUB] = { "uldub", dt_dis_load },
[DIF_OP_ULDUH] = { "ulduh", dt_dis_load },
[DIF_OP_ULDUW] = { "ulduw", dt_dis_load },
[DIF_OP_ULDX] = { "uldx", dt_dis_load },
[DIF_OP_RLDSB] = { "rldsb", dt_dis_load },
[DIF_OP_RLDSH] = { "rldsh", dt_dis_load },
[DIF_OP_RLDSW] = { "rldsw", dt_dis_load },
[DIF_OP_RLDUB] = { "rldub", dt_dis_load },
[DIF_OP_RLDUH] = { "rlduh", dt_dis_load },
[DIF_OP_RLDUW] = { "rlduw", dt_dis_load },
[DIF_OP_RLDX] = { "rldx", dt_dis_load },
[DIF_OP_XLATE] = { "xlate", dt_dis_xlate },
[DIF_OP_XLARG] = { "xlarg", dt_dis_xlate },
#if __has_feature(capabilities)
[DIF_OP_LDC] = { "ldc", dt_dis_load },
[DIF_OP_RLDC] = { "rldc", dt_dis_load },
[DIF_OP_ULDC] = { "uldc", dt_dis_load },
[DIF_OP_STC] = { "stc", dt_dis_store },
#endif
};

const struct opent *op;
Expand Down
6 changes: 4 additions & 2 deletions cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,9 @@
hp->dofh_ident[DOF_ID_MAG2] = DOF_MAG_MAG2;
hp->dofh_ident[DOF_ID_MAG3] = DOF_MAG_MAG3;

if (dtp->dt_conf.dtc_ctfmodel == CTF_MODEL_LP64)
if (dtp->dt_conf.dtc_ctfmodel == CTF_MODEL_P128)
hp->dofh_ident[DOF_ID_MODEL] = DOF_MODEL_P128;
else if (dtp->dt_conf.dtc_ctfmodel == CTF_MODEL_LP64)
hp->dofh_ident[DOF_ID_MODEL] = DOF_MODEL_LP64;
else
hp->dofh_ident[DOF_ID_MODEL] = DOF_MODEL_ILP32;
Expand Down Expand Up @@ -813,7 +815,7 @@
dofe.dofe_uarg = edp->dted_uarg;

(void) dof_add_lsect(ddo, &dofe, DOF_SECT_ECBDESC,
sizeof (uint64_t), 0, 0, sizeof (dof_ecbdesc_t));
sizeof (dtrace_uarg_t), 0, 0, sizeof (dof_ecbdesc_t));

Check failure on line 818 in cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c

View workflow job for this annotation

GitHub Actions / Style Checker

space prohibited between function name and open parenthesis '('

Check failure on line 818 in cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c

View workflow job for this annotation

GitHub Actions / Style Checker

space prohibited between function name and open parenthesis '('
}

/*
Expand Down
1 change: 1 addition & 0 deletions cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ dtrace_faultstr(dtrace_hdl_t *dtp, int fault)
{ DTRACEFLT_TUPOFLOW, "tuple stack overflow" },
{ DTRACEFLT_BADSTACK, "bad stack" },
{ DTRACEFLT_LIBRARY, "library-level fault" },
{ DTRACEFLT_CHERI, "CHERI exception" },
{ 0, NULL }
};

Expand Down
Loading