Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp551572yba; Sat, 13 Apr 2019 07:39:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5zn9bLt1aLpqTFNetBOO1gnLL3MDqTc4do/qSaiSPWi06x8HjUI7s6aTK4UUeJIcvEUke X-Received: by 2002:a17:902:7247:: with SMTP id c7mr64001910pll.255.1555166343559; Sat, 13 Apr 2019 07:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555166343; cv=none; d=google.com; s=arc-20160816; b=ZEHoYbdT2QGnDi+VUXWULtPhr0bTyz2bQh+m3GF1Ty0jtsj3WXgTm/9oPbixo6wCxy BM+YXnfYooSVlSUPeYX8XyGOd/XZFDXdVhiETmb47Z3dZN1yf3Drt1SQnZYreIQyFw9j 9kWZmp2ZPgwDu89+ykrQUsbhJKFlgQr0FGkuG6T82WLvsPDdk9uApuo4M4T/y1ThPUOh QPla0ZqGXuH4kxYgp1d9/EbE7PzXfMxUYapyRyOCM0Sy+PEtihwJ3o5gBFO9x/lSN8GV MOVXassFZFhWmNB14Lg81OF6jCa5h7pGj1tvxcYjLnVhFo5wEinjQvLoJ/FRXux02vxi 1YFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3AmDlTtRl8gHe7lrt0QycVfzUgq8U5nbabLrw5aFA1U=; b=PgSI2Gtm4BnQn0GyMkaRPit1xa3RdYxAoOBPe9U29SfwhyOQOrUpkfuHzkqb77FeQl G3ZUbvpyfcNp+ejFjuorzcufowYcnXTN1OT25FnrlhljXbgMvpZu/awrmxAR/oArENPu Zkw29G8X2a7/HHkV/6ZD0JYq7px6nTNMaap7ZbygAjxmSOPvZhTs9WMKYLrjoeMGGReb K3JeaSbYjv793bHwf8SGlzGcwq+YTEEFKvCevjqCKlOiQkZk5sc+DpcuXiXLsQ+AXDMK W3bR72hw7R0WfRpKLcqiaiFMAc6DE9Vpx4JYuxZE0LoM+zmq6tSgEvyx3OEy4M+ZS7xp AW1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="G/wI8KHF"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 60si11555693pla.335.2019.04.13.07.38.45; Sat, 13 Apr 2019 07:39:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="G/wI8KHF"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727169AbfDMOiK (ORCPT + 99 others); Sat, 13 Apr 2019 10:38:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbfDMOiJ (ORCPT ); Sat, 13 Apr 2019 10:38:09 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDF922077C; Sat, 13 Apr 2019 14:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555166289; bh=eDdpk7OVEkgezpqaRXRb+Tovg4FCFdCUBaBUtTanoBo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G/wI8KHF11+XCX8ZvRKt5IAWIIsYojvrDIS0j3Ar/gnfV1xfKpPIl4BmOrAAOOSXi 6eSikcNQYHV1UAgozcaVw4u0yriv3Pp00lWFrg2HRIpoNUZbKbMZLcmcq3pbg711+d X8njMc3oF6GTNotKmtYwreGUhYlVyuKGgXmV6wuM= Date: Sat, 13 Apr 2019 10:38:07 -0400 From: Sasha Levin To: Nicolas Boichat Cc: stable@vger.kernel.org, Ard Biesheuvel , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "akpm@linux-foundation.org" , "linux-arm-kernel@lists.infradead.org" , "markus@oberhumer.com" , "linux-kernel@vger.kernel.org" , Yueyi Li , Guenter Roeck Subject: Re: [PATCH] arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region Message-ID: <20190413143807.GV11568@sasha-vm> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 13, 2019 at 08:41:33PM +0800, Nicolas Boichat wrote: >Dear stable maintainers, > >I encountered a similar issue on a 4.19.33 kernel (Chromium OS). On my >board, the system would not even be able to boot if KASLR decides to >map the linear region to the top of the virtual address space. This >happens every 253 boots on average (there are 0xfd possible random >offsets, and only the top one fails). > >I tried to debug the issue, and it appears physical memory allocated >for vmemmap and mem_section array would end up at the same location, >corrupting each other early on boot. I could not figure out exactly >why this is happening, but in any case, this patch fixes my issue (no >failure in 744 reboots with 240 unique offsets, and counting...), and >IMHO the ERR_PTR justification in the commit message is enough to >warrant inclusion in -stable branches. > >The patch below was committed to mainline as: >commit c8a43c18a97845e7f94ed7d181c11f41964976a2 > arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region > >and should be included in stable branches after this commit: >Fixes: c031a4213c11a5db ("arm64: kaslr: randomize the linear region") >i.e. anything after kernel 4.5 (git describe says v4.5-rc4-62-gc031a4213c11a5d). I've queued it for 4.9-4.19, thanks for the report. -- Thanks, Sasha