Fix BSS sanity check

mark the canaries mutable so they go into data and bss and not in rodata
This commit is contained in:
Andrey Turkin
2024-07-15 04:21:36 +03:00
parent 7a9a5f024f
commit a558860e88
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -12,9 +12,9 @@ use crate::{allocator, device, dtb, init::device_tree, paging};
use log::info;
/// Test of zero values in BSS.
static BSS_TEST_ZERO: usize = 0;
static mut BSS_TEST_ZERO: usize = 0;
/// Test of non-zero values in data.
static DATA_TEST_NONZERO: usize = 0xFFFF_FFFF_FFFF_FFFF;
static mut DATA_TEST_NONZERO: usize = 0xFFFF_FFFF_FFFF_FFFF;
pub static KERNEL_BASE: AtomicUsize = AtomicUsize::new(0);
pub static KERNEL_SIZE: AtomicUsize = AtomicUsize::new(0);
+2 -2
View File
@@ -18,9 +18,9 @@ use crate::{
use log::info;
/// Test of zero values in BSS.
static BSS_TEST_ZERO: usize = 0;
static mut BSS_TEST_ZERO: usize = 0;
/// Test of non-zero values in data.
static DATA_TEST_NONZERO: usize = usize::max_value();
static mut DATA_TEST_NONZERO: usize = usize::max_value();
pub static KERNEL_BASE: AtomicUsize = AtomicUsize::new(0);
pub static KERNEL_SIZE: AtomicUsize = AtomicUsize::new(0);
+2 -2
View File
@@ -20,9 +20,9 @@ use crate::{
};
/// Test of zero values in BSS.
static BSS_TEST_ZERO: usize = 0;
static mut BSS_TEST_ZERO: usize = 0;
/// Test of non-zero values in data.
static DATA_TEST_NONZERO: usize = usize::max_value();
static mut DATA_TEST_NONZERO: usize = usize::max_value();
pub static KERNEL_BASE: AtomicUsize = AtomicUsize::new(0);
pub static KERNEL_SIZE: AtomicUsize = AtomicUsize::new(0);