My English Study매일 만나는 비즈니스 영어
← 시스템 이슈 분석 학습 목록

SYSTEM SW / 2026-08-22 / System issue triage

Analyzing a Use-After-Free Panic in the USB Gadget Path

USB 가젯 경로의 use-after-free 커널 패닉 분석

Orion에서 USB 테더링이나 파일 전송 중 케이블을 뽑을 때 드물게 커널 패닉이 발생합니다. SQE, 사내 커널·BSP 팀, Google 안드로이드 커널팀, 칩셋 벤더 Qorvix USB 팀이 KASAN 빌드로 확인한 use-after-free의 원인이 공통 커널 코드인지 벤더 드라이버인지 분석하고, 단일 패치 반영과 LTS 머지 중 대응 방안을 논의합니다.

가상의 비즈니스 회의 · 중급~고급 · 2,205단어 · 약 18분

Tom Ahn · SQEJiwoo Lee · Kernel & BSPHyunsoo Bae · Kernel & BSPNathan Brooks · Google Android Kernel TeamKen Tsai · Qorvix USB Engineering

01 / English script

Attendance

01 · Tom AhnSQE

Good morning, everyone, and thank you for joining on a Saturday. I'm Tom from SQE. This is a smaller group than usual, because the issue is very specific: a kernel panic in the USB path on Orion. We have Kernel and BSP, Google's Android kernel team, and Qorvix's USB team. Let's do quick introductions, starting with our guests.

02 · Nathan BrooksGoogle Android Kernel Team

Hi, I'm Nathan Brooks from the Android kernel team at Google, joining from Seattle. I work on the common kernel branches, including the USB subsystem. Kevin from partner engineering asked me to join because the crash might be in common code.

03 · Ken TsaiQorvix USB Engineering

Ken Tsai from Qorvix in Taipei. I maintain the USB controller driver for the Orion chipset.

04 · Jiwoo LeeKernel & BSP

Jiwoo Lee, Kernel and BSP. After the storage panic, I seem to have become the go-to person for use-after-free bugs.

05 · Hyunsoo BaeKernel & BSP

Hyunsoo Bae, also Kernel and BSP. I run our KASAN builds, so I'll walk through the report.

Symptom and Reproduction

06 · Tom AhnSQE

Here's the symptom. If a user is using USB tethering or transferring files to a computer, and they unplug the cable in the middle of a transfer, the phone occasionally panics and reboots. In the field, the rate is low, about two crashes per ten thousand unplugs, but because it happens to a lot of users every day, it's now the third most common kernel panic signature on Orion.

07 · Tom AhnSQE

To reproduce it in the lab, we built a simple rig with a relay that connects and disconnects the USB cable every few seconds while a large file transfer runs. With twenty devices running overnight, we get a crash roughly every two hours. That's slow, but it's enough to test hypotheses.

08 · Nathan BrooksGoogle Android Kernel Team

That's a very useful rig. Does it reproduce with tethering only, file transfer only, or does it need both?

09 · Tom AhnSQE

Either one is enough, but it's about three times more frequent when both are active at the same time. That's what made us suspect something shared between the two USB functions, rather than a bug in one of them.

Reading the KASAN Report

10 · Hyunsoo BaeKernel & BSP

The production dumps showed a crash in the completion callback of a USB request, with a pointer that looked like garbage. That's a classic sign of memory corruption, but it doesn't tell you who corrupted it. So we flashed the rig devices with a KASAN build. For anyone who hasn't used it: KASAN is the kernel address sanitizer. It tracks every allocation and every free, and when code touches memory that has already been freed, it stops immediately and prints a report.

11 · Hyunsoo BaeKernel & BSP

The KASAN report is very clear. It shows three stack traces. The first one is the bad access: the USB controller driver's interrupt handler calls the completion callback for a request. The second one shows where that request was allocated: by the tethering function when the cable was connected. And the third one shows where it was freed: by the same tethering function, in its disable path, which runs when the cable is unplugged.

12 · Jiwoo LeeKernel & BSP

So the sequence is: the cable is unplugged, the tethering function frees its request, and then, a moment later, the controller driver completes the same request and calls back into memory that no longer exists. It's very similar in shape to the storage bug: a completion arriving after the owner has already cleaned up.

13 · Tom AhnSQE

Then the question is whose responsibility it is to prevent that. Should the function wait for outstanding requests before freeing them, or should the controller driver make sure it never completes a request after the function is disabled?

14 · Nathan BrooksGoogle Android Kernel Team

According to the gadget framework's contract, it's a shared responsibility, but the order is clearly defined. When a function is disabled, it must first dequeue all its outstanding requests from the controller. Dequeue is supposed to be synchronous: when it returns, the controller has either completed the request with a cancellation status or guaranteed it never will. Only after that can the function free the memory.

15 · Ken TsaiQorvix USB Engineering

And our controller driver does implement dequeue that way, synchronously. So if the function calls dequeue before freeing, this shouldn't happen from our side.

16 · Hyunsoo BaeKernel & BSP

That's where it gets interesting. The tethering function does call dequeue, but only for requests on the receive endpoint. For the transmit endpoint, it relies on a disconnect callback from the controller to clean up. And the timing of that callback relative to disable is where the race happens.

Common Code or Vendor Code

17 · Tom AhnSQE

So is this a bug in the common tethering function, which is Google's code, or in how Qorvix's driver delivers the disconnect callback?

18 · Nathan BrooksGoogle Android Kernel Team

I looked at this before the call, and I believe it's in the common code. The transmit path in that function makes an assumption that held true for older controller drivers, but isn't guaranteed by the framework. In fact, a fix was merged into the upstream long-term stable branch for 6.1 about three weeks ago. Another partner reported a similar crash on a different chipset.

19 · Jiwoo LeeKernel & BSP

Three weeks ago. That explains why we don't have it. Our Orion kernel is based on the 6.1 stable release from three months ago. We merge stable updates quarterly, and the next merge isn't scheduled until October.

20 · Ken TsaiQorvix USB Engineering

I'm relieved, honestly. But to be thorough, I'll still review our controller driver's disconnect path. If our timing makes the race more likely than on other chipsets, I'd like to know.

21 · Nathan BrooksGoogle Android Kernel Team

That's a good idea. On the other partner's chipset, the crash rate was about ten times lower than what you're describing. So your controller may be completing transmit requests more quickly after disconnect, which widens the window.

Verifying the Upstream Fix

22 · Tom AhnSQE

Before we decide anything, I want proof that the upstream fix actually solves our problem. How quickly can we test it?

23 · Hyunsoo BaeKernel & BSP

The patch is small, about fifteen lines, and it applies cleanly to our tree. I can have a KASAN build with the fix on the rig this afternoon. If we run twenty devices for forty-eight hours, which would normally produce about twenty-four crashes, and we see zero KASAN reports, I'd consider that strong evidence.

24 · Jiwoo LeeKernel & BSP

I'd also run a non-KASAN build in parallel. KASAN changes timing, because every memory access is slower. Occasionally, a race disappears under KASAN simply because everything is slower, not because it's fixed. Testing both builds protects us from fooling ourselves.

25 · Tom AhnSQE

Good point. I'll split the rig: ten devices with KASAN plus the fix, ten with the production configuration plus the fix. And I'll keep a few on the old build as a control, just like we did for storage.

Field Impact and Interim Options

26 · Tom AhnSQE

While we wait for the test results, let's think about the users who are hitting this today. Even if the fix goes into the September build, it won't reach most devices until mid-September. Is there anything we can do in the meantime?

27 · Hyunsoo BaeKernel & BSP

Unfortunately, there's no configuration switch that avoids the race. The tethering function is either enabled or not, and disabling USB tethering entirely would be far worse than an occasional crash. The only real fix is the code change.

28 · Jiwoo LeeKernel & BSP

For context on severity, the panic doesn't cause any data loss, because file transfers over USB are written by the computer, not the phone, and an interrupted transfer simply fails. The user loses about a minute while the phone reboots. It's annoying, but it's not dangerous. So I don't think it justifies an emergency release outside the normal monthly schedule.

29 · Tom AhnSQE

I agree with that assessment. Field Quality will still want to know the expected date, though, so support can give customers a real answer instead of 'we're looking into it'.

30 · Ken TsaiQorvix USB Engineering

Is Orion Lite affected as well? It uses a different controller from us, an older generation, but the same tethering function from the common kernel.

31 · Tom AhnSQE

Good question. The signature appears on Orion Lite too, but about fifteen times less often. That's consistent with what Nathan said about controller timing. So the same cherry-pick should go into the Orion Lite September release as well, even though it's much less urgent there.

32 · Nathan BrooksGoogle Android Kernel Team

And for Atlas and Atlas Lite, on kernel 6.12, the fix is already included, because the 6.12 branch received it before the 6.1 backport. So your new devices start clean.

33 · Jiwoo LeeKernel & BSP

That's good to hear. One less thing to worry about on Atlas.

Cherry-Pick or Stable Merge

34 · Tom AhnSQE

Assuming the fix works, how do we ship it? Do we cherry-pick this one patch, or pull in the whole stable update?

35 · Jiwoo LeeKernel & BSP

For the September build, I'd cherry-pick. The content cutoff is August 25th, three days from now. The latest stable update contains about four hundred patches since our last merge. Even though stable patches are generally safe, taking four hundred of them three days before a cutoff, with a critical security fix and a camera fix already in the same build, is too much change at once.

36 · Nathan BrooksGoogle Android Kernel Team

I understand that for the short term. But I'd push back a little on the longer-term strategy. Merging stable updates only once a quarter means you're always up to three months behind on fixes like this one, including security fixes that don't get a separate bulletin entry. The partners with the fewest field crashes tend to merge stable updates monthly.

37 · Hyunsoo BaeKernel & BSP

Monthly merges sound good in theory, but each merge needs a full kernel regression cycle. With our current test capacity, monthly would mean SQE spends a quarter of its kernel time just validating stable merges.

38 · Tom AhnSQE

That's true today, but the kernel-focused regression suite we discussed at the GKI session would change that. If it runs automatically in twelve hours, monthly merges become much cheaper. I'd suggest we take this up properly at the vendor sync on the kernel stable strategy next week, rather than decide it here.

39 · Jiwoo LeeKernel & BSP

Agreed. For now: cherry-pick for September, and a proposal for a faster stable cadence at the meeting on the thirtieth.

Open Questions

40 · Ken TsaiQorvix USB Engineering

One question for Nathan. If our controller completes requests faster than others, is that something we should change? I don't want to slow down our driver just to hide a race in a function driver.

41 · Nathan BrooksGoogle Android Kernel Team

No, please don't. Completing quickly is correct behavior. With the fix, the function no longer depends on the timing, so faster is fine. If anything, your controller did everyone a favor by exposing the bug more often.

42 · Hyunsoo BaeKernel & BSP

This makes me think we should run KASAN builds on the stress rigs more regularly, not only when we're investigating something. If we'd had a KASAN build on a USB rig months ago, we'd have found this before it reached the field.

43 · Tom AhnSQE

I'd support that. Maybe ten percent of the stress lab always runs KASAN builds, rotating across subsystems. It's slower, so it finds fewer timing bugs, but it finds memory bugs with a precise report, which saves days of analysis.

44 · Nathan BrooksGoogle Android Kernel Team

If it helps, our team publishes a list of the most frequent crash signatures we see across partners each month. If you match your field crashes against that list, you'll sometimes find a fix already exists upstream, like today.

45 · Jiwoo LeeKernel & BSP

That would have saved us a week here. Could you add our team to that distribution list?

46 · Nathan BrooksGoogle Android Kernel Team

Of course. I'll ask Kevin to add you on Monday.

Action Items

47 · Tom AhnSQE

Let me summarize. Hyunsoo: KASAN and production builds with the upstream fix on the rig this afternoon. Tom, that's me: split the rig, keep a control group, and report on Monday morning. Jiwoo: prepare the cherry-pick for the September build, assuming the results are clean, and draft the stable cadence proposal for the thirtieth. Ken: review the controller's disconnect path and share the timing data with Nathan. Nathan: add us to the monthly crash signature list. Hyunsoo and I will also propose the rotating KASAN group in the stress lab.

48 · Ken TsaiQorvix USB Engineering

I'll have the timing analysis by Wednesday. I'll measure how long our controller takes to complete outstanding transmit requests after a disconnect, compared with the reference timing in the specification, so we can see exactly how much faster we are than other chipsets.

49 · Hyunsoo BaeKernel & BSP

The builds will be on the rig by 3 p.m. I'll also send everyone the full KASAN report from this morning, with the three stack traces annotated, because it's a good example for anyone who hasn't read one before.

50 · Jiwoo LeeKernel & BSP

And I'll write the cherry-pick so it matches the upstream commit exactly, with the original commit reference in the message. That way, when we do the next stable merge, the tools will recognize it as already applied, and we won't get a conflict.

Closing

51 · Tom AhnSQE

Thank you, everyone, especially Nathan and Ken for joining on a weekend. Our next call is Monday, August 24th, at 9 a.m. Korea time, which is Sunday at 5 p.m. in Seattle. If the overnight results are clean, it should be a short call.

52 · Nathan BrooksGoogle Android Kernel Team

Works for me. Thanks for the clear report; it made this much easier. Honestly, the reproduction rig and the KASAN report together are exactly what we hope to receive from partners. Most crash reports we get are a single stack trace and a sentence, and those take ten times longer to resolve.

53 · Tom AhnSQE

That's good to hear. I'll share the rig design with our other labs, so they can build the same thing for other connectors, like the charging port and the headphone adapter.

54 · Jiwoo LeeKernel & BSP

Thanks, everyone. It's a nice change to have a bug that someone else already fixed. Let's make sure the next one gets found by matching against Nathan's list before we spend a week on it.

02 / 한국어 번역

참석자 확인

01 · Tom AhnSQE

좋은 아침입니다, 여러분. 토요일에 참석해 주셔서 감사합니다. 저는 SQE의 Tom입니다. 이슈가 아주 구체적이라 평소보다 작은 그룹입니다. Orion의 USB 경로에서 발생하는 커널 패닉이죠. 커널·BSP 팀, Google 안드로이드 커널팀, Qorvix USB 팀이 참석했습니다. 손님들부터 간단히 소개하죠.

02 · Nathan BrooksGoogle Android Kernel Team

안녕하세요, 시애틀에서 참석한 Google 안드로이드 커널팀의 Nathan Brooks입니다. USB 서브시스템을 포함해 공통 커널 브랜치를 담당합니다. 크래시가 공통 코드에 있을 수도 있어서, 파트너 엔지니어링의 Kevin이 참석을 요청했습니다.

03 · Ken TsaiQorvix USB Engineering

타이베이에 있는 Qorvix의 Ken Tsai입니다. Orion 칩셋의 USB 컨트롤러 드라이버를 유지보수합니다.

04 · Jiwoo LeeKernel & BSP

커널·BSP 팀 이지우입니다. 스토리지 패닉 이후로 use-after-free 버그 담당자가 된 것 같네요.

05 · Hyunsoo BaeKernel & BSP

같은 커널·BSP 팀 배현수입니다. KASAN 빌드를 운영하고 있어서 보고서를 설명하겠습니다.

증상과 재현

06 · Tom AhnSQE

증상은 이렇습니다. 사용자가 USB 테더링을 쓰거나 컴퓨터로 파일을 전송하다가 전송 도중 케이블을 뽑으면, 폰이 가끔 패닉을 일으키고 재부팅됩니다. 시장에서 비율은 낮아서 케이블을 만 번 뽑을 때 두 번 정도 크래시가 나지만, 매일 많은 사용자에게 일어나기 때문에 지금 Orion에서 세 번째로 흔한 커널 패닉 시그니처입니다.

07 · Tom AhnSQE

랩에서 재현하려고, 대용량 파일 전송이 진행되는 동안 몇 초마다 USB 케이블을 연결했다 끊는 릴레이로 간단한 장치를 만들었습니다. 단말 20대로 밤새 돌리면 대략 2시간마다 크래시가 납니다. 느리지만 가설을 테스트하기에는 충분합니다.

08 · Nathan BrooksGoogle Android Kernel Team

아주 유용한 장치네요. 테더링만으로 재현되나요, 파일 전송만으로 재현되나요, 아니면 둘 다 필요한가요?

09 · Tom AhnSQE

둘 중 하나만으로도 충분하지만, 둘이 동시에 활성화되면 약 세 배 더 자주 발생합니다. 그래서 두 USB 기능 중 하나의 버그라기보다 둘이 공유하는 무언가를 의심하게 됐습니다.

KASAN 보고서 읽기

10 · Hyunsoo BaeKernel & BSP

양산 덤프에서는 USB 요청의 완료 콜백에서 쓰레기 값처럼 보이는 포인터와 함께 크래시가 났습니다. 메모리 손상의 전형적인 징후지만, 누가 손상시켰는지는 알려 주지 않습니다. 그래서 장치에 연결된 단말에 KASAN 빌드를 플래싱했습니다. 안 써 보신 분들을 위해 설명하면, KASAN은 커널 주소 새니타이저입니다. 모든 할당과 해제를 추적하고, 코드가 이미 해제된 메모리를 건드리면 즉시 멈추고 보고서를 출력합니다.

11 · Hyunsoo BaeKernel & BSP

KASAN 보고서는 아주 명확합니다. 스택 트레이스가 세 개 나옵니다. 첫 번째는 잘못된 접근인데, USB 컨트롤러 드라이버의 인터럽트 핸들러가 요청의 완료 콜백을 호출하는 부분입니다. 두 번째는 그 요청이 어디서 할당됐는지 보여 주는데, 케이블이 연결될 때 테더링 기능이 할당했습니다. 세 번째는 어디서 해제됐는지 보여 주는데, 같은 테더링 기능이 케이블을 뽑을 때 실행되는 비활성화 경로에서 해제했습니다.

12 · Jiwoo LeeKernel & BSP

그러니까 순서는 이렇습니다. 케이블이 뽑히고, 테더링 기능이 요청을 해제하고, 잠시 후 컨트롤러 드라이버가 같은 요청을 완료 처리하면서 더 이상 존재하지 않는 메모리로 콜백을 호출하는 거죠. 스토리지 버그와 모양이 아주 비슷합니다. 소유자가 이미 정리한 후에 완료가 도착하는 거요.

13 · Tom AhnSQE

그럼 질문은 그걸 막는 게 누구의 책임이냐는 거네요. 기능 쪽이 해제하기 전에 미처리 요청을 기다려야 하나요, 아니면 컨트롤러 드라이버가 기능이 비활성화된 후에는 절대 요청을 완료 처리하지 않도록 해야 하나요?

14 · Nathan BrooksGoogle Android Kernel Team

가젯 프레임워크의 계약에 따르면 공동 책임이지만, 순서는 명확히 정의돼 있습니다. 기능이 비활성화될 때는 먼저 컨트롤러에서 미처리 요청을 모두 dequeue해야 합니다. dequeue는 동기적이어야 합니다. 반환될 때 컨트롤러는 그 요청을 취소 상태로 완료했거나, 절대 완료하지 않을 거라고 보장한 상태여야 하죠. 그 이후에야 기능이 메모리를 해제할 수 있습니다.

15 · Ken TsaiQorvix USB Engineering

그리고 저희 컨트롤러 드라이버는 dequeue를 그렇게 동기적으로 구현하고 있습니다. 그러니 기능이 해제 전에 dequeue를 호출한다면, 저희 쪽에서 이런 일이 생겨선 안 됩니다.

16 · Hyunsoo BaeKernel & BSP

거기서부터가 흥미롭습니다. 테더링 기능은 dequeue를 호출하긴 하지만, 수신 엔드포인트의 요청에 대해서만 합니다. 송신 엔드포인트는 정리를 위해 컨트롤러의 연결 해제 콜백에 의존합니다. 그리고 비활성화 대비 그 콜백의 타이밍에서 경쟁 상태가 생깁니다.

공통 코드인가, 벤더 코드인가

17 · Tom AhnSQE

그럼 이건 Google 코드인 공통 테더링 기능의 버그인가요, 아니면 Qorvix 드라이버가 연결 해제 콜백을 전달하는 방식의 문제인가요?

18 · Nathan BrooksGoogle Android Kernel Team

회의 전에 살펴봤는데, 공통 코드에 있다고 봅니다. 그 기능의 송신 경로는 예전 컨트롤러 드라이버에서는 맞았지만 프레임워크가 보장하지는 않는 가정을 하고 있습니다. 실제로 약 3주 전에 6.1 업스트림 장기 안정 브랜치에 수정이 머지됐습니다. 다른 파트너가 다른 칩셋에서 비슷한 크래시를 보고했거든요.

19 · Jiwoo LeeKernel & BSP

3주 전이라고요. 그래서 저희한테 없었군요. Orion 커널은 3개월 전 6.1 안정 릴리스 기반입니다. 안정 업데이트는 분기마다 머지하는데, 다음 머지는 10월에야 예정돼 있습니다.

20 · Ken TsaiQorvix USB Engineering

솔직히 안심되네요. 하지만 철저하게 하기 위해 저희 컨트롤러 드라이버의 연결 해제 경로를 여전히 검토하겠습니다. 저희 타이밍이 다른 칩셋보다 경쟁 상태를 더 잘 일으킨다면 알고 싶습니다.

21 · Nathan BrooksGoogle Android Kernel Team

좋은 생각입니다. 다른 파트너의 칩셋에서는 크래시율이 말씀하신 것보다 약 10배 낮았습니다. 그러니 귀사 컨트롤러가 연결 해제 후 송신 요청을 더 빨리 완료하고 있어서 시간 창이 넓어지는 걸 수도 있습니다.

업스트림 수정 검증

22 · Tom AhnSQE

뭔가를 결정하기 전에, 업스트림 수정이 실제로 저희 문제를 해결한다는 증거를 원합니다. 얼마나 빨리 테스트할 수 있나요?

23 · Hyunsoo BaeKernel & BSP

패치는 15줄 정도로 작고, 저희 트리에 깔끔하게 적용됩니다. 오늘 오후에 수정이 들어간 KASAN 빌드를 장치에 올릴 수 있습니다. 보통이라면 크래시가 약 24건 나올 단말 20대 48시간 실행에서 KASAN 보고가 0건이면, 강한 증거로 보겠습니다.

24 · Jiwoo LeeKernel & BSP

KASAN이 아닌 빌드도 병렬로 돌리고 싶습니다. KASAN은 모든 메모리 접근을 느리게 해서 타이밍을 바꿉니다. 가끔은 고쳐져서가 아니라 단지 모든 게 느려져서 KASAN에서 경쟁 상태가 사라지기도 합니다. 두 빌드를 모두 테스트하면 스스로를 속이는 걸 막을 수 있습니다.

25 · Tom AhnSQE

좋은 지적이에요. 장치를 나누겠습니다. 10대는 KASAN과 수정, 10대는 양산 설정과 수정으로요. 그리고 스토리지 때처럼 몇 대는 이전 빌드로 대조군으로 두겠습니다.

시장 영향과 임시 대응

26 · Tom AhnSQE

테스트 결과를 기다리는 동안, 오늘 이 문제를 겪고 있는 사용자들을 생각해 봅시다. 수정이 9월 빌드에 들어가더라도 대부분의 단말에는 9월 중순에야 도달합니다. 그동안 할 수 있는 게 있을까요?

27 · Hyunsoo BaeKernel & BSP

안타깝게도 경쟁 상태를 피하는 설정 스위치는 없습니다. 테더링 기능은 켜져 있거나 꺼져 있거나 둘 중 하나고, USB 테더링을 완전히 끄는 건 가끔 나는 크래시보다 훨씬 나쁩니다. 진짜 해결책은 코드 변경뿐입니다.

28 · Jiwoo LeeKernel & BSP

심각도에 대한 맥락을 말씀드리면, USB 파일 전송은 폰이 아니라 컴퓨터가 쓰고 중단된 전송은 그냥 실패하기 때문에, 이 패닉으로 데이터 손실은 없습니다. 사용자는 폰이 재부팅되는 동안 1분 정도를 잃습니다. 짜증 나긴 하지만 위험하지는 않습니다. 그래서 정기 월간 일정 외의 긴급 릴리스를 정당화할 정도는 아니라고 봅니다.

29 · Tom AhnSQE

그 평가에 동의합니다. 그래도 고객 지원팀이 '확인 중입니다' 대신 실제 답을 줄 수 있도록, 시장 품질팀은 예상 날짜를 알고 싶어 할 겁니다.

30 · Ken TsaiQorvix USB Engineering

Orion Lite도 영향을 받나요? 저희 것과 다른, 이전 세대 컨트롤러를 쓰지만 공통 커널의 같은 테더링 기능을 씁니다.

31 · Tom AhnSQE

좋은 질문입니다. Orion Lite에서도 시그니처가 나타나지만, 약 15배 덜 자주 나옵니다. 컨트롤러 타이밍에 대해 Nathan이 한 말과 일치하죠. 그러니 거기서는 훨씬 덜 시급하더라도 같은 체리픽을 Orion Lite 9월 릴리스에도 넣어야 합니다.

32 · Nathan BrooksGoogle Android Kernel Team

그리고 커널 6.12 기반의 Atlas와 Atlas Lite는 6.1 백포트 전에 6.12 브랜치가 이미 그 수정을 받았기 때문에 이미 포함돼 있습니다. 그러니 새 단말들은 깨끗하게 시작합니다.

33 · Jiwoo LeeKernel & BSP

반가운 소식이네요. Atlas에서 걱정할 게 하나 줄었어요.

체리픽이냐, 안정 브랜치 머지냐

34 · Tom AhnSQE

수정이 효과가 있다고 가정하면, 어떻게 출시하죠? 이 패치 하나만 체리픽하나요, 아니면 안정 업데이트 전체를 가져오나요?

35 · Jiwoo LeeKernel & BSP

9월 빌드에는 체리픽하겠습니다. 콘텐츠 마감이 3일 후인 8월 25일입니다. 최신 안정 업데이트에는 마지막 머지 이후 패치가 약 400개 있습니다. 안정 브랜치 패치가 대체로 안전하긴 하지만, 크리티컬 보안 수정과 카메라 수정이 이미 같은 빌드에 있는데 마감 3일 전에 400개를 가져오는 건 한꺼번에 너무 많은 변화입니다.

36 · Nathan BrooksGoogle Android Kernel Team

단기적으로는 이해합니다. 하지만 장기 전략에 대해서는 조금 이의를 제기하고 싶습니다. 분기에 한 번만 안정 업데이트를 머지하면, 이번 같은 수정에 대해 항상 최대 3개월 뒤처지게 됩니다. 별도 보안 공지 항목이 없는 보안 수정도 포함해서요. 시장 크래시가 가장 적은 파트너들은 대체로 매달 안정 업데이트를 머지합니다.

37 · Hyunsoo BaeKernel & BSP

매달 머지하는 건 이론상 좋게 들리지만, 머지마다 전체 커널 회귀 사이클이 필요합니다. 현재 테스트 역량으로 매달 하면 SQE가 커널 테스트 시간의 4분의 1을 안정 머지 검증에만 쓰게 됩니다.

38 · Tom AhnSQE

지금은 맞는 말이지만, GKI 세션에서 논의한 커널 중심 회귀 스위트가 생기면 달라집니다. 12시간 안에 자동으로 돌아간다면 매달 머지하는 비용이 훨씬 낮아지죠. 여기서 결정하기보다 다음 주 커널 안정 브랜치 전략에 관한 벤더 회의에서 제대로 다루자고 제안합니다.

39 · Jiwoo LeeKernel & BSP

동의합니다. 지금은 9월에 체리픽하고, 30일 회의에서 더 빠른 안정 브랜치 머지 주기를 제안하는 걸로 하죠.

추가 질의

40 · Ken TsaiQorvix USB Engineering

Nathan에게 질문 하나요. 저희 컨트롤러가 다른 것보다 요청을 빨리 완료한다면, 그걸 바꿔야 하나요? 기능 드라이버의 경쟁 상태를 숨기려고 저희 드라이버를 느리게 만들고 싶지는 않습니다.

41 · Nathan BrooksGoogle Android Kernel Team

아니요, 그러지 마세요. 빠르게 완료하는 건 올바른 동작입니다. 수정이 들어가면 기능이 더 이상 타이밍에 의존하지 않으니, 빠른 건 괜찮습니다. 오히려 귀사 컨트롤러가 버그를 더 자주 드러나게 해서 모두에게 도움을 준 셈이죠.

42 · Hyunsoo BaeKernel & BSP

이걸 보니 뭔가를 조사할 때만이 아니라 스트레스 장치에서 KASAN 빌드를 더 정기적으로 돌려야겠다는 생각이 듭니다. 몇 달 전에 USB 장치에 KASAN 빌드가 있었다면 시장에 나가기 전에 이걸 찾았을 겁니다.

43 · Tom AhnSQE

찬성합니다. 스트레스 랩의 10% 정도를 항상 KASAN 빌드로 돌리고, 서브시스템별로 순환하는 거죠. 더 느려서 타이밍 버그는 덜 찾지만, 메모리 버그는 정확한 보고서와 함께 찾아내서 며칠 치 분석을 아껴 줍니다.

44 · Nathan BrooksGoogle Android Kernel Team

도움이 된다면, 저희 팀은 매달 파트너 전반에서 가장 자주 보이는 크래시 시그니처 목록을 공유합니다. 귀사 시장 크래시를 그 목록과 대조하면, 오늘처럼 이미 업스트림에 수정이 있는 경우를 가끔 찾을 수 있을 겁니다.

45 · Jiwoo LeeKernel & BSP

그거면 이번에 일주일은 아꼈겠네요. 저희 팀을 그 배포 목록에 추가해 주실 수 있나요?

46 · Nathan BrooksGoogle Android Kernel Team

물론이죠. 월요일에 Kevin에게 추가해 달라고 하겠습니다.

실행 항목

47 · Tom AhnSQE

요약하겠습니다. 현수 님은 오늘 오후 업스트림 수정이 들어간 KASAN 빌드와 양산 빌드를 장치에 올려 주세요. 저 Tom은 장치를 나누고 대조군을 두고 월요일 오전에 보고하겠습니다. 지우 님은 결과가 깨끗하다는 전제로 9월 빌드용 체리픽을 준비하고, 30일 회의용 안정 브랜치 머지 주기 제안서 초안을 써 주세요. Ken은 컨트롤러의 연결 해제 경로를 검토하고 타이밍 데이터를 Nathan과 공유해 주세요. Nathan은 저희를 월간 크래시 시그니처 목록에 추가해 주세요. 그리고 현수 님과 저는 스트레스 랩의 순환 KASAN 그룹을 제안하겠습니다.

48 · Ken TsaiQorvix USB Engineering

수요일까지 타이밍 분석을 드리겠습니다. 연결 해제 후 저희 컨트롤러가 미처리 송신 요청을 완료하는 데 걸리는 시간을 규격의 기준 타이밍과 비교해 측정해서, 다른 칩셋보다 정확히 얼마나 빠른지 볼 수 있게 하겠습니다.

49 · Hyunsoo BaeKernel & BSP

빌드는 오후 3시까지 장치에 올리겠습니다. 그리고 KASAN 보고서를 처음 보는 분들에게 좋은 예시가 될 테니, 오늘 아침의 전체 보고서를 스택 트레이스 세 개에 주석을 달아서 모두에게 보내겠습니다.

50 · Jiwoo LeeKernel & BSP

그리고 체리픽을 업스트림 커밋과 정확히 일치하게 작성하고, 메시지에 원래 커밋 참조를 넣겠습니다. 그러면 다음 안정 브랜치 머지 때 도구가 이미 적용된 것으로 인식해서 충돌이 나지 않을 겁니다.

마무리

51 · Tom AhnSQE

모두 감사합니다. 특히 주말에 참석해 주신 Nathan과 Ken에게요. 다음 회의는 8월 24일 월요일 한국 시간 오전 9시, 시애틀 시간으로는 일요일 오후 5시입니다. 밤사이 결과가 깨끗하면 짧은 회의가 될 겁니다.

52 · Nathan BrooksGoogle Android Kernel Team

좋습니다. 보고서가 명확해서 훨씬 쉬웠어요. 고맙습니다. 솔직히 재현 장치와 KASAN 보고서를 함께 주신 게 바로 저희가 파트너들에게 받고 싶은 것입니다. 저희가 받는 대부분의 크래시 보고는 스택 트레이스 하나와 문장 하나라서, 해결하는 데 열 배는 더 오래 걸립니다.

53 · Tom AhnSQE

반가운 말씀이네요. 다른 랩들이 충전 포트나 헤드폰 어댑터 같은 다른 커넥터용으로도 같은 걸 만들 수 있도록 장치 설계를 공유하겠습니다.

54 · Jiwoo LeeKernel & BSP

모두 감사합니다. 다른 누군가 이미 고쳐 둔 버그를 만나니 기분 좋은 변화네요. 다음번에는 일주일을 쓰기 전에 Nathan의 목록과 대조해서 찾도록 합시다.

03 / Business expressions

the go-to person

믿고 찾는 담당자 · 특정 분야에서 사람들이 먼저 찾는 사람을 말할 때

After the storage panic, I seem to have become the go-to person for use-after-free bugs.

응용 연습
She's the go-to person for anything related to the bootloader.

enough to test hypotheses

가설을 테스트하기에 충분한 · 재현 빈도가 낮아도 분석에는 쓸 만할 때

That's slow, but it's enough to test hypotheses.

응용 연습
One reproduction per hour is enough to test hypotheses.

made us suspect

~을 의심하게 만들었다 · 관찰 결과가 특정 원인을 가리키게 된 경위를 설명할 때

That's what made us suspect something shared between the two USB functions, rather than a bug in one of them.

응용 연습
The timing pattern made us suspect the thermal driver.

a classic sign of

~의 전형적인 징후 · 증상이 특정 유형의 문제를 강하게 시사할 때

That's a classic sign of memory corruption, but it doesn't tell you who corrupted it.

응용 연습
A garbage pointer in a callback is a classic sign of use-after-free.

very similar in shape

모양(구조)이 아주 비슷한 · 두 버그의 패턴이 닮았음을 지적할 때

It's very similar in shape to the storage bug: a completion arriving after the owner has already cleaned up.

응용 연습
This deadlock is very similar in shape to last year's audio hang.

a shared responsibility

공동 책임 · 여러 구성 요소가 함께 책임지는 구조를 설명할 때

According to the gadget framework's contract, it's a shared responsibility, but the order is clearly defined.

응용 연습
Data integrity is a shared responsibility between the app and the file system.

That's where it gets interesting

거기서부터가 흥미롭다 · 분석의 핵심 반전이나 단서로 넘어갈 때

That's where it gets interesting.

응용 연습
The crash only happens on one carrier. That's where it gets interesting.

held true

(가정이) 맞았다 · 과거에는 유효했던 가정을 설명할 때

The transmit path in that function makes an assumption that held true for older controller drivers, but isn't guaranteed by the framework.

응용 연습
That assumption held true until we added a second display.

to be thorough

철저하게 하기 위해 · 필수는 아니지만 추가 확인을 하겠다고 할 때

But to be thorough, I'll still review our controller driver's disconnect path.

응용 연습
To be thorough, let's rerun the test on the old firmware too.

widens the window

(경쟁 상태의) 시간 창을 넓힌다 · 타이밍 차이로 버그 발생 가능성이 커지는 걸 설명할 때

So your controller may be completing transmit requests more quickly after disconnect, which widens the window.

응용 연습
The extra logging widens the window for the race.

fooling ourselves

스스로를 속이는 것 · 잘못된 검증으로 착각하는 위험을 경계할 때

Testing both builds protects us from fooling ourselves.

응용 연습
A test that can't fail is just fooling ourselves.

up to three months behind

최대 3개월 뒤처진 · 업데이트 주기로 인한 지연을 설명할 때

Merging stable updates only once a quarter means you're always up to three months behind on fixes like this one, including security fixes that don't get a separate bulletin entry.

응용 연습
With quarterly merges, we're up to three months behind upstream.

take this up properly

이 문제를 제대로 다루다 · 현재 자리보다 적합한 회의에서 논의하자고 할 때

I'd suggest we take this up properly at the vendor sync on the kernel stable strategy next week, rather than decide it here.

응용 연습
Let's take this up properly at the release council.

did everyone a favor

모두에게 도움을 줬다 · 의도치 않게 문제를 드러내 결과적으로 도움이 된 상황을 말할 때

If anything, your controller did everyone a favor by exposing the bug more often.

응용 연습
The strict compiler did everyone a favor by flagging the bug.

saves days of analysis

며칠 치 분석을 아껴 준다 · 도구나 방법의 효율성을 강조할 때

It's slower, so it finds fewer timing bugs, but it finds memory bugs with a precise report, which saves days of analysis.

응용 연습
A good reproduction script saves days of analysis.

a nice change

기분 좋은 변화 · 평소와 다른 반가운 상황을 가볍게 표현할 때

It's a nice change to have a bug that someone else already fixed.

응용 연습
A quiet on-call week was a nice change.