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] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  7 Jan 2022 12:49:50 +0800
From:   Pingfan Liu <kernelfans@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Pingfan Liu <kernelfans@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
Subject: [PATCH 2/3] tracing/filter: harden the prototype of predicate_parse()

Since the next patch badly relies on the struct 'trace_event_call' to
pass in 'event_call_class info', making the involved functions' prototype
stricter.

There is no functional change in this patch.

Signed-off-by: Pingfan Liu <kernelfans@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...hat.com>
To: linux-kernel@...r.kernel.org
---
 kernel/trace/trace_events_filter.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 264456e1698f..2a05315127f9 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -136,7 +136,8 @@ static void parse_error(struct filter_parse_error *pe, int err, int pos)
 	pe->lasterr_pos = pos;
 }
 
-typedef int (*parse_pred_fn)(const char *str, void *data, int pos,
+typedef int (*parse_pred_fn)(const char *str, struct trace_event_call *data,
+			     int pos,
 			     struct filter_parse_error *pe,
 			     struct filter_pred **pred);
 
@@ -408,7 +409,7 @@ enum {
  */
 static struct prog_entry *
 predicate_parse(const char *str, int nr_parens, int nr_preds,
-		parse_pred_fn parse_pred, void *data,
+		parse_pred_fn parse_pred, struct trace_event_call *data,
 		struct filter_parse_error *pe)
 {
 	struct prog_entry *prog_stack;
@@ -1149,7 +1150,7 @@ static filter_pred_fn_t select_comparison_fn(enum filter_op_ids op,
 }
 
 /* Called when a predicate is encountered by predicate_parse() */
-static int parse_pred(const char *str, void *data,
+static int parse_pred(const char *str, struct trace_event_call *data,
 		      int pos, struct filter_parse_error *pe,
 		      struct filter_pred **pred_ptr)
 {
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ