Re: map bss to addr zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Srinivas Ramanan <srinivas.ramanan@xxxxxxxxx> wrote:

>Hi all,
>This is an interview question.
>"What is the implication of mapping BSS to the Virtual Memory Segment
>0?"
>
> I was not able to find the answer from web. So posting here.
>thanks,
>srinivas
>
>_______________________________________________
>Kernelnewbies mailing list
>Kernelnewbies@xxxxxxxxxxxxxxxxx
>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

As a guess,

Linux kernel developers leverage the fact that low address values are illegal, thus a pointer handling error that generates a low address value triggers a trap which allows the programmer to know he screwed up.

Using virtual memory segment zero makes those valid addresses and thus programming errors are more likely to slip through un-noticed.

HTH
Greg
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux