Amazon is working to expand the Linux kernel's core scheduling mechanism so that untrusted tasks are isolated more tightly than the current SMT-focused design allows — a move aimed squarely at the class of CPU side-channel attacks that have complicated multi-tenant cloud security since Spectre.
As Phoronix reports, Amazon's interest is in extending core scheduling "to additional considerations," so that task isolation goes beyond the single rule the feature enforces today: only trusted tasks may share a physical core with an SMT sibling thread. The reporting does not specify which additional resources or relationships the expanded scheme would cover, and Amazon has not detailed them either.
What core scheduling actually does
To understand why this matters, it helps to start with hyperthreading — officially simultaneous multithreading, or SMT. One physical CPU core is presented to the operating system as two logical processors, each running its own task. The two threads share the core's execution resources and, critically, its caches.
That sharing is a security boundary problem. A malicious process on one sibling thread can observe cache-timing patterns, branch behaviour and other microarchitectural signals leaking from a victim process on the other — the basic technique behind Spectre-class and related side-channel attacks. In a public cloud, where tenants with no relationship to each other routinely land on the same hardware, the risk is not theoretical.
Core scheduling, which shipped in the mainline kernel in Linux 5.14 in 2021 after work originating at Google, addresses this by grouping tasks into "core scheduling cookie" domains. Only tasks sharing a trusted cookie are permitted to run simultaneously on the two SMT siblings of a core. If a core has to run an untrusted task, its sibling thread is idled rather than allowed to run alongside it.
Cookies are assigned from userspace through the prctl(PR_SCHED_CORE) interface and inherited across fork and exec, so it is container runtimes and job schedulers — not the kernel — that decide which tasks belong to the same trust grouping. Anything without a shared cookie falls into its own group by default.
Where AWS wants to take it
The mechanism as it stands is narrowly about SMT sibling relationships. Amazon's proposal is to broaden the criteria used to decide when tasks may share execution resources — a significant generalisation of a feature that has, until now, been relatively simple to reason about. The extensions remain patch-stage work: the core scheduling framework itself is long-merged kernel functionality, but Amazon's additions are proposals under discussion, not shipped code that administrators can enable today.
Core scheduling has never been free, either. CONFIG_SCHED_CORE and the associated sysfs and sched_setattr interfaces are opt-in, which is why not every deployment has absorbed the performance cost of idling sibling threads under contention. AWS's proposal would, in effect, make that trade-off more expensive at scale — restricting more forms of resource sharing rather than fewer. That the company is willing to propose it suggests it judges the security benefit worth the throughput loss on instances it meters by the vCPU.
Why it matters beyond the patch queue
For infrastructure teams, the story is a signal about where cloud-level isolation is heading. Providers are increasingly treating the CPU itself — not just the virtual machine boundary, the network namespace or the storage path — as a tenancy isolation surface. Anyone running mixed-trust workloads on shared tenancy hardware, whether public cloud instances or on-premises servers with SMT enabled, faces the same underlying question of who shares a core with whom.
For system administrators in Hong Kong, the relevance is conditional but practical. Teams running workloads in AWS's ap-east-1 region, or maintaining on-premises Linux estates alongside cloud instances, can expect whatever isolation rules a major provider adopts to shape both the performance characteristics of the instances they buy and the security assumptions they can make about their own multi-tenant deployments. The immediate action is modest — track the patch discussion rather than plan around it — while an inventory of whether CONFIG_SCHED_CORE is enabled across existing fleets remains a worthwhile item now.
Phoronix's coverage sets out the current state of the proposal; the specifics of what Amazon intends to isolate beyond SMT siblings remain to be seen as the patches develop.
Amazon 正致力擴展 Linux kernel 的 core scheduling 機制,使不受信任的任務獲得比現行以 SMT 為核心的設計更嚴密的隔離——此舉直接針對自 Spectre 以來令多租戶雲端安全複雜化的一類 CPU side-channel 攻擊。
據 Phoronix 報道,Amazon 的興趣在於將 core scheduling「擴展至其他考量因素」,令任務隔離超越該功能目前所執行的單一規則:只有受信任的任務才可與 SMT sibling thread 共用同一個物理核心。報道並未指明擴展方案將涵蓋哪些額外資源或關係,Amazon 亦未作進一步說明。
Core scheduling 究竟做什麼
要理解此事為何重要,可先從 hyperthreading——正式名稱為 simultaneous multithreading,即 SMT——講起。一個物理 CPU core 會以兩個邏輯處理器的形式呈現給作業系統,各自執行自己的任務。兩個 thread 共用該核心的執行資源,關鍵在於,亦共用其快取。
這種共用構成了一個安全邊界問題。位於其中一個 sibling thread 上的惡意進程,可以觀察到從另一個 sibling thread 上受害者進程洩漏出來的 cache-timing 模式、branch 行為及其他微架構信號——這正是 Spectre 類及相關 side-channel 攻擊的基本技術。在公共雲環境中,彼此毫無關聯的租戶經常落在同一硬件上,風險並非純屬理論。
Core scheduling 於 2021 年隨 Linux 5.14 進入 mainline kernel,源於 Google 的工作,其做法是將任務分組至「core scheduling cookie」域。只有共享受信任 cookie 的任務,才獲准同時在一個核心的兩個 SMT sibling 上運行。若某核心必須執行不受信任的任務,其 sibling thread 會被置於閒置狀態,而非容許與之並行運行。
Cookie 透過 prctl(PR_SCHED_CORE) 介面從 userspace 指定,並在 fork 與 exec 之間繼承,因此決定哪些任務屬於同一信任分組的是 container runtime 及 job scheduler——而非 kernel。沒有共享 cookie 的任務,預設歸入各自獨立的群組。
AWS 希望將其帶往何方
現行機制嚴格來說只涉及 SMT sibling 關係。Amazon 的提議是擴闊判斷任務何時可共用執行資源的準則——這是對一項至今為止仍相對易於推理的功能所作的顯著擴大化。相關擴展仍處於 patch 階段:core scheduling 框架本身早已合併進 kernel,但 Amazon 的增補內容仍是討論中的提案,並非系統管理員今日即可啟用的已發布程式碼。
Core scheduling 從來也不是零成本的。CONFIG_SCHED_CORE 及相關的 sysfs 和 sched_setattr 介面均屬 opt-in 設定,這正是並非所有部署都願意承擔在競爭下閒置 sibling thread 所帶來性能代價的原因。AWS 的提議實質上會令這項取捨在大規模下代價更高——限制更多形式的資源共享,而非更少。Amazon 願意提出此方案,顯示其認為安全收益值得以按 vCPU 計量的實例所損失的吞吐量來換取。
為何影響不止於 patch queue
對基礎設施團隊而言,此事釋放了一個訊號,指出雲端層級隔離正走向何方。服務供應商日益將 CPU 本身——而不僅是虛擬機邊界、network namespace 或儲存路徑——視為租戶隔離的層面。任何人只要在共享租戶硬件上運行信任級別混雜的負載,無論是公共雲實例還是啟用了 SMT 的本地伺服器,都面臨同一根本問題:誰與誰共用一個核心。
對香港的系統管理員而言,相關性雖有條件但相當實際。在 AWS ap-east-1 區域運行負載,或在維護本地 Linux 系統之餘同時使用雲端實例的團隊,可以預期主要供應商採納的任何隔離規則,都會影響他們所購買實例的性能特徵,以及他們對自身多租戶部署可作何種安全假設。當下行動宜低調——追蹤 patch 討論而非據此規劃——與此同時,盤點現有機群中 CONFIG_SCHED_CORE 是否已啟用,仍是一項值得即時跟進的事項。
Phoronix 的報道梳理了提案的現狀;Amazon 意圖在 SMT sibling 之外隔離什麼,具體細節仍有待 patch 的後續發展來揭曉。
