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: <004cd4075f81c092a72a201da9b9170ccf6ff94a.camel@kernel.org>
Date:   Wed, 07 Oct 2020 09:27:39 -0500
From:   Tom Zanussi <zanussi@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>,
        Colin Ian King <colin.king@...onical.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: tracing: Add support for dynamic strings to synthetic events

On Wed, 2020-10-07 at 09:30 -0400, Steven Rostedt wrote:
> On Wed, 7 Oct 2020 14:08:38 +0100
> Colin Ian King <colin.king@...onical.com> wrote:
> 
> > Hi,
> > 
> > Static analysis with Coverity has detected a duplicated condition
> > in an
> > if statement in the following commit in source
> > kernel/trace/trace_events_synth.c
> > 
> > commit bd82631d7ccdc894af2738e47abcba2cb6e7dea9
> > Author: Tom Zanussi <zanussi@...nel.org>
> > Date:   Sun Oct 4 17:14:06 2020 -0500
> > 
> >     tracing: Add support for dynamic strings to synthetic events
> > 
> > Analysis is as follows:
> > 
> > 493        for (i = 0; i < event->n_fields; i++) {
> > 
> > Same on both sides (CONSTANT_EXPRESSION_RESULT)
> > pointless_expression: The expression event->fields[i]->is_dynamic
> > &&
> > event->fields[i]->is_dynamic does not accomplish anything because
> > it
> > evaluates to either of its identical operands, event->fields[i]-
> > >is_dynamic.
> > 
> >    Did you intend the operands to be different?
> > 
> > 494                if (event->fields[i]->is_dynamic &&
> > 495                    event->fields[i]->is_dynamic)
> 
> Bah, I believe that was suppose to be:
> 
> 		if (event->fields[i]->is_string &&
> 		    event->fields[i]->is_dynamic)
> 
> I'll go and fix that.
> 

Yep, thanks for fixing that.

Acked-by: Tom Zanussi <zanussi@...nel.org>


Tom

> -- Steve
> 
> > 496                        pos += snprintf(buf + pos, LEN_OR_ZERO,
> > 497                                ", __get_str(%s)",
> > event->fields[i]->name);
> > 498                else
> > 499                        pos += snprintf(buf + pos, LEN_OR_ZERO,
> > 500                                        ", REC->%s",
> > event->fields[i]->name);
> > 501        }
> > 
> > Colin
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ