linux-kernel

How Linux arm64 switch between AArch32 and AArch64

点点圈 提交于 2020-12-04 05:28:18
问题 Linux supports running 32-bit application, as long as kernel enables CONFIG_COMPAT the hardware supports the AArch32 I assume that 32-bit application must run in arm AArch32 execution state and if the environment has 32-bit application and 64-bit application. 32-bit application process -> arm state is AArch32 64-bit application process and kernel -> arm state is AArch64 Is it correct? If so, how does the Linux handle the AArch32 and AArch64 switch? Does the kernel know the running process is

How Linux arm64 switch between AArch32 and AArch64

送分小仙女□ 提交于 2020-12-04 05:26:01
问题 Linux supports running 32-bit application, as long as kernel enables CONFIG_COMPAT the hardware supports the AArch32 I assume that 32-bit application must run in arm AArch32 execution state and if the environment has 32-bit application and 64-bit application. 32-bit application process -> arm state is AArch32 64-bit application process and kernel -> arm state is AArch64 Is it correct? If so, how does the Linux handle the AArch32 and AArch64 switch? Does the kernel know the running process is

Where is eax in the pt_regs struct? Only ax is present

余生颓废 提交于 2020-12-01 10:20:08
问题 I am trying to use the pt_regs struct to get and set registers such as eax , but compilation errors tell me that pt_regs has no such member eax . However, I am able to get the ax register. Can anybody tell me what is happening? I am using 32-bit Ubuntu linux with the 3.0.0 kernel. Thank you again. 回答1: Take a look at the definition of struct pt_regs in arch/x86/include/asm/ptrace.h. Notice #ifndef __KERNEL__ stuff there, it means that the definition of that structure is different for kernel

Is there any difference between socketpair and pair of unnamed pipes?

删除回忆录丶 提交于 2020-11-30 02:57:31
问题 I would like to know not only user-side differences, but differences / common parts in Linux kernel implementation as well. 回答1: pipes are unidirectional, so you need two pipes to have bidirectional communication, whereas a socketpair is bidirectional. pipes are always stream-oriented, whereas socketpairs can be datagram-oriented. socketpairs are normal AF_UNIX sockets, which means that ancillary messages like SCM_RIGHTS and SCM_CREDENTIALS can be passed over them. In the kernel, pipes are

Is there any difference between socketpair and pair of unnamed pipes?

陌路散爱 提交于 2020-11-30 02:56:21
问题 I would like to know not only user-side differences, but differences / common parts in Linux kernel implementation as well. 回答1: pipes are unidirectional, so you need two pipes to have bidirectional communication, whereas a socketpair is bidirectional. pipes are always stream-oriented, whereas socketpairs can be datagram-oriented. socketpairs are normal AF_UNIX sockets, which means that ancillary messages like SCM_RIGHTS and SCM_CREDENTIALS can be passed over them. In the kernel, pipes are

Is there any difference between socketpair and pair of unnamed pipes?

这一生的挚爱 提交于 2020-11-30 02:54:46
问题 I would like to know not only user-side differences, but differences / common parts in Linux kernel implementation as well. 回答1: pipes are unidirectional, so you need two pipes to have bidirectional communication, whereas a socketpair is bidirectional. pipes are always stream-oriented, whereas socketpairs can be datagram-oriented. socketpairs are normal AF_UNIX sockets, which means that ancillary messages like SCM_RIGHTS and SCM_CREDENTIALS can be passed over them. In the kernel, pipes are