Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1642300rdb; Thu, 25 Jan 2024 01:36:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzLpnxeKMJrKRBF7chnWJDGUFaazXpUNaKgur17nNjVqmSHZv292IYPZrnM0Rt0+uEXvHt X-Received: by 2002:a17:902:7444:b0:1d7:2509:4d79 with SMTP id e4-20020a170902744400b001d725094d79mr612384plt.79.1706175418575; Thu, 25 Jan 2024 01:36:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706175418; cv=pass; d=google.com; s=arc-20160816; b=xy5MigM9irR4IVExfDB+Q+E0AHFLM2b62OBGcO0NRPld6bpakY8Fh6dQA1hRIluITM dxwzq0XjagT9r2gt2oQ2mwceXfo/IkJw4T0R9dAo9+pvJp8MiknHiUytBby/qXuPEFC2 4uvtHd+Cu4DTDp0qVpOvyoOD7H56aMaWZfCFQDSVnDc1Cfq+6kVoVGIr1XAHxXOPfM1q ikVEdWT1MYBHRgvn66LcaTjblMfmfKxgNA/sG5LN9SRJ4HPatCK2Aw9kNSXL1LfkFGCS XJzixmNKgBNrzixNMgYzC8uuOuYLiaZJDv6yIYM1qMPIGWQmkXLc6lsU+Dx0u5ZP6Tz1 e1RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=i0i8PWJmZEIkk+qKWWCdcOgFw5jqjthhyPV0wFojKbQ=; fh=zJdEr9hWPUkD/26TH4P/v9eeE+mGUdWylVmn6cFXCto=; b=mNSZTBOTepq8yMEeVmdtp41kPRduMxJHrZWjTYw+ovbVLRdLCRjv6w8Qu4FmE6P7F1 D9kEq3CKEEoSj0B7JmScqcQYfFk8+5k0/bsb9nl8hAe2bavkM2WRfWfqudmp5qfbVLI7 8zjdzAWLsJwKYKeYDE8Z7PZVqnnY1Ev8jawSl7SCescpJKKAtz9zKBKTW5L+o4WtPL3R eL0nMioAF5PZ8qN8FWzBw3Qvp+FYYAAlAth/BoVQAOl0x20477W/vakcUYbXKYewoLwn uoQ290BbXhegkcpU9W0VEde2DL2sqYA4AZbOvojQBa4HKj6GyuWWarT/KVtcNlPlAfs/ 6HYg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=H6pVcBwO; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="TYyNxe/g"; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-38266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u7-20020a170902b28700b001d78f90818dsi1633912plr.130.2024.01.25.01.36.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 01:36:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=H6pVcBwO; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="TYyNxe/g"; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-38266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 070052863FB for ; Thu, 25 Jan 2024 09:31:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 840B4200C1; Thu, 25 Jan 2024 09:29:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="H6pVcBwO"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="TYyNxe/g" Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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 85BE71D559; Thu, 25 Jan 2024 09:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706174949; cv=none; b=TNaBxKyKHY4oTkR4wuSF9JLc3I3gF8sx2pKigPheSco5S91kdXAzqzYiw2euuTE/BVu2cZgyqTSE0f2aRX2eQ52PBHuTnjpCSC3Bsy98xzv5ueTfF/Qhd0F6yKfLA7aUDddAgkhdUyKW0Jy5kXDkCx24ZIY/uBvmngthcgy9VbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706174949; c=relaxed/simple; bh=K/9JKflS9axsLrR15vQW/TMGMDqOa6Hya/B30Dusweg=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=ae5zcey6CG0xYH7+Kt3IZlb3cSqyJ1IefF+98+0sLn/rzVsnhepzQvsqfku+JoBdihrZsbTm0WTT5N2gNH9SpF4cwYQcdHX7FvNaRZdL9MbKHDRQqwIEiiXfEEl/T1HBrlyxLOwP2w/X88y6K8Jv2+SuPNjwgXo52GSJfii1B5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=H6pVcBwO; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=TYyNxe/g; arc=none smtp.client-ip=64.147.123.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9DB603200BB7; Thu, 25 Jan 2024 04:29:04 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute3.internal (MEProxy); Thu, 25 Jan 2024 04:29:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706174944; x=1706261344; bh=i0i8PWJmZEIkk+qKWWCdcOgFw5jqjthhyPV0wFojKbQ=; b= H6pVcBwO4ZLaGUzpBTECLQ40+Mm+pEnyKTDjgZdFJ8Y1TsT1ON1s2ELdQrlEH6BU cgUO71RyLbCfAj5g86T3buVZnH0ROTXRAIicxrC3LqI6yaaWOOmNtaSd/kr1gwHL OodId6jl3iSqNdPnTHT+Ax6vbN6ESIypN/+WEUQHvyo9C+Z9WHw6rUp88bJyiGXY aoUdZP83FOfUvWsiAXLJtSKxljh6Pg0/5jEr1ub9yiw4R5uAmCIEu1WADbBCO0CJ 07q7VK5e9bPb9jgcT//yAEYR901RBjEgPYKFSYpJ4j+lkGkghysG/y89kodK9Wk7 rZ/kWLSH9OCP3D8gLZeDCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706174944; x= 1706261344; bh=i0i8PWJmZEIkk+qKWWCdcOgFw5jqjthhyPV0wFojKbQ=; b=T YyNxe/gap3a1Ds7o35cEU4eoD2hL/lLjyRrQ8FcKoji7qh+TjeUeWJ5lGVgFLE1x ZJCGjkVygP49mRc81E2QmexP2bxGbXrOctbw+Vy/bKGq8wTydaIJC1MmaFlBJXuk DFcFYSqWMHu2yvIQri/nA32t0eTD79ru2Qzo8NZ/fKXPKXy7/BKSjiRC8bGOnmOU DUI5rndTjp48GgQIPOHa3/3AyfaMX0i39eBEFkB3FrTC9fHwkljpBZ7Z8EBtmCEn Lba2+kPJRAB8anHmy2Fv6AhaLPEOD7mA4B7UluGFJx4XvteVFIF6aProT+t7pzZX Yz1F1vP7//Qhqq1kYfLaA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelfedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdfl ihgrgihunhcujggrnhhgfdcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtoh hmqeenucggtffrrghtthgvrhhnpedufeegfeetudeghefftdehfefgveffleefgfehhfej ueegveethfduuddvieehgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 46B4136A0076; Thu, 25 Jan 2024 04:29:03 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-119-ga8b98d1bd8-fm-20240108.001-ga8b98d1b Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <00d1b813-c55f-4365-8d81-d70258e10b16@app.fastmail.com> In-Reply-To: References: <75e9fd7b08562ad9b456a5bdaacb7cc220311cc9.camel@xry111.site> <9481b6d9d015aea25d8f2563bf7bd6f6462f758f.camel@xry111.site> <0be1203c9df55432548c92281c8392dfa2f7d6bf.camel@xry111.site> Date: Thu, 25 Jan 2024 09:28:41 +0000 From: "Jiaxun Yang" To: "Linus Torvalds" , "Xi Ruoyao" , tsbogend@alpha.franken.de Cc: "Andreas Schwab" , "Ben Hutchings" , "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, libc-alpha@sourceware.org Subject: Re: Strange EFAULT on mips64el returned by syscall when another thread is forking Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable =E5=9C=A82024=E5=B9=B41=E6=9C=8824=E6=97=A5=E4=B8=80=E6=9C=88 =E4=B8=8B=E5= =8D=8810:10=EF=BC=8CLinus Torvalds=E5=86=99=E9=81=93=EF=BC=9A [...] > > Anyway, I'm pretty sure this is the bug, now some MIPS person just > needs to fix the MIPS version of "instruction_pointer()" to do what > "exception_epc()" already does. Hi folks, Kinda MIPS person here, I looked into the problem, and it's not that easy to fix. I inspected some existing usage of "instruction_pointer()", and some of them do want exception return address (which is always CP0_EPC). Others like this case they want the precise exception instruction pointer ("exception_epc()" for MIPS). I'm planning to make "instruction_pointer()" always point to exception instructions, and implemented a new function called "return_pc()"or whatever for "exception_epc()". Do you have a better name in mind? Besides isa16 stuff do require kernel to read user space fault instruction to determine delay slot size... I don't think it's always possible when "instruction_pointer()" is called. MIPS16/microMIPS is rarely used today though. Thanks > > Linus --=20 - Jiaxun