From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36D60CD11C2 for ; Wed, 10 Apr 2024 11:54:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jQX1u3sx/3aiWQ/lUzTJqZ7OK++60MDMagL22BgYpBI=; b=O0e9iTeasIKJA2 E7TSD9cQhauuQFdibmFNdQhwdXLQCnn+oIqxvMMv+r6naFTFRmM+18uSwfO3td500R8GMbU/LeRfJ +Tuj/V/a7WfY+rXe5FrvKGJkOehB62JnVrMbBpBSqBZ50YLn/qFkJQxab79GrZGXrpqTw4HKIJhWX CIRVPp9h0aR/zCbUhPVNSufBspc9I34Jx9/L4BfjiGwzq3TqNLEATwjZfodbaIkmfKFTNZfhUfwjY b3csEUDOpFV2BnDA8YxUZDN+ADCXmm/XPt9h7uLYu8mZwEzmr+WXKEkSmCWM5dqpxD00ls51x8FQx cnS0SC9k57QH+vDiTy1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruWWK-00000006kDl-44Kt; Wed, 10 Apr 2024 11:53:41 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruWWF-00000006kB0-3Dhw for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2024 11:53:37 +0000 Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4VF1PQ6LmwzNnWf; Wed, 10 Apr 2024 19:51:06 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 12CA714037D; Wed, 10 Apr 2024 19:53:23 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 10 Apr 2024 19:53:22 +0800 Message-ID: <0977b553-b0ae-4e4b-8cb4-007204381c0b@huawei.com> Date: Wed, 10 Apr 2024 19:53:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] arm64: mm: drop VM_FAULT_BADMAP/VM_FAULT_BADACCESS Content-Language: en-US To: Aishwarya TCV CC: , , Will Deacon , Catalin Marinas , Russell King , Andrew Morton , Mark Brown , Cristian Marussi References: <20240407081211.2292362-1-wangkefeng.wang@huawei.com> <20240407081211.2292362-2-wangkefeng.wang@huawei.com> <681e3bf8-dedf-469e-8fd3-0a67b8e6e625@arm.com> From: Kefeng Wang In-Reply-To: <681e3bf8-dedf-469e-8fd3-0a67b8e6e625@arm.com> X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm100001.china.huawei.com (7.185.36.93) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240410_045336_297471_51C84CA4 X-CRM114-Status: GOOD ( 21.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2024/4/10 19:24, Aishwarya TCV wrote: > > > On 07/04/2024 09:12, Kefeng Wang wrote: >> If bad map or access, directly set si_code to SEGV_MAPRR or SEGV_ACCERR, >> also set fault to 0 and goto error handling, which make us to drop the >> arch's special vm fault reason. >> >> Signed-off-by: Kefeng Wang >> --- >> arch/arm64/mm/fault.c | 41 ++++++++++++++++++----------------------- >> 1 file changed, 18 insertions(+), 23 deletions(-) > > Hi Kefeng, > > While running LTP test suite, I observed that few test cases are unable > to kill exe when run against next-master(next-20240409) kernel with > Arm64 on JUNO in our CI. I can send the full logs if required, but it > doesn't say much. Sorry about it, as Catalin pointed, there is issue in this patch, and I replied today, could you help to test with following changes, many thanks. diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 61a2acae0dca..451ba7cbd5ad 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -604,6 +604,7 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr, } if (!(vma->vm_flags & vm_flags)) { + mmap_read_unlock(mm); fault = 0; si_code = SEGV_ACCERR; goto bad_area; @@ -632,6 +633,7 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr, if (likely(!(fault & VM_FAULT_ERROR))) return 0; + si_code = SEGV_MAPERR; bad_area: /* * If we are in kernel mode at this point, we have no context to > > A bisect identified cf0049a15207a5a78798105eff789c2025bcf652 as the > first bad commit. Bisected it on the tag "next-20240409" at repo > "https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git". > > This works fine on Linux version v6.9-rc3 > > Here are some of the failing test cases in LTP quickhit: > ----------------------------- > chdir01 > link04 > select03 > unlink07 > > > Failure log: > ----------- > 06:06:49.288908 Test timeouted, sending SIGKILL! > 06:06:54.293806 Test timeouted, sending SIGKILL! > 06:06:59.296872 Test timeouted, sending SIGKILL! > 06:07:04.292044 Test timeouted, sending SIGKILL! > 06:07:09.290185 Test timeouted, sending SIGKILL! > 06:07:14.295134 Test timeouted, sending SIGKILL! > 06:07:19.293279 Test timeouted, sending SIGKILL! > 06:07:24.292405 Test timeouted, sending SIGKILL! > 06:07:24.292790 Cannot kill test processes! > 06:07:24.296564 Congratulation, likely test hit a kernel bug. > 06:07:24.301315 Exiting uncleanly... > > > Bisect log: > ---------- > git bisect start > # good: [fec50db7033ea478773b159e0e2efb135270e3b7] Linux 6.9-rc3 > git bisect good fec50db7033ea478773b159e0e2efb135270e3b7 > # bad: [a053fd3ca5d1b927a8655f239c84b0d790218fda] Add linux-next > specific files for 20240409 > git bisect bad a053fd3ca5d1b927a8655f239c84b0d790218fda > # bad: [4eb0063b031ea720cd8971e3e3d2426d27c5d7a6] Merge branch > 'mtd/next' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git > git bisect bad 4eb0063b031ea720cd8971e3e3d2426d27c5d7a6 > # bad: [24dde11bfadd5f38c6cca3cea6f16971bd10dc86] Merge branch > 'for-next' of git://github.com/Xilinx/linux-xlnx.git > git bisect bad 24dde11bfadd5f38c6cca3cea6f16971bd10dc86 > # bad: [bef23348d7e75c502399ba1a24627aa447b816dc] Merge branch > 'mm-everything' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > git bisect bad bef23348d7e75c502399ba1a24627aa447b816dc > # good: [3317f7faabc24b500c26d02615ac75ca2786e272] mm: swap: > free_swap_and_cache_nr() as batched free_swap_and_cache() > git bisect good 3317f7faabc24b500c26d02615ac75ca2786e272 > # good: [541970e62546ff5c96622669f2796d43b1a406e3] Merge branch > 'gpio/for-current' of > git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git > git bisect good 541970e62546ff5c96622669f2796d43b1a406e3 > # bad: [1df265717e0f9d96079073189f6e6c52a48e493c] > __mod_memcg_lruvec_state-enhance-diagnostics-fix > git bisect bad 1df265717e0f9d96079073189f6e6c52a48e493c > # bad: [19ab4054346474c2b456f9bff6a98e41e5e46224] hugetlb: Simplify > hugetlb_wp() arguments > git bisect bad 19ab4054346474c2b456f9bff6a98e41e5e46224 > # good: [75ef450aa9828ca20817c46c5b99f131156f6eee] x86: mm: accelerate > pagefault when badaccess > git bisect good 75ef450aa9828ca20817c46c5b99f131156f6eee > # bad: [c6b5a19e679bb713efd57d82f9080f780e0bb60a] mm/treewide: rename > CONFIG_HAVE_FAST_GUP to CONFIG_HAVE_GUP_FAST > git bisect bad c6b5a19e679bb713efd57d82f9080f780e0bb60a > # bad: [01446d1e9e627945664f2a1daa53e8720946d0cd] mm: remove struct page > from get_shadow_from_swap_cache > git bisect bad 01446d1e9e627945664f2a1daa53e8720946d0cd > # bad: [8f9d6a30dd992c44debea3161083a6c2cd3ad87f] arm: mm: drop > VM_FAULT_BADMAP/VM_FAULT_BADACCESS > git bisect bad 8f9d6a30dd992c44debea3161083a6c2cd3ad87f > # bad: [cf0049a15207a5a78798105eff789c2025bcf652] arm64: mm: drop > VM_FAULT_BADMAP/VM_FAULT_BADACCESS > git bisect bad cf0049a15207a5a78798105eff789c2025bcf652 > # first bad commit: [cf0049a15207a5a78798105eff789c2025bcf652] arm64: > mm: drop VM_FAULT_BADMAP/VM_FAULT_BADACCESSgit bisect log > > > Thanks, > Aishwarya _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel