Red Bear OS — microkernel OS in Rust, based on Redox
Derivative of Redox OS (https://www.redox-os.org) adding: - AMD GPU driver (amdgpu) via LinuxKPI compat layer - ext4 filesystem support (ext4d scheme daemon) - ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG) - Custom branding (hostname, os-release, boot identity) Build system is full upstream Redox with RBOS overlay in local/. Patches for kernel, base, and relibc are symlinked from local/patches/ and protected from make clean/distclean. Custom recipes live in local/recipes/ with symlinks into the recipes/ search path. Build: make all CONFIG_NAME=redbear-full Sync: ./local/scripts/sync-upstream.sh
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
diff --git a/drivers/acpid/src/acpi/dmar/mod.rs b/drivers/acpid/src/acpi/dmar/mod.rs
|
||||
--- a/drivers/acpid/src/acpi/dmar/mod.rs
|
||||
+++ b/drivers/acpid/src/acpi/dmar/mod.rs
|
||||
@@ -475,8 +475,12 @@ impl<'sdt> Iterator for DmarRawIter<'sdt> {
|
||||
.expect("expected a 2-byte slice to be convertible to [u8; 2]");
|
||||
|
||||
- let ty = u16::from_ne_bytes(type_bytes);
|
||||
- let len = u16::from_ne_bytes(len_bytes);
|
||||
+ let len = u16::from_ne_bytes(len_bytes) as usize;
|
||||
+
|
||||
+ if len < 4 {
|
||||
+ return None;
|
||||
+ }
|
||||
+
|
||||
+ let ty = u16::from_ne_bytes(type_bytes);
|
||||
|
||||
- let len = usize::try_from(len).expect("expected u16 to fit within usize");
|
||||
|
||||
if len > remainder.len() {
|
||||
Reference in New Issue
Block a user