Files
xen/docs
Michal Orzel 81e823f1e9 xen/arm: validate max grant frames against the grant table region
Per the binding (docs/misc/arm/device-tree/guest.txt), region 0 for
mapping grant table is large enough to map the whole grant table. Xen
never checks that this holds:
 - enhanced dom0less domUs are given GUEST_GNTTAB_SIZE (4096 frames),
   while their limit comes from the max_grant_frames DT property or, if
   absent, from the gnttab_max_frames command line option or default,
   neither of which is bounded by the region size,
 - a dom0less hardware domain is given gnttab_dom0_frames() frames,
   while the max_grant_frames DT property can raise its limit above
   that.

A guest growing its grant table past the end of the region ends up
mapping grant frames over whatever follows it in its address space,
e.g. the magic pages at GUEST_MAGIC_BASE for a domU.

Validate that the configured max frames can actually fit in the region
Xen exposes in make_hypervisor_node().

Fix find_gnttab_region() logic of setting the gnttab_size for hardware
domain to allow the max frames up until the size of the text section.
Otherwise, the DT setting would only allow to shrink it from the
default.

Fixes: 79eb2871f2 ("xen/arm: configure dom0less domain for enabling xenstore after boot")
Fixes: df68a4cb7e ("xen/arm: Add capabilities to dom0less")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2026-10-22 07:47:28 +02:00
..
2026-06-29 18:06:24 +01:00
2018-11-14 19:25:11 +00:00

Sphinx documentation:

All source rendered by Sphinx is licensed under CC-BY-4.0.

You are free to:
  Share:
    Copy and redistribute the material in any medium or format.
  Adapt:
    Remix, transform, and build upon the material for any purpose, even
    commercially.

Under the following terms:
  Attribution:
    You must give appropriate credit, provide a link to the license, and
    indicate if changes were made. You may do so in any reasonable manner, but
    not in any way that suggests the licensor endorses you or your use.
  No additional restrictions:
    You may not apply legal terms or technological measures that legally
    restrict others from doing anything the license permits.

See https://creativecommons.org/licenses/by/4.0/ for full details.

This includes:
  * All ReStructured Text files:          docs/*/*.rst
  * The Sphinx configuration file:        docs/conf.py
  * Content in Sphinx-exclusive subdirs:  docs/*-guide/*


Other documentation:

There are a variety of text documents in various formats.  These, given no
explicit license guidance, fall under Xen's default GPL-2.0 license.