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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250917141528.cd619a95a19a33d71dcc4b1c@linux-foundation.org>
Date: Wed, 17 Sep 2025 14:15:28 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Mike Rapoport <rppt@...nel.org>
Cc: Alexander Graf <graf@...zon.com>, Baoquan He <bhe@...hat.com>, Changyuan
 Lyu <changyuanl@...gle.com>, Chris Li <chrisl@...nel.org>, Jason Gunthorpe
 <jgg@...dia.com>, Pasha Tatashin <pasha.tatashin@...een.com>, Pratyush
 Yadav <pratyush@...nel.org>, kexec@...ts.infradead.org, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/4] kho: add support for preserving vmalloc
 allocations

On Wed, 17 Sep 2025 20:40:32 +0300 Mike Rapoport <rppt@...nel.org> wrote:

> A vmalloc allocation is preserved using binary structure similar to
> global KHO memory tracker. It's a linked list of pages where each page
> is an array of physical address of pages in vmalloc area.
> 
> kho_preserve_vmalloc() hands out the physical address of the head page
> to the caller. This address is used as the argument to
> kho_vmalloc_restore() to restore the mapping in the vmalloc address
> space and populate it with the preserved pages.
> 
> ...
>
> --- a/include/linux/kexec_handover.h
> +++ b/include/linux/kexec_handover.h
> @@ -39,12 +39,22 @@ struct page;
>  
>  struct kho_serialization;
>  
> +struct kho_vmalloc_chunk;
> +struct kho_vmalloc {
> +        DECLARE_KHOSER_PTR(first, struct kho_vmalloc_chunk *);

offtopic nit: DECLARE_KHOSER_PTR() *defines* a union named "first".  It
doesn't declare one.  A better name for this would have been DEFINE_...

And the world would be a better place if those three macros had a bit
of documentation ;)

The code looks nice though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ