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: <510846AB.8010900@suse.cz>
Date:	Tue, 29 Jan 2013 23:01:15 +0100
From:	Jiri Slaby <jslaby@...e.cz>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Lingzhu Xiang <lxiang@...hat.com>,
	Roman Rakus <rrakus@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] tty: set_termios/set_termiox should not return -EINTR

On 01/29/2013 08:49 PM, Oleg Nesterov wrote:
> On 01/29, Jiri Slaby wrote:
>>
>> On 01/29/2013 08:07 PM, Oleg Nesterov wrote:
>>>
>>> Change set_termios/set_termiox to return -ERESTARTSYS to fix this
>>> particular problem.
>>
>> This looks reasonable. However given the link above says:
>>  You are not authorized to access bug #904907.
>> the description above is poor. What problem exactly does this fix?
> 
> A syscall must never return EINTR unless it can not be restarted
> (or it should not be restarted by, say, historical reasons).
> 
> In this case ioctl(TCSETAW) returns -EINTR even if it is interrupted
> by the signal which has the SA_RESTART handler. This doesn't look right
> no matter what.

Yes, and more, it is against POSIX. I don't dispute the correctness of
the patch at all.

>> Why this should go to stable at all?
> 
> OK, this is up to you.
> 
> But if this patch is correct, perhaps it should be backported. This
> -EINTR breaks /bin/bash which doesn't expect it, this leads to
> "*** glibc detected *** ./bash-4.1.2-14.el6/bin/bash: double free or corruption (out):"
> 
> Perhaps /bin/bash is buggy too, I do not know. Probably Roman and
> Lingzhu can tell more.

But I really want to hear more details here (the commit log deserves
that). E.g. why it started causing problems right now. The code is there
like forever.

-- 
js
suse labs
--
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