From patchwork Wed Oct 31 14:04:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 149819 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6835858ljp; Wed, 31 Oct 2018 07:04:40 -0700 (PDT) X-Received: by 2002:ab0:134a:: with SMTP id h10mr1415688uae.52.1540994680097; Wed, 31 Oct 2018 07:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540994680; cv=none; d=google.com; s=arc-20160816; b=MDg9Vi86zSKfk9k3gJjsK3i+F3L87CkWUi+sXoHDDEPd43yIu+RtSKZpiaJjknCUBR gh8sIHz/t9JZj32uIbZItI6uaw2IsI45v2O6RgZhV4eehYjmYDtVX3wpqH9nZwuGUf/H ijbGTAeGmNLhYvlIB5enhGWkSiHGtMpEWJfgVz3nt4VKDOzbEEWwakgmSBYrUfBurPZY WUBWMCgwT6usENw+pwqWv3AL6WbsumG8JqKFLC79AXZtejTAN5OPgvO9FN/n6gAKCbc5 01fOPX1kPTHOZtElCluu+z7+zDQybWvoWT4HMMJW4xOo52GCa2EROK6d5mE2sBA0at6O p7jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=CfwRSXDw6H+U3rb68lYVd+lIqfcHoWNcQNOWkF03XnI=; b=eWfpW1MOy7w3WwtjR8MAkBKaPNOi24LVTAbf3/NLKRyhmh6BsJ0GzVYApwkAyLl1Dh AgQHxn8pfs7Atnf8QjrGwfSFHhGqKa85Zb2AKBS/+zPDhRkQzObWKIIyyWl/FBZ8GOsr Zo+yTsrdmRCz2smuM+gdi9p1QqEqQ4ZV+R5s8wWAnRt9eCgJSVVG/MLLRaBeAWnE4680 gLAOknydUj6R0tFyXa7Yt1WGDLMvlRYySpbnASKx/+IMFn0NCfbu9Yy6PPXTL/qW4Ph1 k+QyK8pnzMZqAQpHPptIN+4nxSA2GOZuiyHlGiVS9+TDGUxV574e92uCf/iwccZfXfXq npBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OmRbPWdO; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q187sor1148146vsq.57.2018.10.31.07.04.39 for (Google Transport Security); Wed, 31 Oct 2018 07:04:39 -0700 (PDT) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OmRbPWdO; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=CfwRSXDw6H+U3rb68lYVd+lIqfcHoWNcQNOWkF03XnI=; b=OmRbPWdOPN0M3XMq0wgiwdXroOHzYLnf/s/v0VbLpWyKsCu+eYDRQ5qWdLfMJa2G11 AxYihA7vgk9J6RMYqWeuy69TjoRsguBM/d4Az5XwEyJH4ijpF7Kih4qXpSDoPFRoRBex RKtarJtK/B5sy+8uUeHf4FIPbIsg8Pq+zKfvY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CfwRSXDw6H+U3rb68lYVd+lIqfcHoWNcQNOWkF03XnI=; b=FJzj06K/1RVcfVcpWHvONz3ZjEdjB3LmRmXpjcMRCT+cD/svf1xJQmat+iaL4mUaj3 2sfbzw2+TyGYqLkSb6+Z0FFc6Ms9jxOSCdUybT45WBZ49zAMvN9/6dM6VwM5kaqYZROj KXG3TqOZNdK0zijHwIpvUS2SEfJ3wOPKrmb7Iw4AhwlBvOkS+ojl7ccvBGDVT1G42rkZ btmKXjDNL81npk+p7Y+pmTf7IwMS1uNsvm7cWYYMLwvejb7BH7L7K/NH6wSw+fQPHmoV LIgXpsHrgSz0SGCF5DAH6ffa5ImbfX9RrGG3imtCXW7yLgx0fZWccRsT1mIl/QKjcbV2 m1tw== X-Gm-Message-State: AGRZ1gIRHBIzB71DuE9k1xqhLFW8paFM7F6NXqlsZoJiLPKxlGoQbUB8 LmQegeyV0tUVSVUHJfI7+bMpaVLq X-Google-Smtp-Source: AJdET5eHHSzD/AOxgEPsV7dIkk0KXkFEVOjXD6eE2S1LDNANPPXJXHBvjGm3dbPDF2EObLEJitmjIQ== X-Received: by 2002:a67:6f84:: with SMTP id k126mr1172731vsc.236.1540994678893; Wed, 31 Oct 2018 07:04:38 -0700 (PDT) Return-Path: Received: from dave-Dell-System-XPS-L502X.hsd1.nh.comcast.net ([2603:3005:3403:7100:2c71:8680:34e1:a6aa]) by smtp.googlemail.com with ESMTPSA id 6sm6795632vsy.25.2018.10.31.07.04.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 07:04:37 -0700 (PDT) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Tony Lindgren , Marc Zyngier , Mark Rutland Cc: Greg KH , Mark Brown Subject: [PATCH 4.4 00/18] V4.4 backport of 32-bit arm spectre patches Date: Wed, 31 Oct 2018 10:04:18 -0400 Message-Id: <20181031140436.2964-1-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 From: "David A. Long" V4.4 backport of spectre patches from Russell M. King's spectre branch. Most KVM patches are excluded. Patches not yet in upstream are excluded. Russell King (18): ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs ARM: bugs: prepare processor bug infrastructure ARM: bugs: hook processor bug checking into SMP and suspend paths ARM: bugs: add support for per-processor bug checking ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre ARM: spectre-v2: harden branch predictor on context switches ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit ARM: spectre-v2: harden user aborts in kernel space ARM: spectre-v2: warn about incorrect context switching functions ARM: spectre-v1: add speculation barrier (csdb) macros ARM: spectre-v1: add array_index_mask_nospec() implementation ARM: spectre-v1: fix syscall entry ARM: signal: copy registers using __copy_from_user() ARM: vfp: use __copy_from_user() when restoring VFP state ARM: oabi-compat: copy semops using __copy_from_user() ARM: use __inttype() in get_user() ARM: spectre-v1: use get_user() for __get_user() ARM: spectre-v1: mitigate user accesses arch/arm/include/asm/assembler.h | 12 +++ arch/arm/include/asm/barrier.h | 32 +++++++ arch/arm/include/asm/bugs.h | 6 +- arch/arm/include/asm/cp15.h | 18 ++++ arch/arm/include/asm/cputype.h | 8 ++ arch/arm/include/asm/proc-fns.h | 4 + arch/arm/include/asm/system_misc.h | 15 ++++ arch/arm/include/asm/thread_info.h | 4 +- arch/arm/include/asm/uaccess.h | 25 ++++-- arch/arm/kernel/Makefile | 1 + arch/arm/kernel/bugs.c | 18 ++++ arch/arm/kernel/entry-common.S | 18 ++-- arch/arm/kernel/entry-header.S | 25 ++++++ arch/arm/kernel/signal.c | 56 ++++++------ arch/arm/kernel/smp.c | 4 + arch/arm/kernel/suspend.c | 2 + arch/arm/kernel/sys_oabi-compat.c | 8 +- arch/arm/lib/copy_from_user.S | 9 ++ arch/arm/mm/Kconfig | 23 +++++ arch/arm/mm/Makefile | 2 +- arch/arm/mm/fault.c | 3 + arch/arm/mm/proc-macros.S | 3 +- arch/arm/mm/proc-v7-2level.S | 6 -- arch/arm/mm/proc-v7-bugs.c | 112 ++++++++++++++++++++++++ arch/arm/mm/proc-v7.S | 133 ++++++++++++++++++++++------- arch/arm/vfp/vfpmodule.c | 17 ++-- 26 files changed, 462 insertions(+), 102 deletions(-) create mode 100644 arch/arm/kernel/bugs.c create mode 100644 arch/arm/mm/proc-v7-bugs.c -- 2.17.1 Tested-by: Hanjun Guo