From patchwork Fri Sep 7 00:37:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146147 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp524263ljw; Thu, 6 Sep 2018 17:38:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbVuWQizUtXpMdfmTPM8QqDWAM1XrRZDOveja3pWJbreenloDCC1/vaiOPu+Duxtaw04R3o X-Received: by 2002:a17:902:7b96:: with SMTP id w22-v6mr5328445pll.24.1536280704257; Thu, 06 Sep 2018 17:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536280704; cv=none; d=google.com; s=arc-20160816; b=F05Xpn7yv2Hsq++MuxSe52zVwUmnImghJKOv+on0inoEuYK0bEnikqx4r84TLpFHYe UR1BUbROEhhaRbEHYtD2F0V52CRNyQITIGveTMTEUZxfYWPzj10wCYfmoOqnjZe7IkyE 4uT8cVRdZ3/g//fxg/gKiWi0IiNDamn96e3OhCX0ZabguXC9GOHrbsMaApra+w23iURX +NjXrmbINglXHhANWMNSBowTQNumiXCxlJSitVKd1Y6HW8TZtkRBNRM9cf3E19jR8Nca prahGFVIhANGu/mgNX3L/PHVZMdw/205u8mHPNr0u5wt8DjXZ2ShC2JyQQLQvrD6I+FU +ClQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=Vge4aNCM0no2JUe1nfDuXK3DKZZ6iNY8zErus3b4Ino=; b=XurHfk4+DMBKH6ZzqILgOy3lzJf+j2+ymqizof29DnGx1OEBQA11FREGcw3dy862hS tWYDigKC7RS+NVIaWdq15Hg8I9Lt7tJDnQyGFoEgbHuWF1n+C5CXOZeS0h9XLJCgV+VS I/yNueTJ34TbohuFUbzVdpL0p4HLVD8Q38K2kfAz0IXlb4GbltOl8VSsW7ECSQ8PDz6J bdNBt2IvWQRZp8e2jVm0p2RlG38LRDdUMvSet6ba4dgYmp86OkYT8IY7R2Fq2bzuQFi3 YnXDjH/zZU64DTP3xAnMLCocHAwN1NLGpgEWG1Updw70sq4aaR5pWqnVsnAou0G0VBKY m7QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=a4P7ivAM; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si6386292plh.18.2018.09.06.17.38.23; Thu, 06 Sep 2018 17:38:24 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=a4P7ivAM; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729813AbeIGFQ0 (ORCPT + 32 others); Fri, 7 Sep 2018 01:16:26 -0400 Received: from mail-by2nam01on0136.outbound.protection.outlook.com ([104.47.34.136]:26290 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729757AbeIGFQZ (ORCPT ); Fri, 7 Sep 2018 01:16:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vge4aNCM0no2JUe1nfDuXK3DKZZ6iNY8zErus3b4Ino=; b=a4P7ivAMmccwBOYMBn5YNxdMv4HSZ5+jhLKveSz53Y9SdN5R3QstQhsHqol9E1trvaVV+a/K+3nPrqtMFn1qikPwpCBCCiUHZjpPay3pU8gbAcbsbH//GuK07EWLQ9vtz/SGCJdfcqKPJqEmxaQWZ9wRRcdOEcPdJ1aUniVE5cc= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0757.namprd21.prod.outlook.com (10.173.192.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1143.1; Fri, 7 Sep 2018 00:38:17 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.008; Fri, 7 Sep 2018 00:38:17 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Masahiro Yamada , Sasha Levin Subject: [PATCH AUTOSEL 4.14 15/67] kbuild: add .DELETE_ON_ERROR special target Thread-Topic: [PATCH AUTOSEL 4.14 15/67] kbuild: add .DELETE_ON_ERROR special target Thread-Index: AQHURkL1yBMmIR6aU0aijc+iggujkA== Date: Fri, 7 Sep 2018 00:37:30 +0000 Message-ID: <20180907003716.57737-15-alexander.levin@microsoft.com> References: <20180907003716.57737-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003716.57737-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0757; 6:SreIZdmGViEO64kJiXNnGxBda88Z+bwhAw4tNT4ufltGEE07c6i2Gza/2EfmUVrhmX0SSvnbOYqH7mNwsdgw6UrYYe5vXPZxbxZG7d8HNsBRt0dT5wcAGIUVzDa4e3KvfLrflPIYMTfWb+2qze9zb9GCIJSAoGQ0XkepSgvMtDgBhPPKtywGVWzIA8f87NZ4YGAOzj5BpEFn8o/mWci8oBag0Q/HS5zlEGovwykREQ52Hw9au/Ai3oM2WGsBbr03lH+pde0RalPkgjKIp+CsX3zFUFlegUT15MwMyAkMqoRE6qldJj0xWDsXCQKY6/CyLj2tu6NK8O24Nb90cQSfEMwv5wohklxjEsevbz/pNGOfjSlpBlE9IHYgKnlpHtbRvxZt/FiOikhA30yYlMbgQmrrtU0t3o8of1WvjVrz1xi5or1VMFBNDT/t3MpyLZJaiUmo8kiHP/JMWldVixclgw==; 5:OfndktiK9+IyNiDCsltACMPVxHbTInuL1GIX1uyjGn1Nc0F8u1vUK+dufS9PSHVyxEBSxB/piz+9frrP9ORZPHxBlHs5LHTd+fkGwoSwPBOGqwXubcKM65wBTC/05XwZ7LR+Eg1k6FIDI184GU09tJ2iSdPyR6TOPOtrMWjMILY=; 7:4sWmcfRmk13vb+1raVwI24xrZKWg0Sv+WeyCgWCij9U6QN0rAkRyn9ibJF/0aLuv42AW5m1HezF7/QAJf7gjbumrebLUmd4QlP6+qlvbO6uJSfHAt90KE7JEiutd8O7HEw9gYW2wGLRIDaNTBxZO+ew8U5AqpLUOfHxCaKLSmBuayD0jK6pftpW8qnAjSZdHkliE5nlG/FN/3CpAr0pi8zaZmcuJr52MtACqQt4h6SU1Q7mR3j0DvoZhzQd9JYdX x-ms-office365-filtering-correlation-id: fb354d66-7d5b-438a-426d-08d6145a3462 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0757; x-ms-traffictypediagnostic: CY4PR21MB0757: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231344)(944501410)(52105095)(2018427008)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0757; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0757; x-forefront-prvs: 07880C4932 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(396003)(136003)(346002)(376002)(199004)(189003)(8936002)(3846002)(81166006)(86612001)(6666003)(5250100002)(81156014)(486006)(99286004)(6486002)(106356001)(10290500003)(107886003)(256004)(14444005)(26005)(11346002)(14454004)(446003)(76176011)(6346003)(5660300001)(10090500001)(110136005)(2616005)(66066001)(186003)(476003)(72206003)(2501003)(54906003)(575784001)(316002)(6436002)(86362001)(97736004)(53936002)(22452003)(6506007)(102836004)(8676002)(6512007)(2900100001)(68736007)(305945005)(7736002)(217873002)(6116002)(1076002)(25786009)(2906002)(36756003)(4326008)(105586002)(478600001)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0757; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: inb31+1gCr6T0/yfSnj9j99YFD9Kc4J7zsewMjvNd21zcxjIPONyIAZVSCepugPc+Lm0SzVeYwZgFQWLAXBSK9rmF7jiCKAFKXkc/3ZqRJb+d/+wSbCn26kKw+v+TSW7FRLNJQWc2JknZIXZ/7f2F3gnOW28Yb1Z2WcG1uCkC0KiZO0IdXkNlszWFtURvDfvTMuSVegEUbboHDUlrvtJCZdGZlCaP1h7mKqOT7J1vgxFm+K090EBZz95YM4mSJyMfvaqXFWDlWJGfbV1eHJzfLusFJxpkpFtxwr9SSDGgJI8s6y66VVTUJYvbABJh4A5+yoGfluQqu6vELTRbcg2kKlx+C7wGPa2scF4RZn0g/Q= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <87A3D0C830FDBC4AA97A90851D89C8EF@namprd21.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb354d66-7d5b-438a-426d-08d6145a3462 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2018 00:37:30.8505 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0757 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit 9c2af1c7377a8a6ef86e5cabf80978f3dbbb25c0 ] If Make gets a fatal signal while a shell is executing, it may delete the target file that the recipe was supposed to update. This is needed to make sure that it is remade from scratch when Make is next run; if Make is interrupted after the recipe has begun to write the target file, it results in an incomplete file whose time stamp is newer than that of the prerequisites files. Make automatically deletes the incomplete file on interrupt unless the target is marked .PRECIOUS. The situation is just the same as when the shell fails for some reasons. Usually when a recipe line fails, if it has changed the target file at all, the file is corrupted, or at least it is not completely updated. Yet the file’s time stamp says that it is now up to date, so the next time Make runs, it will not try to update that file. However, Make does not cater to delete the incomplete target file in this case. We need to add .DELETE_ON_ERROR somewhere in the Makefile to request it. scripts/Kbuild.include seems a suitable place to add it because it is included from almost all sub-makes. Please note .DELETE_ON_ERROR is not effective for phony targets. The external module building should never ever touch the kernel tree. The following recipe fails if include/generated/autoconf.h is missing. However, include/config/auto.conf is not deleted since it is a phony target. PHONY += include/config/auto.conf include/config/auto.conf: $(Q)test -e include/generated/autoconf.h -a -e $@ || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or $@ are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/Kbuild.include | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index fcbbecf92395..a0ad87e869f9 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -403,3 +403,6 @@ endif endef # ############################################################################### + +# delete partially updated (i.e. corrupted) files on error +.DELETE_ON_ERROR: From patchwork Fri Sep 7 00:37:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146157 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp533900ljw; Thu, 6 Sep 2018 17:51:38 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda7HC1jwdzqCffBSg3gtyhUFvTN8cqix9ziOhpTBesdhicOhL9cMv1T1NZWvPuPnPcuYg4h X-Received: by 2002:a17:902:9893:: with SMTP id s19-v6mr5482582plp.130.1536281498519; Thu, 06 Sep 2018 17:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536281498; cv=none; d=google.com; s=arc-20160816; b=hUyX6SWIiNTi/pEqmwZamB32gJCCCaJT55icyVK5L4Kx7AOEvPpRqd9z3LIqupluNj yi0eD9Tip286juLZu5qTUzegTcGyASjFYB6LYQUbzA/FsXwJEAIHaqbt0PqJzDmszFk0 nsumy2RnKGyAj8Obnd2ilLr29YZv2rOffiTQ4dZemu9BWsZ27Ox+NLdtgySY5mst9Ad6 oqrzXufOYcnWgDhFTuLTEUpqSFKwmgf8Mw5RKAnu/O8+78ViiWqBICuRsfW2PDjZ1sjL 1Jp97D9my/kPTRxsaiJkSFqaPfPZTs/yB6zgzRNE8nUeczahG0v326Pnqv+dVgbiGnXO 4xNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=sKX167D/he6MfznbIHFagZ74tdJFTnwN4pBFgqfYpI0=; b=LtRCfrClHOoVvVT+bt3OXmSAU7KzshxfG/qQZUJ/JuUVV++JRZPHT1pqvhyOg0OmdM q5q5d00NqGyNOulrGdoMmIBjXIpqKgydqSJYu+RgBOt0xSAzZzsg7XWI6U/as+w9dVWW A38yPgV6GxnafzcU1KI21K1UxI5Ac32e4Fdgr4PfRhS87EBhsaJXj5yeJpBnHszPH/x9 tnuURG76BAXgWUBO501EDHMvh6TOtAhnco/JMkziVhTEc6JnQ03Utr6PGrmrq463bZfF 96FxLd22O2K7h4WzBBIBavZKjw2vsbpHPdTcNaCVMxlyOVBfn40sDBa6WjFE919P25xb LvtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lD7CAZqS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8-v6si6129060pgp.202.2018.09.06.17.51.38; Thu, 06 Sep 2018 17:51:38 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lD7CAZqS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729672AbeIGF3i (ORCPT + 32 others); Fri, 7 Sep 2018 01:29:38 -0400 Received: from mail-cys01nam02on0116.outbound.protection.outlook.com ([104.47.37.116]:29216 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730267AbeIGFRQ (ORCPT ); Fri, 7 Sep 2018 01:17:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sKX167D/he6MfznbIHFagZ74tdJFTnwN4pBFgqfYpI0=; b=lD7CAZqSwEM4uzcc8PmqSH/pX2vpTlYDfRe2j1yEPG9BCfTbPI4c2FwTlVluJrvf6bLoJIitTGPKl92Ez0rKRxNucpPv5ngpNM9Hk5hG7gx7y6+lLdCvTgB8Ikx6nLMmguJgnn01qFCsFyaEUcEa8W2D/ApEC58zP06E58/mAvA= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0840.namprd21.prod.outlook.com (10.173.192.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.6; Fri, 7 Sep 2018 00:38:59 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.008; Fri, 7 Sep 2018 00:38:59 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Mark Rutland , Christoffer Dall , Marc Zyngier , "kvmarm@lists.cs.columbia.edu" , Sasha Levin Subject: [PATCH AUTOSEL 4.14 41/67] KVM: arm/arm64: vgic: Fix possible spectre-v1 write in vgic_mmio_write_apr() Thread-Topic: [PATCH AUTOSEL 4.14 41/67] KVM: arm/arm64: vgic: Fix possible spectre-v1 write in vgic_mmio_write_apr() Thread-Index: AQHURkMC2Cvd849b+0uD/E1Gmxi0sQ== Date: Fri, 7 Sep 2018 00:37:52 +0000 Message-ID: <20180907003716.57737-41-alexander.levin@microsoft.com> References: <20180907003716.57737-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003716.57737-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0840; 6:cFbDW+867mW5AI4MqMkU83NpqOK7yyKpEG3/cEo9G2T58jwHM5hO4p6clEjV9RVr3U4a9X0gsjh58yOopSOBts2AOJbCyNZN4wCSjVQy9N0ucCqCrOTZYDo0Gi83MCjQsTyI2HxC6smPzMCbTRa7vp4NhilFFKR6ltlK+rRU5wdev5Zo59phwqaRHYSx79dO0nAK+fN6X8XzuNj8cKTrSWvb1Hcoe0ShxIAiSd3B6qgiH6C1Y9bi5ZPM8X5pdnOrCIo/M8cVHCOirQGYfvlNChOi7HlvPZr3Lmqitv5ERuqpx1RUToZNIWY+CZJOU53Ei1Xc8cmrF4P+FrtWKVcbwzWvMe4dZ16TQ5Jg9KpHvqAmu4rFB+HMeIlj7PRIJC7HNjeHSpqVAL2cxT7z7tQHouEGfm3PiUSbQ99TidjXqIG2cknCd2aMQCZXpCo8+I9eZXsvSTw0aBt9BWF1TOhf+g==; 5:v5b3RU2aDK34dY6WCisp3ML+MyYXcNFwCHDmTTubnzhvvM1/MOsbO+RH2ltUKTTlWQCpvtKvxEj7I4eusmmh6AwSNihmh2oKRVzKPRTJWmnzLvCot2JkuJ/jd0uCcehBoK7ZRUyh6ny9Js+m/merWu6qf4LpvRRXizaF0TKntdk=; 7:X0m3lik/JHV105ak3oPsRKCV5odAPV/x705UwVXCTfceNkA56bO8CfuCTgWxcUAzrgSN90ibL5WK1XIxjhECJWxxCvgat2BwvOLwy2w2MpAmkxyG5ZJBZ/2ZUPvnpZkKNvprGN1qr7yeBt+splLBibTIogN6pQ9PSvJBMNqO9pbEpwfexfOjm3bqI+nqoSzc5IqRhErGRaZy6wx06ibS8iriHkUpgyWy/t7DDOCngkBKKNdsFgOdGlbGyodfkbVT x-ms-office365-filtering-correlation-id: 4dd9d884-6ede-400f-4f7d-08d6145a4d2a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0840; x-ms-traffictypediagnostic: CY4PR21MB0840: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171)(85170053105377); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231344)(944501410)(52105095)(2018427008)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0840; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0840; x-forefront-prvs: 07880C4932 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(39860400002)(396003)(136003)(189003)(199004)(66066001)(186003)(99286004)(26005)(8936002)(76176011)(102836004)(81166006)(81156014)(5250100002)(54906003)(6506007)(110136005)(11346002)(446003)(316002)(476003)(2616005)(106356001)(6486002)(86362001)(6436002)(105586002)(86612001)(97736004)(486006)(6346003)(53936002)(6512007)(68736007)(10090500001)(2501003)(1076002)(22452003)(6116002)(3846002)(36756003)(4326008)(8676002)(10290500003)(2900100001)(25786009)(256004)(305945005)(72206003)(7736002)(478600001)(14454004)(217873002)(6666003)(5660300001)(107886003)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0840; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: EPXjmaxT13OorEggYdTpZVYygv/LImHGoBMCoz8u3nWV3EvX0WRr31dJ7mgaN8QKWxs3PMzxGnl4geLuJ13VuKyA8RTra3Ibzxs1i6o9ZjcefzGhoLR9vvlah0NGqql68DXqpBxbrNl5tJt/cntaIFLb29awkDgWmjGlroE008VtkADJi/SbaNLQpNDuPBu9EENMiduQzWgwgE5jgb4WloceM4ULJa8ZDr1ylA0yB6yEcKH+/824JPNw9SHwNcQkTjYJWR7jRGXK+Lo9TkL8CTdXgPguafxHakPLP/P3yTyLWbos97H+ETIkqw/mfq1ssDqq7MQl7azDz4+yHuYt2DCt1HCpI44OPO1YJNCfhs8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4dd9d884-6ede-400f-4f7d-08d6145a4d2a X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2018 00:37:52.0624 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0840 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland [ Upstream commit 6b8b9a48545e08345b8ff77c9fd51b1aebdbefb3 ] It's possible for userspace to control n. Sanitize n when using it as an array index, to inhibit the potential spectre-v1 write gadget. Note that while it appears that n must be bound to the interval [0,3] due to the way it is extracted from addr, we cannot guarantee that compiler transformations (and/or future refactoring) will ensure this is the case, and given this is a slow path it's better to always perform the masking. Found by smatch. Signed-off-by: Mark Rutland Cc: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- virt/kvm/arm/vgic/vgic-mmio-v2.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/virt/kvm/arm/vgic/vgic-mmio-v2.c b/virt/kvm/arm/vgic/vgic-mmio-v2.c index af003268bf3e..7ea5928244fa 100644 --- a/virt/kvm/arm/vgic/vgic-mmio-v2.c +++ b/virt/kvm/arm/vgic/vgic-mmio-v2.c @@ -348,6 +348,9 @@ static void vgic_mmio_write_apr(struct kvm_vcpu *vcpu, if (n > vgic_v3_max_apr_idx(vcpu)) return; + + n = array_index_nospec(n, 4); + /* GICv3 only uses ICH_AP1Rn for memory mapped (GICv2) guests */ vgicv3->vgic_ap1r[n] = val; } From patchwork Fri Sep 7 00:37:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146156 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp533308ljw; Thu, 6 Sep 2018 17:50:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaXsVwfK4dQoXv51y91dnAMOqWrMRO8zcyzdppSjrifvbXl7mHO6eDksC6QZiz6dwNlzhFy X-Received: by 2002:a17:902:8308:: with SMTP id bd8-v6mr5403490plb.134.1536281449498; Thu, 06 Sep 2018 17:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536281449; cv=none; d=google.com; s=arc-20160816; b=xts95Fv8WMk9tGe9APfcSDz9egXuyUFCUdVWNNnvW6Ix3UHCGijp0Sz2OnqWqi2acl B22ndJpMe1AnbkOr4X0TEfaOBAIUu8LgIwT65FGAbeE4EiGS5YSBciEsnO1mKqes81JA ciw9OPDZpZzSO7jkvCUQz7F3c1YS92jWBIKPn9FxcBGJKs+rGD0piSa4fiOzo6eORv/Q 7SpxywfE/ajyFAMOHmfZ3mGEFS+o7H3C7BQImg64Tyy6iEpS4w6YnhBeUoDBXayfLoge exigJ93C7jtCmsHpJgK3JtluZygj2CpfRwAFbT/8L6tpqsrktS1ay0p2nj5AE2XeK+7J gvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=OkJPn+fotjk74b5NoSPl72AywsOEp+TKWI9TEbUQ0po=; b=Aa1SHenYwPz8lT7HjnwhR9BwYSkeewDbhjXp5w/ZRg/rrhLkXuKWFiV/BDY9dbI+eT NEL4CcL1jkgv2AFutnEJ1dbyeEheTDrpcreUw4OqZo7pZxFGosFsNL+LymCrqLP7ptWt gbKKScU4yDNLMijPvM6wKB8yxxG5BMS1C3by1sDRR2Z5qFTW2ktL+41mNxsQXmZiEH93 nd/g/zOjN7NDtJ9Z9O5R8+2JYdo/b6WK3JX7HPXGL5lJHJ9N9WldmHCK13H5VBxfS0JM 2xhFHMdexMcT0ayg3wtuRJsMsbBiBmZp0IJZraMGypObMejDsuphJ77OvXGc662KRrnG rZkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=m71Sud7k; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si5429781plr.138.2018.09.06.17.50.49; Thu, 06 Sep 2018 17:50:49 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=m71Sud7k; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730395AbeIGFRS (ORCPT + 32 others); Fri, 7 Sep 2018 01:17:18 -0400 Received: from mail-eopbgr710126.outbound.protection.outlook.com ([40.107.71.126]:45789 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730327AbeIGFRR (ORCPT ); Fri, 7 Sep 2018 01:17:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OkJPn+fotjk74b5NoSPl72AywsOEp+TKWI9TEbUQ0po=; b=m71Sud7kQdL1lOVdjeYmtk35jDFWC1UGzh61PcYWygQULH3XozV4QhpvjQQOZNnazF21aYG8QA4x32ta41i5SK5KisackKT5ueZU2C8gkGeOmhr9IxA4f+zrzzjBINnI7AO3bOGtLaUQzB1SCXbHKo2biGs43SsQTuCx+GKPiUo= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0839.namprd21.prod.outlook.com (10.173.192.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.6; Fri, 7 Sep 2018 00:39:04 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.008; Fri, 7 Sep 2018 00:39:04 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Mark Rutland , Catalin Marinas , Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL 4.14 50/67] arm64: fix possible spectre-v1 write in ptrace_hbp_set_event() Thread-Topic: [PATCH AUTOSEL 4.14 50/67] arm64: fix possible spectre-v1 write in ptrace_hbp_set_event() Thread-Index: AQHURkMGBNn/uGXqH0qN5ilV0K49hQ== Date: Fri, 7 Sep 2018 00:37:58 +0000 Message-ID: <20180907003716.57737-50-alexander.levin@microsoft.com> References: <20180907003716.57737-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003716.57737-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0839; 6:BAiGOxtrPIkUtOzCYJiUztWZb2Qt8zdI4Z9dMBXSac4c5VUVax3xuAiHFSfkSuctnNvt9jd0P/vJGf6LRxI7FHOSk7w7Vd/B9nzYEfGjw3AW+sKMBwbaTQ3A+B5p/xU9lpz4H9/vsj8FuAErjLiCZZyWWceWPjEDLYMCAgkgetHKJwOpZMER5E72QYN4hQX3S5bmqozZS+hFWhiA7w8QYN4QmmcibowQji6HfJbZ/ebiEDyLDMnuaPmqrMQnV9pL5uNmJ1Hakk0v7C3tiDORXW3nimSGs1OqUI6oHuz9CkgHBwFFjALL6IG2/LQyMq9ZUL8kMWtxvOX7LwW+v2uTNkpQOZ1J39eGQJGlE9olmBIXQJ6MBfFnJ3AZMEs283QYNQ9PBbTk5xnDL0JG8/6itm2eOgtjEnxs0OqbHS/TSYoymbOtSoMGZDib78NgSr5M9cWXeyWWFQVQJBKqj7g3pw==; 5:t0+XR4NKFowmJn+idWZHrdYqlN7L4TeTPAdZYRmMVlCrSuKRZ2Sxu/vcmG9AoZ1LR0KYqGyt2ALNlix8bRH0WnM/qm7nFqbAkHQyvEKWZy4/885b6lchg+gXXChQLmhFAF3JAxlYE2bnWAdcnnvgmFgVX3dQBy7/jx5S2dT6VjE=; 7:wZhy+HrKKPe3KH6Sc7bWKBus0ycA3FIPa4lS96sFwnU3EGo/QWJyBSCalEuRDhK7JB1ZTseQsI2+iozUGNlsrx+mYMaMarKlu3R3HGighHFgH5TZZrjQ5ek//I+V8twwBCVIjMPWwmbq/JNQPmV+11lHBEwPhy+WuPTowvIPI4dv6w8wCwWGPX4xZOGFmeZbf1idByKcaRAuStdXJbfl6XHu64F8h1nGUtlECE0irFkaqV1UGuRu6G+GKQk5cQFQ x-ms-office365-filtering-correlation-id: 80ff2207-ce80-4dda-0e87-08d6145a500a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0839; x-ms-traffictypediagnostic: CY4PR21MB0839: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231344)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0839; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0839; x-forefront-prvs: 07880C4932 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(366004)(136003)(346002)(39860400002)(189003)(199004)(10290500003)(99286004)(10090500001)(105586002)(106356001)(102836004)(76176011)(97736004)(6512007)(53936002)(2900100001)(6346003)(316002)(54906003)(110136005)(256004)(26005)(6436002)(107886003)(2906002)(86362001)(186003)(478600001)(5660300001)(6486002)(446003)(476003)(68736007)(7736002)(86612001)(11346002)(8936002)(1076002)(22452003)(25786009)(2501003)(36756003)(2616005)(486006)(81166006)(81156014)(66066001)(6666003)(217873002)(4326008)(6506007)(5250100002)(6116002)(3846002)(305945005)(8676002)(72206003)(14454004); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0839; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: oh3us/5ZsK4pKXql9pX6Pj8VP2AhAUnGiFzueseKZjnqv3TD01p5CWpCFSly89pMwPFksIpGQ7T9F5/3OwruiBIu7uYUX8I68GYVq1wwmaYviytNzQIjVY8pDdSl7gJKJg1AwKdRrQoZxZsSZ/i78AvtYulF4XtXJbsH5VgGmWdrmhXsfOlEiQ8GWTW8mUah+E1ys5a1Qp1TlniALzytTyn40e1oG4MpDvzonVC+4MEiBDL6dqNZA146acmCkYcqwQ/fsbqmcyZnJrJ8suABTnVBqh2sUy5vANjGcfkyGXFsTMzOtWGyjmG5KE4k7qo/l386D0PxAkC35YGFRIhwjhOISvjMKBrxGx3iClSKUp0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80ff2207-ce80-4dda-0e87-08d6145a500a X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2018 00:37:58.3172 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0839 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Rutland [ Upstream commit 14d6e289a89780377f8bb09de8926d3c62d763cd ] It's possible for userspace to control idx. Sanitize idx when using it as an array index, to inhibit the potential spectre-v1 write gadget. Found by smatch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/ptrace.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index edaf346d13d5..34d915b6974b 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -274,19 +274,22 @@ static int ptrace_hbp_set_event(unsigned int note_type, switch (note_type) { case NT_ARM_HW_BREAK: - if (idx < ARM_MAX_BRP) { - tsk->thread.debug.hbp_break[idx] = bp; - err = 0; - } + if (idx >= ARM_MAX_BRP) + goto out; + idx = array_index_nospec(idx, ARM_MAX_BRP); + tsk->thread.debug.hbp_break[idx] = bp; + err = 0; break; case NT_ARM_HW_WATCH: - if (idx < ARM_MAX_WRP) { - tsk->thread.debug.hbp_watch[idx] = bp; - err = 0; - } + if (idx >= ARM_MAX_WRP) + goto out; + idx = array_index_nospec(idx, ARM_MAX_WRP); + tsk->thread.debug.hbp_watch[idx] = bp; + err = 0; break; } +out: return err; } From patchwork Fri Sep 7 00:38:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146149 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp525021ljw; Thu, 6 Sep 2018 17:39:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbjCnN74Q4tqUecYxSlhoBKChtP5/zUHsbA4Lp7Rxeg4X/V1Ez2Eg7jgEpBFezWLv3pz1Cx X-Received: by 2002:a63:5706:: with SMTP id l6-v6mr5698456pgb.118.1536280760048; Thu, 06 Sep 2018 17:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536280760; cv=none; d=google.com; s=arc-20160816; b=PJJlkTkEbwWMAtp/M4Aztc3nKBwMrFNCJM/JEN+Wgst+aoKGwvlmaO/rBKNM0uvxcE 41LZlG9lD/kMBEg89AARrlY49VV32Dtrs63UXVx+xhkz78tUJ6Zd+pg3sQfMIBGgp2gT /RqynXPbN9PzyUAbjG3CeIcM9gMwIoOb6zg03UN6xpNcC0TPbcJssZ0LmRp0J8QOmOM4 p+Aamg4ixOoLGzFDsMMa/BkzQgmP69gos0/ohae7BOWjtVUhIvKqMrYOe2P6NWCBTLQA acYtBAE25OOQ7cuulgkn/aVdBSF0UKFgxIyRE84KhDzT/MSh8/CJek+XY9/iTfwHRnUG 4BNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=kfeU64utFURAg7znkVdwluCSUkjT4qVLq6HNDfKkQHU=; b=D6bsT8g72Twks8Sfg5VTBXSVNmArVTQtUk9OTd/ysVGanmZnTj3VhxJLueznRVhJ5k oR8Wb20OcFU/IuhqfoSDpkUtmie2Xn30Jbf1PgpPkT+YqepWrm0vzi/lptQx4o1Vyh/e JjeI5BhOM99JuTAwjbO+oAdoVmwWnWvyxTib8VQDrlLNiw3oXDVpuoDd8myYzx5Lq8VA xXH40Bb3u7ZJDsj3Q7sPhXvalY2o9qUbQRHz1nwCVfekZMWwm+c00iGnkuDBHNdDn1J7 JiT7udKRV7aiOMQLREO1r5ttOuAQErbNB0JXb1781Gkoio4hLL/05189S9Q2zNdhD8DV n9hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=i6aIhYXT; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6-v6si6511942pgi.506.2018.09.06.17.39.19; Thu, 06 Sep 2018 17:39:20 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=i6aIhYXT; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730443AbeIGFRX (ORCPT + 32 others); Fri, 7 Sep 2018 01:17:23 -0400 Received: from mail-bl2nam02on0129.outbound.protection.outlook.com ([104.47.38.129]:33184 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729275AbeIGFRV (ORCPT ); Fri, 7 Sep 2018 01:17:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kfeU64utFURAg7znkVdwluCSUkjT4qVLq6HNDfKkQHU=; b=i6aIhYXTXzLK5kG5bAxpqQo1Lq7iKeGIe/2LKRJuvPuJqlUhOWHNXDuecNC1Fo8xipNbEJRPo7XJVf5/CMf0v8GirD63VF8sAI788uGmd0fzECopAvspdip6J0u06NCPFV3BJL1DcdemYSejhK9sus3yo7tEkltMs4qBaI/5EH4= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0757.namprd21.prod.outlook.com (10.173.192.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1143.1; Fri, 7 Sep 2018 00:39:06 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.008; Fri, 7 Sep 2018 00:39:06 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Loic Poulain , Andy Gross , Sasha Levin Subject: [PATCH AUTOSEL 4.14 55/67] arm64: dts: qcom: db410c: Fix Bluetooth LED trigger Thread-Topic: [PATCH AUTOSEL 4.14 55/67] arm64: dts: qcom: db410c: Fix Bluetooth LED trigger Thread-Index: AQHURkMIgieTIq36AUa8l6CmXKiP3g== Date: Fri, 7 Sep 2018 00:38:01 +0000 Message-ID: <20180907003716.57737-55-alexander.levin@microsoft.com> References: <20180907003716.57737-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003716.57737-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0757; 6:VN1fgCxH6h+qTdy6pL8Cm27OZR/AlISGbUMkbqgN3jcp+t7mbU5tR+nPtyTLiIN1evrkI/p+H4upi1anM4xt+IQjnMnUOsrIax58aKGMf2PPMyi9TV6yu8bOm7D7ps6u8JK0osV8/Y07kDsJdkXPdIPUOmwKrfWJCoZI9USl/KpIsvBUGQmy8safLJpI4Gsztv75sBmxqcR/Uv/5y2btEsi5WV2N7H6wY39ey+Q7hO7o+jQlsfZ959XFpZRrzBju7WoWdYs0Z7UBeMV8NDXvQXL/w0gKxGwoBQK/gAZvOEoyuAYXle3HU6/XcLhnjo7szgmmzgHwlAQLhJWzbrmZJrL1oP+Ru1B4qPQVIvxr2sSyd9F1eiF4UfGjtDUbFHJfoLGhcP0jVeaU4Uv7zRQmNOirfURdIrOtO7PVEAnJLHP9C3Gq9zpiHUxda6K+wHFG13dKFN8QMucuz+nof8wBdQ==; 5:pvNDtgv6/3WpHkyN6hk33R3FaJy7eT2LHhdEfMH/YGs6DZAtaUluv5YV6p67NKmGovPPo2L1X90/zWYhCdbbJ8eobnnSgT1EAYH2xsuVJM7SKsfecWwj7ARCN4ObuoY6qiHYPPTjyPhvGM4ggGA2VMXiD2ardxBKlMBvdn0Mz3g=; 7:1CUoD/rj6kqeYLCNvKIDxjbn1FJiMn53VnC3xUmc/GXLP2ZkVxH2CzSNrPNyLg47iTMhc0aVLdd35mPgZ7FKqtSNikukOd+bYHfMFNx3dQR2kOhLs3HKOgUqTpojXVYsZ+iQWhnTdEX493m5Nm1zoPw7jQQ9+Z8qH1ZGk8+m1yoclXUuy6Yzn2W7+bbr0mDl7hBv69trW1VF8RIo2sJRaJ3xZrlmlceaRgSPUxZ6xbLS1ZMFw3i/w3S21FTl1yKi x-ms-office365-filtering-correlation-id: 2ede9f2c-c7f5-4f2a-a3bb-08d6145a5158 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0757; x-ms-traffictypediagnostic: CY4PR21MB0757: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231344)(944501410)(52105095)(2018427008)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0757; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0757; x-forefront-prvs: 07880C4932 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(39860400002)(366004)(396003)(136003)(346002)(376002)(199004)(189003)(8936002)(3846002)(81166006)(86612001)(6666003)(5250100002)(81156014)(486006)(99286004)(6486002)(106356001)(10290500003)(107886003)(256004)(14444005)(26005)(11346002)(14454004)(446003)(76176011)(6346003)(5660300001)(10090500001)(110136005)(2616005)(66066001)(186003)(476003)(72206003)(2501003)(54906003)(316002)(6436002)(86362001)(97736004)(53936002)(22452003)(6506007)(102836004)(8676002)(6512007)(2900100001)(68736007)(305945005)(7736002)(217873002)(6116002)(1076002)(25786009)(2906002)(36756003)(4326008)(105586002)(478600001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0757; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: pzbHlIHXeT9qsnXO+Eam8HT4JZdsJyGyk42hQXTnkIPSEZQmWfyaVhcHh1fhvWPwIvqK50rRa32umqF3tZXCH/sqgBLkA1vA7wOXhZ383IqDEB/kFNn9h3eNhpGYHqPD5uHUSNZmp7J8GrpNX6/1wyueueEKxgGb4VfbzQ8NcQf/FigFT66TS5AWmGCwn5OJaqbgOTG+a0ldUts0P9DQA1zDaROBv68GL3ZT41Q9/9pjGBCP177pooUYE+AMWP5rSvKK99JhiEfmQk2avRwQeQfD3dBTU71e2z41BvcYe3+NKp35MXE0/3IqJUfI+PnuyfrZT+sQFnOqaBGrlRr2HD33KCU482MSO9XwRqdbn4k= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ede9f2c-c7f5-4f2a-a3bb-08d6145a5158 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2018 00:38:01.3775 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0757 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain [ Upstream commit e53db018315b7660bb7000a29e79faff2496c2c2 ] Current LED trigger, 'bt', is not known/used by any existing driver. Fix this by renaming it to 'bluetooth-power' trigger which is controlled by the Bluetooth subsystem. Fixes: 9943230c8860 ("arm64: dts: qcom: Add apq8016-sbc board LED's related device nodes") Signed-off-by: Loic Poulain Signed-off-by: Andy Gross Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index 1d63e6b879de..b6b44fdf7fac 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -187,7 +187,7 @@ led@6 { label = "apq8016-sbc:blue:bt"; gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "bt"; + linux,default-trigger = "bluetooth-power"; default-state = "off"; }; };