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: <20250709153751.222ea2d1de1313a22a69e64e@linux-foundation.org>
Date: Wed, 9 Jul 2025 15:37:51 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, David Hildenbrand
 <david@...hat.com>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>, Vlastimil Babka
 <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>, Suren Baghdasaryan
 <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH] mm: implement "memory.oops_if_bad_pte=1" boot option

On Wed, 9 Jul 2025 21:10:59 +0300 Alexey Dobriyan <adobriyan@...il.com> wrote:

> Implement
> 
> 	memory.oops_if_bad_pte=1
> 
> boot option which oopses the machine instead of dreadful
> 
> 	BUG: Bad page map in process
> 
> message.
> 
> This is intended
> for people who want to panic at the slightest provocation and
> for people who ruled out hardware problems which in turn means that
> delaying vmcore collection is counter-productive.
> 
> Linux doesn't (never?) panicked on PTE corruption and even implemented
> ratelimited version of the message meaning it can go for minutes and
> even hours without anyone noticing which is exactly the opposite of what
> should be done to facilitate debugging.
> 
> Not enabled by default.
> 
> Not advertised.
> 
> @@ -490,6 +498,13 @@ static inline void add_mm_rss_vec(struct mm_struct *mm, int *rss)
>  static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
>  			  pte_t pte, struct page *page)
>  {
> +	/*
> +	 * This line is a formality to collect vmcore ASAP. Real bug
> +	 * (hardware or software) happened earlier, current registers and
> +	 * backtrace aren't interesting.
> +	 */
> +	BUG_ON(oops_if_bad_pte);
> +

Oh.  A pretty simple thing to do with bpf?  A script to tell the kernel
"dump vmcore if you get here" would have applications in places other
than print_bad_pte()?

That's what bpf_panic() was for (https://lwn.net/Articles/901284/) but
it apparently didn't get merged for <reasons>.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ