From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751788AbdH2UL3 (ORCPT ); Tue, 29 Aug 2017 16:11:29 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:25118 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751747AbdH2UL0 (ORCPT ); Tue, 29 Aug 2017 16:11:26 -0400 X-IronPort-AV: E=Sophos;i="5.41,445,1498489200"; d="scan'208";a="255142128" From: Chris Brandt To: Nicolas Pitre CC: Al Viro , "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: AQHTFrYiY6R51FFvb0KRm0l9W82V16KZZVmAgABwtgCAAA7ZAIAAUjoAgAGRyCCAAAyTAIAAAhmg Date: Tue, 29 Aug 2017 20:11:22 +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;SG2PR06MB0757;20:M+Ogobb27aglczNWQQg4cj8hTZVNrOmvyy3edjBlRTM55KmacRYWM2Q/DEZHMF4T+6UXjv2jvoojPQ/Zb2ced1D11DGQM+yHaszyxUmgjCMND+cj2/wPEEb+I46CB2u7DXOA/UoEAdI5jnaA+usqWH6M57omMZtuROZw0wfwi3g= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 0cbce9ff-11c2-45c1-cd22-08d4ef1a1eb5 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:SG2PR06MB0757; x-ms-traffictypediagnostic: SG2PR06MB0757: 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)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SG2PR06MB0757;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SG2PR06MB0757; x-forefront-prvs: 0414DF926F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(24454002)(199003)(189002)(101416001)(53936002)(86362001)(189998001)(110136004)(2906002)(6246003)(97736004)(229853002)(6506006)(6436002)(81166006)(105586002)(55016002)(8936002)(8676002)(81156014)(3846002)(14454004)(102836003)(6116002)(2900100001)(99286003)(106356001)(54906002)(7736002)(305945005)(9686003)(478600001)(33656002)(72206003)(93886005)(6916009)(5250100002)(2950100002)(66066001)(68736007)(50986999)(76176999)(54356999)(3280700002)(7696004)(3660700001)(4326008)(74316002)(25786009)(5660300001);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR06MB0757;H:SG2PR06MB1165.apcprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX: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 20:11:22.8251 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0757 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 v7TKBXZ5011888 On Tuesday, August 29, 2017, Nicolas Pitre wrote: > On Tue, 29 Aug 2017, Chris Brandt wrote: > > > 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. > > When not a uImage, do you mean by that a XIP kernel? Yes, CONFIG_XIP_KERNEL. > If so you should > know by now from that other thread on LAK that the XIP linker script is > broken and probably just worked by luck till now. Still, if you could > bisect between -rc4 and -rc7 and pinpoint the change that makes it not > work that would be better than speculations. Note that everything else seem OK when CONFIG_XIP_KERNEL=y. It's just when CONFIG_XIP_KERNEL=y CONFIG_CRAMFS_PHYSMEM=y which is odd. So hopefully that means it will be easy to track down. Chris