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 402524C3D0; Mon, 14 Oct 2024 15:48:03 +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=1728920884; cv=none; b=pl6h1qPzAzl57wEthyuVJDDWigJbWcLIfVrwti0iT+aonIbQ7AV5B86W+oqspOeP409W549IVCTLDyEePWIxDiZqUejo4Hm6GYen7Rj6sjrwCoGGojhsRoc+EJgWTkgbHpjg21IBKlUUipt9b5mM4XfeXFfIVfDgzK3Po9W2VyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728920884; c=relaxed/simple; bh=GzsUoUiNhKTK3YdZrXtW8NdzWqv5iw1PoH3sAqDorsw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gbGPgC9JZzsmalKcn7xaig+vG17o7lyVJMfHan5CT1WQsKOGt0nwV4Fu6gNxBou9ZvXgHozsnW91NSOXBALdk9W9EltzLnMrn/VwhhtNEJSzTuO2zcvZu26JMkBbbsGa0gY1IYuAkirmVOyMdPoTB3g3aufIveKcwoiXFBr2p0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gUQHaFJn; 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="gUQHaFJn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 419EEC4CEC3; Mon, 14 Oct 2024 15:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728920883; bh=GzsUoUiNhKTK3YdZrXtW8NdzWqv5iw1PoH3sAqDorsw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUQHaFJnfl8GocRbvMKCm2pNSv4Zu1bSbud4/N4HypWJBIeqQYnzf2PpU6r14SWJz kW0SPc8Te5lh8jX/vrd/yPGkY4O9IPCtqas2cbjJAxkHccC9gToBtC15aJ3e0yU5Mf 7p43gdpyB7n8IetfqbLFmpJewplOl7Y2MyvxbGm8nFwIoeIgoVrvwH+ApvH9UPOZCm Wgz45tCNiMdnSTaVNdfJa5iX3UL/V7PMDulmRjuyBtyIKNN2lIHxkmyQsSvfraLxVA K7q9QhV55XUcVhUJRx96J38FC/HiNvETBOo8/ffBfDu2wnnu8YIG0lolI/vpmRonFb TP90mzUwaH44w== Date: Mon, 14 Oct 2024 18:44:14 +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 Mon, Oct 14, 2024 at 08:27:36AM -0700, Dave Hansen wrote: > On 10/13/24 01:17, Mike Rapoport wrote: > > 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. > > It's not really about making it _available_ to 32-bit, but making sure > that we're actually doing the check against the right feature and in the > right way. > > To me, it seems like execmem itself should be excluding all HIGHMEM=y > builds or _maybe_ all 32-bit builds because execmem has the built-in > assumption that vmalloc memory is in the direct map. I presume you mean execmem cache here, as execmem in general should work everywhere. After discussion with Christoph about how to define execmem_fill_trapping_insns(), I'm going to add a Kconfig opt-in option that will guard the entire execmem cache implementation and have it selected by x86_64. -- Sincerely yours, Mike.