Received: by 10.223.176.46 with SMTP id f43csp4149667wra; Tue, 23 Jan 2018 05:09:52 -0800 (PST) X-Google-Smtp-Source: AH8x226Y7P1wuT97bPaC31YDTGgv8tWW3PoQArhBuURCROFCEiQ/qfembGt0f4294j5E3Oc7hTj0 X-Received: by 10.98.58.5 with SMTP id h5mr10344122pfa.169.1516712992396; Tue, 23 Jan 2018 05:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516712992; cv=none; d=google.com; s=arc-20160816; b=pgw3D3upDc4PgWeXDznThL6wUU+DOfs66b7kjvzKIQAsJL5ihfhb+cjRr0OiT41YYW mzNfA+vF1sCQIw4P9Ebiym4SH/00PdBIVzKqy6yFZdj9L+B5B/MnsnHdgNR4tcVXmx5U w8+pPNC0wRoEyIDPRuacYj1nJTAMxD6sR02rTA+8LP9T+Sqhc5teScn0Pg2KNf9RLeAL DtsobElk7kgS0AS8m62HJ97gjuDakb4WvG5PjN3BzNHGFaHTpeKgSyi91OSHOgAl7rSO 6EhEWP3d2gVKVtal+EY3ArW1T8ObLxStFi0vKohYO6pQl7YSMZbtUbGy7qtCL0v4S/lk A0Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rD8cAdmuDKXOncvQ6iqUiSBa2jc8BgaMOht8E6h/ckg=; b=rb6MEvitVGANZ5zWmNq0Fi5wx3jVnGR0J5HXVG09Nigwm2Ye9tF8lIYmm2Ctv9fT3L IDSInfIVcnLoRB1zkmBhdcNRJn4KbhCCiqF1eJd8fZBv2JCYWO19OZZuVsjSRD2EapWC rOppxZzHvpzhuW9ig+w+bBcIoQcz/5KkK+nz3KGwk+2LmOgwPxuLMHhl8oZPPWBGE8JO IVRfM4Ymk1beT9YdCQ4fC0Gjgksj4pr7ZZBY8XuUEfTegrkrby4xje/OpnBEAqqXjE9h e5q3f2I4ZAPgA4r+JRYtJlcW/RuyyUd1STofSNzMT5icwMPrqqkk7x8nfaFlwodN/X9u lFlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1-v6si4715562plb.178.2018.01.23.05.09.38; Tue, 23 Jan 2018 05:09:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbeAWNHO (ORCPT + 99 others); Tue, 23 Jan 2018 08:07:14 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49310 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751541AbeAWNHM (ORCPT ); Tue, 23 Jan 2018 08:07:12 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0ND5tlt098406 for ; Tue, 23 Jan 2018 08:07:12 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fp2krfnsu-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 23 Jan 2018 08:07:11 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Jan 2018 13:07:09 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 23 Jan 2018 13:07:06 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0ND76Lu63832110; Tue, 23 Jan 2018 13:07:06 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2270F4C04A; Tue, 23 Jan 2018 13:01:11 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BDF794C040; Tue, 23 Jan 2018 13:01:10 +0000 (GMT) Received: from mschwideX1.boeblingen.de.ibm.com (unknown [9.152.212.220]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 23 Jan 2018 13:01:10 +0000 (GMT) From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org Cc: Heiko Carstens , Christian Borntraeger , Paolo Bonzini , Cornelia Huck , David Hildenbrand , Greg Kroah-Hartman , Jon Masters , Marcus Meissner , Jiri Kosina Subject: [RFC][PATCH 0/5] s390: improve speculative execution handling v2 Date: Tue, 23 Jan 2018 14:07:00 +0100 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18012313-0012-0000-0000-000005A6DA9C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18012313-0013-0000-0000-000019226216 Message-Id: <1516712825-2917-1-git-send-email-schwidefsky@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-23_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801230179 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Version 2 of the speculative execution mitigation for s390. Changes to v1: * The KVM patch to add the guest bpb feature already went upstream. * Dropped the patch to introduce the gmb barrier to defend against spectre variant 1 until the bikeshedding in regard to the naming is done. * Switched from a system call to the PR_ISOLATE_BP process control to run user space tasks with branch prediction isolation. My main question is if the prctl(PR_ISOLATE_BP) makes sense. Martin Schwidefsky (5): prctl: add PR_ISOLATE_BP process control s390/alternative: use a copy of the facility bit mask s390: add options to change branch prediction behaviour for the kernel s390: define ISOLATE_BP to run tasks with modified branch prediction s390: scrub registers on kernel entry and KVM exit arch/s390/Kconfig | 17 +++++ arch/s390/include/asm/facility.h | 18 +++++ arch/s390/include/asm/lowcore.h | 3 +- arch/s390/include/asm/processor.h | 4 ++ arch/s390/include/asm/thread_info.h | 4 ++ arch/s390/kernel/alternative.c | 26 ++++++- arch/s390/kernel/early.c | 5 ++ arch/s390/kernel/entry.S | 134 +++++++++++++++++++++++++++++++++++- arch/s390/kernel/ipl.c | 1 + arch/s390/kernel/processor.c | 8 +++ arch/s390/kernel/setup.c | 4 +- arch/s390/kernel/smp.c | 6 +- include/uapi/linux/prctl.h | 8 +++ kernel/sys.c | 6 ++ 14 files changed, 238 insertions(+), 6 deletions(-) -- 2.7.4