File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636// Directmap leaks cannot reveal the KASLR slide.
3737#define PAGE_OFFSET_RANDOMIZED 0
3838
39+ // The compile-time PAGE_OFFSET is the architectural guaranteed runtime
40+ // value: the kernel writes _ULCAST_(0x9) to the DMW1 CSR unconditionally
41+ // at boot, so Q_PAGE_OFFSET can be pinned without evidence — same
42+ // "architectural certainty" shape as MIPS CKSEG0 and ppc64 book3s.
43+ // Unlocks text_base_coupling_synth (it needs Q_PAGE_OFFSET pinned to
44+ // propagate Q_VIRT_TEXT_BASE ↔ Q_PHYS_TEXT_BASE).
45+ #define PAGE_OFFSET_INVARIANT 1
46+
3947// XKPRANGE starts at 0x8000000000000000 (hardware direct map windows DMW0/1/2).
4048// XKVRANGE starts at 0xc000000000000000 (vmalloc, modules, vmemmap).
4149// XSPRANGE (0x4000000000000000) is hardware-accessible at PLV0 but unused by
Original file line number Diff line number Diff line change 2323
2424// PAGE_OFFSET and PHYS_OFFSET are compile-time on ppc32 (BookE
2525// CONFIG_RELOCATABLE is out of KASLD scope). Mainline ppc32 has no KASLR —
26- // text sits at a fixed offset within the linear map.
26+ // text sits at a fixed offset within the linear map. The compile-time
27+ // constant is the architectural guaranteed runtime value within KASLD's
28+ // modelled scope, so Q_PAGE_OFFSET is pinnable without evidence (same
29+ // shape as mips32/64 and ppc64). Unlocks text_base_coupling_synth.
2730// https://elixir.bootlin.com/linux/v6.1.1/source/arch/powerpc/include/asm/page.h#L240
2831#define DIRECTMAP_STATIC 1
2932#define TEXT_TRACKS_DIRECTMAP 1
33+ #define PAGE_OFFSET_INVARIANT 1
3034
3135#define KERNEL_VIRT_VAS_START PAGE_OFFSET
3236#define KERNEL_VIRT_VAS_END 0xfffffffful
Original file line number Diff line number Diff line change 2222#define PHYS_OFFSET 0ul
2323// PAGE_OFFSET and PHYS_OFFSET are compile-time on riscv32; the directmap
2424// projection is sound. No mainline KASLR — text sits at a fixed offset
25- // within the linear map.
25+ // within the linear map. The compile-time constant is the architectural
26+ // guaranteed runtime value (no VMSPLIT/SATP/paging-mode dependency on
27+ // riscv32), so Q_PAGE_OFFSET is pinnable without evidence — same shape
28+ // as mips32/64 and ppc32/64. Unlocks text_base_coupling_synth.
2629#define DIRECTMAP_STATIC 1
2730#define TEXT_TRACKS_DIRECTMAP 1
31+ #define PAGE_OFFSET_INVARIANT 1
2832
2933#define KERNEL_VIRT_VAS_START PAGE_OFFSET
3034#define KERNEL_VIRT_VAS_END 0xfffffffful
You can’t perform that action at this time.
0 commit comments