All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] Need to get some very basic things sorted out
@ 2005-09-28 15:14 Dinolinux
  2005-09-28 17:46 ` lounprime
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dinolinux @ 2005-09-28 15:14 UTC (permalink / raw)
  To: kernel-janitors

Hey!

If you noted my last message and thougt that it was very noob, don't
count on any more advancement here. ;-)

The thing is that I need help to get started. I'm in the process of
learning C and I need to know how the kernel patching and distribution
works.

1 - I've looked into the kernel-janitor TODO list and I don't exactly
understand lines like this:
/Audit return codes (and handle failure correctly) for: /(What does
this mean???)/
- request_region() /(This one was tricky)/
/Where do I have to look for the code? Do I have to go to the _entire_
kernel tree?

2 - How do I start writing patches? This doesn't tell me much:
/Before attacking any of these, we suggest sending a few patches in
advance to see if you are doing something wrong, or if someone else
is already doing same work.
Read related threads in the mailing list archive.
/Which patches? Where do I find a TODO list of patches that need to be
done? The lkml mailing list don't say me much.

I hope this wasn't _too_ noob :-)

    Dinolinux


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [KJ] Need to get some very basic things sorted out
  2005-09-28 15:14 [KJ] Need to get some very basic things sorted out Dinolinux
@ 2005-09-28 17:46 ` lounprime
  2005-09-28 17:56 ` Alexey Dobriyan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: lounprime @ 2005-09-28 17:46 UTC (permalink / raw)
  To: kernel-janitors


[-- Attachment #1.1: Type: text/plain, Size: 1673 bytes --]

Gentle People,
 
I'm newly registered member to the list and wanted to ask a question,
if someone has time.
 
Is anyone aware of any outstanding bug reports regarding Slab Corruption
in slab.c?
 
My most sincere thanks for your time,
 
LouNprime@aol.com
Lou Bangert
 
/Lou:-) 
 
-----Original Message-----
From: Dinolinux <slackfan@users.sourceforge.net>
To: kernel-janitors@lists.osdl.org
Sent: Wed, 28 Sep 2005 17:14:22 +0200
Subject: [KJ] Need to get some very basic things sorted out


Hey!

If you noted my last message and thougt that it was very noob, don't
count on any more advancement here. ;-)

The thing is that I need help to get started. I'm in the process of
learning C and I need to know how the kernel patching and distribution
works.

1 - I've looked into the kernel-janitor TODO list and I don't exactly
understand lines like this:
/Audit return codes (and handle failure correctly) for: /(What does
this mean???)/
- request_region() /(This one was tricky)/
/Where do I have to look for the code? Do I have to go to the _entire_
kernel tree?

2 - How do I start writing patches? This doesn't tell me much:
/Before attacking any of these, we suggest sending a few patches in
advance to see if you are doing something wrong, or if someone else
is already doing same work.
Read related threads in the mailing list archive.
/Which patches? Where do I find a TODO list of patches that need to be
done? The lkml mailing list don't say me much.

I hope this wasn't _too_ noob :-)

    Dinolinux


_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

[-- Attachment #1.2: Type: text/html, Size: 3113 bytes --]

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [KJ] Need to get some very basic things sorted out
  2005-09-28 15:14 [KJ] Need to get some very basic things sorted out Dinolinux
  2005-09-28 17:46 ` lounprime
@ 2005-09-28 17:56 ` Alexey Dobriyan
  2005-09-28 17:56 ` Randy.Dunlap
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Alexey Dobriyan @ 2005-09-28 17:56 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

On Wed, Sep 28, 2005 at 05:14:22PM +0200, Dinolinux wrote:
> The thing is that I need help to get started. I'm in the process of
> learning C and I need to know how the kernel patching and distribution
> works.
> 
> 1 - I've looked into the kernel-janitor TODO list and I don't exactly
> understand lines like this:
> /Audit return codes (and handle failure correctly) for: /(What does
> this mean???)/

Consider example:

	buf = kmalloc(256, GFP_KERNEL);
	buf[0] = 'L';

See the prolem? kmalloc() can return NULL, which means "Not enough
memory". This buggy code doesn't check for NULL.

	buf = kmalloc(256, GFP_KERNEL);
	if (!buf)
		return -ENOMEM;
	buf[0] = 'L';

This sane code checks return value of kmalloc() and propagate proper
error. Note, note, note: undoing all previous allocations if one fails
is mandatory. See code around existing kmalloc()s to see how it's
usually done.

> - request_region() /(This one was tricky)/
> /Where do I have to look for the code?

grep for request_region. -C option of grep is very handy in such cases.

> Do I have to go to the _entire_ kernel tree?

It would be nice if each and every request_region() call is checked for
return value. Much patience is required for this.

> 2 - How do I start writing patches?

less Documentation/SubmittingPatches	(section 1 and the rest of
course)

> This doesn't tell me much:
> /Before attacking any of these, we suggest sending a few patches in
> advance to see if you are doing something wrong, or if someone else
> is already doing same work.
> Read related threads in the mailing list archive.
> /Which patches? Where do I find a TODO list of patches that need to be
> done?

You're reading one of them -- kernel-janitors TODO list. Things to be
done.


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [KJ] Need to get some very basic things sorted out
  2005-09-28 15:14 [KJ] Need to get some very basic things sorted out Dinolinux
  2005-09-28 17:46 ` lounprime
  2005-09-28 17:56 ` Alexey Dobriyan
@ 2005-09-28 17:56 ` Randy.Dunlap
  2005-09-28 18:20 ` Ricardo Nabinger Sanchez
  2005-09-28 18:42 ` Randy.Dunlap
  4 siblings, 0 replies; 6+ messages in thread
From: Randy.Dunlap @ 2005-09-28 17:56 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1525 bytes --]

On Wed, 28 Sep 2005, Alexey Dobriyan wrote:

> On Wed, Sep 28, 2005 at 05:14:22PM +0200, Dinolinux wrote:
> > The thing is that I need help to get started. I'm in the process of
> > learning C and I need to know how the kernel patching and distribution
> > works.
> >
> > 1 - I've looked into the kernel-janitor TODO list and I don't exactly
> > understand lines like this:
> > /Audit return codes (and handle failure correctly) for: /(What does
> > this mean???)/
>
> Consider example:
>
> 	buf = kmalloc(256, GFP_KERNEL);
> 	buf[0] = 'L';
>
> See the prolem? kmalloc() can return NULL, which means "Not enough
> memory". This buggy code doesn't check for NULL.
>
> 	buf = kmalloc(256, GFP_KERNEL);
> 	if (!buf)
> 		return -ENOMEM;
> 	buf[0] = 'L';
>
> This sane code checks return value of kmalloc() and propagate proper
> error. Note, note, note: undoing all previous allocations if one fails
> is mandatory. See code around existing kmalloc()s to see how it's
> usually done.
>
> > - request_region() /(This one was tricky)/
> > /Where do I have to look for the code?
>
> grep for request_region. -C option of grep is very handy in such cases.
>
> > Do I have to go to the _entire_ kernel tree?
>
> It would be nice if each and every request_region() call is checked for
> return value. Much patience is required for this.


Jeff Garzik did a good piece of that work a few days ago.
His email also tells what pieces remain to be done.

See
  http://marc.theaimsgroup.com/?l=linux-kernel&m=112742405517833&w=2

-- 
~Randy

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [KJ] Need to get some very basic things sorted out
  2005-09-28 15:14 [KJ] Need to get some very basic things sorted out Dinolinux
                   ` (2 preceding siblings ...)
  2005-09-28 17:56 ` Randy.Dunlap
@ 2005-09-28 18:20 ` Ricardo Nabinger Sanchez
  2005-09-28 18:42 ` Randy.Dunlap
  4 siblings, 0 replies; 6+ messages in thread
From: Ricardo Nabinger Sanchez @ 2005-09-28 18:20 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]

Quoting  Alexey Dobriyan <adobriyan@gmail.com>
Sent on  Wed, 28 Sep 2005 21:56:14 +0400

Hello,

> 	buf = kmalloc(256, GFP_KERNEL);
> 	if (!buf)
> 		return -ENOMEM;
> 	buf[0] = 'L';

*please* correct me if I'm wrong, but I remember reading somewhere a Linus'
message stating that one should not use "if (!pointer)" for pointers when
it is intended to do "if (pointer == NULL)".  in short, what I remember is
that one should not assume that NULL == 0, thus the explicit NULL checking.

a quick search revealed these:

	http://lwn.net/Articles/93574/
	http://lwn.net/Articles/93577/

are these still valid?  (I presume yes, but...)

Regards.

-- 
Ricardo Nabinger Sanchez
GNU/Linux #140696 [http://counter.li.org]
Slackware Linux + FreeBSD

  Left to themselves, things tend to go from bad to worse.

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [KJ] Need to get some very basic things sorted out
  2005-09-28 15:14 [KJ] Need to get some very basic things sorted out Dinolinux
                   ` (3 preceding siblings ...)
  2005-09-28 18:20 ` Ricardo Nabinger Sanchez
@ 2005-09-28 18:42 ` Randy.Dunlap
  4 siblings, 0 replies; 6+ messages in thread
From: Randy.Dunlap @ 2005-09-28 18:42 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: TEXT/PLAIN, Size: 948 bytes --]

On Wed, 28 Sep 2005, Ricardo Nabinger Sanchez wrote:

> Quoting  Alexey Dobriyan <adobriyan@gmail.com>
> Sent on  Wed, 28 Sep 2005 21:56:14 +0400
>
> Hello,
>
> > 	buf = kmalloc(256, GFP_KERNEL);
> > 	if (!buf)
> > 		return -ENOMEM;
> > 	buf[0] = 'L';
>
> *please* correct me if I'm wrong, but I remember reading somewhere a Linus'
> message stating that one should not use "if (!pointer)" for pointers when
> it is intended to do "if (pointer == NULL)".  in short, what I remember is
> that one should not assume that NULL == 0, thus the explicit NULL checking.
>
> a quick search revealed these:
>
> 	http://lwn.net/Articles/93574/
> 	http://lwn.net/Articles/93577/

These say:
	don't use 0 for a (null) pointer and
	don't use NULL for an integer value.

> are these still valid?  (I presume yes, but...)

Sure, those are valid, but they aren't the same as the
first example above.  I don't see anything wrong with what
Alexey wrote.

-- 
~Randy

[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-28 18:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28 15:14 [KJ] Need to get some very basic things sorted out Dinolinux
2005-09-28 17:46 ` lounprime
2005-09-28 17:56 ` Alexey Dobriyan
2005-09-28 17:56 ` Randy.Dunlap
2005-09-28 18:20 ` Ricardo Nabinger Sanchez
2005-09-28 18:42 ` Randy.Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.