SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
LCU14-113: Upstreaming 101 
LCU14 
LCU14 BURLINGAME
Overview 
❖ Target audience 
➢ Developers 
➢ Engineering managers 
❖ Focus is on Linux kernel upstreaming 
❖ What is upstreaming? 
➢ Define what it is first 
❖ How to upstream? 
➢ Process and Mechanics
Prerequisites 
❖ Familiar with source code control concepts 
❖ Familiar with git terminology (pulls, topic 
branches, etc.) 
❖ Technical understanding of kernel level software
What is upstreaming? 
❖ Linux kernel context 
❖ Upstream means to move software into the top 
level Linux repository 
❖ This is Linus Torvalds' Linux repository (aka 
“mainline”)
What is mainline? (http://www.kernel.org)
Who Exactly Contributes to Mainline? 
(From list of top 3.16 contributors: http://www.remword.com/kps_result/3.16_whole.html)
Swimming upstream to mainline 
❖ Distinct hierarchy of repositories 
❖ Repositories are git trees 
➢ One or more topic branches that feed into 
the mainline kernel 
❖ Different owners for each repository in the 
tree
Upstream code flow
Maintainers 
❖ Component code owners 
➢ Subsystem 
➢ Driver(s) 
➢ Filesystem 
➢ Architecture/Platform 
❖ Responsible for a slice of the kernel tree 
❖ Gatekeepers 
➢ Control acceptance of incoming patches 
➢ Acceptance criteria varies
Maintainer numbers 
❖ 912 unique maintainers 
$ egrep "^M:.*" MAINTAINERS | sort | uniq | wc -l 
912 
❖ Each subsystem/component has one or more 
maintainers 
❖ Example MAINTAINERS entry: 
ARM PORT 
M: Russell King <linux@arm.linux.org.uk> 
L: linux-arm-kernel@lists.infradead.org … 
W: http://www.arm.linux.org.uk/ 
S: Maintained 
F: arch/arm/
Understanding Merge Windows 
❖ Merge windows open every 10 weeks +/- 1 week 
❖ Merge window is open for 2 weeks 
❖ New functionality is only taken into Linus 
Torvalds' tree during the merge window
Understanding Merge Windows 
❖ Merge window planning 
➢ New functionality needs to be accepted in 
maintainer trees usually by the -rc6 or -rc7 
release 
➢ After -rc7 most maintainers will only be 
accepting fixes 
❖ Less than 7 weeks after a merge window closes 
to have a maintainer queue a patch for the next 
merge window.
How to Upstream? 
❖ Preparation 
❖ Creation 
❖ Posting 
❖ Feedback 
❖ Maintenance 
❖ How Long Does it Take?
Preparation 
❖ Know your content 
➢ Your contribution fits into a kernel framework. 
What is it? 
➢ Write your contribution to conform to the 
current framework standards and kernel APIs 
❖ Know who else is doing work in your area 
upstream 
➢ Is anybody doing work related to the 
framework that could affect framework APIs?
Preparation 
❖ Review Documentation/* for clarification on APIs 
and frameworks 
❖ Review Documentation/devicetree/bindings/* for 
clarification on Device Tree bindings and best 
examples. 
❖ Read devicetree mailing list to learn about DT 
best practices 
➢ http://vger.kernel.org/vger-lists.html#devicetree
Preparation 
❖ On what mailing lists and IRC channels are 
similar contributions discussed? 
➢ Follow these forums and understand the 
direction the frameworks are moving in APIs 
and style. 
➢ Ask questions, if necessary, to clarify what 
APIs to make use of before writing your code. 
❖ Read linux-arm-kernel, at a minimum 
➢ http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 
❖ #armlinux on freenode for ARM kernel 
discussions
Creation 
❖ Read and understand 
➢ Documentation/SubmittingPatches 
➢ Documentation/SubmitChecklist 
➢ Documentation/devicetree/bindings/ABI.txt 
➢ .../devicetree/bindings/submitting-patches.txt
Creation 
❖ Use git for code management 
❖ Logical division of commits 
➢ Small changes 
➢ Functionality 
➢ Individually complete (bisectability) 
❖ Logical commits allow for ease of review and 
speed acceptance
Creation 
❖ Multipart series subject line 
➢ Subject: [PATCH 01/11] subsystem: summary phrase 
❖ Version 3 of a single patch submission 
➢ Subject: [PATCH v3] subsystem: summary phrase 
❖ RFC patch submission 
➢ Subject: [PATCH RFC] subsystem: summary phrase
Creation 
❖ Take time to create a quality commit log 
message 
➢ Why the patch is needed 
➢ What the patch implements 
➢ How the patch is implemented. 
➢ “The conditional in foo() did not handle case 
bar and broke platform baz. Add an additional 
conditional and error path to foo() to handle 
bar.” 
❖ Each commit must have a well-formed commit 
log
Creation 
❖ Create patches with git format-patch 
➢ --cover-letter for a patch series 
➢ The cover letter contains an overview 
describing the purpose and scope of the entire 
series. 
❖ Use scripts/checkpatch.pl to verify coding style 
and semantics 
❖ Use scripts/get_maintainer.pl to verify maintainer 
list for submission.
Posting 
❖ Post patch or patch series 
➢ Maintainers on To: 
➢ Mailing lists on Cc: 
➢ Other interested parties on Cc: 
❖ Use git send-email to post patches/series 
❖ Expect comments!
Feedback on Mailing Lists 
❖ No response 
➢ Be patient, maintainers are very busy 
➢ Wait one week to resend if no response 
❖ Tough questions 
➢ Be prepared to justify your decisions or 
approach in great detail 
➢ Maintainers aren't always correct, be strong 
and concise in your justifications. 
➢ If you don't understand a comment, ask for 
clarification!
Feedback on Mailing Lists 
❖ Mailers 
➢ Use a sane mail user agent like mutt 
➢ Advice on configuring various mail user 
agents 
■ Documentation/email-clients.txt 
➢ Wrap at 72 columns 
❖ Getting flamed 
➢ No need to worry about this if you are 
following the documented practices.
Feedback on Mailing Lists 
❖ Making changes 
➢ Be responsive! Address comments via 
discussion and come to a conclusion quickly 
➢ Incorporate agreed upon comments and 
quickly submit a new version 
➢ Be prepared to not get an acceptable 
comment resolution on the first try 
➢ Expect many iterations 
❖ Resubmission 
➢ Increment the version number in the subject 
line for the patch series
Maintenance 
❖ Once accepted, now what? 
➢ Need to follow mailing lists for upcoming 
changes 
➢ Help review any new changes within the same 
area as your contribution 
➢ Test, test, test
Summary 
❖ Preparation is key to success 
❖ RTFM on everything 
❖ Ask questions 
❖ Act with a sense of urgency on comments 
❖ Understand merge window timing
More about Linaro Connect: connect.linaro.org 
Linaro members: www.linaro.org/members 
More about Linaro: www.linaro.org/about/
Are LTS/LTSI/LSK upstream? 
❖ No. These are all downstream trees 
❖ Long Term Stable is a maintenance tree 
➢ Stable tree picked yearly to be LTS and maintained by 
Greg KH 
➢ http://kroah.com/log/blog/2013/08/04/longterm-kernel-3-dot-10/ 
❖ Long Term Stable Initiative is a derivative of LTS that allows 
vendors to commit patches that are not ready for mainline 
➢ http://ltsi.linuxfoundation.org/what-is-ltsi 
❖ Linaro Stable Kernel is a production-oriented derivative of 
LTS that contains not-yet upstream Linaro sponsored 
features 
➢ https://wiki.linaro.org/LSK

Contenu connexe

Plus de Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloLinaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaLinaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraLinaro
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaLinaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 

Plus de Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Dernier

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 

Dernier (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 

LCU14 113- Upstreaming 101

  • 1. LCU14-113: Upstreaming 101 LCU14 LCU14 BURLINGAME
  • 2. Overview ❖ Target audience ➢ Developers ➢ Engineering managers ❖ Focus is on Linux kernel upstreaming ❖ What is upstreaming? ➢ Define what it is first ❖ How to upstream? ➢ Process and Mechanics
  • 3. Prerequisites ❖ Familiar with source code control concepts ❖ Familiar with git terminology (pulls, topic branches, etc.) ❖ Technical understanding of kernel level software
  • 4. What is upstreaming? ❖ Linux kernel context ❖ Upstream means to move software into the top level Linux repository ❖ This is Linus Torvalds' Linux repository (aka “mainline”)
  • 5. What is mainline? (http://www.kernel.org)
  • 6. Who Exactly Contributes to Mainline? (From list of top 3.16 contributors: http://www.remword.com/kps_result/3.16_whole.html)
  • 7. Swimming upstream to mainline ❖ Distinct hierarchy of repositories ❖ Repositories are git trees ➢ One or more topic branches that feed into the mainline kernel ❖ Different owners for each repository in the tree
  • 9. Maintainers ❖ Component code owners ➢ Subsystem ➢ Driver(s) ➢ Filesystem ➢ Architecture/Platform ❖ Responsible for a slice of the kernel tree ❖ Gatekeepers ➢ Control acceptance of incoming patches ➢ Acceptance criteria varies
  • 10. Maintainer numbers ❖ 912 unique maintainers $ egrep "^M:.*" MAINTAINERS | sort | uniq | wc -l 912 ❖ Each subsystem/component has one or more maintainers ❖ Example MAINTAINERS entry: ARM PORT M: Russell King <linux@arm.linux.org.uk> L: linux-arm-kernel@lists.infradead.org … W: http://www.arm.linux.org.uk/ S: Maintained F: arch/arm/
  • 11. Understanding Merge Windows ❖ Merge windows open every 10 weeks +/- 1 week ❖ Merge window is open for 2 weeks ❖ New functionality is only taken into Linus Torvalds' tree during the merge window
  • 12. Understanding Merge Windows ❖ Merge window planning ➢ New functionality needs to be accepted in maintainer trees usually by the -rc6 or -rc7 release ➢ After -rc7 most maintainers will only be accepting fixes ❖ Less than 7 weeks after a merge window closes to have a maintainer queue a patch for the next merge window.
  • 13. How to Upstream? ❖ Preparation ❖ Creation ❖ Posting ❖ Feedback ❖ Maintenance ❖ How Long Does it Take?
  • 14. Preparation ❖ Know your content ➢ Your contribution fits into a kernel framework. What is it? ➢ Write your contribution to conform to the current framework standards and kernel APIs ❖ Know who else is doing work in your area upstream ➢ Is anybody doing work related to the framework that could affect framework APIs?
  • 15. Preparation ❖ Review Documentation/* for clarification on APIs and frameworks ❖ Review Documentation/devicetree/bindings/* for clarification on Device Tree bindings and best examples. ❖ Read devicetree mailing list to learn about DT best practices ➢ http://vger.kernel.org/vger-lists.html#devicetree
  • 16. Preparation ❖ On what mailing lists and IRC channels are similar contributions discussed? ➢ Follow these forums and understand the direction the frameworks are moving in APIs and style. ➢ Ask questions, if necessary, to clarify what APIs to make use of before writing your code. ❖ Read linux-arm-kernel, at a minimum ➢ http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ❖ #armlinux on freenode for ARM kernel discussions
  • 17. Creation ❖ Read and understand ➢ Documentation/SubmittingPatches ➢ Documentation/SubmitChecklist ➢ Documentation/devicetree/bindings/ABI.txt ➢ .../devicetree/bindings/submitting-patches.txt
  • 18. Creation ❖ Use git for code management ❖ Logical division of commits ➢ Small changes ➢ Functionality ➢ Individually complete (bisectability) ❖ Logical commits allow for ease of review and speed acceptance
  • 19. Creation ❖ Multipart series subject line ➢ Subject: [PATCH 01/11] subsystem: summary phrase ❖ Version 3 of a single patch submission ➢ Subject: [PATCH v3] subsystem: summary phrase ❖ RFC patch submission ➢ Subject: [PATCH RFC] subsystem: summary phrase
  • 20. Creation ❖ Take time to create a quality commit log message ➢ Why the patch is needed ➢ What the patch implements ➢ How the patch is implemented. ➢ “The conditional in foo() did not handle case bar and broke platform baz. Add an additional conditional and error path to foo() to handle bar.” ❖ Each commit must have a well-formed commit log
  • 21. Creation ❖ Create patches with git format-patch ➢ --cover-letter for a patch series ➢ The cover letter contains an overview describing the purpose and scope of the entire series. ❖ Use scripts/checkpatch.pl to verify coding style and semantics ❖ Use scripts/get_maintainer.pl to verify maintainer list for submission.
  • 22. Posting ❖ Post patch or patch series ➢ Maintainers on To: ➢ Mailing lists on Cc: ➢ Other interested parties on Cc: ❖ Use git send-email to post patches/series ❖ Expect comments!
  • 23. Feedback on Mailing Lists ❖ No response ➢ Be patient, maintainers are very busy ➢ Wait one week to resend if no response ❖ Tough questions ➢ Be prepared to justify your decisions or approach in great detail ➢ Maintainers aren't always correct, be strong and concise in your justifications. ➢ If you don't understand a comment, ask for clarification!
  • 24. Feedback on Mailing Lists ❖ Mailers ➢ Use a sane mail user agent like mutt ➢ Advice on configuring various mail user agents ■ Documentation/email-clients.txt ➢ Wrap at 72 columns ❖ Getting flamed ➢ No need to worry about this if you are following the documented practices.
  • 25. Feedback on Mailing Lists ❖ Making changes ➢ Be responsive! Address comments via discussion and come to a conclusion quickly ➢ Incorporate agreed upon comments and quickly submit a new version ➢ Be prepared to not get an acceptable comment resolution on the first try ➢ Expect many iterations ❖ Resubmission ➢ Increment the version number in the subject line for the patch series
  • 26. Maintenance ❖ Once accepted, now what? ➢ Need to follow mailing lists for upcoming changes ➢ Help review any new changes within the same area as your contribution ➢ Test, test, test
  • 27. Summary ❖ Preparation is key to success ❖ RTFM on everything ❖ Ask questions ❖ Act with a sense of urgency on comments ❖ Understand merge window timing
  • 28. More about Linaro Connect: connect.linaro.org Linaro members: www.linaro.org/members More about Linaro: www.linaro.org/about/
  • 29. Are LTS/LTSI/LSK upstream? ❖ No. These are all downstream trees ❖ Long Term Stable is a maintenance tree ➢ Stable tree picked yearly to be LTS and maintained by Greg KH ➢ http://kroah.com/log/blog/2013/08/04/longterm-kernel-3-dot-10/ ❖ Long Term Stable Initiative is a derivative of LTS that allows vendors to commit patches that are not ready for mainline ➢ http://ltsi.linuxfoundation.org/what-is-ltsi ❖ Linaro Stable Kernel is a production-oriented derivative of LTS that contains not-yet upstream Linaro sponsored features ➢ https://wiki.linaro.org/LSK