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: <20251211030006.GA9333@ranerica-svr.sc.intel.com>
Date: Wed, 10 Dec 2025 19:00:06 -0800
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: Changyuan Lyu <changyuanl@...gle.com>,
	"Mike Rapoport (Microsoft)" <rppt@...nel.org>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	anthony.yznaga@...cle.com, arnd@...db.de, ashish.kalra@....com,
	benh@...nel.crashing.org, bp@...en8.de, catalin.marinas@....com,
	corbet@....net, dave.hansen@...ux.intel.com,
	devicetree@...r.kernel.org, dwmw2@...radead.org,
	ebiederm@...ssion.com, graf@...zon.com, hpa@...or.com,
	jgowans@...zon.com, kexec@...ts.infradead.org, krzk@...nel.org,
	linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
	linux-mm@...ck.org, luto@...nel.org, mark.rutland@....com,
	mingo@...hat.com, pasha.tatashin@...een.com, pbonzini@...hat.com,
	peterz@...radead.org, ptyadav@...zon.de, robh@...nel.org,
	rostedt@...dmis.org, rppt@...nel.org, saravanak@...gle.com,
	skinsburskii@...ux.microsoft.com, tglx@...utronix.de,
	thomas.lendacky@....com, will@...nel.org, x86@...nel.org
Subject: Re: [PATCH v8 17/17] Documentation: KHO: Add memblock bindings

On Fri, May 09, 2025 at 12:46:35AM -0700, Changyuan Lyu wrote:
> From: "Mike Rapoport (Microsoft)" <rppt@...nel.org>
> 
> We introduced KHO into Linux: A framework that allows Linux to pass
> metadata and memory across kexec from Linux to Linux. KHO reuses fdt
> as file format and shares a lot of the same properties of firmware-to-
> Linux boot formats: It needs a stable, documented ABI that allows for
> forward and backward compatibility as well as versioning.
> 
> As first user of KHO, we introduced memblock which can now preserve
> memory ranges reserved with reserve_mem command line options contents
> across kexec, so you can use the post-kexec kernel to read traces from
> the pre-kexec kernel.
> 
> This patch adds memblock schemas similar to "device" device tree ones to
> a new kho bindings directory. This allows us to force contributors to
> document the data that moves across KHO kexecs and catch breaking change
> during review.
> 
> Co-developed-by: Alexander Graf <graf@...zon.com>
> Signed-off-by: Alexander Graf <graf@...zon.com>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
> Signed-off-by: Changyuan Lyu <changyuanl@...gle.com>
> ---
>  .../kho/bindings/memblock/memblock.yaml       | 39 ++++++++++++++++++
>  .../kho/bindings/memblock/reserve-mem.yaml    | 40 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  3 files changed, 80 insertions(+)
>  create mode 100644 Documentation/core-api/kho/bindings/memblock/memblock.yaml
>  create mode 100644 Documentation/core-api/kho/bindings/memblock/reserve-mem.yaml
> 
> diff --git a/Documentation/core-api/kho/bindings/memblock/memblock.yaml b/Documentation/core-api/kho/bindings/memblock/memblock.yaml
> new file mode 100644
> index 0000000000000..d388c28eb91d1
> --- /dev/null
> +++ b/Documentation/core-api/kho/bindings/memblock/memblock.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +title: Memblock reserved memory
> +
> +maintainers:
> +  - Mike Rapoport <rppt@...nel.org>
> +
> +description: |
> +  Memblock can serialize its current memory reservations created with
> +  reserve_mem command line option across kexec through KHO.
> +  The post-KHO kernel can then consume these reservations and they are
> +  guaranteed to have the same physical address.

Hi Changyuan, Mike,

I am sorry I am late to this patchset. I am working on a patchset to use
KHO to pass reserved memory regions to a driver after kexec and I have a
few questions.

> +
> +properties:
> +  compatible:
> +    enum:
> +      - reserve-mem-v1

Shouldn't this be "memblock-v1". IIUC, the compatible "reserve-mem-v1" is
to be used for the memblock reserved memory regions, not the memblock node.


> +
> +patternProperties:
> +  "$[0-9a-f_]+^":

Shouldn't this be "^[0-9a-f_]+$": ^ at the start of the pattern and $ at
the end of it? Or is this a KHO-specific rule?

Also, IIUC, this means that names of the nodes are hexadecimal numbers
whereas the example below has a "membloc" name. I assume this does not
refer to the subnode named "n1" as this does not follow the pattern
either Moreover, it should have been documented in the reserve-mem binding.

> +    $ref: reserve-mem.yaml#
> +    description: reserved memory regions
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    memblock {
> +      compatible = "memblock-v1";
> +      n1 {
> +        compatible = "reserve-mem-v1";
> +        start = <0xc06b 0x4000000>;
> +        size = <0x04 0x00>;
> +      };
> +    };

Thanks and BR,
Ricardo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ