Message ID | 20180409002239.163177-180-alexander.levin@microsoft.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp704546ljb; Sun, 8 Apr 2018 19:06:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Dd0ayLfMO1dRGDNjB3RN+W3CudBk3Jtn/a7x/ZeyD53HDKIderHN1moEOcnnUlbF294yl X-Received: by 10.99.100.197 with SMTP id y188mr23380344pgb.277.1523239561016; Sun, 08 Apr 2018 19:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523239561; cv=none; d=google.com; s=arc-20160816; b=Afejy5hY2sexTLGof/W07fcGVjilou+oSvScoIIF2ESBAN+AdsaEZhI7yEragDkEUW 01TSjYXbvFjEObgcGb/uxANGw8jXWksIWS/xABH8NhdM17D4UpeD6b30uNJs9xnWuVFO G/hNUf3GgkywBakQpGfiWJ8ysRLrnVz+l02PorlL2XPuV937lreSBc7Gef3mXDS6O9xC zYgX4+cLs7RCisXN4/2pVQi6w+K/ZE0prn7HFydtGsZn51P6cIncbVUNl95Zwwu6qW1z rXvodMqgXn67V3FyaTO7PZYPniveRNTWf9Ht/j4k8E+YoH3LpEMHEOso6bp406NkKcXm ri4w== 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 :arc-authentication-results; bh=oM5JRjnNOOvHiYlL/YkLYqPuwiH9qy+8TZmBlQ/mD7k=; b=YQ9aS6COnkrT8rWSmh9qp+FRAYHX4CepG1lErA7T9x8L9lIhMODHkmq46i8157kQSZ Osv/xolarDKI3sp4gqljbTHALyulHWVKqZ0WMazI1OIEwHRW4zz/ZkMPfk1Z+nwCyHgl 79D5Yli8qSnkc8cwcSYdnuZVwhLa9vlPvQ3uCtjmnM+/tBTPw2Joq1zayvVkvE13Qq1/ OwHvFc5wuX5Iscv2TJxUFrTPXZSRtBhmn2uvRNwb05+mkchbzE8I7dp+0JSVSXsM1Ig9 INNuYWcVzH3+WwWUnLQdiXYHv1rxgXUs6tW/5nxSj8t6HTvd6nSaZYQh0noAeo5YPqbz aB2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Ib58pE2+; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si8665129pgq.646.2018.04.08.19.06.00; Sun, 08 Apr 2018 19:06:00 -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=Ib58pE2+; 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 S1757807AbeDICF5 (ORCPT <rfc822;ramon.fried@linaro.org> + 29 others); Sun, 8 Apr 2018 22:05:57 -0400 Received: from mail-cys01nam02on0107.outbound.protection.outlook.com ([104.47.37.107]:40886 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756311AbeDIAba (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 8 Apr 2018 20:31:30 -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; bh=oM5JRjnNOOvHiYlL/YkLYqPuwiH9qy+8TZmBlQ/mD7k=; b=Ib58pE2+vfkYG5RHJIifrxJrsCKzkgz/ADauYJfBk75IadLSzDO7dJzzpAW88bbpB3hqhWGcvGuzrVNVMLKrghcHC3ydzSeauP/BSMbs11CjN6e6Hrw2PENqQwablHsTW+ogjIonrQqIPG9qEM/NHOE4BSrqJYBq+L5b7O8Udk4= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1126.namprd21.prod.outlook.com (52.132.132.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:31:24 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:31:24 +0000 From: Sasha Levin <Alexander.Levin@microsoft.com> To: "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: Dave Martin <Dave.Martin@arm.com>, Will Deacon <will.deacon@arm.com>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL for 4.9 180/293] arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails Thread-Topic: [PATCH AUTOSEL for 4.9 180/293] arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails Thread-Index: AQHTz5k7ATtWyuV53Uq5j1Zr0D3AAw== Date: Mon, 9 Apr 2018 00:25:15 +0000 Message-ID: <20180409002239.163177-180-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-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; DM5PR2101MB1126; 7:deJRSsX5qAQ4A/8WOaxFBYg85YTX5QBDakulVWXqV3Hb2ySg5mniuHNrQbw8B4HwYnh33qwk+tIi4sc+CPkw99kMwTMwCpd05MjUDNfTKXMBfvCo4lLC0aigZoh1sMh6vCeFhZ7f23+EBNVFC07xBo2/wd/wNQSmdorGVyq9zHRNd2vklXdxYSHjz9BKSHmXfV3Yrctz1e2NqsidsBoaxKfCmHY17UfY8QVQV3vKoiiUU8794pDmiU1TEuRc7tTw; 20:9HSx+7IT8BWqx6A1Ndpo5abtZuj1ZY8lXmMmd4CcKeKCGRcMUUU1wCt8FSjfLHKZLC/RUiq7vdTo2Y3Pmu+3La0kakYL6Fwu0Q9TN+Z0Ck1kcTkkNQYWM9WK2f5KNEUCRPLN7ztZU/gOZdEp7WGWzWfW4Gh2XIjVve7Wy+k89SI= X-MS-Office365-Filtering-Correlation-Id: f87fbee7-f379-48f4-1455-08d59db13974 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020); SRVR:DM5PR2101MB1126; x-ms-traffictypediagnostic: DM5PR2101MB1126: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB11266226B5FF3AC4CD515679FBBF0@DM5PR2101MB1126.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1126; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1126; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39380400002)(396003)(39860400002)(346002)(376002)(189003)(199004)(2616005)(476003)(81156014)(8676002)(81166006)(3846002)(486006)(2900100001)(6436002)(186003)(478600001)(72206003)(110136005)(54906003)(2906002)(86612001)(6666003)(2501003)(26005)(10090500001)(102836004)(6512007)(6116002)(14454004)(5250100002)(10290500003)(1076002)(446003)(3280700002)(3660700001)(11346002)(8936002)(25786009)(6506007)(106356001)(4326008)(107886003)(36756003)(105586002)(53936002)(86362001)(66066001)(6486002)(99286004)(5660300001)(316002)(22452003)(305945005)(76176011)(97736004)(68736007)(7736002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1126; H:DM5PR2101MB1032.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) x-microsoft-antispam-message-info: 9njMOfKEAOYAD0EQ8BNVRz9bBWTuEDwpbtwxE8wHjxXF8AdM+cMSsAoa4IpV0YEdkEzijIVtrhtfNsLpuOxtkSfkNd1FD3d4Xje8yMHTKC6Ibq+ZOUu7hp0shLJFuliX9FfQrd059sBAJ8cWykH8S4ewVWnYKdqE0fLFTvtOKeXgiMYfWNzmpgLsyEpAF5XpQFucnyQIhR7Gv1zPGJ8tF7aE3YGt3N4WSsBGTGO/qHpzJ6TZ18alz6obTSotPOMJNsyQ+FFncgu2XRvKM0TCkTvx8/IL7LgNTkI8PB/h0vF68YSJ90qoxUmHT+GZbww9ZhuOn6lQopCDlTvQkLnrjmGVsvyTKxvsYn+6NtIC9RmD2nJm+XHFwPhx3BBdM5HWVemZlyKNnfmuTX4RGdmAn01QKV+KLk5sUyoSitsnduo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f87fbee7-f379-48f4-1455-08d59db13974 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:25:15.3626 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 5c78b64369cf..cca95e75aaeb 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -938,8 +938,10 @@ static int compat_vfp_set(struct task_struct *target, if (count && !ret) { ret = get_user(fpscr, (compat_ulong_t *)ubuf); - uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; - uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK; + if (!ret) { + uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; + uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK; + } } fpsimd_flush_task_state(target);