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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211026140632.GV880162@paulmck-ThinkPad-P17-Gen-1>
Date:   Tue, 26 Oct 2021 07:06:32 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     "lizhijian@...itsu.com" <lizhijian@...itsu.com>
Cc:     "dave@...olabs.net" <dave@...olabs.net>,
        "josh@...htriplett.org" <josh@...htriplett.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
        "jiangshanlai@...il.com" <jiangshanlai@...il.com>,
        "joel@...lfernandes.org" <joel@...lfernandes.org>,
        "rcu@...r.kernel.org" <rcu@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] refscale: always log the error message

On Mon, Oct 25, 2021 at 06:12:40AM +0000, lizhijian@...itsu.com wrote:
> 
> 
> On 25/10/2021 11:26, Li Zhijian wrote:
> > Generally, error message should be logged anyhow.
> >
> > Signed-off-by: Li Zhijian <lizhijian@...fujitsu.com>
> > ---
> >   kernel/rcu/refscale.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c
> > index a4479f00dcdc..f055d168365a 100644
> > --- a/kernel/rcu/refscale.c
> > +++ b/kernel/rcu/refscale.c
> > @@ -58,8 +58,8 @@ do {											\
> >   	}										\
> >   } while (0)
> >   
> > -#define VERBOSE_SCALEOUT_ERRSTRING(s, x...) \
> > -	do { if (verbose) pr_alert("%s" SCALE_FLAG "!!! " s, scale_type, ## x); } while (0)
> > +#define SCALEOUT_ERRSTRING(s, x...) \
> > +	do { pr_alert("%s" SCALE_FLAG "!!! " s, scale_type, ## x); } while (0)
> >   
> >   MODULE_LICENSE("GPL");
> >   MODULE_AUTHOR("Joel Fernandes (Google) <joel@...lfernandes.org>");
> > @@ -651,7 +651,7 @@ static int main_func(void *arg)
> >   	result_avg = kzalloc(nruns * sizeof(*result_avg), GFP_KERNEL);
> >   	buf = kzalloc(800 + 64, GFP_KERNEL);
> >   	if (!result_avg || !buf) {
> > -		VERBOSE_SCALEOUT_ERRSTRING("out of memory");
> > +		SCALEOUT_ERRSTRING("out of memory");
> 
> '\n' should be added to the last to flush it.

And there might well be other missing "\n" instances in similar messages
in rcuscale.c, rcutorture.c, scftorture.c, locktorture.c, and torture.c.
Please feel free to send a patch for each file needing this help.

I queued your other three patches for v5.17 (not this coming merge window,
but the one after that), thank you!  I did wordsmith the commit logs,
so please check to see if I messed anything up.

							Thanx, Paul

> >   		goto oom_exit;
> >   	}
> >   	if (holdoff)
> > @@ -837,7 +837,7 @@ ref_scale_init(void)
> >   	reader_tasks = kcalloc(nreaders, sizeof(reader_tasks[0]),
> >   			       GFP_KERNEL);
> >   	if (!reader_tasks) {
> > -		VERBOSE_SCALEOUT_ERRSTRING("out of memory");
> > +		SCALEOUT_ERRSTRING("out of memory");
> ditto
> 
> Thanks
> Zhijian
> >   		firsterr = -ENOMEM;
> >   		goto unwind;
> >   	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ