From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751175AbcIGEAU (ORCPT ); Wed, 7 Sep 2016 00:00:20 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:44085 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbcIGEAS (ORCPT ); Wed, 7 Sep 2016 00:00:18 -0400 X-IBM-Helo: d23dlp01.au.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Wed, 07 Sep 2016 09:30:08 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Kees Cook , Dave Hansen , Anshuman Khandual CC: Linux-MM , LKML , Andrew Morton Subject: Re: [PATCH V3] mm: Add sysfs interface to dump each node's zonelist information 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> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16090704-0052-0000-0000-000001C456C1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16090704-0053-0000-0000-000006BB0592 Message-Id: <57CF90C8.6050409@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-07_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1609070057 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2016 08:38 AM, Kees Cook wrote: > 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). Learned about the significance of %pK coupled with kptr_restrict interface. Will change this. Thanks for pointing out.