01 / English script
Opening
01 · Daniel ChoKernel & BSP
Good afternoon, everyone. This is our monthly tech-sharing session, and today's topic is one that people have strong feelings about: how we review code, and whether we should adopt an upstream-first policy for kernel changes. I'll share some data first, and then I'd like a real debate. Nobody needs to agree with me.
02 · Grace JungRelease Management
I'm here mostly because every out-of-tree patch becomes my problem at rebase time. So I'm biased, but I'll try to listen.
03 · Jiho NamProduct Security
And I'm here because review is the last line of defense before a vulnerability ships. I want to make sure security doesn't get lost in a conversation about process.
04 · Daniel ChoKernel & BSP
Perfect. Those are exactly the perspectives I was hoping for.
Where We Are Today
05 · Daniel ChoKernel & BSP
Let's start with the numbers. Our Orion kernel carries about eleven hundred patches on top of the Android common kernel. Of those, roughly two hundred are vendor drivers that will never go upstream. The rest are ours: fixes, tuning, and features. Only about forty of them have ever been sent upstream.
06 · Jiwoo LeeKernel & BSP
And each rebase costs us. When we moved from six-one to six-six for the internal test branch, three engineers spent five weeks resolving conflicts. About a third of those conflicts were in patches that fixed bugs upstream had already fixed in a different way.
07 · Brian ShinFramework
So we were fixing the same bug twice, and then paying again to throw our version away.
08 · Jiwoo LeeKernel & BSP
Exactly. And nobody noticed, because our patch never went outside the building.
09 · Daniel ChoKernel & BSP
On the review side, our median kernel review takes about six hours from upload to approval. That sounds fast, but in a sample of fifty reviews, thirty-one had only one comment or none. Upstream, the same kind of patch typically gets several rounds of feedback.
10 · Elena ParkFramework
To be fair, a review with no comments isn't automatically a bad review. Sometimes the patch is just good.
11 · Daniel ChoKernel & BSP
That's fair. But when I traced the eight regressions from the last quarter back to their commits, six of them had been approved with no comments at all.
The Case for Upstream First
12 · Jiwoo LeeKernel & BSP
Let me make the case. Upstream first means that before a generic kernel fix lands in our tree, it's posted to the upstream mailing list. We don't have to wait for it to be merged, but it has to be posted, and the link goes into our commit message.
13 · Jiwoo LeeKernel & BSP
Three things happen when you do that. First, you get reviewed by the people who wrote the code you're changing. Second, if upstream already has a better fix, someone tells you within days instead of us discovering it during a rebase two years later. And third, once it's merged, the patch disappears from our pile forever.
14 · Grace JungRelease Management
That third point is the one I care about. Every patch we carry is a patch somebody has to carry again on the next kernel.
15 · Daniel ChoKernel & BSP
Google is also moving in this direction. For GKI, they already reject vendor hooks that don't have a clear upstream story. So in some sense the decision is being made for us anyway.
The Case Against
16 · Brian ShinFramework
I'll take the other side, because someone should. My worry is speed. When we have a launch-blocking bug, I need the fix in the build tonight, not after a public discussion that can take weeks. Upstream reviewers don't care about our launch date.
17 · Jiwoo LeeKernel & BSP
But that's not what the policy says. You post it and land it the same day. The upstream review runs in parallel. If they ask for changes, we pick up the improved version later.
18 · Brian ShinFramework
Then what do we gain if we land it anyway? We still carry the patch until upstream accepts it.
19 · Jiwoo LeeKernel & BSP
We gain the feedback, and we gain a deadline for the patch to stop being ours. Right now there's no such deadline, so patches live forever.
20 · Elena ParkFramework
My concern is different. Some of our changes reveal product plans. If we post a patch that adds support for a new display mode three months before launch, people can read it and guess what we're building.
21 · Daniel ChoKernel & BSP
That's a legitimate concern, and it's why I'd scope the policy to generic fixes, not new hardware features. A locking bug in the scheduler doesn't reveal anything about our roadmap.
The Security Angle
22 · Jiho NamProduct Security
Here's where I need to push back on everyone. Security fixes are a special case. If we find a vulnerability in the kernel, posting the fix publicly before devices are patched tells attackers exactly where to look. That has to go through the embargoed security process, not the public list.
23 · Jiwoo LeeKernel & BSP
Completely agree. The policy would explicitly exclude anything that goes through the security team. Those follow the coordinated disclosure timeline.
24 · Jiho NamProduct Security
Good. My second point is about our internal reviews. I'd like any change that touches parsing of untrusted input, memory permissions, or the boundary between user space and the kernel to require a second reviewer from a different team. One comment-free approval isn't enough for those areas.
25 · Brian ShinFramework
How would people know when a change falls into that category? Engineers don't always realize their patch touches a security boundary.
26 · Jiho NamProduct Security
We can do it by path. We already have a list of sensitive directories and files. The review tool can add a security reviewer automatically when a patch touches one of them.
What a Good Review Looks Like
27 · Daniel ChoKernel & BSP
Let's talk about review quality itself, because upstream first only covers part of the tree. What do we actually expect from a reviewer?
28 · Elena ParkFramework
For me, the reviewer should be able to explain the change to someone else. If you can't explain why the patch is correct, you shouldn't approve it. And the commit message should make that easy: what was broken, why, and how this fixes it.
29 · Jiwoo LeeKernel & BSP
Upstream maintainers are brutal about commit messages, and honestly, they're right. Half of our internal commit messages just say 'fix crash' with a ticket number. Two years later, the ticket system has been migrated and nobody knows what the crash was.
30 · Grace JungRelease Management
I've lived that. During the last rebase, I spent a whole day trying to figure out whether a patch was still needed, and the only clue was a ticket link that returned an error.
31 · Brian ShinFramework
Fine, I can get behind better commit messages. That's cheap and it helps everyone. But I don't want reviews to become a ritual where people leave comments just to prove they read the code.
32 · Daniel ChoKernel & BSP
Agreed. The goal isn't more comments. The goal is that the reviewer actually understood the change. A short note saying what you checked is often enough, for example, 'verified the lock is held on all callers.'
Cost and Capacity
33 · Grace JungRelease Management
Let me ask the practical question. Who's going to do this? Posting upstream means responding to feedback, sending new versions, sometimes arguing for weeks. Our engineers are already fully loaded.
34 · Jiwoo LeeKernel & BSP
I won't pretend it's free. My estimate is about ten percent of a kernel engineer's time. But compare that with five weeks for three people at every rebase. Over two years, it's cheaper to do it upstream.
35 · Daniel ChoKernel & BSP
There's also a hiring and growth benefit. Engineers who have patches in the mainline kernel get better at writing code that others can review. That skill comes back into our internal reviews.
36 · Brian ShinFramework
I'll concede that point. Some of the best reviewers on my team learned by getting torn apart on a public list.
37 · Elena ParkFramework
Can I add one practical suggestion? If we make upstream work visible, people will treat it as real work. Right now, nobody gets credit for a patch that's merged upstream, because it doesn't show up in our project tracking at all. If it appeared in performance reviews the same way a feature does, I think engineers would volunteer for it.
38 · Daniel ChoKernel & BSP
That's a great point, and it costs almost nothing. I'll talk to the engineering managers about adding upstream contributions to the quarterly goals, starting with the people in the pilot.
A Recent Example
39 · Daniel ChoKernel & BSP
Let me make this concrete with a case from July. Some of you will remember the Orion Lite camera hang. The root cause was a patch in the workqueue code that changed how a flush was handled. It was approved in under two hours with no comments.
40 · Jiwoo LeeKernel & BSP
And here's the painful part. The same race had been discussed on the upstream list eight months earlier. A maintainer explained exactly why the obvious fix was wrong, and the correct fix was already in a newer kernel. If our engineer had posted the patch, someone would have pointed to that thread within a day.
41 · Brian ShinFramework
How long did the hang take to fix in the end?
42 · Daniel ChoKernel & BSP
Three weeks from the first field report to the fix, plus a maintenance release, plus the SQE time to reproduce it. Compare that with the five minutes it would have taken to send an email to the mailing list. I'm not saying every case is like this, but this one cost us a lot.
43 · Elena ParkFramework
That's a strong example, but I want to be careful about one thing. The engineer who wrote that patch was new, and the reviewer was overloaded that week. I don't want this discussion to turn into blaming individuals. The process let them down.
44 · Daniel ChoKernel & BSP
Completely agree, and that's why I didn't put any names on the slide. The question is what process would have caught it, not who should have caught it.
Tooling That Helps
45 · Jiho NamProduct Security
Before we talk about policy, I think tools can take a lot of the load off reviewers. Right now, our review system runs the build and a basic boot test, and that's it. Upstream, every patch is checked for style, and many subsystems run static analysis automatically.
46 · Jiwoo LeeKernel & BSP
We could add the upstream style checker and a sparse run to every kernel review in about a week. Neither of them finds deep bugs, but they remove the boring comments, so the human reviewer can focus on the logic.
47 · Brian ShinFramework
On the framework side, we already have lint checks, and honestly they changed the culture. People stopped arguing about formatting and started arguing about design, which is what we actually want.
48 · Jiho NamProduct Security
I'd also like lockdep and the kernel address sanitizer enabled on the nightly debug builds for Atlas. They catch exactly the kind of locking and memory bugs that slip through a quick review.
49 · Grace JungRelease Management
As long as they stay on debug builds, I have no objection. The performance cost would be unacceptable on user builds, but nightly builds are exactly the right place.
Working with Vendors
50 · Grace JungRelease Management
One more angle we haven't covered is vendor code. Qorvix and Arvenna send us large drops of kernel patches. Do we hold them to the same standard?
51 · Jiwoo LeeKernel & BSP
We should, at least for generic fixes. When I looked at the last Qorvix drop, about sixty patches had nothing to do with their hardware. They were fixes to the memory manager and the scheduler that Qorvix found on their own reference boards. Some of them were good, but none were upstream.
52 · Daniel ChoKernel & BSP
So we end up carrying their debt as well as ours. I'd like to add a line to the Atlas BSP agreement with Arvenna: generic core-kernel changes must come with an upstream link, or a written reason why they can't go upstream.
53 · Elena ParkFramework
Is that realistic this late in the Atlas contract? The BSP 1.0 date is next week.
54 · Daniel ChoKernel & BSP
Not for 1.0, no. But the contract has quarterly updates for three years. If we ask now, it can apply from the first quarterly update. Arvenna's own engineers have told me privately that they'd prefer to upstream more, but they need a customer to ask for it.
55 · Grace JungRelease Management
Then let's be that customer. I'll raise it with the partner management team so it goes through the right channel.
Proposal and Next Steps
56 · Daniel ChoKernel & BSP
Let me try to pull this together. I'm hearing agreement on a few things, and real doubts on others, so let me propose a pilot rather than a policy.
57 · Daniel ChoKernel & BSP
For the next three months, on the Atlas kernel only, generic fixes must be posted upstream before or on the same day they land, with the link in the commit message. Security fixes and new hardware features are excluded. Every commit message must explain the problem and the fix, not just a ticket number. And changes in sensitive paths automatically get a security reviewer from another team.
58 · Jiho NamProduct Security
I'm happy with that. I'll send the list of sensitive paths to the tools team this week.
59 · Elena ParkFramework
Atlas is a good place to try it, because it's still early and nothing there is launch-critical yet. I'd like to see the numbers at the end before we talk about Orion.
60 · Brian ShinFramework
I'm still skeptical about speed, but a pilot is a fair way to find out. If it slows down a single urgent fix, I'll be the first to say so.
61 · Daniel ChoKernel & BSP
That's exactly the kind of feedback I want. I'll measure three things: how many patches we post, how many get merged, and how long it takes to land urgent fixes compared with today. Jiwoo, can you run an upstreaming office hour every Thursday for anyone who needs help with their first submission?
62 · Jiwoo LeeKernel & BSP
Happy to. I'll also write a one-page guide on how to format a patch for the mailing list, because that's where most people get stuck the first time.
63 · Grace JungRelease Management
And I'll add a field to the rebase tracker so we can see how many patches the pilot removes from our carry list. If the number goes down, that's the strongest argument for expanding it.
64 · Daniel ChoKernel & BSP
Great. Thank you all for a genuinely useful debate. We'll review the pilot results at the December session.
03 / Business expressions
people have strong feelings about
사람들이 강한 의견을 갖고 있는 것 · 논쟁적인 주제를 소개할 때
This is our monthly tech-sharing session, and today's topic is one that people have strong feelings about: how we review code, and whether we should adopt an upstream-first policy for kernel changes.
응용 연습
Remote work is a topic people have strong feelings about.
Nobody needs to agree with me
저에게 동의할 필요는 없습니다 · 자유로운 반대 의견을 장려할 때
Nobody needs to agree with me.
응용 연습
Here's my view, but nobody needs to agree with me.
becomes my problem
결국 제 문제가 됩니다 · 어떤 일이 결국 자신에게 영향을 줄 때
I'm here mostly because every out-of-tree patch becomes my problem at rebase time.
응용 연습
Every late spec change becomes my problem at integration time.
the last line of defense
마지막 방어선 · 최종 안전장치의 역할을 강조할 때
And I'm here because review is the last line of defense before a vulnerability ships.
응용 연습
Testing is the last line of defense before customers see the bug.
To be fair
공정하게 말하면 · 상대 입장을 일부 인정할 때
To be fair, a review with no comments isn't automatically a bad review.
응용 연습
To be fair, the vendor delivered the driver on time.
I'll take the other side, because someone should
누군가는 해야 하니 제가 반대편을 맡겠습니다 · 일부러 반론을 제시할 때
I'll take the other side, because someone should.
응용 연습
I'll take the other side, because someone should question this plan.
in parallel
병행해서 · 두 작업을 동시에 진행할 때
The upstream review runs in parallel.
응용 연습
The vendor can debug the firmware in parallel with our kernel investigation.
That's a legitimate concern
정당한 우려입니다 · 상대 우려를 인정하며 답할 때
That's a legitimate concern, and it's why I'd scope the policy to generic fixes, not new hardware features.
응용 연습
That's a legitimate concern, and we'll address it in the test plan.
push back on
~에 반론을 제기하다 · 정중하게 반대할 때
Here's where I need to push back on everyone.
응용 연습
I need to push back on the idea that this is a hardware problem.
falls into that category
그 범주에 해당하다 · 분류 기준을 확인할 때
How would people know when a change falls into that category?
응용 연습
Does a display driver change fall into that category?
I've lived that
저도 겪어 봤습니다 · 경험에서 나온 공감을 표현할 때
I've lived that.
응용 연습
Rebasing without commit history? I've lived that.
I can get behind
찬성할 수 있습니다 · 제안에 동의를 표현할 때
Fine, I can get behind better commit messages.
응용 연습
I can get behind a weekly sync if it stays under thirty minutes.
I won't pretend it's free
공짜라고는 하지 않겠습니다 · 비용을 솔직히 인정할 때
I won't pretend it's free.
응용 연습
I won't pretend it's free, but the savings are larger.
I'll concede that point
그 점은 인정하겠습니다 · 논쟁 중 상대 논점을 받아들일 때
I'll concede that point.
응용 연습
I'll concede that point; the old tool was slower.
pull this together
이걸 정리하다 · 논의를 종합할 때
Let me try to pull this together.
응용 연습
Let me pull this together before we run out of time.
a fair way to find out
알아보기에 공정한 방법 · 실험이나 시범을 수용할 때
I'm still skeptical about speed, but a pilot is a fair way to find out.
응용 연습
A two-week trial is a fair way to find out.