From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbcHPVLT (ORCPT ); Tue, 16 Aug 2016 17:11:19 -0400 Received: from mail.skyhub.de ([78.46.96.112]:35904 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752325AbcHPVLR (ORCPT ); Tue, 16 Aug 2016 17:11:17 -0400 Date: Tue, 16 Aug 2016 23:01:08 +0200 From: Borislav Petkov To: Kees Cook Cc: Brian Gerst , Baoquan He , Yinghai Lu , Juergen Gross , Thomas Garnier , Andy Lutomirski , "H. Peter Anvin" , Alexander Kuleshov , Josh Poimboeuf , Christian Borntraeger , Stephen Smalley , "Kirill A. Shutemov" , Joerg Roedel , "Williams, Dan J" , Mark Salter , Borislav Petkov , Jonathan Corbet , Matt Fleming , Xiao Guangrong , "Aneesh Kumar K.V" , Ingo Molnar , Linus Torvalds , Dave Hansen , Toshi Kani , Alexander Popov , Linux Kernel Mailing List , Jan Beulich , Andrew Morton , Boris Ostrovsky , Denys Vlasenko , Peter Zijlstra , Dave Young , Thomas Gleixner , Dmitry Vyukov , Lv Zheng , Martin Schwidefsky , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions Message-ID: <20160816210108.GA6332@nazgul.tnic> References: <1466556426-32664-7-git-send-email-keescook@chromium.org> <20160814232657.GA10704@x1.redhat.com> <20160816134205.GB11106@nazgul.tnic> <20160816134928.GC11106@nazgul.tnic> <20160816155412.GB15004@nazgul.tnic> <20160816175008.GA10538@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2016 at 12:49:52PM -0700, Kees Cook wrote: > Am I misreading this? No you're not. > Shouldn't it be: > > cont = container; > #ifdef CONFIG_RANDOMIZE_MEMORY > cont += PAGE_OFFSET - __PAGE_OFFSET_BASE; > #endif > > (otherwise cont is undefined in the RANDOMIZE_MEMORY=n case?) Thanks for catching this Kees, I'll send a new version in the morning. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --