Cannot get I/O access to '/dev/mem'
Maintainer thường phản hồi trong vòng 1 ngày
@demoray đang làm issue này rồi.
Từ ngày 12/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Hello. My attempt to get I/O access to '/dev/mem' fails. May the details provided be somehow useful to investigate what prevents it.
$ hostnamectl | sed -n '8p;12p' | awk '$1=$1'
Operating System: Fedora Linux 44 (Workstation Edition)
Kernel: Linux 7.1.7-200.fc44.x86_64
Parameters the kernel was compiled with that are relevant for this report:
$ grep _STRICT_DEVMEM /boot/config-$(uname -r)
CONFIG_STRICT_DEVMEM=y
CONFIG_IO_STRICT_DEVMEM=y
I learned that the main kernel configuration option for controlling I/O access to '/dev/mem' is 'CONFIG_STRICT_DEVMEM'. Lacking knowledge to recompile the kernel, thus my alternative was to add the parameter/key 'strict-devmem=0' to my kernel cmdline:
$ cat /etc/kernel/cmdline
root=UUID=(...) ro rootflags=subvol=root rhgb quiet strict-devmem=0
Test
$ sudo dd if=/dev/mem of=/dev/null
dd: error reading '/dev/mem': Operation not permitted
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0943418 s, 11.1 MB/s
This program
$ file -b avml
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=669c613fbe2bc57310816a6071922ee2203ed86f, stripped
$ stat avml | sed -n '3,4p'
Device: 0,53 Inode: 831989 Links: 1
Access: (0755/-rwxr-xr-x) Uid: (1000/...) Gid: (1000/...)
No permission correlated
$ ./avml acquire --source /dev/mem mem_dump
Error: error: unable to parse /proc/iomem
caused by:
0: need CAP_SYS_ADMIN to read /proc/iomem
Expected!
$ sudo !!
sudo ./avml acquire --source /dev/mem mem_dump
Error: error: unable to read memory
caused by:
0: unable to create memory snapshot from source: /dev/mem
1: unable to create memory snapshot
2: write block failed: 1048576..2483167231
3: io error: unable to read memory page
4: Operation not permitted (os error 1)
I cannot say whether the layout that is presented in 'cat /proc/iomem' represents what is readable within that limit. That seems to me out of topic though.
So, I thought I could expect that the operation would be at last permitted. Since it is not, it's still limited to the first megabyte, which is as expected on a recent Linux kernel. May I ask, do you happen to have a suggestion on this matter?
- Ngôn ngữ chính
- Rust
- Star
- 1.1k
- Fork
- 96
- Merge trung bình
- 2 ngày 28 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/avml
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
microsoft/avml#607 · 3 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
microsoft/avml#9 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/avml
Issue tương tự
-
`mise doctor` Shows Not Installed Lazy Tools as ProblemsCó thể đã có người làm @jdx đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
nn::linear: weight initialization depends on `bias` because the bias is created before the weightCó thể đã có người làm @monfortema đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
LaurentMazare/tch-rs#1067 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
astral-sh/astral-codec#234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100