From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756167AbcIGDIV (ORCPT ); Tue, 6 Sep 2016 23:08:21 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37601 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755914AbcIGDIU (ORCPT ); Tue, 6 Sep 2016 23:08:20 -0400 MIME-Version: 1.0 In-Reply-To: <57CF28C5.3090006@intel.com> References: <1473140072-24137-2-git-send-email-khandual@linux.vnet.ibm.com> <1473150666-3875-1-git-send-email-khandual@linux.vnet.ibm.com> <57CF28C5.3090006@intel.com> From: Kees Cook Date: Tue, 6 Sep 2016 20:08:18 -0700 X-Google-Sender-Auth: eyVVV9SOPKpYwtG-tnyIrYH7gDM Message-ID: Subject: Re: [PATCH V3] mm: Add sysfs interface to dump each node's zonelist information To: Dave Hansen , Anshuman Khandual Cc: Linux-MM , LKML , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 6, 2016 at 1:36 PM, Dave Hansen wrote: > On 09/06/2016 01:31 AM, Anshuman Khandual wrote: >> [NODE (0)] >> ZONELIST_FALLBACK >> (0) (node 0) (zone DMA c00000000140c000) >> (1) (node 1) (zone DMA c000000100000000) >> (2) (node 2) (zone DMA c000000200000000) >> (3) (node 3) (zone DMA c000000300000000) >> ZONELIST_NOFALLBACK >> (0) (node 0) (zone DMA c00000000140c000) > > Don't we have some prohibition on dumping out kernel addresses like this > so that attackers can't trivially defeat kernel layout randomization? Anything printing memory addresses should be using %pK (not %lx as done here). -Kees -- Kees Cook Nexus Security From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id D86556B0038 for ; Tue, 6 Sep 2016 23:08:21 -0400 (EDT) Received: by mail-wm0-f71.google.com with SMTP id m139so3476688wma.0 for ; Tue, 06 Sep 2016 20:08:21 -0700 (PDT) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com. [2a00:1450:400c:c09::231]) by mx.google.com with ESMTPS id vm5si33970742wjc.40.2016.09.06.20.08.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 20:08:20 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id w12so7445351wmf.0 for ; Tue, 06 Sep 2016 20:08:20 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <57CF28C5.3090006@intel.com> References: <1473140072-24137-2-git-send-email-khandual@linux.vnet.ibm.com> <1473150666-3875-1-git-send-email-khandual@linux.vnet.ibm.com> <57CF28C5.3090006@intel.com> From: Kees Cook Date: Tue, 6 Sep 2016 20:08:18 -0700 Message-ID: Subject: Re: [PATCH V3] mm: Add sysfs interface to dump each node's zonelist information Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Dave Hansen , Anshuman Khandual Cc: Linux-MM , LKML , Andrew Morton On Tue, Sep 6, 2016 at 1:36 PM, Dave Hansen wrote: > On 09/06/2016 01:31 AM, Anshuman Khandual wrote: >> [NODE (0)] >> ZONELIST_FALLBACK >> (0) (node 0) (zone DMA c00000000140c000) >> (1) (node 1) (zone DMA c000000100000000) >> (2) (node 2) (zone DMA c000000200000000) >> (3) (node 3) (zone DMA c000000300000000) >> ZONELIST_NOFALLBACK >> (0) (node 0) (zone DMA c00000000140c000) > > Don't we have some prohibition on dumping out kernel addresses like this > so that attackers can't trivially defeat kernel layout randomization? Anything printing memory addresses should be using %pK (not %lx as done here). -Kees -- Kees Cook Nexus Security -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org