Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1385362rdb; Wed, 24 Jan 2024 13:39:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IExA23muXzar+dHl1FtE7+FuHhzc3XY1f9r6RL+ShJcczUl0ywxrSXjdZo4QLTWkLpD5Kwg X-Received: by 2002:a0d:f683:0:b0:5ff:981e:d228 with SMTP id g125-20020a0df683000000b005ff981ed228mr1334121ywf.94.1706132342048; Wed, 24 Jan 2024 13:39:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706132342; cv=pass; d=google.com; s=arc-20160816; b=d95lEWefkzbP+f7QWCun+SgtVvUQdxjjmT7ciQ6vWkoOGtZFAkHXB1Owj9Yy+23MTe e+zLCPuQmNgGnpz3DWqpGtIZ0jwXLFlofQi6ZKYCKW3IH0qstWg+nhr3mVzAWgcFrRv9 SDMg38XuAEIDmBMATqnbSBP0lxV54TQuVtijHIHu/aBtU9soOy6YL2k+Lu6BFFkfL5jn +8SaUEUtUAJnvGOXgHXLBUV1TWm4bxmaGuU/4oPs/X7jjQkfp1Y1HxlUj4Ct8FRA6pbv gqTcSAmKWSs7aIqpyja+zKKJOKodNmoEqRR7FqB1PYqgI6Q0VOISFNN25sVDy7dxchH/ tz6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=olkzssiMAOyrA6VGf05y4yJF+1Fq9DSdVhO2ybhSFCI=; fh=hMFoKiVYyK6bUerpUpWuT6EakSVl+k437e0r++K3Wqk=; b=wRpt5TBR9IMU7gzJ769/yNgcb0aulGPDlM6ts40xpfFAwa0Q82kcwyWq1FX5FYycdC fBDljUDDnnERnxq8cLMyM/UaGipIllazQ1U5AYcJ92R3xAaMcfrC2DqV2WnIK1X0dbBo JznGW+TmnT3hjPefkk6Wais0EsHaY2I7+oiO8HYjBSTxzMwZcZwKvWqPbPolCvzCrZO8 B7qQLR3dxO0ZsesaBrd9eUSEUYIYEUCO/PoiKqgsK/obIFSruK+EpfAfa1ACwjIS6Tx9 heYiUdsqSoPaLLNMWUw3ZhG/WUhyYsLrCCuAF1gknp2tHY1X7gqqg7buCIbfwH7sL9Fc 49iQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b="Cvu/QdE/"; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-37706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37706-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g1-20020ac87d01000000b0042a2b1651d4si11197035qtb.171.2024.01.24.13.39.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 13:39:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b="Cvu/QdE/"; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-37706-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37706-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B8E9F1C239C1 for ; Wed, 24 Jan 2024 21:39:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41C0F135A5B; Wed, 24 Jan 2024 21:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="Cvu/QdE/" Received: from xry111.site (xry111.site [89.208.246.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8CF21353F5; Wed, 24 Jan 2024 21:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132302; cv=none; b=t6FdT3gEad3j+mFyNOqnEl1xe8Y8ZvLsxasSxUU8e3uqLh7tGH7r+fUbHcy4yy4wCVudScIR868JrvqWX8fdH6Ka3LA4hatdyVjIsF9vQyXK1hcrcwhgms4wESVuYg+60EqJQ0CuFo7AGW4g6NVGvVSbLjZGoSx13Zje9vatC08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706132302; c=relaxed/simple; bh=6mY4cj8CJ8vFPelnuieKviTWwDNiq9cImboGHDPjJGw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=trGMtY82uilfPTb9li6tEd8YieaLvqxZg60pVz5vKVJnDMWU/YvuE7xHnm6ATSGT8sigDq0Mp5FYMbFBDG2FrrE3qNf3n12zrTAgRxVmwE8Rvs2Au8BzMZnBaYA2hjZk6oM5Tu7rWJqmrNarkzQ1e3tuS+VBs0a2rR/1QcfD3VE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=Cvu/QdE/; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1706132299; bh=6mY4cj8CJ8vFPelnuieKviTWwDNiq9cImboGHDPjJGw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Cvu/QdE/iY9Wn/zxodNq1CDkCTJGGqfdWZhJ2wYw1v9hR4ZQ9oNJQjMfGdTJKVivL jcR/yN454i8ljQpK97RdlB1tankDiqCgW12C186nJ2K+98F/AUkdJ1pFK2OnJkHmXT qYl2tbVW6BFaQdLYH7ltIEkJn8B5bykC/pPLPkFc= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id ADD6B66A7E; Wed, 24 Jan 2024 16:38:17 -0500 (EST) Message-ID: <0625c3286a515ccb2ff5f7f58fd2019f81dd512e.camel@xry111.site> Subject: Re: Strange EFAULT on mips64el returned by syscall when another thread is forking From: Xi Ruoyao To: Andreas Schwab , Ben Hutchings Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Jiaxun Yang , Thomas Bogendoerfer , libc-alpha@sourceware.org, Linus Torvalds Date: Thu, 25 Jan 2024 05:38:16 +0800 In-Reply-To: References: <75e9fd7b08562ad9b456a5bdaacb7cc220311cc9.camel@xry111.site> <9481b6d9d015aea25d8f2563bf7bd6f6462f758f.camel@xry111.site> <0be1203c9df55432548c92281c8392dfa2f7d6bf.camel@xry111.site> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-01-25 at 05:32 +0800, Xi Ruoyao wrote: /* snip */ > and the "interesting" aspects: >=20 > 1. If I change the third parameter of "read" to any value >=3D 8, it no > longer fails.=C2=A0 But it fails with any integer in [1, 8). > 2. It fails no matter if I initialize buf. > 3. It does not fail on arm64 (the only other port using > lock_mm_and_find_vma I have access to). Correction: I'd not realized many ports use lock_mm_and_find_vma even before this series of changes. I also have access to x86_64 and loongarch64, and the failure seems specific to MIPS. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University