Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965835AbcKXO2f (ORCPT ); Thu, 24 Nov 2016 09:28:35 -0500 Received: from mail-by2nam03on0086.outbound.protection.outlook.com ([104.47.42.86]:11916 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965556AbcKXO2T (ORCPT ); Thu, 24 Nov 2016 09:28:19 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Robert.Richter@cavium.com; Date: Thu, 24 Nov 2016 15:11:49 +0100 From: Robert Richter To: Ard Biesheuvel CC: Will Deacon , Robert Richter , Mark Rutland , Catalin Marinas , David Daney , Hanjun Guo , "linux-arm-kernel@lists.infradead.org" , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] arm64: mm: Fix memmap to be initialized for the entire section Message-ID: <20161124141149.GE2213@rric.localdomain> References: <20161109195132.GZ22012@rric.localdomain> <20161117142528.GJ22855@arm.com> <20161117151805.GJ2151@rric.localdomain> <20161123211538.GH10776@rric.localdomain> <20161124134238.GI10776@rric.localdomain> <20161124135151.GJ10776@rric.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [92.229.88.216] X-ClientProxiedBy: HE1PR0101CA0024.eurprd01.prod.exchangelabs.com (10.168.141.162) To CY1PR07MB2347.namprd07.prod.outlook.com (10.166.194.146) X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2347;2:hnkeurLt5WMc3pkZPEgL2NwL3rYwwcWAUF+92o5tAb1xwu3kw2fSg0tiNseDIX8nrUB28Fd8SK2Z5m+aMTZ3m2ATgpMtzP1dm1x7ltDMN+Ds5UQksaD5bnV3gBIjZqvg8RNgZrHMBqW6qI1r3jf+XULD1IKFv0mVm5uGAPoiQ+w=;3:UcObEP5JmYu42/2RFiv/UsLTNvX96HprpXrtIEpP8vNl9aE0zbsSV79BHcGQteicvYnjJ/PBdLnYhOdP5ZKFFoSXinOTJCd3zhA8SHNn3RXDqjAUDGE1xaYIh714UEW196PvtRsVPIIWZi1cxSLwSpuMLb/XpaLwurx6qhohXJ0=;25:Wr+HXWFdhoC3qg3WB5CwUmZhqvglkGO4vDnMAltAPVf3N4FXtkxn+2gq+KN7jobPRLKwGtsKU9fxo/LsFgsd/Gi3cTI+04UW52V1cw2H1qrFapekFj3janGsWdo6GyAbrosXug0SOA0ZVVMKHvZydW7VSH8fH5lJ22kp5WqEcHoa394i6P8sgTHYmnbx6DbFnktcvUevOhFLmr2jxxx7/YwYJIfT80XKDEMGDHFjcbgO+Al/SyZU6Wq9qGqriQw9ivfpXJZu+G7QGhR+nTgpoYaTiifloOPLrLJNuYaAnHQpnVJGr4c8w2VZhBxeZSA8Vg/n3R05is/wfrvPQXIr1ntB/xvlferv3lcvuV0D6WVf2ISY+pho+NkSShimyNE45Q2KxSr5eb0houlev5n40e+sxGRQTmX9VtWpCK5yFf/sCl6XgJxthfyD97us4ID0xBfW8p1X48m/dnt/3ER09w== X-MS-Office365-Filtering-Correlation-Id: f5cd493a-57ab-4f4a-05e7-08d41473e02f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2347; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2347;31:3GJ2NKq4tvO1iorhqybbyaslSaYuvAejfzt6AByvWPt8yIYsPCcYmjmNu+qtO8aRXeaNQi1M4xxne64YKpLM6Mba1wl1Ifk0WS+6AGvwlrZW7eJXuYpaLhiBd+99nit+6n9eXiVi6XCxKwNXv/zsf1bvIyvfd/rxmGsevot2bf/+veG/S4nPoHb2gRJD5A+Q97blp3gFEvhlTFJRMqiaMGKUanY07tLkb1eshR/4pF8UkPR59BMOEGSu4GlrOzdY82DBUHRqb2AaqimK1vbRKQ==;20:ydy9EkpdXhKS9DQ13Hci5A1rjo7of+hLWi/TEZrVsU1l5dcu8K3SaVPPNuqXgRXayN8QHXFCyRN3SWW225esMteVCOOxhhxSNLQZ3ZjWLUARQYVc/+eDVfjPVQgRCV5wqSeGxo1xQi5xqWK4YZvHPJtH3YuvoHWI0K/dVGVEGXy5uty0I8SY1hwL9kL903A3qzJ3D/ivpUuUqChchUPPCTt1R0QJHVDY2khqoW+Ufh1CyvHc9Ve2SmDTlr57AJAiIqU9zW20wEZekok+eMtTor3PzLmbQnadjuau79FpID2ArfBFH4Day/fiX+fbtCOnDPjnDz2lM1aoYgjTJA1IDdmLclL1XqTluq45d/+NWUv6YkVCfeS+rC8T0LZPDG3itq8f0acsScHd5v+AHptXe4esw3TjS8XDlZkGRHnGsYDtyACAIv6KoOCL3C2i7IB18oKDjrWEV5cqWCUhM19fw78p499o4IFHRlKY4zYIomeqsfi2zLFQpE2dTGY8ig6E X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6045199)(6060326)(6040361)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6061324)(6041248)(20161123555025)(20161123564025)(20161123560025)(20161123562025);SRVR:CY1PR07MB2347;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2347; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2347;4:dffZuIRdSDUi5r2o3ppbQbwoqXPBvmploRVw9BaZV/91I6aSWpYDsOHs7mwIFwkSKuBVqMNdqn6lZ+aRfH44gBXvO1HYMljrrFp9xOUjYVG4Fjd3ThpGIf6Dfv+0S7lnJr/e2ZLfISw0ELSJFJ35d4Ay2FdNy0d2GB+RjQVvPqWDFpK+tRg0S0qWtgUJQfZY/jV+K7RxuKITT9SSo0sU4MeaTiWXCRK1mvGOepTUaVzb62MtUu1J07Pou5ZyeRby0Yxbro+Xae8E/ynrm2QCxq4ztJ7z+9tupFua+aofMzGOsVCG7ZeeZNOvJDGconO7u7dCpoUaBzlYfhRgOC3L+N8YUs9b6XQu2LCb5ZehsOGdNzzKDyyGJsltN0gdqr1AwBSL98NbaGaN/giK+qFxt+CP+Os3stPopLpQmGVZKP9fcGiygFLUpfb2HMdlSlfHdGKfb3SS7GgJQr8iZiGGZ0EWXXITOYajQAZx4BgsEM4kWGqG8m8XnvfgpS9Py/vX6CYW3kI508C5/UE9DWpjtBbLtyYCKZYZkNt42m2r9xxWJywlfaPUKrxl80swcEG7z6a6tkERAx+yKh4FXLpW3I9YkutVP/I6iwmUj3WRZWo= X-Forefront-PRVS: 0136C1DDA4 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(24454002)(189002)(199003)(39380400001)(39410400001)(106356001)(23726003)(4001350100001)(105586002)(47776003)(8676002)(66066001)(1076002)(33656002)(38730400001)(81166006)(110136003)(189998001)(97736004)(97756001)(81156014)(2906002)(5660300001)(42186005)(4326007)(9686002)(101416001)(93886004)(92566002)(50466002)(83506001)(305945005)(2950100002)(6666003)(76176999)(229853002)(6116002)(54356999)(7846002)(46406003)(50986999)(77096005)(6916009)(86362001)(68736007)(3846002)(7736002)(39400400001)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2347;H:rric.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2347;23:CLnpdUqMgMT/bb5NQkdke4Wmsp0sy7dfu7R1cPXNf?= =?us-ascii?Q?cS0r0ZNo29noqM5F9d0e3czvqeG0fUsVxxPIHpBS0syIV/8DYS0se2tmqq2Y?= =?us-ascii?Q?uJppg5lY4QtG3W2suQAtT264PIdbU8BBrI5WtsY9doNovNJc30GD4q8KdqRE?= =?us-ascii?Q?TPUWKK4KBafuTdHuWQy19PIMK2E/ygk7UvgOpSl2nke57J0AY6+zWdaV7eBt?= =?us-ascii?Q?2RTBl5B9dnvqGQdPQe1aV0A1WIWnIt2RIHcX8CSKIc2+H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ngdF03ctAfeBHfP0T3MADcZ+r7ixTEtadiD+KLv/tG?= =?us-ascii?Q?VKgngahFogc6R9KD8m/cSgvIW8MH7/+hFTBzSyygSVKlkriRVs7d5uMXcCFV?= =?us-ascii?Q?ziBTBFmRaReoML1kZMklqLhHvK/iLNZRru2K8x7/e8/OAGTc6o6bshw11OQh?= =?us-ascii?B?Zz09?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2347;6:fRqdbCzsuse16jFg4ZQyvMVR1s146AkSTBWdNkpR6HT1tvgpOkPK44KZiCns9Gp8s9hpLAGYXhi6KcEdvBSrdZ6PShw90SfVUruh4+8YABr+dp79DJ1QWpWNhVJ32psfX6pwvRnFh9SXuJzzxIi0+QTrcGedv57GJdfacMNjkDqPNM7SXDT4rqW73UyAcKUggQSJHJB/ZxwANL5vmtPwIpfwvYEGGNiuxwcZpf5bmGXsPD/M1rj7X/fFuT0kreSvNB4W9RuYH1/SS6ma+FhOiZzqcmSPFI1haeNhRycZ0ENoYptUkTiClK4NkZbN72jzElsVtABCi/rDuK1DxlrXO9ON99RwowL7k8UGgTnez1E=;5:pK7jGp2hnCJ3bVg6mMw3Q5fQrCrDufON3inoJa0FVNE8qxNeoyqPIOrcwcZIYGUbDN1i7s+KQ9iTnGkkc9XIMX4aD0CnJlvjwnDQjU4Tij9Lt2LjSXRaVHblbPhUXD5Cftioi7gTjCSOG8QyaprKiA==;24:NvnuA1/L7me+sGMTdtS4OkwKgJFITDvb/v4PJCqpa26F8EaYvXuD218Wwz8VxxVtI59r0LNSuvDX3aDBi9UqGuWepiD0KV05QkKwDj6oTQw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2347;7:RG7CR7CTizNr7TEwLUKvOCb7aNO+JXizxUp8q2brxoZF9zDBAdSQdA3nxgRl+pM37gdbb4xJq/0frpMc15/MSFnvZzw5regLsSlMmDr4PRiHGS4xMgPRxlF4QlEjpYEQ0gCLwMQh0/UnePcrmq8ZU2IUhSQsMzm5dX8WRurhn26feccAVqTFg+VPKkzFXsM/CwlayCrFVsKzj/NhhvyR7QHM2/cwtpRYGBiAEVlLuhCYK/TAf91R8GiM54pbOnd/8Aj3cw3Dgs8f/9dMIMaSrImClQKoAoYTW3gyLKmZ6E5OTDd6QoHUgJh79/IGoKItKgt/tX++NlCFjBFrFfYCsNWpfBeKJayJg8LaIWY423A= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2016 14:12:05.4693 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2347 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1350 Lines: 38 On 24.11.16 13:58:30, Ard Biesheuvel wrote: > On 24 November 2016 at 13:51, Robert Richter wrote: > > On 24.11.16 13:44:31, Ard Biesheuvel wrote: > >> On 24 November 2016 at 13:42, Robert Richter wrote: > >> > On 23.11.16 21:25:06, Ard Biesheuvel wrote: > >> >> Why? MEMREMAP_WB is used often, among other things for mapping > >> >> firmware tables, which are marked as NOMAP, so in these cases, the > >> >> linear address is not mapped. > >> > > >> > If fw tables are mapped wb, that is wrong and needs a separate fix. > >> > > >> > >> Why is that wrong? > > > > The whole issue with mapping acpi tables is not marking them cachable, > > what wb does. > > What 'issue'? > > > Otherwise we could just use linear mapping for those mem > > ranges. > > > > Regions containing firmware tables are owned by the firmware, and it > is the firmware that tells us which memory attributes we are allowed > to use. If those attributes include WB, it is perfectly legal to use a > cacheable mapping. That does *not* mean they should be covered by the > linear mapping. The linear mapping is read-write-non-exec, for > instance, and we may prefer to use a read-only mapping and/or > executable mapping. Ok, I am going to fix try_ram_remap(). Are there other concerns with this patch? Thanks, -Robert