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] [day] [month] [year] [list]
Date:   Fri, 27 Oct 2017 09:57:26 +0000
From:   taoyuhong <taoyuhong@...wei.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "jslaby@...e.com" <jslaby@...e.com>,
        Zhaoshenglong <zhaoshenglong@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 答复: 答复: [PATCH] tty: fix flush_to_ldisc() oops before tty_open is done

Hi Gerg
> Because of this text, I am not allowed to respond to your emails, sorry :(

That is my fault! Please let me re-send these message.

> This feels "odd", are we sure that open really should be clearning this flag?
Because the pty devices also use tty_init_dev(), to create tty_struct , and inside where I set the TTY_HUPPED flag.
If don't clean it at the end of ptmx_ope(), new tty_struct created for a ssh connection will have this bit set 

> What is this barrier() call protecting?  Please always comment it so 
> that we know what is going on in 5 years when we next look at this 
> code
It does not really hung the tty up, just set TTY_HUPPED flag. After the tty structure is generated, a kworker with flush_to_ldisc() would be scheduled to another cpu, not the one who is opening that /dev/tty*. I think a barrier() can ensure the kworker see tty flags change in time.

>What keeps the bit from being set now right after checking it?
After check, next step is to call tty_ldisc_receive_buf(). If anyone obtains all required locks and modifies terminal or line discipline, while receiving is In processing, it should have another problem. Maybe oops again.
I have no idea how to keep the bit being set, but after testing for days, I haven't sawn that happen.

Yuhong Tao

Huawei Technologies Co., Ltd.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ