
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A Rust library providing extended AArch64 CPU utilities and cache management operations.
This library extends the functionality of the aarch64-cpu
crate by providing additional utilities for:
aarch64-cpu
registers#![no_std]
compatible for embedded and bare-metal environmentsAdd this to your Cargo.toml
:
[dependencies]
aarch64-cpu-ext = "0.1.0"
use aarch64_cpu_ext::cache::{icache_flush_all, cache_line_size, dcache_range, CacheOp};
// Flush instruction cache
icache_flush_all();
// Get cache line size
let line_size = cache_line_size();
// Perform cache operations on memory ranges
let buffer = &mut [0u8; 4096];
dcache_range(CacheOp::Clean, buffer.as_ptr() as usize, buffer.len());
dcache_range(CacheOp::Invalidate, buffer.as_ptr() as usize, buffer.len());
dcache_range(CacheOp::CleanAndInvalidate, buffer.as_ptr() as usize, buffer.len());
use aarch64_cpu_ext::registers::*;
// Access system registers (re-exported from aarch64-cpu)
let current_el = CurrentEL.get();
use aarch64_cpu_ext::structures::tte::*;
// Create a 4KB granule, 48-bit address table entry
let table_addr = 0x10_0000; // Must be aligned to granule size
let table_tte = TTE4K48::table(table_addr, 1); // attr_index = 1
// Create a block entry with detailed configuration
let block_addr = 0x20_0000;
let config = BlockConfig {
attr_index: 0,
access_permissions: access_permissions::RW_EL1,
shareability: Shareability::InnerShareable,
executable: false,
privileged_executable: false,
contiguous: false,
not_global: false,
};
let block_tte = TTE4K48::new_block(block_addr, config);
// Different granule sizes and address widths
let tte_16k_48 = TTE16K48::table(0x4000, 0); // 16KB granule, 48-bit
let tte_64k_52 = TTE64K52::table(0x10000, 2); // 64KB granule, 52-bit
// Address alignment utilities
let aligned_addr = TTE4K48::align_up(0x12345);
let is_aligned = TTE64K48::is_aligned(0x10000);
// Virtual address index calculation for page table walks
let va = 0x1234_5678_9ABC_DEF0;
let level0_index = TTE4K48::calculate_index(va, 0);
Granule | Address Width | Type Alias |
---|---|---|
4KB | 48-bit | TTE4K48 |
4KB | 52-bit | TTE4K52 |
16KB | 48-bit | TTE16K48 |
16KB | 52-bit | TTE16K52 |
64KB | 48-bit | TTE64K48 |
64KB | 52-bit | TTE64K52 |
use aarch64_cpu_ext::asm::cache::{dc, ic, CVAC, IALLU};
// Direct assembly instruction wrappers
ic(IALLU); // Instruction cache invalidate all
dc(CVAC, address); // Data cache clean by virtual address
#![no_std]
)aarch64-cpu
version 10 - Provides base AArch64 CPU functionalitytock-registers
version 0.9 - Register access and manipulation utilitiesThis library is specifically designed for AArch64 (ARM64) architecture and will not compile for other targets.
Licensed under either of
at your option.
Contributions are welcome! Please ensure that any new features maintain compatibility with #![no_std]
environments and follow the existing code patterns.
FAQs
Unknown package
We found that aarch64-cpu-ext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.