From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DBC36335D3; Sun, 13 Oct 2024 08:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728807696; cv=none; b=k4/BjzXa8zlH2pTwBA8RR81N/bJa+oR4qv+ywH//kk2TWWOKrua20bqXxZL7gSPsEl3fjiO6Xwk0BqPv5CfGjbhIZc6jEZ9MzS0HIcy8ZU8WkSExqH86yBYdhTJJEuWoDBRUBh18ZksNYD29eAtD1Zhs37DiV6LsePAcG/28Boc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728807696; c=relaxed/simple; bh=axLE1xiN/UJraVdsbL227+KygpaRBx8zh/1+7kBzHtI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EZnXDR9lHuGGyonJhvpgtrie1UgA3PSZwA3xpfBN8wg65g9hdlAFM5jxNJngmgTj3BNGbAjPB74PIN6aQYYJMTdS/schf6d8cIAtswQ8PR4cO/MI0vk8NhmejKasahdxjGqgkI66P2dx0dBq5owz0OhGQSBuSDEFmpWJO7oiEzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tULugrmy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tULugrmy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F7DDC4CEC5; Sun, 13 Oct 2024 08:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728807695; bh=axLE1xiN/UJraVdsbL227+KygpaRBx8zh/1+7kBzHtI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tULugrmyy2c91yQJWjaBjHXqphYG/JvCX5o6kz6uVZ9/fCV6HwEPz8SuQgJzDUq5n kxV0HdtXAKAFfmvUvZdgQZMP0unvXMRCEnlyS1H3JQDZ5ossIIaf2Eh/Nt9pL4A4fs UgxKSMuMKcaccm8geMjYnMSohGCn8RKZBpgaQDbot9RbMkW0GDRRTO33pSpl/x1ym0 dQuemnzjAiXPC/0mLG1oT+1A/aZ61lYeZndqRDYWKybQ8BBsLJUN0uOrlEeKnU9yp5 FWC9VLWLI9drpamlPLmTprJP5YlRHBN3xN5RHu8q3+QwHPmEl5AZGNADKSg4N+YSpq BHkDzwCRuBmaA== Date: Sun, 13 Oct 2024 11:17:48 +0300 From: Mike Rapoport To: Dave Hansen Cc: kernel test robot , oe-lkp@lists.linux.dev, lkp@intel.com, Linux Memory Management List , Andrew Morton , Andreas Larsson , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Brian Cain , Catalin Marinas , Christophe Leroy , Christoph Hellwig , Dave Hansen , Dinh Nguyen , Geert Uytterhoeven , Guo Ren , Helge Deller , Huacai Chen , Ingo Molnar , Johannes Berg , John Paul Adrian Glaubitz , Kent Overstreet , "Liam R. Howlett" , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Oleg Nesterov , Palmer Dabbelt , Peter Zijlstra , Richard Weinberger , Russell King , Song Liu , Stafford Horne , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Uladzislau Rezki , Vineet Gupta , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [linux-next:master] [x86/module] 6661cae1aa: WARNING:at_arch/x86/mm/pat/set_memory.c:#__cpa_process_fault Message-ID: References: <202410111408.8fe6f604-lkp@intel.com> <73d5a6ed-da3c-448e-8cf8-6abb59cb2c36@intel.com> 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=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Oct 11, 2024 at 09:30:33AM -0700, Dave Hansen wrote: > On 10/11/24 08:40, Mike Rapoport wrote: > > On Fri, Oct 11, 2024 at 07:00:01AM -0700, Dave Hansen wrote: > >> On 10/11/24 06:08, Mike Rapoport wrote: > >>> This patch disables ROX caches on 32-bit, it should fix the issue. > >> While I'm not going to shed a tear for 32-bit, what's the actual > >> compatibility issue with 32-bit? > > From the stack trace it looks like execmem tries to update the direct map > > for highmem memory, and cpa is not happy about it. > > First of all, if it's a highmem problem, shouldn't the check be for > CONFIG_HIGHMEM and not on 32-bit vs. 64-bit? We do have non-highmem > 32-bit configs. 32 bit also does not have ARCH_HUGE_VMALLOC and execmem cache will be anyway populated with 4k pages, so I don't see why it would be useful on 32 bit all. > Also, where did the highmem come from? All of the execmem allocations > look like they're some variant of PAGE_KERNEL, but no __GFP_HIGHMEM. Despite that execmem allocations are PAGE_KERNEL, __vmalloc_area_node() implicitly adds __GFP_HIGHMEM for !DMA allocations. cpa->vaddr = 0 here: [ 8.161035][ T98] CPA: called for zero pte. vaddr = 0 cpa->vaddr = 0 means that page_address() returned NULL which can happen only for highmem pages. set_direct_map_valid_noflush() __set_pages_np() unsigned long tempaddr = (unsigned long) page_address(page); struct cpa_data cpa = { .vaddr = &tempaddr, ... __change_page_attr_set_clr(&cpa, 1); -- Sincerely yours, Mike.