Message ID | 20180409002738.163941-91-alexander.levin@microsoft.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp648711ljb; Sun, 8 Apr 2018 17:37:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9iHxTqyig4yAcSh8e9TYqnJoOUxHfHcNUAgr6Pb7/FnaAC11zgs42mpSPiq5lHn/NCjhw X-Received: by 2002:a17:902:7611:: with SMTP id k17-v6mr3025072pll.244.1523234268797; Sun, 08 Apr 2018 17:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523234268; cv=none; d=google.com; s=arc-20160816; b=hFeJOt9rR1iDc7QSgPKfh8YtD7J6qBWBJ0aPVt40i+gFE2nRa5xVKDnmBPV8UbABeK 17iZin0gJUYcalZgQk4479+Dy0M6/jeQfFQryvrtm6PJDfSOgQkbDIv0TUd9YJrLM1x4 FBCl6gntHDuMDrxPrhFLrou5oLpXmgfZ2/KtrFBHgaDT2bg+92nv6rMFNapqjHTAIxPY 8wtP7TBRd0vDBI59W6xHxRdl4CfwO2wQ/p4+LrwulO/sApQYNnov240ZSKAdnMSNoPdU PZXGJ8ASKpuW/IKcKWN1xCr3s74QPnjXx3dDayfr2i2Y3ih7Uak9cYVUm0+V3wRFI9ep EeqA== 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=JHtEn1VXtQ+Z13mENNLagRXSk7uqP2t6QvvXoK3MZIE=; b=kVbKDcTCo/gqPbqei3F4kGRM6dSRJ0CbHDzKBDJCDcL6FeoF1GZLr12pkDXiDHBK0z SCrudNOk7aeK9cA5cFL7pDaCXi+cNlj9HbJ+s9rnhDownFIKf0E6wuDF7lUfktnfq5Yb ZOsr+zLx6D4/USo6nLaGj01gKNsQGHAoTsMxoqPNQS4SMes899HKfd+UavGM1ZpCX3NH 6D8d7l86N682vTy9n6EzJ9MJnKuuW2pfMZKxWu690cNuMitYK3FH/VWiBf5irwvTetla ByVreItN3I3i6PS4/jUJQWhhhtwmZ1CBwhvfaInISsd9J3sjM7KPY64TlGPbEybILtrj 27ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=npT9xW7D; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si1561404pgc.731.2018.04.08.17.37.48; Sun, 08 Apr 2018 17:37:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=npT9xW7D; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S932821AbeDIAhp (ORCPT <rfc822;semen.protsenko@linaro.org> + 11 others); Sun, 8 Apr 2018 20:37:45 -0400 Received: from mail-sn1nam02on0135.outbound.protection.outlook.com ([104.47.36.135]:3040 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754315AbeDIAhk (ORCPT <rfc822;stable@vger.kernel.org>); Sun, 8 Apr 2018 20:37:40 -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=JHtEn1VXtQ+Z13mENNLagRXSk7uqP2t6QvvXoK3MZIE=; b=npT9xW7Djd68+GjBKlDLyQSJcoiJ9rCxP7WabER2QeRdv2C8SzL9+PODqxZ5+xPRILGYfIfqCwkYhPGN27XD/+Y5KcBTzZ7gm81PXei2S2oaebKuE82pTb4IOzR4u08NmbvcnS7zesoJREm7dk1UYPoFzEmzfu/5VrPjAP0eI0k= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) 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:37:38 +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:37:38 +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.4 091/162] arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() Thread-Topic: [PATCH AUTOSEL for 4.4 091/162] arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() Thread-Index: AQHTz5m7WV/WP7Q+FEy1WfSfCQyAmw== Date: Mon, 9 Apr 2018 00:28:50 +0000 Message-ID: <20180409002738.163941-91-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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; DM5PR2101MB1031; 7:LbvF8G003+ZAKzSE9bl8BZcBHK/inbHKMht26wiNfEjOZ8S/poBdrT/J/gsMuze8XDbPbuG6EEHjVgRDrkrPtygjkWIlDENjpwxVptX+Sp3fHR4gzpuBc3YoSGWexYyGyc5BNubjqUZ9ElMZ/fQHoeQTQsEHSTgcM4zvxpq0T3cQy+XB8cgWZ6PD/5LBPLNJn2WIXUrEmNdvDL628amnhOYwMJtKFmd2/NOo3l9qry9B6cVIfUfZYKkn16PAvpGB; 20:T51gm/VqXrSqX+nQWOZwA+G9GG84IrVZGT8rhPLJOglVelZYMGIOlemV1NX5wvYlATGJQhk5u/a53vGNkKdIUD0lWqFzdBUjgLVd5n7P/EQj2E0hCATtpIgbn3HEF64Mm77aljZSF3qpqMTDkXBsmYCDrWqIBrdtye0oWykGct0= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: be7a7a8b-41bb-4c1d-ade3-08d59db218a6 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB10319DBAE102FBA21F2A1E75FBBF0@DM5PR2101MB1031.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)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR2101MB1031; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1031; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(39380400002)(346002)(39860400002)(189003)(199004)(2900100001)(10290500003)(99286004)(76176011)(14454004)(7736002)(11346002)(26005)(6666003)(86612001)(72206003)(478600001)(36756003)(106356001)(66066001)(2616005)(186003)(22452003)(86362001)(68736007)(305945005)(54906003)(102836004)(486006)(59450400001)(110136005)(316002)(6506007)(446003)(107886003)(53936002)(4326008)(105586002)(6436002)(6486002)(476003)(6512007)(5660300001)(5250100002)(25786009)(3846002)(6116002)(1076002)(97736004)(3280700002)(2501003)(2906002)(81156014)(8676002)(10090500001)(81166006)(8936002)(3660700001)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1031; 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: rMEpHUP6az/HMJuM3hv4ZBB+JqN4e1sFt5daxnleEcMIJfg0O2GXwkMujTpr11WTQfjbSx1M9cFJ70zFaRKaFVv1iSU4rWMPSTvoprgcgs/8vaOJ2724CNZpQDg7E7S1wjgPFIIpFQy5jc1aTO1MS8KdPLlgqq60hvlygHHasSkeYgq0bjaKENpfIVqblw/IDofHory7c8f4DoapR3sPX1eDmJjoh8Xt7FwFuC5yq5RfCHB609oqWZbclCwNGBjVwD8XZj/1prAPweraPFdJuPn9YPBCIyBvXpDXqmxalJpQMNl6KlMHX7Ynhg5OhPz6SHvjELgIPH4fpvcSNUloyFAG3uKpRq0Kqn1kQZA+UL5rebY0uhWmALEgWbTc0SwCiMjhfnEUye7vgkRqFjOnEB2gXA7bJCJBwarxfUqHXcY= 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: be7a7a8b-41bb-4c1d-ade3-08d59db218a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:50.8646 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index b81fa63bc834..f67bb64d2640 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -822,18 +822,20 @@ static int compat_vfp_set(struct task_struct *target, { struct user_fpsimd_state *uregs; compat_ulong_t fpscr; - int ret; + int ret, vregs_end_pos; if (pos + count > VFP_STATE_SIZE) return -EIO; uregs = &target->thread.fpsimd_state.user_fpsimd; + vregs_end_pos = VFP_STATE_SIZE - sizeof(compat_ulong_t); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, uregs, 0, - VFP_STATE_SIZE - sizeof(compat_ulong_t)); + vregs_end_pos); if (count && !ret) { - ret = get_user(fpscr, (compat_ulong_t *)ubuf); + ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &fpscr, + vregs_end_pos, VFP_STATE_SIZE); if (!ret) { uregs->fpsr = fpscr & VFP_FPSCR_STAT_MASK; uregs->fpcr = fpscr & VFP_FPSCR_CTRL_MASK;