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]
Message-ID: <20250416152027.0562b339@gandalf.local.home>
Date: Wed, 16 Apr 2025 15:20:27 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Madhavan Srinivasan
 <maddy@...ux.ibm.com>, Hari Bathini <hbathini@...ux.ibm.com>
Subject: Re: [mainline]Kernel crash while running ftrace selftest

On Wed, 16 Apr 2025 22:36:11 +0530
Venkat Rao Bagalkote <venkat88@...ux.ibm.com> wrote:

> >    */
> >   int ftrace_shutdown_subops(struct ftrace_ops *ops, struct ftrace_ops *subops, int command)
> >   {
> > -	struct ftrace_hash *filter_hash;
> > -	struct ftrace_hash *notrace_hash;
> > +	struct ftrace_hash *filter_hash = EMPTY_HASH;
> > +	struct ftrace_hash *notrace_hash = EMPTY_HASH;
> >   	int ret;
> >   
> >   	if (unlikely(ftrace_disabled))  
> 
> 
> Hello Steve,
> 
> Issue still persists with the above patch.

Ah I just noticed that your backtrace had ftrace_startup_subops() not
ftrace_shutdown_subops(). How about this patch? It initializes for both
functions:

-- Steve

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index a8a02868b435..43394445390c 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3490,8 +3490,8 @@ static int add_next_hash(struct ftrace_hash **filter_hash, struct ftrace_hash **
  */
 int ftrace_startup_subops(struct ftrace_ops *ops, struct ftrace_ops *subops, int command)
 {
-	struct ftrace_hash *filter_hash;
-	struct ftrace_hash *notrace_hash;
+	struct ftrace_hash *filter_hash = EMPTY_HASH;
+	struct ftrace_hash *notrace_hash = EMPTY_HASH;
 	struct ftrace_hash *save_filter_hash;
 	struct ftrace_hash *save_notrace_hash;
 	int ret;
@@ -3625,8 +3625,8 @@ static int rebuild_hashes(struct ftrace_hash **filter_hash, struct ftrace_hash *
  */
 int ftrace_shutdown_subops(struct ftrace_ops *ops, struct ftrace_ops *subops, int command)
 {
-	struct ftrace_hash *filter_hash;
-	struct ftrace_hash *notrace_hash;
+	struct ftrace_hash *filter_hash = EMPTY_HASH;
+	struct ftrace_hash *notrace_hash = EMPTY_HASH;
 	int ret;
 
 	if (unlikely(ftrace_disabled))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ