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:	Mon, 13 Oct 2008 23:03:51 -0500
From:	Tom Zanussi <zanussi@...cast.net>
To:	Pekka Enberg <penberg@...helsinki.fi>
Cc:	Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>,
	jens.axboe@...cle.com, linux-kernel@...r.kernel.org
Subject: Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice

Hi Pekka,

On Mon, 2008-10-13 at 09:57 +0300, Pekka Enberg wrote:
> Hi Tom,
> 
> On Fri, 2008-10-10 at 23:58 -0500, Tom Zanussi wrote:
> > It looks like you hit the same problem as described here:
> > 
> > commit 8191ecd1d14c6914c660dfa007154860a7908857
> > 
> >     splice: fix infinite loop in generic_file_splice_read()
> > 
> > relay uses the same loop but it never got noticed or fixed.  Can you try
> > the following patch:
> > 
> > diff --git a/kernel/relay.c b/kernel/relay.c
> > index 8d13a78..6a4d439 100644
> > --- a/kernel/relay.c
> > +++ b/kernel/relay.c
> > @@ -1318,12 +1318,9 @@ static ssize_t relay_file_splice_read(struct file *in,
> >  		if (ret < 0)
> >  			break;
> >  		else if (!ret) {
> > -			if (spliced)
> > -				break;
> > -			if (flags & SPLICE_F_NONBLOCK) {
> > +			if (flags & SPLICE_F_NONBLOCK)
> >  				ret = -EAGAIN;
> > -				break;
> > -			}
> > +			break;
> >  		}
> >  
> >  		*ppos += ret;
> > 
> 
> Indeed. That fixes the deadlock.
> 
> However, now I don't get anything to the cpu*.out files if I run
> kmemtraced with kmemtrace disabled. If I enable kmemtrace manually and
> then run kmemtraced, I do receive some data. I did apply the
> kmemtrace-user patch as well.
> 
> Hmm?

To me, that sounds like how it should work - if kmemtrace is disabled,
it shouldn't be logging anything, and that's in fact what I saw when
debugging this - it started out disabled and therefore nothing being
logged to relay (printks confirmed that).  When I wrote 1 to the enabled
file, data started getting logged to relay and to the *.out files.

So I don't know why the enabled state behaves the way it does, or if
it's unexpected, but that anyway doesn't seem like a relay problem to
me.

Tom

> 
> 		Pekka
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ