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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 7E68F6B0038 for ; Wed, 7 Sep 2016 00:00:33 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id x24so10420470pfa.0 for ; Tue, 06 Sep 2016 21:00:33 -0700 (PDT) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id j3si8433993pan.276.2016.09.06.21.00.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 21:00:32 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u873w4ck074492 for ; Wed, 7 Sep 2016 00:00:32 -0400 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 25a57kc5jm-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Sep 2016 00:00:32 -0400 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Sep 2016 14:00:29 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 387E82BB0059 for ; Wed, 7 Sep 2016 14:00:11 +1000 (EST) Received: from d23av06.au.ibm.com (d23av06.au.ibm.com [9.190.235.151]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8740Bic6750470 for ; Wed, 7 Sep 2016 14:00:11 +1000 Received: from d23av06.au.ibm.com (localhost [127.0.0.1]) by d23av06.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u8740Al5006791 for ; Wed, 7 Sep 2016 14:00:10 +1000 Date: Wed, 07 Sep 2016 09:30:08 +0530 From: Anshuman Khandual MIME-Version: 1.0 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 Message-Id: <57CF90C8.6050409@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Kees Cook , Dave Hansen , Anshuman Khandual Cc: Linux-MM , LKML , Andrew Morton 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. -- 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