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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230715095419.3af9ec19@rorschach.local.home>
Date:   Sat, 15 Jul 2023 09:54:19 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Zheng Yejian <zhengyejian1@...wei.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 2/2] tracing: Add free_trace_iter_content() helper
 function

On Sat, 15 Jul 2023 09:42:01 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Sat, 15 Jul 2023 13:15:32 +0800
> Zheng Yejian <zhengyejian1@...wei.com> wrote:
> 
> > > @@ -6709,7 +6723,12 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)
> > >   	}
> > >   
> > >   	trace_seq_init(&iter->seq);
> > > -	iter->trace = tr->current_trace;
> > > +
> > > +	iter->trace = kzalloc(sizeof(*iter->trace), GFP_KERNEL);
> > > +	if (!iter->trace)
> > > +		goto fail;  
> > 
> > Hi, Steve, 'ret' may need to be set before `goto fail`:
> >    ret = -ENOMEM;
> > 
> 
> As I mentioned to Masami, this hunk of the patch didn't belong.
> Something got mixed up in the commit. This patch even depends on the
> previous patch to remove the allocation completely.
> 

I know what I did now. I first started writing this patch and saw that
the iter->trace was inconsistent and in one place allocated a copy and
here it did not. I started to make the copy here, when I realized that
there was no reason to make that copy. Then I wrote the first patch to
remove the copying, but forgot to remove the copying I added in this
patch! :-p

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ