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 A9899C433EF for ; Thu, 28 Apr 2022 16:14:14 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SEaGDqXyGEBktKA5ksoFmtv6Ol3kcf8hV+ILIkhcvT4=; b=wjT05FKlQUf1tH TTJT9Jt7HM/vFPrtz1LET9SVrE4bN3Q8SliFc32Till51HJSTZovx3iNxvkb+0S9LdMyPymTMYcUV WF4JhY6jata3Vu697mF6qYK/XlitcfE2QMLuW10UZ2wDwxRciByFgcoLg/c4FrMCJvvYOhGnjV2zq EcMgX89+a5SKy0GUsnY62YIeIRK0pFWT0TCx/squb8pJsAF5nywP5OCDX9HyMYE4AYmE7KXKSCLae Vw09WL4KEQzZg/FTDGME+4QNaFQ3vWG7kpEiXkuAHcvULTSsNB9xAq+VXmypfIslYN1uAvWil6Yuf SaxVmL1de0XGaTIO6GTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk6lR-007rS9-Rc; Thu, 28 Apr 2022 16:13:09 +0000 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk6lO-007rPv-02 for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 16:13:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651162385; x=1682698385; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FrfyPGyrRql3+c1AJp/BIgQHA9i1fgkYU3oOQT+9KWw=; b=qDFPIa0pS+L3QkwfkvO+fQN+3yh3GXxUquY2Le3r9RmWCdKqsFP8NRfH IrsCU870zLfqiDC3hRsDQdx9eoaqK2VR45xBGitxHGMDrugjCNve4wFZJ Z5zt8LWew/8aKoQIsrzPrygoPWfQrAi0+stYSfrtOPR2u9cBSHuZUUPOX A=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 28 Apr 2022 09:13:01 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2022 09:13:00 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 28 Apr 2022 09:13:00 -0700 Received: from qian (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 28 Apr 2022 09:12:57 -0700 Date: Thu, 28 Apr 2022 12:12:54 -0400 From: Qian Cai To: Andrey Konovalov CC: , Andrew Morton , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev , Linux Memory Management List , Vincenzo Frascino , "Catalin Marinas" , Will Deacon , "Mark Rutland" , Linux ARM , Peter Collingbourne , Evgenii Stepanov , LKML , Andrey Konovalov Subject: Re: [PATCH v6 00/39] kasan, vmalloc, arm64: add vmalloc tagging support for SW/HW_TAGS Message-ID: <20220428161254.GA182@qian> References: <20220428141356.GB71@qian> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_091306_112319_B7F3E172 X-CRM114-Status: GOOD ( 10.37 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 28, 2022 at 05:28:12PM +0200, Andrey Konovalov wrote: > No ideas so far. > > Looks like the page has reserved tag set when it's being freed. > > Does this crash only happen with the SW_TAGS mode? No, the system is running exclusively with CONFIG_KASAN_GENERIC=y > Does this crash only happen when loading modules? Yes. Here is another sligtly different path at the bottom. > Does your system have any hot-plugged memory? No. BUG: Bad page state in process systemd-udevd pfn:403fc007c page:fffffd00fd001f00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x403fc007c flags: 0x1bfffc0000001000(reserved|node=1|zone=2|lastcpupid=0xffff) raw: 1bfffc0000001000 fffffd00fd001f08 fffffd00fd001f08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set CPU: 101 PID: 2004 Comm: systemd-udevd Not tainted 5.17.0-rc8-next-20220317-dirty #39 Call trace: dump_backtrace show_stack dump_stack_lvl dump_stack bad_page free_pcp_prepare free_pages_prepare at mm/page_alloc.c:1348 (inlined by) free_pcp_prepare at mm/page_alloc.c:1403 free_unref_page __free_pages free_pages.part.0 free_pages kasan_depopulate_vmalloc_pte (inlined by) kasan_depopulate_vmalloc_pte at mm/kasan/shadow.c:359 apply_to_pte_range apply_to_pte_range at mm/memory.c:2547 apply_to_pmd_range apply_to_pud_range __apply_to_page_range apply_to_existing_page_range kasan_release_vmalloc (inlined by) kasan_release_vmalloc at mm/kasan/shadow.c:469 __purge_vmap_area_lazy _vm_unmap_aliases.part.0 __vunmap __vfree vfree module_memfree free_module do_init_module load_module __do_sys_finit_module __arm64_sys_finit_module invoke_syscall el0_svc_common.constprop.0 do_el0_svc el0_svc el0t_64_sync_handler el0t_64_sync Disabling lock debugging due to kernel taint BUG: Bad page state in process systemd-udevd pfn:403fc007b page:fffffd00fd001ec0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x403fc007b flags: 0x1bfffc0000001000(reserved|node=1|zone=2|lastcpupid=0xffff) raw: 1bfffc0000001000 fffffd00fd001ec8 fffffd00fd001ec8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set CPU: 101 PID: 2004 Comm: systemd-udevd Tainted: G B 5.17.0-rc8-next-20220317-dirty #39 Call trace: dump_backtrace show_stack dump_stack_lvl dump_stack bad_page free_pcp_prepare free_unref_page __free_pages free_pages.part.0 free_pages kasan_depopulate_vmalloc_pte apply_to_pte_range apply_to_pmd_range apply_to_pud_range __apply_to_page_range apply_to_existing_page_range kasan_release_vmalloc __purge_vmap_area_lazy _vm_unmap_aliases.part.0 __vunmap __vfree vfree module_memfree free_module do_init_module load_module __do_sys_finit_module __arm64_sys_finit_module invoke_syscall el0_svc_common.constprop.0 do_el0_svc el0_svc el0t_64_sync_handler el0t_64_sync _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel