From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757803AbcAOLXc (ORCPT ); Fri, 15 Jan 2016 06:23:32 -0500 Received: from foss.arm.com ([217.140.101.70]:52252 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757784AbcAOLXa (ORCPT ); Fri, 15 Jan 2016 06:23:30 -0500 Date: Fri, 15 Jan 2016 11:23:07 +0000 From: Mark Rutland To: Ard Biesheuvel Cc: Kees Cook , Arnd Bergmann , kernel-hardening@lists.openwall.com, Sharma Bhupesh , Catalin Marinas , Will Deacon , "linux-kernel@vger.kernel.org" , Leif Lindholm , Stuart Yoder , Marc Zyngier , Christoffer Dall , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v3 07/21] arm64: move kernel image to base of vmalloc area Message-ID: <20160115112306.GC3262@leverpostej> References: <1452518355-4606-1-git-send-email-ard.biesheuvel@linaro.org> <1452518355-4606-8-git-send-email-ard.biesheuvel@linaro.org> <20160112181336.GF4858@leverpostej> <20160113135109.GJ23370@leverpostej> <20160114185701.GA28181@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2016 at 10:54:26AM +0100, Ard Biesheuvel wrote: > On 14 January 2016 at 19:57, Mark Rutland wrote: > > On Wed, Jan 13, 2016 at 01:51:10PM +0000, Mark Rutland wrote: > >> On Wed, Jan 13, 2016 at 09:39:41AM +0100, Ard Biesheuvel wrote: > >> > If I remove the rounding, I get false positive kasan errors which I > >> > have not quite diagnosed yet, but are probably due to the fact that > >> > the rounding performed by vmemmap_populate() goes in the wrong > >> > direction. > > > > As far as I can see, it implicitly rounds the base down and end up to > > SWAPPER_BLOCK_SIZE granularity. > > > > I can see that it might map too much memory, but I can't see why that > > should trigger KASAN failures. Regardless of what was mapped KASAN > > should stick to the region it cares about, and everything else should > > stay out of that. > > > > When do you see the failures, and are they in any way consistent? > > > > Do you have an example to hand? > > > > For some reason, this issue has evaporated, i.e., I can no longer > reproduce it on my WIP v4 branch. > So I will remove the rounding. Ok. I'll let you know if I stumble across anything that looks like a potential cause of the KASAN failures, and I'll try to give v4 a go at some point soon. Thanks, Mark.