用户是否可以在内核模式下运行自己的程序?用户怎么能做到这一点?他们必须绕过系统保护机制中的哪些弱点?
我认为用户程序可以在中断向量中将模式位从用户模式切换到内核模式,然后它可以执行它想要的任何中断处理程序。我在正确的轨道上吗?
我想创建一个 rootfs 以与 UML 内核一起使用并且能够使用互联网。我正在使用febootstrap
包:bash
, coreutils
, net-tools
, iputils
。使用后febootstrap-supermin-helper
我得到了我的rootfs
但是当尝试用 UML 启动它时我得到这些错误:
[ 4.340000] systemd[1]: systemd-logind.service holdoff time over, scheduling restart.
[ 4.340000] systemd[1]: dbus.service start request repeated too quickly, refusing to start.
[ 4.340000] systemd-logind[638]: Failed to get system D-Bus connection: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or …
Run Code Online (Sandbox Code Playgroud) 我已经查看了 U&L 的问题和答案,但我仍然无法从用户那里更改我的默认组。
[red@ws-red-l ~]$ whoami
red
[red@ws-red-l ~]$ groups
yellow green
[red@ws-red-l ~]$ sudo usermod -g green red
usermod: no changes
[red@ws-red-l ~]$ sudo usermod -G green red
[red@ws-red-l ~]$ groups
yellow green
[red@ws-red-l ~]$ touch file
[red@ws-red-l ~]$ ls -l file
-rw-r--r-- 1 red yellow 0 Feb 18 13:51 file
Run Code Online (Sandbox Code Playgroud)
我更喜欢如果red
不属于组,yellow
所以当我做一个touch file
文件的组将是green
. 我在这里做错了什么?
我按照这里的步骤在用户模式下成功编译了内核:https : //btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDB
但是当我./linux
以各种方式开始时,它总是给我一个非常相似的错误:
pc@linux-94q0:~/linux-4.11-rc4> ./linux root=/mnt
Core dump limits :
soft - 0
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...OK
Adding 33251328 bytes to physical memory to account for exec-shield gap
Linux version 4.11.0-rc4 (pc@linux-94q0) (gcc version 4.8.5 (SUSE Linux) ) …
Run Code Online (Sandbox Code Playgroud)