Date: Tue, 12 Jan 2021 10:33:35 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f74397658390 - main - dtrace: Blacklist riscv exception handlers for fbt Message-ID: <202101121033.10CAXZFe004740@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f74397658390237200cc19cae133ea1073e7bf6d commit f74397658390237200cc19cae133ea1073e7bf6d Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-01-11 20:23:22 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-01-12 09:33:16 +0000 dtrace: Blacklist riscv exception handlers for fbt We can't safely instrument those exception handlers, so blacklist them. Test case: dtrace -n ::: Reviewed by: markj (previous version) Differential Revision: https://reviews.freebsd.org/D27754 --- sys/cddl/dev/fbt/riscv/fbt_isa.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/cddl/dev/fbt/riscv/fbt_isa.c b/sys/cddl/dev/fbt/riscv/fbt_isa.c index 406fcd3f9bea..659a9d44c81c 100644 --- a/sys/cddl/dev/fbt/riscv/fbt_isa.c +++ b/sys/cddl/dev/fbt/riscv/fbt_isa.c @@ -156,6 +156,19 @@ fbt_provide_module_function(linker_file_t lf, int symindx, if (fbt_excluded(name)) return (0); + /* + * Some assembly-language exception handlers are not suitable for + * instrumentation. + */ + if (strcmp(name, "cpu_exception_handler") == 0) + return (0); + if (strcmp(name, "cpu_exception_handler_user") == 0) + return (0); + if (strcmp(name, "cpu_exception_handler_supervisor") == 0) + return (0); + if (strcmp(name, "do_trap_supervisor") == 0) + return (0); + instr = (uint32_t *)(symval->value); limit = (uint32_t *)(symval->value + symval->size);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101121033.10CAXZFe004740>