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:	Sun, 12 Oct 2008 19:03:12 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Adam Tlałka <atlka@...gda.pl>
Cc:	7eggert@....de, linux-kernel@...r.kernel.org, torvalds@...l.org
Subject: Re: [PATCH 0/2] SIGWINCH problem with terminal apps still alive

> I've read the code. The race problem with xterm or other pty using

Clearly not.

> program in 2.6.26 appeared because one app called ioctl(TIOCSWINSZ) on
> the master side while other read winsize (TIOCGWINSZ) using client side
> (slave). So in one ioctl() call tty == master and in other tty ==
> real_tty. Of course we can have the opposite situaction so terminal app

Then we end up with both using real_tty.

> Anyway I think that you miss the point. Why using
> real_tty->termios_mutex instead of tty->termios_mutex in tty_do_resize

To avoid deadlocks if you took both as you updated both structures.

> So it seems that tty->termios_mutex could point to different
> location in different calls but real_tty->termios_mutex always points
> to the same location.

You've finally got there - we always work off real_tty. That is why we
can safely use the mutex on the real_tty side.

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