Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754245AbbLKVU5 (ORCPT ); Fri, 11 Dec 2015 16:20:57 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:50647 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752310AbbLKVUz (ORCPT ); Fri, 11 Dec 2015 16:20:55 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Al Viro Cc: Greg KH , Jiri Slaby , "H. Peter Anvin" , Linus Torvalds , Aurelien Jarno , Andy Lutomirski , Florian Weimer , Serge Hallyn , Jann Horn , "security\@kernel.org" , "security\@ubuntu.com \>\> security" , security@debian.org, Willy Tarreau , linux-kernel@vger.kernel.org References: <1CB621EF-1647-463B-A144-D611DB150E15@zytor.com> <20151208223135.GA8352@kroah.com> <87oae0h2bo.fsf@x220.int.ebiederm.org> <56677DE3.5040705@zytor.com> <20151209012311.GA11794@kroah.com> <84B136DF-55E4-476A-9CB2-062B15677EE5@zytor.com> <20151209013859.GA12442@kroah.com> <20151209083225.GA30452@1wt.eu> <87wpskyds7.fsf_-_@x220.int.ebiederm.org> <20151211210400.GL20997@ZenIV.linux.org.uk> Date: Fri, 11 Dec 2015 15:11:56 -0600 In-Reply-To: <20151211210400.GL20997@ZenIV.linux.org.uk> (Al Viro's message of "Fri, 11 Dec 2015 21:04:00 +0000") Message-ID: <87h9jovgf7.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: U2FsdGVkX18TvdNAbGLg35Z0oozpIWsmdF3BZhE9EZY= X-SA-Exim-Connect-IP: 70.59.167.217 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 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.4997] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa03 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa03 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Al Viro X-Spam-Relay-Country: X-Spam-Timing: total 5854 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 5 (0.1%), b_tie_ro: 2.8 (0.0%), parse: 1.23 (0.0%), extract_message_metadata: 25 (0.4%), get_uri_detail_list: 1.59 (0.0%), tests_pri_-1000: 10 (0.2%), tests_pri_-950: 2.1 (0.0%), tests_pri_-900: 1.73 (0.0%), tests_pri_-400: 33 (0.6%), check_bayes: 31 (0.5%), b_tokenize: 12 (0.2%), b_tok_get_all: 7 (0.1%), b_comp_prob: 3.7 (0.1%), b_tok_touch_all: 2.6 (0.0%), b_finish: 0.89 (0.0%), tests_pri_0: 898 (15.3%), check_dkim_signature: 1.04 (0.0%), check_dkim_adsp: 4.3 (0.1%), tests_pri_500: 4872 (83.2%), poll_dns_idle: 4863 (83.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] devpts: Sensible /dev/ptmx & force newinstance 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: 1218 Lines: 32 Al Viro writes: > On Fri, Dec 11, 2015 at 01:40:40PM -0600, Eric W. Biederman wrote: > >> + inode = path.dentry->d_inode; >> + filp->f_path = path; >> + filp->f_inode = inode; >> + filp->f_mapping = inode->i_mapping; >> + path_put(&old); > > Don't. You are creating a fairly subtle constraint on what the code in > fs/open.c and fs/namei.c can do, for no good reason. You can bloody > well maintain the information you need without that. There is a good reason. We can not write a race free version of ptsname without it. If it would help I am happy to add a helper to change the filp path that lives next to d_dentry_open so that this is not insane to maintain. I am not ready to consider yet another attempt by kernel people to solve userspace problems that is a half thought out mess that means we will still have bugs and problems 20 years hence. We need to actually solve the problem and anything less than that is just stupid. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/