Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1423967rdb; Sat, 3 Feb 2024 05:57:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHctkF15HgBF6HlcflFS6xQUO1tdix3OEaV28wRzEHWIh4hgmbGF4/f9dAYUxzK5xMXok8T X-Received: by 2002:a17:906:538f:b0:a37:1978:6cb8 with SMTP id g15-20020a170906538f00b00a3719786cb8mr2428715ejo.4.1706968628058; Sat, 03 Feb 2024 05:57:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706968628; cv=pass; d=google.com; s=arc-20160816; b=TieY/ajiPheyh4Mi1HXh8jFdcvOm0u6ieWZ7bJV0Aj5cZkGcyQCHivKlwwEUhapDZ6 IiVUFee7Vjbcesfm4c2CR9oepJDbpCrFgM9nPYr8QxEKRam5abuKCoEYag9bSv8NDVJd r6FuddOHfgdk+Wkq8nhkZ3Yb6J3qxzV6lHeZVcByBYWIdNPwVmyMCA1yx0zjClVsqcYm VLXOspOzz1DoygR/gRDQ/VbVsW5HNB5VjziH5JU3oNqcuVWOmcqSHnBYrnA1nhDrypHx 4s85uoc14ac7YJv7N8eVnHFNvrHsNEItge8tJCHQjhc246JZF0ZtEhHltLlsXxw5cj/2 Juzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :feedback-id:dkim-signature:dkim-signature; bh=mLqlcryUIStpRqzennhZ+4KphRKLiiH95cS6m9g+jYk=; fh=DwqEqKZ/ENasxjJ13W8Zi8oblGTBhTuce1WwbWgwPiQ=; b=REF/4yx9+mhyuqlIdUMHyK7l8kY7SC1ZTC/Jjxw+PMMC8a64Wz/LT2GBNHsVX70oUJ q9Mt1xXASLsKSFzkHZRrcxq+M34SXyn5u6XZcOZGJOxd+pICMZPnGmzK3udKz07deLgN emgZoxXi9LZp+oDVEYDXXJvUrhyo7w2wzybOLGembrxYXKIAbFUJ+QM5p9bbWkad9o6t 8pINVKk8gTrJ0LVvyo5AGwV/2pY9hEJcHdiNcDPREALoOtn6ZHuPE2ph8wirGpL2j2Qv qzK59aAjPEsp5R7WfDZ21M5Lwpd3yFm4JZed+BoDxbxaO0FqmrvrbBMwYZ5i1PB9xXOe 1iQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=mEF+Ph5F; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=xc5Oj+Vl; 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-51111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCXBw3i7NGxrS5tDvdHh1hWc8tZXzsUZthBK4iMWnZ3OSOvpJHyq4mvyk/wnUSR3+nYyfIS0iZXhtJjVuCtc2/doMfMs3Ym8DjHqV4ZYqw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s24-20020a170906061800b00a36fa4933b4si1810036ejb.207.2024.02.03.05.57.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 05:57:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=mEF+Ph5F; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=xc5Oj+Vl; 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-51111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51111-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 98D071F24236 for ; Sat, 3 Feb 2024 13:57:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B90335DF16; Sat, 3 Feb 2024 13:56:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="mEF+Ph5F"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="xc5Oj+Vl" 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 9F1D258206; Sat, 3 Feb 2024 13:56:51 +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=1706968614; cv=none; b=btM+JCWcEUpgPS8gxGMto3Ez7ay3XcNWinSJTMdsdDWV+TDn9Wnj9pX3ZCeECSYnMmoCY/yLOgcfyjKiDfiURTYJYaQmhdk6Bki3KSXdFcqtYRgeGCFnKruFh5rCS4mRoBSqxk5U3co10JrfA41/Z/nA/PuEPlOahVehQXhgdlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706968614; c=relaxed/simple; bh=IxdoSDanbspVEE40NG9hB8hZCtFlgS2f70QPmZu1vVQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WpLwAtVL+2DvDPu3y4f8gq/+R2w4wssf5grSBEf0X5TJXXVdVmKhGYabxLsX6Cep+YMuuA1lWFewbp01QG7+kcUdSPzKi4Ftn+RSNoQUCS5fVDpg5ErtRPZMRZUfxtBv8fvZuy6HE4QNtBtk6M6YYXul7714UiKpDn2/9qVVGoY= 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=mEF+Ph5F; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=xc5Oj+Vl; 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 compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id F1A623200AF6; Sat, 3 Feb 2024 08:56:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 03 Feb 2024 08:56:48 -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=1706968607; x=1707055007; bh=mLqlcryUIStpRqzennhZ+4KphRKLiiH95cS6m9g+jYk=; b= mEF+Ph5FsFu9wQyBBKmdYfXVLlgHd7TRLkaT6Uq0PxHrjDatLPe69UYNFuxFwEi/ E5TSnvzjxFxXdnR026XtQAoLNFpmaPT5G3hDBOz8bmW+5c5Ib4nR1UuLppEZJpxX CcICYmL0K1z4kwjOCjnXj5CLmcK7xy9HG18dWepGrdsyQGmMDsALlLrZd2isDVoT CZwpTd6nxRCMFHauSddlXlaeswAYGZbPNAu8EoaIWOkMKjneQFNouE6YciwkuWEC VSrpyW0cNw/1nS5AUON9lA1a5cRYN19iFl6e7nV7wpDjsIYBpA1d9B0u2Dc8Dboo ZFb9CT8M1+Dhsl9Z8BdrxQ== 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=1706968607; x= 1707055007; bh=mLqlcryUIStpRqzennhZ+4KphRKLiiH95cS6m9g+jYk=; b=x c5Oj+Vl8pxAwFFABzQaNQgsSNOB+7SBSjkyH2fTqfq5j5wOaw1Zms7txzh3pOPi7 QOwb257+PuFpnek6GSucCek4IHnJFaBrcVonBBI4ho+p/tm+WheHVBh8+vXhqnGt YnOo3MKeG4/jYhgG26KIYtvuiv2NfvBSwdeH+mijoYPZZkNC+/E3KYFzjLvLUYkA 8qkae73PTjUcfBHhufZlm6rCqRu0FB/WCrHRpyj5DD8QlBLnC6AOETXZJDvQQ6rO 4v9Gh9Ltr0gHzfQMji4asuaYG2ZdlxErvkW3X9VuQ0GOV5riACgC3bDJm0MGJqmZ 595zeom841wVv3NkJej2Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeduiedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeflihgr gihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqne cuggftrfgrthhtvghrnhepleeuffehheegleeuvdelgffhueekjeetueevuefhffdtgfeu hfeggfeukefffedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 3 Feb 2024 08:56:45 -0500 (EST) Message-ID: Date: Sat, 3 Feb 2024 13:56:43 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/3] Handle delay slot for extable lookup To: Linus Torvalds Cc: Oleg Nesterov , Thomas Bogendoerfer , Andrew Morton , Ben Hutchings , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, Xi Ruoyao References: <20240202-exception_ip-v2-0-e6894d5ce705@flygoat.com> Content-Language: en-US From: Jiaxun Yang Autocrypt: addr=jiaxun.yang@flygoat.com; keydata= xsFNBFnp/kwBEADEHKlSYJNLpFE1HPHfvsxjggAIK3ZtHTj5iLuRkEHDPiyyiLtmIgimmD3+ XN/uu2k1FFbrYiYgMjpGCXeRtdCLqkd+g9V4kYMlgi4MPHLt3XEuHcoKD1Yd2qYPT/OiQeGM 6bPtGUZlgfOpze1XuqHQ2VMWATL+kLYzk6FUUL715t8J5J9TgZBvSy8zc6gvpp3awsCwjFSv X3fiPMTC2dIiiMh4rKQKGboI1c7svgu6blHpy/Q5pXlEVqfLc7tFTGnvUp95jsK639GD8Ht3 0fSBxHGrTslrT775Aqi+1IsbJKBOmxIuU9eUG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linus Torvalds 写道: > On Fri, 2 Feb 2024 at 04:30, Jiaxun Yang wrote: >> ptrace: Introduce exception_ip arch hook >> MIPS: Clear Cause.BD in instruction_pointer_set >> mm/memory: Use exception ip to search exception tables > Just to clarify: does that second patch fix the problem that > __isa_exception_epc() does a __get_user()? > > Because that mm/memory.c use of "exception_ip()" most definitely > cannot take a page fault. I reconsidered this issue today and I believe that exception_ip() usage here won't trigger page_fault anyway. Given that exception_ip is guarded by !user_mode(regs), EPC must points to a kernel text address. There is no way accessing kernel text will generate such exception.. Thanks > > So if MIPS cannot do that whole exception IP thing without potentially > touching user space, I do worry that we might just have to add a > > #ifndef __MIPS__ > > around this all. > > Possibly somehow limited to just the microMIPS/MIPS16e case in Kconfig instead? > > Linus -- --- Jiaxun Yang