Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp258318rdb; Thu, 1 Feb 2024 07:47:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDN2ShCtjI+N4PTcvlxL1Wu/h7L2F/9bfryO/hxJ8V/GuLdmSzyu/6K3kuOB5Sr0bYR4AX X-Received: by 2002:a17:906:7c48:b0:a35:6667:b3f1 with SMTP id g8-20020a1709067c4800b00a356667b3f1mr3902824ejp.66.1706802432691; Thu, 01 Feb 2024 07:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706802432; cv=pass; d=google.com; s=arc-20160816; b=TKUHi3P0gUJlO5O0dLtv1Qz7gI8qOZrXOsTb6XUjm0aBzgPOIb/CUcVsIrm2kc8lWB XmhAObFtMwSts5rPaIoxFMM6RbFu9HL2N+jebE9hTXnUet/r794CCPhpCD6I2+m3bzeC fLYAl+gUKkhEiVz5qy03S4zS5xNM4ueyasyeUsRcwJNV0EDwSdRX+S0m0NgVO+dgMgO5 RiMAcd4In3COfFC79fpOjEki+2o6Mg0FRlXfAwsdVFnq13rPMneC/IJXFWTQA4zYzDZA diShBSWiCwxrR+dIBdhMhScTa+xM4rO/MSr7sAEtGDPe4IRmMtKMpBy4fFMYeZGTjVT+ vcNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=i1v7gjbWYtUmewWLy9Kvlb4tyH5uqfyNj8gU9rtRY70=; fh=dw88+JPmXhYgu61Dz0mDvHoLHcSY+bBkpDRLxD/kRPM=; b=UlkiY9uZ6tVGGgTIfBuV8vRL9S/pQG5FwRUInXyZ9sgtEqk3N1g77otHYlFE1dclZ6 ZHJmPqIRgjUbeMbP6fEXdvHwJlsEF6aqg6xPUxU1SwbSkSXFD41aP9TZoQPuelF3aALa JSX7c+oWBBYJ4c2BENCjd6/MDP6wjMDhEXN7pA/H/3bS5yLiJHjUNpOSv2NynioryGP9 z4UqKLNGaVbi5Mn4n025G7txpoSQxHvHJSETtk2K+6c0+W9moB7qzErM91dYUNIE+LTP y8sFKlSxJbYaJPI6pkvBu8pK1ClBgIa9ptfYoJAM2s1VxMdd/kxA96nOhsMvpR29dn0u 8qnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=OcTC9QfL; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=uNT7zrOD; 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-48434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48434-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; AJvYcCUnbVgzUFAHdBnk+ZTUu83fyGAElCf+Z50fwwn78EJf31fkgV/EFt3Ese0kl49hVi952Fgq/dxhM8lcPa1sK64doGseKSYV9a+8PBGVrA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d23-20020a170906c21700b00a35e65e08cdsi3571882ejz.586.2024.02.01.07.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48434-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=OcTC9QfL; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=uNT7zrOD; 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-48434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48434-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 65D6B1F242A8 for ; Thu, 1 Feb 2024 15:47:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 702AF77A01; Thu, 1 Feb 2024 15:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="OcTC9QfL"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uNT7zrOD" Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.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 C3DE3626AD; Thu, 1 Feb 2024 15:46:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706802397; cv=none; b=qkaaKeF4AWai1LLUrejF2qnQezjg11WqhQqxmqWLwhUnFOD7NnIIQAcfGKhnKx9Fv+BWb+6KvNGgDlRAkhCV8KEU7SOo7fDTyiBPbQ7EvwnBZWF18UVUOK2OgBmgnaSa0jM6dLq80wsAsAtoCWK5ItJZ51HvKzYF7HgGrxSdb2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706802397; c=relaxed/simple; bh=NiHFyPPrD5sK3tKmsstYY6GfrHgdKmJEsdk12grutnA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H3HHm1D9Gi4OiG64Nw9YtHpa2/Nz3c5IyJk12L5D5R4qvdQBKZxehQc9rliphiH9yi3vP2nZ6xwfmj12oisQJXnvMRUAhUNDDe4onrz/uucydraRO5Dzh4Hn3NYr3OmcW0A2svjLO0AhxzQkhEGJf3qk+Crb1MyEqA0e3hyywcc= 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=OcTC9QfL; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=uNT7zrOD; arc=none smtp.client-ip=66.111.4.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 compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.nyi.internal (Postfix) with ESMTP id C35AC5C0080; Thu, 1 Feb 2024 10:46:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 01 Feb 2024 10:46:34 -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=1706802394; x=1706888794; bh=i1v7gjbWYtUmewWLy9Kvlb4tyH5uqfyNj8gU9rtRY70=; b= OcTC9QfL162gZptSWEDjPWdZnEazNy9ME14ocM4u4Hqg32ZxHXv86zGSpg1ANxrp y85+SHbIXplcptG1iu9QbpHDlIeWxrmmNxDtRWQRjB+GrMNAXbg0gjdoyiRkzveT RbPTIm1lL940KAuRgcszRYHYUjqyGaeWna6/r4ikauCbuoxp9SZueRiDIsUfUTbQ lLFeaRdYgU+Iful3+CVSJnsV+NbWTarlf/iXjvb66r48+k+fLozytYBianvvo6wf WS/vAa3CAsR+79V2NZvjF/LS1Gzt7DlyZZxQzBe+e+yuZKWGY1CKyNnRRwLbi3u5 QQB9Iw/7y92B4ZcU+gLr1A== 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=1706802394; x= 1706888794; bh=i1v7gjbWYtUmewWLy9Kvlb4tyH5uqfyNj8gU9rtRY70=; b=u NT7zrODxo1yyqBsfvZZE8jEgzkBEg4zm7mB0qJkNoo+cH7BOocaIMy8zJZoRIOhH 46YaWAexAN5A0SHU+Rfm3Ga+RIGesj+AvHsz0inE1ZD5zknUM5MiLnoiUKSo8hYW TSlSu33ESAm+VxKElQ7IBNKmzEtc526+wJgLUTACSRkGAgBoHG6zOgl0ejytcCzH XliM963BvsNuxXClnE1HOhNEuI7kq+NkGrTIcqD4pUBTuoKnr/481Z8m2mTTRrYD sbr9mvEU3osslGFafQqC+ckc6J64sgiPUeGYa6SkOzJAs13dXdKKbe3cxijujbUC dvaqenrCgk/Gub5tGP4wA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeduuddgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeflihgr gihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqne cuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtdduudeghfeu veegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Feb 2024 10:46:33 -0500 (EST) From: Jiaxun Yang Date: Thu, 01 Feb 2024 15:46:28 +0000 Subject: [PATCH 2/3] MIPS: Clear Cause.BD in instruction_pointer_set Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240201-exception_ip-v1-2-aa26ab3ee0b5@flygoat.com> References: <20240201-exception_ip-v1-0-aa26ab3ee0b5@flygoat.com> In-Reply-To: <20240201-exception_ip-v1-0-aa26ab3ee0b5@flygoat.com> To: Oleg Nesterov , Thomas Bogendoerfer , Andrew Morton , Ben Hutchings Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=860; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=NiHFyPPrD5sK3tKmsstYY6GfrHgdKmJEsdk12grutnA=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtTde64yuL1SSV4UOF9DePOkzgsnGSd6LJDLjxSMtNtSb F0aeTKso5SFQYyLQVZMkSVEQKlvQ+PFBdcfZP2BmcPKBDaEi1MAJmIdxMjwTTn6ttlZ/av+3xp3 Pe7ZFsP1s/eGc6bPToN79bsYuU7OY2Q45vFTKG7j7El89pddzOYxbdN/9LVUT2PVZknNzeInBAo 4AA== X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Clear Cause.BD after we use instruction_pointer_set to override EPC. This can prevent exception_epc check against instruction code at new return address. It won't be considered as "in delay slot" after epc being overridden anyway. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/ptrace.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index 97589731fd40..845508008e90 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h @@ -60,6 +60,7 @@ static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val) { regs->cp0_epc = val; + regs->cp0_cause &= ~CAUSEF_BD; } /* Query offset/name of register from its name/offset */ -- 2.43.0