Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933962AbcDSTLg (ORCPT ); Tue, 19 Apr 2016 15:11:36 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:54919 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbcDSTLf (ORCPT ); Tue, 19 Apr 2016 15:11:35 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: "H. Peter Anvin" Cc: Andy Lutomirski , Linus Torvalds , security@debian.org, "security\@kernel.org" , Al Viro , "security\@ubuntu.com \>\> security" , Peter Hurley , Serge Hallyn , Willy Tarreau , Aurelien Jarno , One Thousand Gnomes , Jann Horn , Greg KH , Linux Kernel Mailing List , Jiri Slaby , Florian Weimer References: <878u0s3orx.fsf_-_@x220.int.ebiederm.org> <87twjcorwg.fsf@x220.int.ebiederm.org> <20160409140909.42315e6d@lxorguk.ukuu.org.uk> <83FE8CD2-C0A2-4ADB-AEBD-8DD89AD4F88A@zytor.com> <87bn5ij0x1.fsf@x220.int.ebiederm.org> <78205895-E11D-417F-91DC-4BCA0B61A122@zytor.com> <570D4781.3070600@zytor.com> <877ffyzy1j.fsf_-_@x220.int.ebiederm.org> <87y48evbzn.fsf@x220.int.ebiederm.org> <0A2DB3DF-3D96-4B9B-85AC-E7C4DBDF0E9B@zytor.com> Date: Tue, 19 Apr 2016 14:00:48 -0500 In-Reply-To: <0A2DB3DF-3D96-4B9B-85AC-E7C4DBDF0E9B@zytor.com> (H. Peter Anvin's message of "Fri, 15 Apr 2016 14:29:15 -0700") Message-ID: <87vb3djue7.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX18Hs54Epb4RVzmt3okkXr2w58G4+PWdb9U= X-SA-Exim-Connect-IP: 97.119.105.151 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;"H. Peter Anvin" X-Spam-Relay-Country: X-Spam-Timing: total 1584 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.8 (0.2%), b_tie_ro: 2.00 (0.1%), parse: 0.63 (0.0%), extract_message_metadata: 10 (0.6%), get_uri_detail_list: 0.71 (0.0%), tests_pri_-1000: 6 (0.4%), tests_pri_-950: 1.19 (0.1%), tests_pri_-900: 0.97 (0.1%), tests_pri_-400: 25 (1.5%), check_bayes: 23 (1.5%), b_tokenize: 6 (0.4%), b_tok_get_all: 9 (0.6%), b_comp_prob: 1.78 (0.1%), b_tok_touch_all: 2.9 (0.2%), b_finish: 0.72 (0.0%), tests_pri_0: 619 (39.1%), check_dkim_signature: 0.79 (0.0%), check_dkim_adsp: 3.5 (0.2%), tests_pri_500: 916 (57.8%), poll_dns_idle: 906 (57.2%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 01/16] devpts: Attempting to get it right X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 27 "H. Peter Anvin" writes: > It's really too bad we can't just use follow_link :-/ Well follow_link is actually impossible to use as it doesn't exist anymore. The routine now is get_link. ;-) That said just to be certain of where everything stands I took a look to verify that we can't. I got about half way there. I tweaked init_special_inode, and d_flags_for_inode to set inode->i_link to "pts/ptmx", and to set DCACHE_SYMLINK_TYPE (aka made it so d_is_symlink returned true) on all instances of /dev/ptmx except /dev/pts/ptmx. Things sort of worked and things also acted very very weird. It is tempting because we would not need special vfs helpers, and would not require much code, but since it did not work cleanly I give that case a pass. I think old udev on distro's like centos5 and centos6 are actually a limit, as udev does something like calling stat on the device node after creation to ensure everything was created properly. Eric