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

Disable dlfilter by default #255

Merged
merged 1 commit into from
Sep 25, 2022
Merged
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions core/env_vars.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ let debug = Option.is_some (Unix.getenv "MAGIC_TRACE_DEBUG")
features of magic-trace. *)
let experimental = Option.is_some (Unix.getenv "MAGIC_TRACE_EXPERIMENTAL")

(* When tracing the kernel on certain systems, perf only has root access when
(* magic-trace's dlfilter integration is busted right now, see #246. Also:

When tracing the kernel on certain systems, perf only has root access when
being run with a specific set of flags. Since this does not include
[--dlfilter], this environment variable allows the user to forcibly disable
filtering. *)
let no_dlfilter = Option.is_some (Unix.getenv "MAGIC_TRACE_NO_DLFILTER")
let no_dlfilter = Option.is_none (Unix.getenv "MAGIC_TRACE_ENABLE_DLFILTER")