Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbdHNTKt (ORCPT ); Mon, 14 Aug 2017 15:10:49 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:38593 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbdHNTKs (ORCPT ); Mon, 14 Aug 2017 15:10:48 -0400 MIME-Version: 1.0 In-Reply-To: <20170809200755.11234-11-tycho@docker.com> References: <20170809200755.11234-1-tycho@docker.com> <20170809200755.11234-11-tycho@docker.com> From: Kees Cook Date: Mon, 14 Aug 2017 12:10:47 -0700 X-Google-Sender-Auth: iGQvfgROQtRxhUVpa8iWYvXyd9s Message-ID: Subject: Re: [PATCH v5 10/10] lkdtm: Add test for XPFO To: Tycho Andersen Cc: LKML , Linux-MM , "kernel-hardening@lists.openwall.com" , Marco Benatto , Juerg Haefliger , Juerg Haefliger 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: 597 Lines: 19 On Wed, Aug 9, 2017 at 1:07 PM, Tycho Andersen wrote: > From: Juerg Haefliger > > This test simply reads from userspace memory via the kernel's linear > map. > > hugepages is only supported on x86 right now, hence the ifdef. I'd prefer that the #ifdef is handled in the .c file. The result is that all architectures will have the XPFO_READ_USER_HUGE test, but it can just fail when not available. This means no changes are needed for lkdtm in the future and the test provides an actual test of hugepages coverage. -Kees -- Kees Cook Pixel Security