From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 0B3816B000D for ; Fri, 13 Jul 2018 13:29:14 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id u18-v6so21079013pfh.21 for ; Fri, 13 Jul 2018 10:29:14 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id q3-v6si23716417pgf.40.2018.07.13.10.29.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 10:29:13 -0700 (PDT) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 639FE2148D for ; Fri, 13 Jul 2018 17:29:12 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id n17-v6so10139172wmh.2 for ; Fri, 13 Jul 2018 10:29:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1531308586-29340-40-git-send-email-joro@8bytes.org> References: <1531308586-29340-1-git-send-email-joro@8bytes.org> <1531308586-29340-40-git-send-email-joro@8bytes.org> From: Andy Lutomirski Date: Fri, 13 Jul 2018 10:28:50 -0700 Message-ID: Subject: Re: [PATCH 39/39] x86/entry/32: Add debug code to check entry/exit cr3 Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Joerg Roedel Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" , Joerg Roedel On Wed, Jul 11, 2018 at 4:29 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Add a config option that enabled code to check that we enter > and leave the kernel with the correct cr3. This is needed > because we have no NX protection of user-addresses in the > kernel-cr3 on x86-32 and wouldn't notice that type of bug > otherwise. > I like this, but could you make it just use CONFIG_DEBUG_ENTRY? --Andy