Received: by 10.213.65.68 with SMTP id h4csp2183000imn; Sun, 8 Apr 2018 21:55:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx486v0//PAJRNL1pM4Eq3ODXLQauS4d1uqQl3XaqkiwadldyXDHq2Bu4ihTRKPHGa7QlRWDo X-Received: by 2002:a17:902:3204:: with SMTP id y4-v6mr37093950plb.226.1523249724828; Sun, 08 Apr 2018 21:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523249724; cv=none; d=google.com; s=arc-20160816; b=wMfh78Lq0iV79/Ou4ujjkIsq2j7sYGHzCmO6y3StxwyZQUrJIU/YfhhpkEIk7uMFqS oYByvuZNQ6FK7Owkp0/Pd9JFzHcIiSUpLpBLZJhJlZ8oKhbSJc8IeFyN/iWIdrdj2Tp6 zzetqBSZ2adbMWlW/kJzXMMgUlGJBE4jR5LAa0DmziK4lyApsLbL8H4AWH6IuOEAbfr+ ylAhjs/1LZJhz4Et+Ob4acl3Tg5Rd79t2TLGigDP2C/Jjfx1HvQT52cx3FLktuW9Lvy2 DL/NvljPDlYnzsuWcjGuNN7kcfCEbTLUZVAFF4fa86y2HJZ16zLGO1JmZJw8Bj54npSR uzcQ== 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=Ct0oR4BPFhzHi9xbTPxcYWuIlnX5MBBLIT1FsMJkM5U=; b=uqtZSNWStirgKwBWwisXKaFkuSR4VWjzfXRWXtnlJ27ldI6d1mMT8ioq8N5DotRhty wYaeMIIf6yVCM2TgAXIbLSaWa8uJTxpLn6a6oJlpnhWA0tx8NXpWfr2uzv3nhsixi7v7 mUv2y1o0J62SFRFGP18Uo5G2hf0VdYDuRESMhymUqwIPBj8VTf4ctf9HrR7ylhww91QD 9m1zuUugY8bRKply5WNxWDmPjqZwoPnxcZ60u9QQQddtGuXAq3Oq/354OZZRjOtK6EIa uT2qgSlLi5x0QXXI75r5ZYu2FY8aspAFTCysp8gVXN7SPGzYpIw/acrM/WpE739Z/BZ4 jwDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ULYv3tMI; 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 k70si10700152pgc.622.2018.04.08.21.54.48; Sun, 08 Apr 2018 21:55: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=ULYv3tMI; 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 S1753425AbeDIASK (ORCPT + 99 others); Sun, 8 Apr 2018 20:18:10 -0400 Received: from mail-co1nam03on0092.outbound.protection.outlook.com ([104.47.40.92]:42112 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753394AbeDIASD (ORCPT ); Sun, 8 Apr 2018 20:18:03 -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=Ct0oR4BPFhzHi9xbTPxcYWuIlnX5MBBLIT1FsMJkM5U=; b=ULYv3tMIA8b+hG3iRMJNjYlwHPJSW+lxLltKhVNZVH+Edi5QYsvE3Ky63NzGQTALxOeNfLze7wlR70WesOlwvItksgxJytpferSYzE9TBerbA4UVI6kky1dnmAeiAjFoWvPUlyVD7BfDybRIVPX5y4ytMxxchL1VnWnnTQc4c1k= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1046.namprd21.prod.outlook.com (52.132.128.15) 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:17:53 +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:17:53 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Vladimir Murzin , Russell King , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 053/189] ARM: 8740/1: NOMMU: Make sure we do not hold stale data in mem[] array Thread-Topic: [PATCH AUTOSEL for 4.15 053/189] ARM: 8740/1: NOMMU: Make sure we do not hold stale data in mem[] array Thread-Index: AQHTz5gku4MueDI2jEOlUumjzuuefw== Date: Mon, 9 Apr 2018 00:17:27 +0000 Message-ID: <20180409001637.162453-53-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-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;DM5PR2101MB1046;7:DLRkMwKmjYp7eVSdxX0inCGd06JsFT2vifXjniew6CXw54kuz04SbXeLXp/okqOEcPaPB4ZCiDloLn3lDt60xEL2f5DbpchCFtopxuXFgUlxch/iH7kRvz1NzsHsuajBXR+tjKTuspl4h6/X4zZ+ZcCYzdIhqKdQy3oSSj/i3V15Ia7cAKCMEQeDTqhQpBP/9qGGFyjDbz7yPe1znpa9qbcLrdPpbyoE+pjsMD594gtXFpZgia53JkOJaeKVsrUW;20:F9YewPYhaL8SGFntXmAHuWLbGKnx7NMD69pSZV6i/NRoyqdknw9jiNLxIzXGieya+FezXAFOn5W5T10bxNH2ZKpliYoL6mkFkP+gXeqEXyGGjklNZ348I0tmEu4eFT8tde0uJ6lYh33aSGkYvKadUpakpp5O0sthh+9N2fDaJo4= X-MS-Office365-Filtering-Correlation-Id: c85d4ac3-7327-4358-eb71-08d59daf5675 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:DM5PR2101MB1046; x-ms-traffictypediagnostic: DM5PR2101MB1046: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: 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)(10201501046)(3002001)(93006095)(93001095)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1046;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1046; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(376002)(396003)(366004)(39860400002)(199004)(189003)(36756003)(575784001)(186003)(11346002)(446003)(476003)(2616005)(7736002)(5660300001)(26005)(10290500003)(478600001)(106356001)(6666003)(68736007)(10090500001)(54906003)(3846002)(22452003)(6116002)(86612001)(110136005)(99286004)(86362001)(72206003)(305945005)(76176011)(102836004)(6506007)(486006)(316002)(3280700002)(3660700001)(81166006)(81156014)(8676002)(2906002)(14454004)(2900100001)(97736004)(6486002)(8936002)(1076002)(6512007)(6436002)(105586002)(25786009)(4326008)(2501003)(5250100002)(53936002)(66066001)(107886003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1046;H:DM5PR2101MB1032.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) x-microsoft-antispam-message-info: jk2IKWYPL+hFqwvitxn6BCuq/gZuylZpdcDLT2x5K6AE/MQAgTRLYttENdaOWVrpOssop1Nmb24nkb2oGSJapiAROLi6zBquvL+lWh8D8tSkCtbZL0Po7iMIT10V+7ua/H0vcZJsbFfufhYa8DdveTAYi9yFRTUiKfMW9kmFLlQgjVtxL4fh0coAIJ+05FDBRH0kVxm0B2pxjVztzRHJzIBL67ROgRPFZE9reNpatJOR/BXSAfLQpSrAVVcYRmAQvNoFWZ0bpziGZm8nFO8MoI7kC/9G2ULoz3nbAcu+vWC4j+kQdKnpPH1pF4y+HDc/4D5vwor4ZUZsUWA14PR/53EMnAiIv+RoVj6IOAnLXakMV7LqhmmX/NVYK+aazPRhHJnIiZQnez9w23f5JkflaRlv4gLdKiKSbtO5R+L3lCE= 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: c85d4ac3-7327-4358-eb71-08d59daf5675 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:17:27.8065 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1046 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Murzin [ Upstream commit 636e645f1f2a5826beacd23548696f1655b0b5d8 ] adjust_lowmem_bounds() called twice which can lead to stalled data (i.e. subreg) value in mem[] array after the first call. Zero out mem[] array before we allocate MPU regions for memory. Fixes: 5c9d9a1b3a54 ("ARM: 8712/1: NOMMU: Use more MPU regions to cover mem= ory") Signed-off-by: Vladimir Murzin Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/mm/pmsa-v7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mm/pmsa-v7.c b/arch/arm/mm/pmsa-v7.c index 976df60ac426..f65c01fba9f4 100644 --- a/arch/arm/mm/pmsa-v7.c +++ b/arch/arm/mm/pmsa-v7.c @@ -6,6 +6,7 @@ =20 #include #include +#include =20 #include #include @@ -296,6 +297,7 @@ void __init adjust_lowmem_bounds_mpu(void) } } =20 + memset(mem, 0, sizeof(mem)); num =3D allocate_region(mem_start, specified_mem_size, mem_max_regions, m= em); =20 for (i =3D 0; i < num; i++) { --=20 2.15.1