refactor: move to rust 1.84.0-nightly + implement disable_aslr

This commit is contained in:
2024-10-31 22:53:46 +02:00
parent 1a975af1e9
commit 3639d64649
45 changed files with 721 additions and 395 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
#![no_std]
#![allow(clippy::new_without_default)]
#![feature(strict_provenance, asm_const, naked_functions, trait_upcasting)]
#![feature(naked_functions, trait_upcasting)]
extern crate alloc;
@@ -69,13 +69,13 @@ pub static CPU_COUNT: AtomicUsize = AtomicUsize::new(1);
#[naked]
extern "C" fn idle_task(_: usize) -> ! {
unsafe {
core::arch::asm!(
core::arch::naked_asm!(
r#"
1:
nop
jmp 1b
"#,
options(noreturn, att_syntax)
1:
nop
jmp 1b
"#,
options(att_syntax)
);
}
}
+1 -1
View File
@@ -384,7 +384,7 @@ pub unsafe fn init_fixed_tables() {
(ram_mapping_l1_phys as u64) | (PageAttributes::WRITABLE | PageAttributes::PRESENT).bits();
// TODO ENABLE EFER.NXE
let cr3 = &KERNEL_TABLES.l0 as *const _ as usize - KERNEL_VIRT_OFFSET;
let cr3 = &raw const KERNEL_TABLES.l0 as usize - KERNEL_VIRT_OFFSET;
CR3.set_address(cr3);
}