I took the following lines from understanding linux kernel book.
All Linux processes running in User Mode use the same pair of segments to address instructions and data. These segments are called user code segment and user data segment , respectively. Similarly, all Linux processes running in Kernel Mode use the same pair of segments to address instructions and data: they are called kernel code segment and kernel data segment , respectively.
linear addresses associated with such segments all start at 0 and reach the addressing limit of 232 -1. This means that all processes, either in User Mode or in Kernel Mode, may use the same logical addresses.
Another important consequence of having all segments start at 0x00000000 is that in Linux, logical addresses coincide with linear addresses; that is, the value of the Offset field of a logical address always coincides with the value of the corresponding linear address.
On Mon, Jun 23, 2008 at 8:49 AM, Steven Zhou <lullaby2005@xxxxxxxxx> wrote:
Thanks for pay attenion to my question.
I know virtual address includes logical address and linear address, which one does the "0xbfcce590" belongs to?Best Regards.
On Mon, Jun 23, 2008 at 11:12 AM, Mark Brown <markb@xxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Steven,
The address 0xbfcce590 is a virtual address (in the stack) which is assigned to you by the loader.
-- Mark
On Jun 22, 2008, at 10:43 PM, Steven Zhou wrote:
Hi guys,
I'm troubling with a problem about the logical address, linear address and the physical address in programs.
For example, there's a program below:
#include <stdio.h>
int main ()
{
int a;
printf("%x\n", &a);
return 0;
}
the result is :
bfcce590
I konw the address "bfcce590" is in the user mode stack space of the process, but I'm not sure that the address is logical address, linear address, or physical address?
(I konw the logical is identiy with linear address in x86 platform, but I want to known deeply)
Can you kindly help me unserstand the detail of this problem?
thx:)
--
Best Regards.
--