lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20230529172149.fec12da876356c1a679d8bcb@kernel.org>
Date:   Mon, 29 May 2023 17:21:49 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     sunliming <sunliming@...inos.cn>
Cc:     rostedt@...dmis.org, beaub@...ux.microsoft.com,
        linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] tracing/user_events: Handle matching arguments that is
 null from dyn_events

On Mon, 29 May 2023 14:51:10 +0800
sunliming <sunliming@...inos.cn> wrote:

> When A registering user event from dyn_events has no argments, it will pass the
> matching check, regardless of whether there is a user event with the same name
> and arguments. Add the matching check when the arguments of registering user
> event is null.

OK, since the user_events doesn't support multi-definitions on the same name
event, this should be checked.

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thank you!

> 
> Signed-off-by: sunliming <sunliming@...inos.cn>
> ---
>  kernel/trace/trace_events_user.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
> index e90161294698..0d91dac206ff 100644
> --- a/kernel/trace/trace_events_user.c
> +++ b/kernel/trace/trace_events_user.c
> @@ -1712,6 +1712,8 @@ static bool user_event_match(const char *system, const char *event,
>  
>  	if (match && argc > 0)
>  		match = user_fields_match(user, argc, argv);
> +	else if (match && argc == 0)
> +		match = list_empty(&user->fields);
>  
>  	return match;
>  }
> -- 
> 2.25.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ