From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906AbdLGSnN (ORCPT ); Thu, 7 Dec 2017 13:43:13 -0500 Received: from mail-ua0-f193.google.com ([209.85.217.193]:35043 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbdLGSnL (ORCPT ); Thu, 7 Dec 2017 13:43:11 -0500 X-Google-Smtp-Source: AGs4zMbf0nxg7J6uie+7M7+DsaX6xchpDGkF6GwQjBOBciQ3alICKYpxCBZ0TriCdfSaAeIUrPY6Xdsv1yVE0bdwL2g= MIME-Version: 1.0 In-Reply-To: References: <1512641861-5113-1-git-send-email-geert+renesas@glider.be> From: Kees Cook Date: Thu, 7 Dec 2017 10:43:09 -0800 X-Google-Sender-Auth: ga_AWeel5hee7uvMkrvHqR2UGeI Message-ID: Subject: Re: [PATCH] mm/slab: Do not hash pointers when debugging slab To: Christopher Lameter Cc: Geert Uytterhoeven , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "Tobin C . Harding" , Linux-MM , LKML , Linus Torvalds 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 Thu, Dec 7, 2017 at 3:13 AM, Christopher Lameter wrote: > On Thu, 7 Dec 2017, Geert Uytterhoeven wrote: > >> If CONFIG_DEBUG_SLAB/CONFIG_DEBUG_SLAB_LEAK are enabled, the slab code >> prints extra debug information when e.g. corruption is detected. >> This includes pointers, which are not very useful when hashed. >> >> Fix this by using %px to print unhashed pointers instead. > > Acked-by: Christoph Lameter > > These SLAB config options are only used for testing so this is ok. Most systems use SLUB so I can't say how common CONFIG_DEBUG_SLAB is. (Though, FWIW with SLUB, CONFIG_SLUB_DEBUG is very common.) -Kees -- Kees Cook Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f70.google.com (mail-vk0-f70.google.com [209.85.213.70]) by kanga.kvack.org (Postfix) with ESMTP id 0A7116B0038 for ; Thu, 7 Dec 2017 13:43:15 -0500 (EST) Received: by mail-vk0-f70.google.com with SMTP id t20so4350239vkb.17 for ; Thu, 07 Dec 2017 10:43:15 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 32sor2216853uat.303.2017.12.07.10.43.10 for (Google Transport Security); Thu, 07 Dec 2017 10:43:11 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1512641861-5113-1-git-send-email-geert+renesas@glider.be> From: Kees Cook Date: Thu, 7 Dec 2017 10:43:09 -0800 Message-ID: Subject: Re: [PATCH] mm/slab: Do not hash pointers when debugging slab Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Christopher Lameter Cc: Geert Uytterhoeven , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "Tobin C . Harding" , Linux-MM , LKML , Linus Torvalds On Thu, Dec 7, 2017 at 3:13 AM, Christopher Lameter wrote: > On Thu, 7 Dec 2017, Geert Uytterhoeven wrote: > >> If CONFIG_DEBUG_SLAB/CONFIG_DEBUG_SLAB_LEAK are enabled, the slab code >> prints extra debug information when e.g. corruption is detected. >> This includes pointers, which are not very useful when hashed. >> >> Fix this by using %px to print unhashed pointers instead. > > Acked-by: Christoph Lameter > > These SLAB config options are only used for testing so this is ok. Most systems use SLUB so I can't say how common CONFIG_DEBUG_SLAB is. (Though, FWIW with SLUB, CONFIG_SLUB_DEBUG is very common.) -Kees -- Kees Cook Pixel 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