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]
Date:	Tue, 7 Jul 2009 18:35:16 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Neil Horman <nhorman@...driver.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	earl_chew@...lent.com, alan@...rguk.ukuu.org.uk,
	andi@...stfloor.org
Subject: Re: [PATCH 3/3] exec: Allow do_coredump to wait for user space
	pipe readers to complete (v8)

On 07/07, Neil Horman wrote:
>
> > +static void wait_for_dump_helpers(struct file *file)
> > +{
> > +	struct pipe_inode_info *pipe;
> > +
> > +	pipe = file->f_path.dentry->d_inode->i_pipe;
> > +
> > +	pipe_lock(pipe);
> > +	pipe->readers++;
> > +	pipe->writers--;
> > +
> > +	while ((pipe->readers > 1) && (!signal_pending(current))) {
> > +		wake_up_interruptible_sync(&pipe->wait);
> > +		kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
> > +		pipe_wait(pipe);
> > +	}
> > +
> > +	pipe->readers--;
> > +	pipe->writers++;
> > +	pipe_unlock(pipe);
> > +
> > +}
> > +
> > +
> >  void do_coredump(long signr, int exit_code, struct pt_regs *regs)
> >  {
> >  	struct core_state core_state;
> > @@ -1862,6 +1886,8 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs)
> >  		current->signal->group_exit_code |= 0x80;
> >
> >  close_fail:
> > +	if (ispipe && core_pipe_limit)
> > +		wait_for_dump_helpers(file);

Looks good to me.


As for "&& core_pipe_limit" here, I agree this is subjective and I see
your point.

Oleg.

--
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