From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758427AbbCESTM (ORCPT ); Thu, 5 Mar 2015 13:19:12 -0500 Received: from mail.skyhub.de ([78.46.96.112]:56725 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753920AbbCESTK (ORCPT ); Thu, 5 Mar 2015 13:19:10 -0500 Date: Thu, 5 Mar 2015 19:17:55 +0100 From: Borislav Petkov To: Alexander Kuleshov Cc: LKML Subject: Re: [PATCH v1][CLEANUP] x86: use already defined macros instead of hard-coded values Message-ID: <20150305181755.GL3915@pd.tnic> References: <1425562251-10218-1-git-send-email-kuleshovmail@gmail.com> <20150305172253.GA2051@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 06, 2015 at 12:12:09AM +0600, Alexander Kuleshov wrote: > Ok, i looked on it with gdb, and X86_FEATURE_NX is not correct here. > It's a bug number one. Yes, X86_FEATURE_NX is not the same bit type as the bits you have in %edi. > And L3_START_KERNEL*8 + 1, must be L3_START_KERNEL*8 + 8, as we works > with page entries > or i'm wrong here? Yes. And look at the code after you've changed it. Do you think someone looking at it a couple of months from now will know what L3_START_KERNEL*8 + 8 or (L3_START_KERNEL + 1)*8 means? So having 510 and 511 to mean the last two page table entries is much more understandable. Like I told you a couple of days ago, please don't waste your time with stuff which already works and there are no problems with and go look for real bugs. Believe me, there are plenty out there. > Anyway, thanks for education:) No problem. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --