Re: Kernelnewbies Digest, Vol 22, Issue 1

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

 



hello everybody,

I am new to kernel programming.
Can anyone tell me how to start it.

kishore kumar

On Sun, Sep 2, 2012 at 9:30 PM, <kernelnewbies-request@xxxxxxxxxxxxxxxxx> wrote:
Send Kernelnewbies mailing list submissions to
        kernelnewbies@xxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
or, via email, send a message with subject or body 'help' to
        kernelnewbies-request@xxxxxxxxxxxxxxxxx

You can reach the person managing the list at
        kernelnewbies-owner@xxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Kernelnewbies digest..."


Today's Topics:

   1. Re: map bss to addr zero (Ritesh Harjani)
   2. Re: map bss to addr zero (Mulyadi Santosa)
   3. Re: Kernel booting problem. (Jim Cromie)


----------------------------------------------------------------------

Message: 1
Date: Sun, 2 Sep 2012 00:53:17 +0530
From: Ritesh Harjani <ritesh.harjani@xxxxxxxxx>
Subject: Re: map bss to addr zero
To: Srinivas Ramanan <srinivas.ramanan@xxxxxxxxx>,
        mulyadi.santosa@xxxxxxxxx
Cc: kernelnewbies@xxxxxxxxxxxxxxxxx
Message-ID:
        <CAD15agbM8jO+-KmrRByDpd0NRN3k_bcpEQi9p8W721c8_9Pefg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

On Mon, Aug 27, 2012 at 2:01 AM, 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
>


Hi,

The bss section typically includes all uninitialized variables declared
with the static keyword.
The zero page which  is a copy-on-write page that reads as zero is used to
map the BSS segment. Any process referencing the zero page sees the page
filled with zeos and if it tries to writes to the page, it ends up
modifying a private copy. (LDD ch15. page 429)

Mulyadi,

Why it will generate a page fault later when process will tries to
reference it, while it already has mapped with the zero page?


Sorry if i am wrong anywhere.
Ritesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120902/b18f7568/attachment-0001.html

------------------------------

Message: 2
Date: Sun, 2 Sep 2012 12:46:29 +0700
From: Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>
Subject: Re: map bss to addr zero
To: Ritesh Harjani <ritesh.harjani@xxxxxxxxx>
Cc: Srinivas Ramanan <srinivas.ramanan@xxxxxxxxx>,
        kernelnewbies@xxxxxxxxxxxxxxxxx
Message-ID:
        <CAGdaadYXCTYad0aRKME1eyQ-rt1gh=vN=Siyz2HtQzONpCBgVw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1

Hi... :)

On Sun, Sep 2, 2012 at 2:23 AM, Ritesh Harjani <ritesh.harjani@xxxxxxxxx> wrote:
> Mulyadi,
>
> Why it will generate a page fault later when process will tries to reference
> it, while it already has mapped with the zero page?
>
>

Hopefully I interpret it correctly that this question is for me :)

Sorry, maybe I am not clear, by reference, I meant "updating " or
"writing" new value.

Since this zero page is mapped as read only, when writing to this zero
page, page fault is triggered. Then page fault handler conclude that
this is actually a write toward zero page from valid address, so it
will allocate page(s).


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



------------------------------

Message: 3
Date: Sun, 2 Sep 2012 04:23:02 -0600
From: Jim Cromie <jim.cromie@xxxxxxxxx>
Subject: Re: Kernel booting problem.
To: Sri Ram Vemulpali <sri.ram.gmu06@xxxxxxxxx>
Cc: Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>, Jonathan Neusch?fer
        <j.neuschaefer@xxxxxxx>,        kernelnewbies@xxxxxxxxxxxxxxxxx
Message-ID:
        <CAJfuBxytc+u1W99QKA7HCR_Su1NRx=1Qhn5MdLTKT_DYGpLuoQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Aug 29, 2012 at 10:06 PM, Sri Ram Vemulpali
<sri.ram.gmu06@xxxxxxxxx> wrote:
> Thanks for the replies again.
>
> This time the problem is in tty specification.
> Kernel supports console=tty0 (virtual terminal), where as my inittab has
> entry ::sysinit:/sbin/getty -L ttyS0 vt100. I have to change the ttyS0 to tty0.
>
> Once I changed this, I got login prompt.
>
> But I do not understand how we tell kernel to use ttyS0 over tty0.
> Because in kernel config I selected was ttyS0 but it is using tty0.

try console on boot-line

root@voyage:~# more /proc/cmdline
root=LABEL=ROOT_FS  console=ttyS0,115200n8  rootdelay=120 reboot=bios loglevel=8
 dynamic_debug.verbose=1

> Weird?
>
> Thanks,
> Sri.
>



------------------------------

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


End of Kernelnewbies Digest, Vol 22, Issue 1
********************************************

_______________________________________________
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