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: <mafs08qgnc7pe.fsf@kernel.org>
Date: Mon, 03 Nov 2025 19:05:49 +0100
From: Pratyush Yadav <pratyush@...nel.org>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: akpm@...ux-foundation.org,  brauner@...nel.org,  corbet@....net,
  graf@...zon.com,  jgg@...pe.ca,  linux-kernel@...r.kernel.org,
  linux-kselftest@...r.kernel.org,  linux-mm@...ck.org,
  masahiroy@...nel.org,  ojeda@...nel.org,  pratyush@...nel.org,
  rdunlap@...radead.org,  rppt@...nel.org,  tj@...nel.org,
  yanjun.zhu@...ux.dev
Subject: Re: [PATCH v9 3/9] kho: add interfaces to unpreserve folios, page
 ranges, and vmalloc

Hi Pasha,

On Sat, Nov 01 2025, Pasha Tatashin wrote:

> Allow users of KHO to cancel the previous preservation by adding the
> necessary interfaces to unpreserve folio, pages, and vmallocs.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@...een.com>
> Reviewed-by: Pratyush Yadav <pratyush@...nel.org>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
[...]
> +/**
> + * kho_unpreserve_vmalloc - unpreserve memory allocated with vmalloc()
> + * @preservation: preservation metadata returned by kho_preserve_vmalloc()
> + *
> + * Instructs KHO to unpreserve the area in vmalloc address space that was
> + * previously preserved with kho_preserve_vmalloc().
> + *
> + * Return: 0 on success, error code on failure
> + */
> +int kho_unpreserve_vmalloc(struct kho_vmalloc *preservation)
> +{
> +	if (kho_out.finalized)
> +		return -EBUSY;
> +
> +	kho_vmalloc_free_chunks(preservation);

When reviewing this patch, I spotted that kho_vmalloc_free_chunks() is
broken. Well it happens to work if all pages are 0-order, but breaks on
higher-order allocations.

I have sent a separate patch [0] to fix this on top of mm-stable. It
doesn't have a conflict with this patch so it shouldn't cause trouble.
And I **don't** think it should block this patch either. This is mostly
a heads up.

[0] https://lore.kernel.org/linux-mm/20251103180235.71409-2-pratyush@kernel.org/T/#u

-- 
Regards,
Pratyush Yadav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ