Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2429222pxa; Fri, 7 Aug 2020 10:54:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn2uvi+nBOrpKSlFglHPrCL0w2vTgF6AcNW4HgivUPmpeW6cj0tvBj5CO2PkJ//5OJXAy4 X-Received: by 2002:a17:906:990c:: with SMTP id zl12mr10119079ejb.488.1596822863589; Fri, 07 Aug 2020 10:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596822863; cv=none; d=google.com; s=arc-20160816; b=NlWBdWw0ruswq6hosQPRjUtpLt9cEMBBHrre0Yqe/Q3duAk+S3BN/HSXnFsEbRarLy Fs6p8Ru9MLEjn2TgjGf8mzjiSIelfHpK6cb6U+OmgyFhieYwRo+pc99cQuN6wH/9xgfd PFDAb17D8Fq+++FnYbos3ZfUSVLZaGeqYgPORuqsZKDHjwAvJKLZx/f19l/7nkEgkUFn vHL+0IOpGNi5TCJZtT2r4oVVrRNSzRgXhA9ijfcHSdo37jY52GScbolZlV+9uAeP7BN1 HGgHenTuvy1+SKql9HYyYRtSZFhSggsnsJyLGkUbeZT1bBUA24Q84QzzsPG7Zc3nA1gU SveA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=7rFtTYgty6X4oWzyWCtAXM5bdgI3jqDY75d+k2FdyYw=; b=QCU6HAFCSm8SCqSthAcdLbiPJPknHRPNyeuP/w4l3Btfhq0l3+LmacMF57ZJOWadrf fd3vKtJcqb7zEwHffUIu6ICWu+aO+IWMhmt85EkCJ7euitriY7N09PLI+gtmY9DceR8f oo8P5H49i9I9rNVojh75Ef+a8XPjLq4iwV5JVdoB/kIqjDxSW44Bh5EIEQBVHv4oiUhK jpq3TtZWI5bIORJHxD7fkDXdwC++sFHopc4CJ28UItPOOC/GCB1wldiIP0Wqs8PRb+Gu nMAap3Ndfp9MMpuHBFKzuBmSui+KLo9kXd2jwkjg3suQ5r/9YpCTmP/grTTcd4v11b80 Dddw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=ljpr+RBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si5510473edv.136.2020.08.07.10.54.00; Fri, 07 Aug 2020 10:54:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b=ljpr+RBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbgHGRvX (ORCPT + 99 others); Fri, 7 Aug 2020 13:51:23 -0400 Received: from sonic311-24.consmr.mail.gq1.yahoo.com ([98.137.65.205]:46327 "EHLO sonic311-24.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727838AbgHGRvW (ORCPT ); Fri, 7 Aug 2020 13:51:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1596822681; bh=7rFtTYgty6X4oWzyWCtAXM5bdgI3jqDY75d+k2FdyYw=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From:Subject; b=ljpr+RBkuOhMExQ6suaSGIXFI0Z6hwaW+LHh7V9DG4MbnJuudoIBD5Up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DfPChA.lTYvLJBY4rjPjd.H7Vfngbr33nmWM6SAwW4kKZ6Tg_ UaBzDuQJYIM6PVZbQwvASZgMxa35jHi7NYQUyjmGCJXjbO6x7HfIdXx5TH4g9MHgo2sScs.EnDpc sn4QvMZR3FXsbXIb21bhsrOrKQWlTuI38J90SsaflpGO67rk6rkBnoONavpgilZxE4cXTM1jk7Hk twQ3pbs8o_M3vfEYpxRL0aMzhmdMKIVpFmAkuZzZHsoOHWLsie9v2ClQFPecpF3zS8rwjmJe8VfR xZBr0Q2QbM5ViRZhgQl.iiScKddiqejV2wCnh44RpR5NlcWKj1PLR1XQ6GH64k9hyQtyzAPDpCAc 0hh1a1s4woIgvbU53NpWmTLZqr.s0Wy41DWuYnzKt5xqjdJZ1GcvQ6lW8fG3iW_bDhsh..eUg8zD Wc.wkgKFiZgWtIswJMU03zEmHFWh0Uog24DaJs1q4P4kj8R9zaRe0ys1y1sj03AWpsY7qUM56wHA 2YRJNKfUk98sUmrNFRsm1ggDL4B0JL2ph3JPBsDb3Kdipaurwjvxfaw_O1LNks7Atxpt0_FwRj4P zDdAskBh9UP8t2IiQfvSqAFn.durl8bBXxajQskgyJWYXNyYNgnnAWQgDAZf_W9k5j5YNcGpUORs DgWXtm3SFmX9.iB2ND.0TPbMWsmyL8D_Y_nGPcW0B0Ylw9RJlK_Ti6VLDEO.omhq57VNMVKpdW38 S.fbEO0_EeswMUP3ISJVJFF5Q3F4QIK1uIni1s6fHSpJ4Y_8vT4fF2TSkvC9PLJl6Pjid2PDSbR4 7Gy1ulA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Fri, 7 Aug 2020 17:51:21 +0000 Received: by smtp423.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0b03665a650798086ff5d7b69b2720e5; Fri, 07 Aug 2020 17:51:16 +0000 (UTC) Date: Fri, 07 Aug 2020 13:51:12 -0400 From: "Alex Xu (Hello71)" Subject: Re: wine fails to start with seccomp updates for v5.9-rc1 To: Thadeu Lima de Souza Cascardo , Linus Torvalds Cc: Christian Brauner , Aleksa Sarai , Christoph Hellwig , Kees Cook , Linux Kernel Mailing List , Matt Denton , Chris Palmer , Robert Sesek , Sargun Dhillon , Shuah Khan , Tycho Andersen , Will Drewry , Will Deacon , Yonghong Song References: <1596812929.lz7fuo8r2w.none.ref@localhost> <1596812929.lz7fuo8r2w.none@localhost> <20200807173609.GJ4402@mussarela> In-Reply-To: <20200807173609.GJ4402@mussarela> MIME-Version: 1.0 Message-Id: <1596822616.zldk40bolg.none@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16436 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Content-Length: 2032 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Thadeu Lima de Souza Cascardo's message of August 7, 2020 1:3= 6 pm: > On Fri, Aug 07, 2020 at 08:48:46AM -0700, Linus Torvalds wrote: >> On Fri, Aug 7, 2020 at 8:19 AM Alex Xu (Hello71) wr= ote: >> > >> > On Linus' master, wine fails to start with the following error: >> > >> > wine client error:0: write: Bad file descriptor >> > >> > This issue is not present on 5.8. It appears to be caused by failure t= o >> > write to a pipe FD received via SCM_RIGHTS. Therefore, I tried reverti= ng >> > 9ecc6ea491f0, which resolved the issue. >>=20 >> Would you mind trying to bisect exactly where it happens? >>=20 >=20 > This report [1] seemed related and pointed out at c0029de50982 ("net/scm: > Regularize compat handling of scm_detach_fds()"). The use of CMSG_USER_DA= TA > instead of CMSG_COMPAT_DATA seems fishy. >=20 > Alex, can you try applying the patch below? >=20 > Cascardo. >=20 > [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-August/216156.ht= ml >=20 >> I don't think any of the commits in that pull are supposed to change >> semantics, and while reverting the whole merge shows that yes, that's >> what brought in the problems, it would be good to pinpoint just which >> change breaks so that we can fix just that thing. >>=20 >> Kees, ideas? >>=20 >> Linus >=20 > --- > diff --git a/net/compat.c b/net/compat.c > index 703acb51c698..95ce707a30a3 100644 > --- a/net/compat.c > +++ b/net/compat.c > @@ -294,7 +294,7 @@ void scm_detach_fds_compat(struct msghdr *msg, struct= scm_cookie *scm) > (struct compat_cmsghdr __user *)msg->msg_control; > unsigned int o_flags =3D (msg->msg_flags & MSG_CMSG_CLOEXEC) ? O_CLOEXE= C : 0; > int fdmax =3D min_t(int, scm_max_fds_compat(msg), scm->fp->count); > - int __user *cmsg_data =3D CMSG_USER_DATA(cm); > + int __user *cmsg_data =3D CMSG_COMPAT_DATA(cm); > int err =3D 0, i; > =20 > for (i =3D 0; i < fdmax; i++) { >=20 Yes, this seems to work. Tested-by: Alex Xu (Hello71) Thanks!