refactor: move to rust 1.84.0-nightly + implement disable_aslr
This commit is contained in:
@@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user