Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933678AbbLOTGk (ORCPT ); Tue, 15 Dec 2015 14:06:40 -0500 Received: from mail-ig0-f178.google.com ([209.85.213.178]:38238 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbbLOTGj (ORCPT ); Tue, 15 Dec 2015 14:06:39 -0500 MIME-Version: 1.0 In-Reply-To: <20151215183004.GI25973@pd.tnic> References: <20151214080403.GA3708@amd> <20151214085803.GA10520@pd.tnic> <20151214090726.GA6472@amd> <20151214202627.GA15104@amd> <566F3378.8070009@linux.intel.com> <20151215094015.GA3677@amd> <20151215183004.GI25973@pd.tnic> Date: Tue, 15 Dec 2015 11:06:38 -0800 X-Google-Sender-Auth: ZkmdHNwXaZ19CG8OmZIC4sR6Za0 Message-ID: Subject: Re: 4.4-rc5: ugly warn on: 5 W+X pages found From: Linus Torvalds To: Borislav Petkov Cc: Pavel Machek , Andy Lutomirski , Arjan van de Ven , kernel list , Stephen Smalley , Brian Gerst , Denys Vlasenko , Peter Anvin , Mike Galbraith , Peter Zijlstra , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 710 Lines: 18 On Tue, Dec 15, 2015 at 10:30 AM, Borislav Petkov wrote: > On Tue, Dec 15, 2015 at 09:45:40AM -0800, Linus Torvalds wrote: >> >> +static inline int kernel_write_execute_prot(pgprotval_t protval) >> +{ >> + return !(protval & _PAGE_USER) && >> + !(protval & _PAGE_NX) && > > Shouldn't this be without a "!"? AFAIU, we want _PAGE_NX | _PAGE_RW? We want to *warn* about PAGE_RW without PAGE_NX. No? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/