Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4505521imu; Tue, 15 Jan 2019 00:54:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN5u/yiC0ds4Mvb/U6uRCP4D8FNtzX0VKiNjmxN/ugf1ZGAGGZC3Tv9YsRqRbHApz1eFaXCI X-Received: by 2002:a62:5dd1:: with SMTP id n78mr2864903pfj.58.1547542485330; Tue, 15 Jan 2019 00:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547542485; cv=none; d=google.com; s=arc-20160816; b=KVe/tgHvDZBMg/tlzc/UH+yU4XRB4bzP9+2/WHBgEKSS0SUkQ0r9+/Gm4GH+04KEZB kwcpEAVQWPsobZ2zeKDbmWxi4Zp/sgBIKuGlb4ezo/BrEOwbL66ei9uwQdNcVs3AXgPX 0o3RlgwhJukB3joQz0yLIeEVxZSb6x8kdhxs/W0Z8ATrQeUBCK+Ketp4TyEvZsUrTrLZ X/CsCJfiNEpK6QXD0Dw6MZ91h3anwzgJZAh4V1LFQs+XHQCK9wcybXEl1ZRtv1ORNiPE Ars4vbIWEbb25fEHR3ojuPN1v3dAbqPFzlsHK4JpxvSHqluw0AMvv4g+3V9feQudA2Td rorQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from; bh=3FhcxzXejZ1lugE61YyYoMJ6WzFDPnmtcbPPhpWBQ1o=; b=FVlLuWVfkkXGDHxI46H2E4dCUhPGQxFktmhRabW3k0dUXKDlzN1efhzfS8tXuEMBsH 9xBZcbGGP5txK/tQJmFn5AO4wyGEygJrdq2/rLebfwHS4iEMMm3vxNJ8JrakZnRnmP6M fqObQWNPZ7EImdTLCQ0lZi80pDzB1r9PL7/GRSwq0OMYsgu2uhpyXC55+Z2QiJHewRBa 4/+p9bFpnhP0rN+8xKOeNKwFe2wr+rUHiddIb+HneT1lALi/HaLjXRfVCze3LUdGRzft 2x8HvqMEtY7xn5T87ovcJ8zScVSYGoH7rmYnIWHXzEBOAffHj2+wAw7ql1SjOSv/2jVj 8pFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k35si2684797pgm.225.2019.01.15.00.54.29; Tue, 15 Jan 2019 00:54:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbfAOHZb (ORCPT + 99 others); Tue, 15 Jan 2019 02:25:31 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:51442 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727273AbfAOHZb (ORCPT ); Tue, 15 Jan 2019 02:25:31 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1gjJ6H-00079H-OK; Tue, 15 Jan 2019 00:25:29 -0700 Received: from ip68-227-174-240.om.om.cox.net ([68.227.174.240] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1gjJ6G-0003YL-0R; Tue, 15 Jan 2019 00:25:29 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: "Robert O'Callahan" Cc: LKML , Greg Kroah-Hartman References: Date: Tue, 15 Jan 2019 01:25:03 -0600 In-Reply-To: (Robert O'Callahan's message of "Tue, 15 Jan 2019 18:27:00 +1300") Message-ID: <87won67580.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1gjJ6G-0003YL-0R;;;mid=<87won67580.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=68.227.174.240;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19ql09Zv7Njv6JJZZgjOBcubpUOrniLzZ0= X-SA-Exim-Connect-IP: 68.227.174.240 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa07.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4989] * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;"Robert O'Callahan" X-Spam-Relay-Country: X-Spam-Timing: total 1269 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 3.4 (0.3%), b_tie_ro: 2.4 (0.2%), parse: 0.73 (0.1%), extract_message_metadata: 10 (0.8%), get_uri_detail_list: 1.03 (0.1%), tests_pri_-1000: 4.7 (0.4%), tests_pri_-950: 1.28 (0.1%), tests_pri_-900: 1.02 (0.1%), tests_pri_-90: 17 (1.3%), check_bayes: 15 (1.2%), b_tokenize: 4.8 (0.4%), b_tok_get_all: 4.8 (0.4%), b_comp_prob: 1.53 (0.1%), b_tok_touch_all: 2.3 (0.2%), b_finish: 0.61 (0.0%), tests_pri_0: 282 (22.2%), check_dkim_signature: 0.45 (0.0%), check_dkim_adsp: 2.3 (0.2%), poll_dns_idle: 926 (73.0%), tests_pri_10: 2.3 (0.2%), tests_pri_500: 943 (74.3%), rewrite_mail: 0.00 (0.0%) Subject: Re: Regression in 32-bit-compat TIOCGPTPEER ioctl due to 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9 X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Robert O'Callahan" writes: > This commit refactored the implementation of TIOCGPTPEER, moving "case > TIOCGPTPEER" from pty_unix98_ioctl() to tty_ioctl(). > pty_unix98_ioctl() is called by pty_unix98_compat_ioctl(), so before > the commit, TIOCGPTPEER worked for 32-bit userspace. Unfortunately > tty_compat_ioctl() does not call tty_ioctl() so after the commit, > TIOCGPTPEER from 32-bit userspace fails with ENOTTY. > > Testcase in https://bugzilla.kernel.org/show_bug.cgi?id=202271. > > I found this bug running the rr test suite. Can you confirm this fixes it for you? diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index bfe9ad85b362..1b0847976b28 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -2815,6 +2815,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd, case TCXONC: case TIOCMIWAIT: case TIOCSERCONFIG: + case TIOCGPTPEER: return tty_ioctl(file, cmd, arg); } Thank you, Eric Biederman