Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751674AbdH2UAb (ORCPT ); Tue, 29 Aug 2017 16:00:31 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:38261 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbdH2UA3 (ORCPT ); Tue, 29 Aug 2017 16:00:29 -0400 Date: Tue, 29 Aug 2017 16:00:26 -0400 (EDT) From: Nicolas Pitre To: Chris Brandt 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 In-Reply-To: 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> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1459 Lines: 39 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? 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. Nicolas