Skip to content

Safe use of Hyperthreading when Xen stable includes new sched-gran parameter #5547

Description

@trueriver

Qubes OS version:

R 4.0.1
All current versions as of 1 Jan 2020

Affected component(s) or functionality:

Xen, hyperthreading, Intel


Steps to reproduce the behavior:

Run Qubes on machine with hyperthreading (HT) hardware

Expected or desired behavior:

HT should ideally be available

Actual behavior:

HT disabled by default

General notes:

HT has been deliberately disabled for security reasons, and with the current relaease versions of Xen this is sensible. The reason is that there exist several exploits on Intel kit that involve abuse of shared cache, etc, when one thread in a CPU is running on one VM and another on another.

However, the Xen wizards are on the case, and they have a fix that will ensure that all the threads running on a cpu are allocated together. This means that the only software exposed by such exploits will be software that already has access to that machine. This may reduce the attack surface to an acceptable level for at least some users.

The patch is now included in some unstable branches of Xen, and is invoked by the command line parameters

smt on sched-gran=core

(or socket or cpu). My request is that this is implemented by Qubes, but ONLY once we start using a Xen version that includes this feature.

However, it is currently (Jan 2020) too soon to change the current behaviour, as the versions of Xen currently in use ignore this combination without warning.

My request therefore is that this is assigned a sensibly long timescale.


I have consulted the following relevant documentation:

https://www.slideshare.net/xen_com_mgr/xpdds19-core-scheduling-in-xen-jrgen-gro-suse

https://patchwork.kernel.org/cover/11086677/

https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html#sched-gran-x86

(NOTE the above path is in the "unstable" branch)

I am aware of the following related, non-duplicate issues:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: XenThis issue pertains to the Xen hypervisor in Qubes OS.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.R: declinedResolution: It has been decided that no action will be taken on this issue.securityThis issue pertains to the security of Qubes OS.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions