kernel development: drawing lessons from "mistakes" (japan linux symposium 2009)
DESCRIPTION
Every kernel developer knows that Linux comes with plenty of precious documentation as an integral part. From coding style to how to post patches, almost everything has been documented. However, history shows that error is human nature. Sometimes developers do not well know Don’ts, but there are also cases when they make mistakes despite being aware of such rules. Why this happen is unsolved, but a documentation, so far missing, of the consequences of this misbehavior could discourage it. The presenter is project manager of TOMOYO Linux, a security enhancement feature merged in version 2.6.30. Thinking open-minded, he decided to share the errors his project made, wishing it could be a helpful warning to other projects, especially newcomers. In this presentation, it will try to explain the mistake circumstances in TOMOYO Linux project, highlighting the thoughts of project members and the community reactions. No prior kernel development experiences are necessary.TRANSCRIPT
![Page 1: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/1.jpg)
KERNEL DEVELOPMENT: DRAWING LESSONS FROM
"MISTAKES"
Japan Linux Symposium 2009October 23, 2009Toshiharu Harada
[email protected] DATA CORPORATION
![Page 2: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/2.jpg)
ABSTRACTS
Every kernel developer knows that Linux comes with plenty of precious documentation as an integral part. From coding style to how to post patches, almost everything has been documented. However, history shows that error is human nature. Sometimes developers do not well know Don’ts, but there are also cases when they make mistakes despite being aware of such rules. Why this happen is unsolved, but a documentation, so far missing, of the consequences of this misbehavior could discourage it. The presenter is project manager of TOMOYO Linux, a security enhancement feature merged in version 2.6.30. Thinking open-minded, he decided to share the errors his project made, wishing it could be a helpful warning to other projects, especially newcomers. In this presentation, it will try to explain the mistake circumstances in TOMOYO Linux project, highlighting the thoughts of project members and the community reactions.
![Page 3: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/3.jpg)
“Experience is the name everyone gives to his mistakes” --- Oscar Wild
![Page 4: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/4.jpg)
WHAT’S THIS ALL ABOUT
![Page 5: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/5.jpg)
WHAT’S THIS ALL ABOUT
• Linux comes with a set of great documentation
![Page 6: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/6.jpg)
WHAT’S THIS ALL ABOUT
• Linux comes with a set of great documentation
•DOs and DON’Ts are there already
![Page 7: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/7.jpg)
WHAT’S THIS ALL ABOUT
• Linux comes with a set of great documentation
•DOs and DON’Ts are there already
• Yet we keep on making mistakes
![Page 8: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/8.jpg)
WHAT’S THIS ALL ABOUT
• Linux comes with a set of great documentation
•DOs and DON’Ts are there already
• Yet we keep on making mistakes
• Finding a missing piece
![Page 9: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/9.jpg)
WHAT IS MISSING?
![Page 10: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/10.jpg)
WHAT IS MISSING?
• In my humble opinion:
![Page 11: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/11.jpg)
WHAT IS MISSING?
• In my humble opinion:
• Human nature (hard to fix)
![Page 12: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/12.jpg)
WHAT IS MISSING?
• In my humble opinion:
• Human nature (hard to fix)
•Most of us don’t really like readings (hard to fix)
![Page 13: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/13.jpg)
WHAT IS MISSING?
• In my humble opinion:
• Human nature (hard to fix)
•Most of us don’t really like readings (hard to fix)
• Real-life examples taken from TOMOYO Linux project
![Page 14: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/14.jpg)
WHO AM I?
![Page 15: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/15.jpg)
WHO AM I?
• Project manager of TOMOYO Linux
![Page 16: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/16.jpg)
WHO AM I?
• Project manager of TOMOYO Linux
•What is “project manager”?
![Page 17: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/17.jpg)
WHO AM I?
• Project manager of TOMOYO Linux
•What is “project manager”?
• Something put in between an Open Source projects and a Company
![Page 18: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/18.jpg)
WHO AM I?
• Project manager of TOMOYO Linux
•What is “project manager”?
• Something put in between an Open Source projects and a Company
• It’s an adventurous role (experimental stage)
![Page 19: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/19.jpg)
OUCH, IS THIS “SECURE LINUX” TALK?
•No. (so please remain seated, you are safe)
![Page 20: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/20.jpg)
COVERED TOPICS
•Chapter 1: Where to find DOs and DON’Ts
•Chapter 2: TOMOYO Linux posting history overview
•Chapter 3: Step by step introduction of DOs and DON’Ts of the TOMOYO Linux
![Page 21: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/21.jpg)
CHAPTER 1Where to find DOs and DON’Ts
![Page 22: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/22.jpg)
Gentle Reminder
![Page 23: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/23.jpg)
Gentle Reminder
Documentation is a part of Linux Kernel
![Page 24: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/24.jpg)
Gentle Reminder
Documentation is a part of Linux Kernel
After checking out the kernel, cd to “Documentation”
![Page 25: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/25.jpg)
Gentle Reminder
Documentation is a part of Linux Kernel
After checking out the kernel, cd to “Documentation”
Problem is “there are just too many files and directories” and people prefer coding than reading
![Page 26: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/26.jpg)
How Great is It?
![Page 27: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/27.jpg)
How Great is It?
$Documentation/ManagementStyle
![Page 28: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/28.jpg)
How Great is It?
$Documentation/ManagementStyle
“Most people are idiots, and being a manager means you'll have to deal with it, and perhaps more importantly, that _they_ have to deal with _you_.”
![Page 29: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/29.jpg)
How Great is It?
![Page 30: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/30.jpg)
How Great is It?
$Documentation/ManagementStyle
![Page 31: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/31.jpg)
How Great is It?
$Documentation/ManagementStyle
“Thing will go wrong, and people want somebody to blame. Tag you’re it.”
![Page 32: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/32.jpg)
Okay, I’ll do so
![Page 33: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/33.jpg)
Okay, I’ll do so
![Page 34: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/34.jpg)
Okay, I’ll do so
Blame Me
![Page 35: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/35.jpg)
![Page 36: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/36.jpg)
The truth is people will blame you regardless of you are tagged or not (you can omit)
Just these two statements illustrate the essential part of managements
Linux documentation is so practical
![Page 37: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/37.jpg)
Minimal Reading
![Page 38: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/38.jpg)
Minimal Reading
Entire Scheme
![Page 39: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/39.jpg)
Minimal Reading
Entire Scheme
$Documentation/HOWTO
![Page 40: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/40.jpg)
Minimal Reading
Entire Scheme
$Documentation/HOWTO
Submitting Patches
![Page 41: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/41.jpg)
Minimal Reading
Entire Scheme
$Documentation/HOWTO
Submitting Patches
$Documentation/SubmitChecklist
![Page 42: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/42.jpg)
Minimal Reading
Entire Scheme
$Documentation/HOWTO
Submitting Patches
$Documentation/SubmitChecklist
$Documentation/CodingStyle
![Page 43: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/43.jpg)
References
![Page 44: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/44.jpg)
References
Note that the title is “How to Participate in the Linux Community”
![Page 45: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/45.jpg)
References
Note that the title is “How to Participate in the Linux Community”
Making your code upstream means your participation in the Linux Community (Be nice!)
![Page 46: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/46.jpg)
My favorite one
http://www.linuxfoundation.jp/jp_uploads/seminar20070710/Jon-Dev-Process.pdf
����������������� �����������������������
��������������� ��
� �������������� ���� �������
![Page 47: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/47.jpg)
Picked up Two pages
![Page 48: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/48.jpg)
![Page 49: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/49.jpg)
![Page 50: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/50.jpg)
![Page 51: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/51.jpg)
I was laughing when I saw the slides for the first time (in 2007)
When I came to realize that it was true, I couldn’t laugh any more ...
They kept asking me “not yet?” ;-)
![Page 52: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/52.jpg)
CHAPTER 2TOMOYO Linux by Numbers
![Page 53: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/53.jpg)
Leo Tolstoy said
"All Happy Families Resemble Each Other, Each Unhappy Family Is Unhappy in Its Own Way."
![Page 54: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/54.jpg)
9,2302,700,000 2,700,000
![Page 55: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/55.jpg)
Number of employees of NTT DATA
CORPORATION2,700,000
2,700,000
![Page 56: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/56.jpg)
32,700,000 2,700,000
![Page 57: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/57.jpg)
Number of project members
2,700,000 2,700,000
![Page 58: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/58.jpg)
0.0325%2,700,000 2,700,000
![Page 59: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/59.jpg)
Possibilities to be assigned to the
project2,700,000
2,700,000
![Page 60: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/60.jpg)
32,700,000 2,700,000
![Page 61: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/61.jpg)
TOMOYO is the 3rd (and the latest) LSM
module merged upstream
2,700,000 2,700,000
![Page 62: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/62.jpg)
02,700,000 2,700,000
![Page 63: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/63.jpg)
Number of people who expected
TOMOYO would be merged
2,700,000 2,700,000
![Page 64: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/64.jpg)
152,700,000 2,700,000
![Page 65: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/65.jpg)
We posted patches 15 times
2,700,000 2,700,000
![Page 66: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/66.jpg)
7162,700,000
2,700,000
![Page 67: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/67.jpg)
Merged since 716 days after the first
post
2,700,000 2,700,000
![Page 68: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/68.jpg)
1622,700,000 2,700,000
![Page 69: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/69.jpg)
Number of comments from LKML
(0.2 comments/day)2,700,000
2,700,000
![Page 70: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/70.jpg)
Proposal Historyhttp://tomoyo.sourceforge.jp/wiki-e/?JLS2009
![Page 71: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/71.jpg)
CHAPTER 3Drawing Lessons from the “Mistakes”
of TOMOYO Linux Project
![Page 72: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/72.jpg)
CHAPTER 3Drawing Lessons from the “Mistakes”
of TOMOYO Linux Project
Blame
Me
![Page 73: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/73.jpg)
IN THE 1ST POSTING
I wrote:<snip>All right, that's almost everything. Please visit the following URL for the code and documents: http://tomoyo.sourceforge.jp/wiki-e/ If you want to see the code first, then: http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/security/tomoyo/?v=linux-2.6.21.3-tomoyo-2.0
![Page 74: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/74.jpg)
DON’TSend URL
Send patches
![Page 75: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/75.jpg)
DON’TSend URL
Send patches
![Page 76: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/76.jpg)
WHAT HAPPENED?
• I got a personal message from Stephen Smalley, a maintainer of that famous SELinux
–“If you really want feedback or to get your code into the kernel, you need to do more than post a URL to the code - you need to break your code down into a number of patches and post them, just like the AppArmor folks have been doing. “
![Page 77: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/77.jpg)
SO WE RUSHED TO POSTED PATCHES NEXT DAY
• Pavel Machek gave a comment
•“Looks whitespace-damaged to me.”
![Page 78: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/78.jpg)
DON’TIgnore the Linux standard coding style
Always apply checkpatch.pl
![Page 79: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/79.jpg)
DON’TIgnore the Linux standard coding style
Always apply checkpatch.pl
![Page 80: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/80.jpg)
DO
![Page 81: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/81.jpg)
DO
• Carefully read the $Document/CodingStyle
![Page 82: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/82.jpg)
DO
• Carefully read the $Document/CodingStyle
• Check your code with $scripts/checkpatch.pl
![Page 83: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/83.jpg)
DO
• Carefully read the $Document/CodingStyle
• Check your code with $scripts/checkpatch.pl
• Also use other $scripts/check*.pl
![Page 84: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/84.jpg)
• Jiri Kosina pointed us to make patches bisectable
•“Just a trivial minor nitpick - IMHO this breaks bisectability. It might be better to add the Kconfig/Makefile patch at the end of the whole series, so that bisect doesn't end up in the tree in which Makefile references non-existing files/directories.”
![Page 85: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/85.jpg)
DO
• Add the Kconfig/Makefile patch at the end of the whole series, so that bisect doesn't end up in the tree in which Makefile references non-existing files/directories.”
![Page 86: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/86.jpg)
DO
• Add the Kconfig/Makefile patch at the end of the whole series, so that bisect doesn't end up in the tree in which Makefile references non-existing files/directories.”
![Page 87: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/87.jpg)
IN THE 3RD PATCH
• James Morris taught us series of patches should form a thread
•“I'd also suggest making all of the patches a reply to the first email, so they can be threaded.”
![Page 88: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/88.jpg)
LIKE THIS
![Page 89: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/89.jpg)
DO
• Send series of patches as children of the first message so that they can form a thread or you want people to read your messages
![Page 90: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/90.jpg)
DO
• Send series of patches as children of the first message so that they can form a thread or you want people to read your messages
![Page 91: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/91.jpg)
• James Morris said:
• “Please use standard kernel list handling, per include/linux/list.h”
•YOSHIFUJI Hideaki also mentioned:
• You're introducing a custom API, which is open-coded repeatedly throughout your module.
• All linked lists (at least, new ones) must use the standard kernel list API.
![Page 92: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/92.jpg)
DON’TPropose new data structure
Use existing one
![Page 93: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/93.jpg)
DON’TPropose new data structure
Use existing one
![Page 94: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/94.jpg)
IN THE 5TH POSTING
• James Morris suggested to CC netdev mailing list
• “You should send anything which touches core networking to netdev, too, and get an ack from one of the core developers there.”
![Page 95: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/95.jpg)
DO
• Carefully choose CCs and get a review from them
![Page 96: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/96.jpg)
DO
• Carefully choose CCs and get a review from them
![Page 97: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/97.jpg)
IN THE 6TH POSTING
• Tetsuo posted 30 series of messages with the subject,
“Subject: [TOMOYO #7 00/30] TOMOYO Linux 1.6.0 released”
• The problem was “TOMOYO 1.6.0” did not use LSM and implemented different hooks
![Page 98: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/98.jpg)
DON’TTry to invent a new API
Respect a standard and follow one
![Page 99: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/99.jpg)
DON’TTry to invent a new API
Respect a standard and follow one
![Page 100: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/100.jpg)
![Page 101: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/101.jpg)
• Tetsuo and I knew that posting such patches will never be accepted
• However, we had been stuck and we couldn’t find another way
•Our posting was thoughtless, but we were so serious to make our code upstream
![Page 102: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/102.jpg)
IN THE 7TH POSTING
I changed my mind and wrote:
We apologize for the confusion we caused in the last posting, but we don't want to give up returning our work to the mainline. We cordially request LSM changes to pass vfsmount parameters.
![Page 103: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/103.jpg)
• Stephen Smalley kindly responded on the list
–“Don't cordially request it - submit patches to make it happen. Or work with others who have been submitting such patches. “
![Page 104: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/104.jpg)
DON’TCordially ask to merge your code ;-)
Make good patches and post them
![Page 105: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/105.jpg)
DON’TCordially ask to merge your code ;-)
Make good patches and post them
![Page 106: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/106.jpg)
IN THE 16TH POSTING
• Tetsuo posted 25 series of messages with the subject, “Subject: [TOMOYO #16 00/25] Starting TOMOYO 2.3”
• The patches included enhancements as well as garbage collector functionality (so Tetsuo had a reason for 25)
![Page 107: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/107.jpg)
• Pavel Machek commented:
•You are expected to submit diffs in smaller steps, not "here it is, totally rewritten, take it or leave it".
![Page 108: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/108.jpg)
IT HAPPENED IN THE 7TH
• Serge E. Hallyn once gave us a same comment:
•First let me point out that reviewing patches is always a lot of work. What you've done here by posting an entirely new 30-patch implementation of tomoyo when (I hope) you're not even serious about that is to basically tell us our time means nothing to you...
![Page 109: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/109.jpg)
CONCLUSION
![Page 110: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/110.jpg)
![Page 111: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/111.jpg)
•Our mistakes, presented in this slides, are merely the tip of the iceberg
•We made many failures and we sometimes behaved very badly
•Nevertheless, this Linux community reacted and even merged our code
![Page 112: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/112.jpg)
![Page 113: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/113.jpg)
• Feedbacks were not limited by mailing list replies
• There were people who sent off-list messages and left advices in face
![Page 114: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/114.jpg)
WITH ALL MY EXPERIENCESI CAN SAY
![Page 115: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/115.jpg)
WITH ALL MY EXPERIENCESI CAN SAY
•Linux is not just free code
![Page 116: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/116.jpg)
WITH ALL MY EXPERIENCESI CAN SAY
•Linux is not just free code• Linux is great because people are great
![Page 117: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/117.jpg)
WITH ALL MY EXPERIENCESI CAN SAY
•Linux is not just free code• Linux is great because people are great
• Sending your code is a conversation with people
![Page 118: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/118.jpg)
WITH ALL MY EXPERIENCESI CAN SAY
•Linux is not just free code• Linux is great because people are great
• Sending your code is a conversation with people
• They might not appear friendly for the first time, but try to speak them first
![Page 119: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/119.jpg)
ACKNOWLEDGMENTS
![Page 120: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/120.jpg)
![Page 121: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/121.jpg)
Al Viro, Albert Cahalan, Alexey Dobriyan, Andi Kleen, Andrew Morton, Bodo Eggert, Casey Schaufler, Chris Wright, Christoph Hellwig, Crispin Cowan, Daniel Walker, David Howells, David Lang, David P. Quigley, Greg KH, James Morris, Jamie Lokier, Jiri Kosina, Jonathan Corbet, Joshua Brindle, KaiGai Kohei, Kamezawa Hiroyuki, KOSAKI Motohiro, Kyle Moffett, Linus Torvalds, Matthew Wilcox, Miklos Szeredi, Paul E. McKenney, Paul Moore, Pavel Machek, Peter Dolding, Peter Zijlstra, Rik van Riel, Serge E. Hallyn, Seth Arnorld, Shaya Potter, Stephen Smalley, Tim Bird, Trond Myklebust, Valdis Kletnieks, William Leibzon, YOSHIFUJI Hideaki
![Page 122: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/122.jpg)
WE COULDN’T HAVE DONE IT WITHOUT YOUR HELP
Al Viro, Albert Cahalan, Alexey Dobriyan, Andi Kleen, Andrew Morton, Bodo Eggert, Casey Schaufler, Chris Wright, Christoph Hellwig, Crispin Cowan, Daniel Walker, David Howells, David Lang, David P. Quigley, Greg KH, James Morris, Jamie Lokier, Jiri Kosina, Jonathan Corbet, Joshua Brindle, KaiGai Kohei, Kamezawa Hiroyuki, KOSAKI Motohiro, Kyle Moffett, Linus Torvalds, Matthew Wilcox, Miklos Szeredi, Paul E. McKenney, Paul Moore, Pavel Machek, Peter Dolding, Peter Zijlstra, Rik van Riel, Serge E. Hallyn, Seth Arnorld, Shaya Potter, Stephen Smalley, Tim Bird, Trond Myklebust, Valdis Kletnieks, William Leibzon, YOSHIFUJI Hideaki
![Page 123: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/123.jpg)
AND OF COURSE•We thank NTT DATA CORPORATION for their support of
the project
![Page 124: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/124.jpg)
RELATED PRESENTATIONS
Realities of Mainlining- Case of the TOMOYO Linux Project -
Toshiharu Harada<[email protected]><[email protected]>
NTT DATA CORPORATION
July 9, 2008
Time to Glean!"#$%&'$()*+,-$.)/0&'1$2*3$0.4$%+0+'4
July 25, 2008
Toshiharu Harada<[email protected]>
Kentaro TakedaTetsuo Handa
NTT DATA CORPORATION
![Page 125: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/125.jpg)
What does it mean being an Open Source project manager
in Enterpriseenterprise edition
LinuxCon 2009 (Business)September 23, 2009Toshiharu Harada
NTT DATA CORPORATION
What does it mean being an Open Source project manager
in EnterpriseOpen Source Edition
LinuxCon2009 (Business)September 23, 2009Toshiharu Harada
<[email protected]>TOMOYO Linux Project
![Page 126: Kernel Development: Drawing Lessons from "Mistakes" (Japan Linux Symposium 2009)](https://reader038.vdocuments.site/reader038/viewer/2022110118/554a5005b4c905572f8b47fb/html5/thumbnails/126.jpg)
TRADEMARKS
• Linux is a registered trademark of Linus Torvalds in Japan and other countries
• TOMOYO is a registered trademark of NTT DATA CORPORATION in Japan