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 Content-Length: 682 Lines: 21 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