Skip to content

Commit 1da3f14

Browse files
mhiramatrostedt
authored andcommitted
tracing: dynevent: Add a missing lockdown check on dynevent
Since dynamic_events interface on tracefs is compatible with kprobe_events and uprobe_events, it should also check the lockdown status and reject if it is set. Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/175824455687.45175.3734166065458520748.stgit@devnote2 Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent a250103 commit 1da3f14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/trace/trace_dynevent.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ static int dyn_event_open(struct inode *inode, struct file *file)
230230
{
231231
int ret;
232232

233+
ret = security_locked_down(LOCKDOWN_TRACEFS);
234+
if (ret)
235+
return ret;
236+
233237
ret = tracing_check_open_get_tr(NULL);
234238
if (ret)
235239
return ret;

0 commit comments

Comments
 (0)