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]
Message-ID: <20090727145805.690afe5d@lxorguk.ukuu.org.uk>
Date:	Mon, 27 Jul 2009 14:58:05 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>, Ray Lee <ray-lk@...rabbit.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kdesu broken

> > +	/* Indicate that the other end is now closed, set the
> > +	   ENDPENDING marker so that the true end can be processed by
> 
> This seems typo s/ENDPENDING/EOFPENDING/

I renamed it but missed that.

> > @@ -47,13 +50,22 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
> 
> [...]
> 
> > +	set_bit(TTY_EOFPENDING, &pair->flags);
> > +	set_bit(TTY_OTHER_CLOSED, &pair->flags);
> > +	spin_unlock_irqrestore(&pair->buf.lock, flags);
> 
> 	tty_flip_buffer_push() or something?
> 
> > +	wake_up_interruptible(&pair->read_wait);
> > +	wake_up_interruptible(&pair->write_wait);
> 
> It seems, this sets TTY_EOFPENDING, but if flush_to_ldisc() was done
> already here, anybody doesn't set TTY_EOF for master.

Does putting a tty_flip_buffer_push() at that point fix it. I had thought
I could remove it but you are right that creates a situation where EOF
may never get set.
--
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