Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2957336pxb; Tue, 12 Jan 2021 02:51:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjhaPgRKynfuymNT99/uAKZ7+R0L7UCsDvOKn8jtzjPbSqX+F4uUngA8gS2S3PJL2CEuxI X-Received: by 2002:a17:906:5495:: with SMTP id r21mr2778088ejo.59.1610448692909; Tue, 12 Jan 2021 02:51:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610448692; cv=none; d=google.com; s=arc-20160816; b=Y6RM3nmfLj0Z7nWvih6wNczXBOD/tnsOsb3/RbwSDw/XLb6F1SqW4gTIgXw+prwcpj jUgmcdUYggkZSBOScjKwkvPzMnr7CNa3axhORwyMO3jbqueXrUX83V7MAOEwRujNFr/G xl8VknT+5TR2k4LJD07o0zrfVQmHw4AeIT0Tws7ggNSO8K8/SkzesL39cv4OTnP9IeV3 JE1IKoBFmo0DbPA2nwANyjZq6nFcu8m6js8piYpVc0MTwoR6CIO0fl9Oq4JWjclubn9v WbDrSdAmLSZ32M2MeUDzaC/5qB351jKb0TPIfakTRpdzwcdp1xwcYFqAyjVCazbJUrPI JQ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=riYpDpNVp0MuF+hDQP5b8o+j0u0RYPLV+5r86p08fXQ=; b=entaNF4KDv8eL1BDM/3eU2rRwOl68ULPT5lIyVznPOFQ2U3DukFASJubkRmObMo17q AnDEDc2fzSYowY5YIuZTd4lV13iXMQPGr1KSzE0Ni8Efbq8Ck7VQgbdMkjalt5Z4D1GY V8evo5yiHEJvqv+WViNal7gyWNi35LZrTUQ+QmapfHeIBUpTHRpXJGnZ56GvyAYE8dUz 0CYbVBHH8U7nZal1zp6dB9Lt1CZcHPflMEBnDGKic9ihIOtqbRmtVmARCJSTxIf7Hkat We3B87HbKqxww8xGPxOBMH0Q3ou+pdfKn5qhWWo8Z7uzeOt3G9+MSssnmS+W7Qr/IIWZ V1Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=cH5Ou5JE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si160040edc.382.2021.01.12.02.51.09; Tue, 12 Jan 2021 02:51:32 -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=@linux-foundation.org header.s=korg header.b=cH5Ou5JE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727280AbhALBbA (ORCPT + 99 others); Mon, 11 Jan 2021 20:31:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:53820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729495AbhALBav (ORCPT ); Mon, 11 Jan 2021 20:30:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 75E3322E01; Tue, 12 Jan 2021 01:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610415010; bh=0HcB3+On02y9RbOFtZA64sarS9kNDOtXbHjPRCJPzK4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cH5Ou5JEjXsLEP4W1y2EhTIoVbkYyR3WI8o24zmVYv90pYXU2mFG0zQ1acJpUklYB Uigq+6RcP29J+HpN+k01tv42R3DKVr4GccT5S+c0yHVzjAsPEf8355mMY6yPXNvIRd z1RSKEfoSP50tXYkLC3yDuJx8cYGKBhlp//OHq2c= Date: Mon, 11 Jan 2021 17:30:09 -0800 From: Andrew Morton To: Petr Mladek Cc: Timur Tabi , torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , Roman Fietze , Kees Cook Subject: Re: [PATCH] lib/hexdump: introduce DUMP_PREFIX_UNHASHED for unhashed addresses Message-Id: <20210111173009.fe2383539e5ca2c23b135262@linux-foundation.org> In-Reply-To: References: <20210106213547.1077789-1-timur@tabi.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Jan 2021 11:10:56 +0100 Petr Mladek wrote: > Adding Kees into CC because it is security related. > Adding Andrew into CC because he usually takes patches for hexdump. > > On Wed 2021-01-06 15:35:47, Timur Tabi wrote: > > Hashed addresses are useless in hexdumps unless you're comparing > > with other hashed addresses, which is unlikely. However, there's > > no need to break existing code, so introduce a new prefix type > > that prints unhashed addresses. > > > > Signed-off-by: Timur Tabi > > Cc: Roman Fietze > > I agree that there should be way to print the real address. > > And it is sane to add a new mode so that the current > users stay hashed. > 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. 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.