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] [day] [month] [year] [list]
Message-ID: <20240422101806.NkNd2Ksz@linutronix.de>
Date: Mon, 22 Apr 2024 12:18:06 +0200
From: Nam Cao <namcao@...utronix.de>
To: Mike Rapoport <rppt@...nel.org>
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>,
	Björn Töpel <bjorn@...nel.org>,
	Andreas Dilger <adilger@...ger.ca>, Arnd Bergmann <arnd@...db.de>,
	Changbin Du <changbin.du@...wei.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Ingo Molnar <mingo@...nel.org>,
	Krister Johansen <kjlx@...pleofstupid.com>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>, Tejun Heo <tj@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [linux-next:master] [init]  b8de39bd1b:
 BUG:kernel_failed_in_early-boot_stage,last_printk:early_console_in_setup_code

On Mon, Apr 22, 2024 at 12:18:46PM +0300, Mike Rapoport wrote:
> The kernel config here has CONFIG_DEBUG_VIRTUAL=y, so __pa translates to
> __phys_addr() in arch/x86/mm/physaddr.c and __pa(-PAGE_SIZE) triggers
> 
> 		VIRTUAL_BUG_ON(y >= KERNEL_IMAGE_SIZE);

RISCV also has a similar thing when CONFIG_DEBUG_VIRTUAL=y

> 
> x86 has __pa_nodebug() that does not do bounds check, but it cannot be used
> in generic code because no other arch except s390 define it.
> 
> For now I don't have ideas how to make this work in the general case, so
> probably we should only fix riscv for now.

Agree, let's just fix riscv for now. This time I will cook up something
safer, no more __pa() on a potentially invalid address.

Best regards,
Nam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ