Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp126434pxb; Thu, 14 Jan 2021 21:44:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmY4UIlCK+qccJ3AbnYPCQr/G9UXMMBLpBo6F2b10qi9Ro93Nip/moaegzXaUziwi9/bPm X-Received: by 2002:a05:6402:4d2:: with SMTP id n18mr8158118edw.309.1610689448877; Thu, 14 Jan 2021 21:44:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610689448; cv=none; d=google.com; s=arc-20160816; b=ava569nWa2gEX9t7r4JQMdY4JPfpXmwlDO17cFjrXnr/G02QJvRoJY5duBOjyqbCWT 9Jneg1DjNERpowIw8Ks+3wflsrUewZKqfgyahd6zTJZKGfQ0dHFOID8+6GOL2wg3sqz7 812sIkDl/U1tM2uaWoNChnh3O9jtpp9sGHoQ+wbKN73oEw3Tx9DnR7ETynYqAtenp/qE Z74HRlvn9r4ivw4i7CbXynsleqbchTtGcY1MOecTCaf1GSPOBR+DbnKzB/uCYS48ggD5 RgVQj2Ms6VR45aQyxIlbNxh22qGN7A6i/0CKzH4TaW3AU/ZSDlIWPCa7net2M9esmPgR WaAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=mKD5j+eLAfWgREASxlXiVaoaVcNAEc4FVR09beKF4uk=; b=Y1L5bQbm6jGWVy/Um3jiABEaNHG4K/O5hoGCPTTl4iMmauwBR5gTIIxcRgUSo6jNlg Z7s3kDzypma0rj4mYtWi6zDDxiFDrnTeC1PBlZ9xLheVYezXDhkPLuYwzbSMqRXx+Byw z/qcpNX7SLnXifyz2FJeC+HNsz0QEXAmOWL4IrU1ELEfsmIS2dsVZWqXScI6npMU4J3E +8i4ScMcZhUHiHggxKv9R359sqDuxdhMxqiXATdIXEUibwGtjahxYbM2OOjTjwzyYNE7 oI55KKfHgYrj7lzvRumE7wshrxcekdOGRfKbCNCEjVC9eE7D5Mcl+MCgiZnKNwF4UoRs mbQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W6mjLhLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f13si3047086edc.38.2021.01.14.21.43.45; Thu, 14 Jan 2021 21:44:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W6mjLhLF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732313AbhAOC5U (ORCPT + 99 others); Thu, 14 Jan 2021 21:57:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:55256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730528AbhAOC5T (ORCPT ); Thu, 14 Jan 2021 21:57:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A0D623AC6; Fri, 15 Jan 2021 02:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610679399; bh=gVsYalf7CrnQWYli9+w4MJODH5TBXQrYG70lmtMUJYE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=W6mjLhLFQdL+2nItQ8QbQVUl8f6fScYdHk5VgMRwmXeqTKpmVk/24yI4q5TAIJtdC bk/j+Dstdna7Kk69dkzg/G873hS2v19vvFgCIW4yHV7tpZXtEBWSY+G0N5ApFzLbeF Bfk9V5vwSZ51vMM7u44o0AToRPkmpcb8O78JEJQh6pYr/5UA43bWElX/yI98+SHR+p Myegb7Fx83q7QVCNVZPDASyDILDioC8wnXk5xpJUVWHiqHGWVuoU2SVT2Y2zd61E5/ bk2CzTw3pjV7x7XZEbchvmmRj6dzvpYNdJjvd6mfMNPOGbmivSxJSOtEbqAJc43Z5V NxfQWV9Er6PDA== Subject: Re: [PATCH] lib/hexdump: introduce DUMP_PREFIX_UNHASHED for unhashed addresses To: Andrew Morton , Petr Mladek Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , Roman Fietze , Kees Cook References: <20210106213547.1077789-1-timur@tabi.org> <20210111173009.fe2383539e5ca2c23b135262@linux-foundation.org> From: Timur Tabi Message-ID: Date: Thu, 14 Jan 2021 20:56:36 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210111173009.fe2383539e5ca2c23b135262@linux-foundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/11/21 7:30 PM, Andrew Morton wrote: > I doubt if Kees (or I or anyone else) can review this change because > there are no callers which actually use the new DUMP_PREFIX_UNHASHED. > Is it intended that some other places in the kernel be changed to use > this? If so, please describe where and why, so that others can better > understand both the requirement and the security implications. In my opinion, hashed addresses make no sense in a hexdump, so I would say that ALL callers should change. But none of the drivers I've written call print_hex_dump(), so I can't make those changes myself. > If it is intended that this be used mainly for developer debug and not > to be shipped in the mainline kernel then let's get this info into the > changelog as well. I definitely want this patch included in the mainline kernel. Just because there aren't any users today doesn't mean that there won't be. In fact, I suspect that most current users haven't noticed that the addresses have changed or don't care any more, but if they were to write the code today, they would use unhashed addresses. If you want, I can include a patch that changes a few callers of print_hex_dump() to use DUMP_PREFIX_UNHASHED, based on what I think would be useful.