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: <CALu+AoSNhhjxcKp2S0ERkOyezyrxcf87qxKh8isVgwehqOgbfA@mail.gmail.com>
Date: Fri, 3 Jan 2025 15:18:37 +0800
From: Dave Young <dyoung@...hat.com>
To: Zhiquan Li <zhiquan1.li@...el.com>
Cc: bhe@...hat.com, vgoyal@...hat.com, kirill.shutemov@...ux.intel.com, 
	kexec@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crash: Export PAGE_UNACCEPTED_MAPCOUNT_VALUE to vmcoreinfo

On Fri, 3 Jan 2025 at 15:13, Zhiquan Li <zhiquan1.li@...el.com> wrote:
>
> On Intel TDX guest, unaccepted memory is unusable free memory which is
> not managed by buddy, until it's accepted by guest.  Before that, it
> cannot be accessed by the first kernel as well as the kexec'ed kernel.
> The kexec'ed kernel will skip these pages and fill in zero data for the
> reader of vmcore.
>
> The dump tool like makedumpfile creates a page descriptor (size 24
> bytes) for each non-free page, including zero data page, but it will not
> create descriptor for free pages.  If it is not able to distinguish
> these unaccepted pages with zero data pages, a certain amount of space
> will be wasted in proportion.  In fact, as a special kind of free page
> the unaccepted pages should be excluded, like the real free pages.
Hi,

>
> Export the page type PAGE_UNACCEPTED_MAPCOUNT_VALUE to vmcoreinfo, so
> that dump tool can identify whether a page is unaccepted.
>
> Signed-off-by: Zhiquan Li <zhiquan1.li@...el.com>
> ---
>  kernel/vmcore_info.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/kernel/vmcore_info.c b/kernel/vmcore_info.c

Please add into admin-guide/kdump/vmcoreinfo.rst if you add more vmcoreinfo.

> index 1fec61603ef3..e066d31d08f8 100644
> --- a/kernel/vmcore_info.c
> +++ b/kernel/vmcore_info.c
> @@ -210,6 +210,10 @@ static int __init crash_save_vmcoreinfo_init(void)
>         VMCOREINFO_NUMBER(PAGE_HUGETLB_MAPCOUNT_VALUE);
>  #define PAGE_OFFLINE_MAPCOUNT_VALUE    (PGTY_offline << 24)
>         VMCOREINFO_NUMBER(PAGE_OFFLINE_MAPCOUNT_VALUE);
> +#ifdef CONFIG_UNACCEPTED_MEMORY
> +#define PAGE_UNACCEPTED_MAPCOUNT_VALUE (PGTY_unaccepted << 24)
> +       VMCOREINFO_NUMBER(PAGE_UNACCEPTED_MAPCOUNT_VALUE);
> +#endif
>
>  #ifdef CONFIG_KALLSYMS
>         VMCOREINFO_SYMBOL(kallsyms_names);
>
> base-commit: fc033cf25e612e840e545f8d5ad2edd6ba613ed5
> --
> 2.25.1
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ