Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.3.4] - UNRELEASED

### Changed
- Relax MSRV for the `linux_raw` opt-in backend on ARM targets [#688]

### Added
- `unsupported` opt-in backend [#667]

[#667]: https://github.com/rust-random/getrandom/pull/667
[#688]: https://github.com/rust-random/getrandom/pull/688

## [0.3.3] - 2025-05-09

Expand Down
5 changes: 2 additions & 3 deletions src/backends/linux_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ unsafe fn getrandom_syscall(buf: *mut u8, buflen: usize, flags: u32) -> isize {
// Based on `rustix` and `linux-raw-sys` code.
cfg_if! {
if #[cfg(target_arch = "arm")] {
const __NR_getrandom: u32 = 384;
// In thumb-mode, r7 is the frame pointer and is not permitted to be used in
// an inline asm operand, so we have to use a different register and copy it
// into r7 inside the inline asm.
Expand All @@ -22,10 +21,10 @@ unsafe fn getrandom_syscall(buf: *mut u8, buflen: usize, flags: u32) -> isize {
// bother with it.
core::arch::asm!(
"mov {tmp}, r7",
"mov r7, {nr}",
// TODO(MSRV-1.82): replace with `nr = const __NR_getrandom,`
"mov r7, #384",
"svc 0",
"mov r7, {tmp}",
nr = const __NR_getrandom,
tmp = out(reg) _,
inlateout("r0") buf => r0,
in("r1") buflen,
Expand Down