mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 03:39:52 +00:00
Merge upstream main into task/329-gate-a1
Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
This commit is contained in:
commit
66f7127553
35 files changed
+2452
-197
No files matched your search
@@ -95,6 +95,28 @@ access. An image or layout that covers that page is refused, and a guest
|
||||
allocation there fails. The import trampolines above that page are intercepted
|
||||
in the same way and are not reserved.
|
||||
|
||||
Loading an image maps its headers as well as its sections. The first
|
||||
`SizeOfHeaders` bytes of the file are mapped read-only at the image base, in
|
||||
whole 4 KiB pages. Everything in those pages past `SizeOfHeaders` is zero, even
|
||||
where the file holds more bytes there. A guest can read its own DOS header,
|
||||
section table and data directories; it cannot write or execute them.
|
||||
|
||||
When startup loads an image away from its preferred base, it writes the load
|
||||
base into the mapped optional header's `ImageBase` field after the relocations
|
||||
have been applied, so an entry aimed at that field cannot leave any other value
|
||||
there. This is Xenora's policy: the PE specification defines `ImageBase` as the
|
||||
preferred base, and the behaviour has not been compared with Windows.
|
||||
|
||||
The load is refused with `PeError::InvalidHeaderSize` when `SizeOfHeaders` is
|
||||
zero, ends before the section table does, runs past the end of the file, or its
|
||||
pages would reach into a section, and when the bytes given to the loader are not
|
||||
the PE32+ headers that were parsed. The page rule is stricter than the loader
|
||||
was before: an image whose section alignment is below 4 KiB, with a section
|
||||
that starts inside the header page, used to load and is now refused. The header
|
||||
pages count toward the 256 MiB mapping budget of one image, which is checked
|
||||
before anything is mapped. `ParsedPe::parse` does not make these checks, so
|
||||
static inspection of a file is unchanged.
|
||||
|
||||
`xenora probe --mode static` inventories ordinary and delay-loaded PE imports
|
||||
without guest execution. Without `--report` it writes to `diagnostics/probe`,
|
||||
where `xenora imports sync` also looks. `missing_imports.csv` lists unresolved ordinary keys
|
||||
@@ -128,6 +150,18 @@ attribute bit, is truncated, or uses the earlier virtual-address descriptor form
|
||||
is reported in `delay_import_error` and in the Markdown report, together with
|
||||
the entries read before it.
|
||||
|
||||
`xenora_import_gen::demangle` decodes Microsoft Visual C++ decorated names
|
||||
for diagnostics, in the style of Microsoft's `undname`. It covers functions,
|
||||
data, member access and storage, `this` qualifiers, calling conventions,
|
||||
constructors, destructors, common operators, `vftable` names, classes,
|
||||
structs, unions, enums, pointers, references, primitive types, templates
|
||||
with type and integer arguments, and name and type back-references. Function
|
||||
pointer types, RTTI descriptors, nested function scopes and other constructs
|
||||
return `None`, so callers show the decorated name instead of a guess. The
|
||||
generator manifest's list of imports that need manual engineering shows the
|
||||
undecorated form beside each decorated C++ import. Tests check names mangled
|
||||
by clang for `x86_64-pc-windows-msvc` against their source declarations.
|
||||
|
||||
The synthetic process registry supports the current-process pseudo handle and
|
||||
its process ID. The priority boost setter and getter record and query a guest
|
||||
policy. They are partial until a guest scheduler applies the policy. The process
|
||||
|
||||
Reference in new issue
Block a user