Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388AbdH2TiK (ORCPT ); Tue, 29 Aug 2017 15:38:10 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:12793 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750909AbdH2TiI (ORCPT ); Tue, 29 Aug 2017 15:38:08 -0400 X-IronPort-AV: E=Sophos;i="5.41,445,1498489200"; d="scan'208";a="256231458" From: Chris Brandt To: Nicolas Pitre , Al Viro CC: "linux-fsdevel@vger.kernel.org" , "linux-embedded@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2 4/5] cramfs: add mmap support Thread-Topic: [PATCH v2 4/5] cramfs: add mmap support Thread-Index: AQHTFrYiY6R51FFvb0KRm0l9W82V16KZZVmAgABwtgCAAA7ZAIAAUjoAgAGRyCA= Date: Tue, 29 Aug 2017 19:38:03 +0000 Message-ID: References: <20170816173536.1879-1-nicolas.pitre@linaro.org> <20170816173536.1879-5-nicolas.pitre@linaro.org> <20170828064632.GA26136@ZenIV.linux.org.uk> <20170828142306.GJ5426@ZenIV.linux.org.uk> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Chris.Brandt@renesas.com; x-originating-ip: [75.60.247.61] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SG2PR06MB1054;20:JpN0h6HsTwdHroZ5Pzl9GQE0dDo15WqZOcDs6rTku889x1d6M96gSaVRP9ukAzWDP0A8gOJNC6hWM9W8XCprGH0BAaR1UIGTHZV81ipdVm8mfoC7UERwqnN3wjALic9qHNi9q4MestR4C1zwBcVMEp/IMuj/qS+LqjG+5LFeSX8= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 6f561e0d-1b00-482e-fc4d-08d4ef157714 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:SG2PR06MB1054; x-ms-traffictypediagnostic: SG2PR06MB1054: x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SG2PR06MB1054;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SG2PR06MB1054; x-forefront-prvs: 0414DF926F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(189002)(199003)(24454002)(105586002)(74316002)(3660700001)(7696004)(6436002)(93886005)(189998001)(4326008)(54356999)(50986999)(76176999)(33656002)(6506006)(8936002)(478600001)(86362001)(66066001)(8676002)(2950100002)(81166006)(2906002)(55016002)(99286003)(97736004)(9686003)(2900100001)(3280700002)(25786009)(54906002)(305945005)(5660300001)(81156014)(6116002)(102836003)(3846002)(53936002)(14454004)(101416001)(106356001)(5250100002)(6246003)(229853002)(7736002)(72206003)(68736007);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR06MB1054;H:SG2PR06MB1165.apcprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Aug 2017 19:38:03.5735 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB1054 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7TJcFxu008226 Content-Length: 1169 Lines: 38 On Monday, August 28, 2017, Nicolas Pitre wrote: > OK I moved the lock promotion right at the beginning _before_ validating > the split point. Also got a reference on the file to make sure that > hasn't changed too. > > > While we are at it, what happens if you mmap 120Kb, then munmap() the > middle > > 40Kb. Leaving two 40Kb VMAs with 40Kb gap between them, that is. Will > your > > ->vm_private_data be correct for both? > > It wouldn't, but I now changed it to contain absolute values so now it > will. And if the split point lands in the hole then the code just > readjusts the pgoff at the beginning of the remaining part. > > Here's the revised patch: For whatever it's worth, as soon as I moved to 4.13-rc7, CONFIG_CRAMFS_PHYSMEM=y crashes my XIP_KERNEL system before it can even get to any console output. (both the old patch and the new patch) If CONFIG_CRAMFS_PHYSMEM is not set, my XIP system boots fine. However, if I boot -rc7 as a uImage, the new patch works just as good as the old patch. (mounting after boot, or booting with rootfstype=cramfs_physmem) I guess I'll have to figure out what happened between -rc4 and -rc7. Damn! Chris