From: Steven Rostedt <rostedt@goodmis.org>
To: Jordan Rome <linux@jordanrome.com>
Cc: linux-security-module@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
Andrii Nakryiko <andrii@kernel.org>,
Kernel Team <kernel-team@fb.com>, Serge Hallyn <serge@hallyn.com>,
Yonghong Song <yonghong.song@linux.dev>
Subject: Re: [v1] security: add trace event for cap_capable
Date: Thu, 24 Oct 2024 09:19:04 -0400 [thread overview]
Message-ID: <20241024091904.2650d758@rorschach.local.home> (raw)
In-Reply-To: <20241024104012.1815022-1-linux@jordanrome.com>
On Thu, 24 Oct 2024 03:40:12 -0700
Jordan Rome <linux@jordanrome.com> wrote:
> +TRACE_EVENT(capable,
> +
> + TP_PROTO(const struct cred *cred, struct user_namespace *targ_ns,
> + struct user_namespace *capable_ns, int cap, unsigned int opts, int ret),
> +
> + TP_ARGS(cred, targ_ns, capable_ns, cap, opts, ret),
> +
> + TP_STRUCT__entry(
> + __field(const struct cred *, cred)
> + __field(struct user_namespace *, targ_ns)
> + __field(struct user_namespace *, capable_ns)
> + __field(int, cap)
> + __field(unsigned int, opts)
> + __field(int, ret)
> + ),
> +
> + TP_fast_assign(
> + __entry->cred = cred;
> + __entry->targ_ns = targ_ns;
> + __entry->capable_ns = capable_ns;
> + __entry->cap = cap;
> + __entry->opts = opts;
> + __entry->ret = ret;
> + ),
> +
> + TP_printk("cap %d, opts %u, ret %d",
> + __entry->cap, __entry->opts, __entry->ret)
> +);
> +
You record cred, targ_ns and capable_ns but don't use it in TP_printk?
It's fine to print pointers there. Is there a reason you do not?
-- Steve
next prev parent reply other threads:[~2024-10-24 13:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 10:40 [v1] security: add trace event for cap_capable Jordan Rome
2024-10-24 13:19 ` Steven Rostedt [this message]
2024-10-24 13:40 ` Jordan Rome
2024-10-24 17:48 ` Andrii Nakryiko
2024-10-25 0:23 ` Steven Rostedt
2024-10-24 17:50 ` Andrii Nakryiko
2024-10-24 19:37 ` [PATCH v1] " Paul Moore
2024-10-24 20:28 ` [v1] " sergeh
2024-10-25 1:15 ` Jordan Rome
2024-10-25 11:18 ` sergeh
2024-10-25 11:22 ` Jordan Rome
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241024091904.2650d758@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=andrii@kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux@jordanrome.com \
--cc=serge@hallyn.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).