Linus rejects 'beyond stupid' AWS-made Linux patch

栏目: IT技术 · 发布时间: 5年前

内容简介:Linux kernel head Linus Torvalds has trashed a patch from Amazon Web Services (AWS) engineers that was aimed at mitigating the Snoop attack on Intel CPUs discovered by an AWS engineer earlier this year.The so-called '

Linus rejects 'beyond stupid' AWS-made Linux patch

Linus Torvalds has no problem with Microsoft

162:30:00

Linux kernel head Linus Torvalds has trashed a patch from Amazon Web Services (AWS) engineers that was aimed at mitigating the Snoop attack on Intel CPUs discovered by an AWS engineer earlier this year.

The so-called ' Snoop-assisted L1 Data Sampling ', or Snoop (CVE-2020-0550) attacks affecting a range of Intel Xeon and Core CPUs were disclosed in March. 

AWS engineer Pawel Wieczorkiewicz discovered a way to leak data from an Intel CPU's memory via its L1D cache, which sits in CPU cores, through 'bus snooping' – the cache updating operation that happens when data is modified in L1D. 

In the wake of the disclosure, AWS engineer Balbir Singh proposed a patch for the Linux kernel for applications to be able to opt in to flush the L1D cache when a task is switched out.

"This protects their data from being snooped or leaked via side channels after the task has context switched out," Singh explained in April . The patch was intended to ship with Linux kernel version 5.8.  

The feature would allow applications on an opt-in basis to call prctl(2) to flush the L1D cache for a task once it leaves the CPU, assuming the hardware supports it.

But, as spotted by Phoronix , Torvalds believes the patch will allow applications that opt in to the patch to degrade CPU performance for other applications.

"Because it looks to me like this basically exports cache flushing instructions to user space, and gives processes a way to just say 'slow down anybody else I schedule with too'," wrote Torvalds yesterday.

"In other words, from what I can tell, this takes the crazy 'Intel ships buggy CPU's and it causes problems for virtualization' code (which I didn't much care about), and turns it into 'anybody can opt in to this disease, and now it affects even people and CPU's that don't need it and configurations where it's completely pointless'.

"I don't want some application to go 'Oh, I'm _soo_ special and pretty and such a delicate flower, that I want to flush the L1D on every task switch, regardless of what CPU I am on, and regardless of whether there are errata or not. Because that app isn't just slowing down itself, it's slowing down others too."

Torvalds' reference to virtualization was directed at AWS which, like other cloud providers, sells virtual CPUs often with simultaneous multithreading (SMT) enabled.

He goes on to point out that with SMT enabled, it "should disable this kind of crazy pseudo-security entirely, since it is completely pointless in that situation".

"At a _minimum_, SMT being enabled should disable this kind of crazy pseudo-security entirely, since it is completely pointless in that situation. Scheduling simply isn't a synchronization point with SMT on, so saying "sure, I'll flush the L1 at context switch" is beyond stupid," he said .  

In a discussion with Singh , Torvalds notes that to "'flush L1D$ on SMT' is crazy, since an attacker would just sit on a sibling core and attack the L1 contents *before* the task switch happens". 

As noted by The Register , AWS principal engineer Benjamin Herrenschmidt also  added some context to the debate over the patch in a discussion with Red Hat Linux kernel contributor Ingo Molnar. 

Herrenschmidt admitted that the patch is pointless with SMT, but urged kernel developers not to "throw the baby out with the bath water" and contested the argument that the patch was because AWS wants to sell hyper threads as virtual CPUs.

"Not necessarily and not in every circumstances," Herrenschmidt wrote. "Yes, VMs will typically have SMT enabled. This isn't targeted at them though. One example that was given during the discussions was containers pertaining to different users," he said.

"Another example would be a process that handles more critical data such as payment information, than the rest of the system and wants to protect itself (or the admin wants that process protected) against possible data leaks to less trusted processes."

"AWS has more than just VMs for rent :-) There are a whole pile of higher level 'services' that our users can use and not all of them necessarily run on VMs charged per vCPU."

Herrenschmidt said the patches aren't trying to solve problems happening inside of a customer VM running SMT and nor are they about protecting VMs against other VMs on the same system.

More on Linus Torvalds, Linux and open source

  • You can build Linus Torvalds' PC: Here's all the hardware and where to buy it   
  • Linus Torvalds: Avoid Oracle's ZFS kernel code on Linux until 'litigious' Larry signs off    
  • Linus Torvalds isn't worried about Microsoft taking over Linux  
  • Linus Torvalds: 'I'm not a programmer anymore'   
  • Linus Torvalds releases Linux 5.3: Kernel fixes are about user impact, nothing else
  • Microsoft Teams for Linux client: It's happening
  • Microsoft's new Windows 10 20H1 test build adds ARM64 support for WSL
  • Microsoft hosts first Windows Subsystem for Linux conference
  • Linux on your laptop: Here's what you need to know about UEFI firmware
  • Old Linus Torvalds is back: Linux page caching sparks 'bulls**t' outburst
  • Now Intel signs up to open-source code of conduct after Torvalds' Linux hiatus
  • Linus Torvalds: After big Linux performance hit, Spectre v2 patch needs curbs
  • Linus Torvalds F-bombs Nvidia over lack of Linux support
  • Linus Torvalds takes a break from Linux
  • Linux developer who took on Linus Torvalds over abuse quits 'toxic' kernel community
  • Linus Torvalds praises Arm servers, but claims the economics and ecosystem are missing  TechRepublic
  • Linus Torvalds' most memorable quotes  CNET

  • 以上所述就是小编给大家介绍的《Linus rejects 'beyond stupid' AWS-made Linux patch》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

    查看所有标签

    猜你喜欢:

    本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

    交互设计之路

    交互设计之路

    库帕 / Chris Ding / 电子工业出版社 / 2006-3 / 38.00元

    本书是基于众多商务案例,讲述如何创建更好的、高客户忠诚度的软件产品和基于软件的高科技产品的书。本书列举了很多真实可信的实际例子,说明目前在软件产品和基于软件的高科技产品中,普遍存在着“难用”的问题。作者认为,“难用”问题是由这些产品中存在着的高度“认知摩擦”引起的,而产生这个问题的根源在于现今软件开发过程中欠缺了一个为用户利益着想的前期“交互设计”阶段。“难用”的产品不仅损害了用户的利益,最终也将......一起来看看 《交互设计之路》 这本书的介绍吧!

    图片转BASE64编码
    图片转BASE64编码

    在线图片转Base64编码工具

    XML 在线格式化
    XML 在线格式化

    在线 XML 格式化压缩工具

    HSV CMYK 转换工具
    HSV CMYK 转换工具

    HSV CMYK互换工具