mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Rule 11.1 states as following: "Conversions shall not be performed between a pointer to a function and any other type." This deviation from Rule 11.1 relies on both ABI definitions and compiler implementations supported by Xen. The System V x86_64 ABI and the AArch64 ELF ABI define consistent and compatible representations (i.e., having the same size and memory layout) for (void *), unsigned long, and function pointers, enabling safe conversions between these types without data loss or corruption. Additionally, GCC and Clang, faithfully implement the ABI specifications, ensuring that the generated machine code conforms to these guarantees. Developers must note that this behavior is not universal and depends on platform-specific ABIs and compiler implementations. Configure Eclair to avoid reporting violations for conversions from unsigned long or (void *) to a function pointer. Add a compile-time assertion into the file 'xen/common/version.c' to confirm this conversion compatibility across X86 and ARM platforms (assuming this file is common for them). References: - System V x86_64 ABI: https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build - AArch64 ELF ABI: https://github.com/ARM-software/abi-aa/releases - GCC: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html - Clang: https://clang.llvm.org/docs/CrossCompilation.html Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com> Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com> [stefano: remove special powerpc check] Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
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.