Skip to contentSkip to conversation

Tips for a Newcomer

DISCUSSION Logan Blyth 3 participants 5 messages Jun 30, 2013 – Jul 25, 2013 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hello list,

I am looking for some tips on starting as a kernel janitor, and I was hoping to find out the general work flow that people use. From what I can tell, we search through the kernel-next git repo, then either by grep, ctags, or some other method? We are looking for things in the KernelJanitors/Todo, possibly stuff turned up by sparse? Maybe a different static analyser like from clang?

From there we make sure the patch applys cleanly and mail the
maintainer, copying the LKML and Kernel-Janitors?

Are there any recommended tutorials / Articles that google doesn't turn up?

#1 lore raw
Quoted 6 lines · Logan Blyth

Hello list,

I am looking for some tips on starting as a kernel janitor, and I was hoping to find out the general work flow that people use. From what I can tell, we search through the kernel-next git repo, then either by grep, ctags, or some other method?

I use cscope with vim. There is a "make cscope" build target.

Quoted 3 lines

We are looking for
things in the KernelJanitors/Todo, possibly stuff turned up by sparse? Maybe a different static analyser like from clang?

Yeah. That's a lot of it. I don't think anyone is doing clang so you could find some unique bugs that way. Do you know how to get clang working for the kernel?

Quoted 3 lines

From there we make sure the patch applys cleanly and mail the maintainer, copying the LKML and Kernel-Janitors?

Yep. Use scripts/get_maintainer.pl. Send your first patch to kernel janitors without CC'd the maintainer so we can check it for you.

regards,
dan carpenter

#2 lore raw
In reply to Logan Blyth
Quoted 7 lines · Dan Carpenter
Quoted 6 lines · Logan Blyth

Hello list,

I am looking for some tips on starting as a kernel janitor, and I was hoping to find out the general work flow that people use. From what I can tell, we search through the kernel-next git repo, then either by grep, ctags, or some other method?

Quoted 8 lines

I use cscope with vim. There is a "make cscope" build target.

Quoted 3 lines

We are looking for
things in the KernelJanitors/Todo, possibly stuff turned up by sparse? Maybe a different static analyser like from clang?

Yeah. That's a lot of it. I don't think anyone is doing clang so you could find some unique bugs that way. Do you know how to get clang working for the kernel?

I thought I did, turns out, I am struggling. I am planning on watching this video
http://video.linux.com/videos/applying-clang-static-analyzer-to-linux-kernel
but it is 30 min, and I am about to head off to work. I am also having some problems finding bugs, I saw that we should be looking in drivers/staging for bugs, Do we need to make changes to the .config to get those to show up in the tools (clang, smatch, sparse)? If so, are their any other changes?

I would like to compile all the info and tips I have been seeing into a web page. If anyone wants to add to the info, I am happy to hear advice.

Quoted 9 lines
Quoted 2 lines

From there we make sure the patch applys cleanly and mail the
maintainer, copying the LKML and Kernel-Janitors?

Yep. Use scripts/get_maintainer.pl. Send your first patch to kernel janitors without CC'd the maintainer so we can check it for you.

regards,
dan carpenter

#3 lore raw
In reply to Logan Blyth
Quoted 3 lines · Logan Blyth

I would like to compile all the info and tips I have been seeing into a web page. If anyone wants to add to the info, I am happy to hear advice.

I'd be interested in that. I've been lurking for a while, playing with the kernel code as time permits, but would like to dive more deeply into it and start contributing.

Signature · 3 lines
Darryl L. Pierce <[email protected]>
http://mcpierce.fedorapeople.org/
"What do you care what people think, Mr. Feynman?"
#4 lore raw
In reply to Logan Blyth
Quoted 17 lines · Logan Blyth
Quoted 7 lines · Dan Carpenter
Quoted 6 lines · Logan Blyth

Hello list,

I am looking for some tips on starting as a kernel janitor, and I was hoping to find out the general work flow that people use. From what I can tell, we search through the kernel-next git repo, then either by grep, ctags, or some other method?

Quoted 8 lines

I use cscope with vim. There is a "make cscope" build target.

Quoted 3 lines

We are looking for
things in the KernelJanitors/Todo, possibly stuff turned up by sparse? Maybe a different static analyser like from clang?

Yeah. That's a lot of it. I don't think anyone is doing clang so you could find some unique bugs that way. Do you know how to get clang working for the kernel?

Quoted 9 lines

I thought I did, turns out, I am struggling. I am planning on watching this video
http://video.linux.com/videos/applying-clang-static-analyzer-to-linux-kernel
but it is 30 min, and I am about to head off to work. I am also having some problems finding bugs, I saw that we should be looking in drivers/staging for bugs, Do we need to make changes to the .config to get those to show up in the tools (clang, smatch, sparse)? If so, are their any other changes?

Watch the video on clang. It's pretty complicated from what I remember, but maybe it's easier these days.

Someone already posted the links for sparse.

For Smatch the commands are:

git clone git://repo.or.cz/smatch.git
cd smatch
make
cd ~/kernel/src/

From here you could build the database (optional):
~/progs/smatch/devel/smatch_scripts/build_kernel_data.sh

To test the whole kernel the command is:
~/progs/smatch/devel/smatch_scripts/test_kernel.sh creates a warns.txt file at the end.

Or to test only one file the command is:
~/progs/smatch/devel/smatch_scripts/kchecker drivers/file.c

regards,
dan carpenter