lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZwuCLKivIJkB7aza@kernel.org>
Date: Sun, 13 Oct 2024 11:17:48 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Dave Hansen <dave.hansen@...el.com>
Cc: kernel test robot <oliver.sang@...el.com>, oe-lkp@...ts.linux.dev,
	lkp@...el.com, Linux Memory Management List <linux-mm@...ck.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andreas Larsson <andreas@...sler.com>,
	Andy Lutomirski <luto@...nel.org>, Ard Biesheuvel <ardb@...nel.org>,
	Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
	Brian Cain <bcain@...cinc.com>,
	Catalin Marinas <catalin.marinas@....com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Christoph Hellwig <hch@...radead.org>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Dinh Nguyen <dinguyen@...nel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Guo Ren <guoren@...nel.org>, Helge Deller <deller@....de>,
	Huacai Chen <chenhuacai@...nel.org>, Ingo Molnar <mingo@...hat.com>,
	Johannes Berg <johannes@...solutions.net>,
	John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
	Kent Overstreet <kent.overstreet@...ux.dev>,
	"Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Matt Turner <mattst88@...il.com>, Max Filippov <jcmvbkbc@...il.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Michal Simek <monstr@...str.eu>, Oleg Nesterov <oleg@...hat.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Richard Weinberger <richard@....at>,
	Russell King <linux@...linux.org.uk>, Song Liu <song@...nel.org>,
	Stafford Horne <shorne@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Uladzislau Rezki <urezki@...il.com>,
	Vineet Gupta <vgupta@...nel.org>, Will Deacon <will@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [linux-next:master] [x86/module] 6661cae1aa:
 WARNING:at_arch/x86/mm/pat/set_memory.c:#__cpa_process_fault

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ