Language Selection

English French German Italian Portuguese Spanish

Torvalds Blasts "Beyond Stupid" Flushing L1d On Context Switches - Reverts Code For Now

Filed under
Linux

As part of the initial set of changes merged today for Linux 5.8 was the x86/mm material that included the controversial feature of opt-in flushing of the L1 data cache on context switching. Linus Torvalds ended up deciding to revert this functionality as for now at least he views it as crazy.

While this feature is opt-in via new prctl options and not enabled by default and done in the name of helping those concerned about snoop assisted data sampling vulnerabilities or cache leakage via side channels and yet to be uncovered CPU vulnerabilities, for the time being Linux creator Linus Torvalds is not convinced.

Read more

Original:

  • Re: [GIT PULL] x86/mm changes for v5.8
    >  - Provide an opt-in (prctl driven) mechanism to flush the L1D cache on context switch.
    >    The goal is to allow tasks that are paranoid due to the recent snoop assisted data
    >    sampling vulnerabilites, to flush their L1D on being switched out.
    
    Am I mis-reading this?
    
    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".
    
    I don't see a way for a system admin to say "this is stupid, don't do it".
    
    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".
    
    To make matters worse, it has that SW flushing fallback that isn't
    even architectural from what I remember of the last time it was
    discussed, but most certainly will waste a lot of time going through
    the motions that may or may not flush the L1D after all.
    
    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.
    
    I have a hard time following whether this might all end up being
    predicated on the STIBP static branch conditionals and might thus at
    least be limited only to CPU's that have the problem in the first
    place.
    
    But I ended up unpulling it because I can't figure that out, and the
    explanations in the commits don't clarify (and do imply that it's
    regardless of any other errata, since it's for "undiscovered future
    errata").
    
    Because I don't want a random "I can make the kernel do stupid things"
    flag for people to opt into. I think it needs a double opt-in.
    
    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.
    
    I do not want the kernel to do things that seem to be "beyond stupid".
    
    Because I really think this is just PR and pseudo-security, and I
    think there's a real cost in making people think "oh, I'm so special
    that I should enable this".
    
    I'm more than happy to be educated on why I'm wrong, but for now I'm
    unpulling it for lack of data.
    
    Maybe it never happens on SMT because of all those subtle static
    branch rules, but I'd really like to that to be explained.
    
                        Linus
    

Beyond Stupid...

Now that's the Linus I remember and love!

Exercising his freedom of speech

Exercising his freedom of speech

Big changes could be coming to Linux programming

  • Big changes could be coming to Linux programming

    After recently making the switch from Intel to AMD, Linus Torvalds has come out against 80-character-lines as a de facto programming standard.

    As reported by The Register, Torvalds shared his thoughts on the topic of line lengths in a recent Linux kernel clean-up post where he argued that limiting lines to 80 characters makes for lots of line breaks. Others have argued that 80-character lines are a long-standing convention that should remain in place due to the fact that large monitors can handle many small windows when column width is limited.

Linus Torvalds rejects 'beyond stupid' AWS-made Linux patch

  • Linus Torvalds rejects 'beyond stupid' AWS-made Linux patch for Intel CPU Snoop attack

    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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.