Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2200401pxb; Mon, 18 Jan 2021 10:49:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0rpCJULdmZhH5hf/UQax3OKt0M7VmOkskzk581e8FqtZGrQbCD0fyds5Dd+izLDo0K82J X-Received: by 2002:a17:906:a84d:: with SMTP id dx13mr661283ejb.275.1610995754791; Mon, 18 Jan 2021 10:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610995754; cv=none; d=google.com; s=arc-20160816; b=EEdyQJXxR5XRUmzOIPjogIpr3Rjc/LBBsYHlcGhceQHrIPZdW8xp72pXvtGRTrnVMt BvbtiRF4BmLOjgbI7NtQ9w+w68saGdH0mQevSjYWnpcerm4wJwutG0D3EJUo96g8ddO7 02BOqw0Nxd3hXm9QGFoP7HXGU0YTZIQpLDhgq9Oa2RWI8ydbMdTU5uuw4D+ry5lEfa/v ro0/FsRC6rutHRPo/IDqIq36hNe4HbE7pm4H+2+/l2gAGl0luKbyyx3nA/oS0yj7f0lf 3dI28ocuHWvXFTO0HzuzxbOJ0K074Y69VXzsnzNmzueSFH6WqyJYqtlFH9ayNgWIJbJm dX/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=psMEzxEPv5+ylWqc3o687nSgEjIGZMC3XbmoOskqoPc=; b=P3sB0Yt26vNYdNIm7aRVSgbe2SzlmhAfMtbOxdUlpDiJKA0iP2pMRwTSqn6QI8imMQ CgLaFHPjhVogyRvYpgedSxfTvCMCixxzMHqN7CaO971dH6ae3/oWNgaXIlZh92LT68Sg LPbUOqRVXRQ5lLYXZnm5RDnPZ1rtNgonZ2/VnS9hkfI6sOPCepVcDRlw4JjPrS7ZPdkp owdbksAodObyX2pZnDYfXPFP/SLySWMpzEOo1u3ZDkUXiX2Y5k3VySXpJ2vci8DJWxYV 1KuY7gCQgdvimLflzOeoiwfEYX5+SNLetHH4fhad2Xo5rGvcs6Za/8IA5Cfsux+URm/K KkBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qoHMpXLG; 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 e17si8014896edz.241.2021.01.18.10.48.37; Mon, 18 Jan 2021 10:49:14 -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=@infradead.org header.s=casper.20170209 header.b=qoHMpXLG; 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 S2390676AbhARSqB (ORCPT + 99 others); Mon, 18 Jan 2021 13:46:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393673AbhARS1Y (ORCPT ); Mon, 18 Jan 2021 13:27:24 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BA20C061573 for ; Mon, 18 Jan 2021 10:26:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=psMEzxEPv5+ylWqc3o687nSgEjIGZMC3XbmoOskqoPc=; b=qoHMpXLGbkzJhTV1+VZMk8+RXs 7Ke5qITA1Hy5HqACCa1n4z1+W8k+SajBGXe9VzF+Lyk2/qjTs7/LZVX3JHE3QeeP74Ac2Xmqzjbr0 jbYx1f/pFPpk6trnbNqbMEExl9dJAi78lo3wC9SvY45v+cSVGzkcp/yX3EGvYeT2gaiDgdM9b6wB4 5PgCIsDFlQ/C4aCFaPFs/AYoJAertBLl1rmO2zYpdyKnu8P3pVjUkWvPLpsB+VUE3fAusUnEDAsjK dxAwKYFR8u5E0HJjIxdxZnOQB9ILdcZH5Z95MSRB7U9PA3FxCqoxZQEaRb8mkAuyEdKaomGU/5Hse KRy2tOcQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l1ZEZ-00DDQv-GC; Mon, 18 Jan 2021 18:26:37 +0000 Date: Mon, 18 Jan 2021 18:26:35 +0000 From: Matthew Wilcox To: Timur Tabi Cc: Andrew Morton , linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, Sergey Senozhatsky , Petr Mladek , roman.fietze@magna.com, keescook@chromium.org, Steven Rostedt , John Ogness , linux-mm@kvack.org, Akinobu Mita Subject: Re: [PATCH 0/2] introduce DUMP_PREFIX_UNHASHED for hex dumps Message-ID: <20210118182635.GD2260413@casper.infradead.org> References: <20210116220950.47078-1-timur@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210116220950.47078-1-timur@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 16, 2021 at 04:09:48PM -0600, Timur Tabi wrote: > First patch updates print_hex_dump() and related functions to > allow callers to print hex dumps with unhashed addresses. It > adds a new prefix type, so existing code is unchanged. > > Second patch changes a page poising function to use the new > address type. This is just an example of a change. If it's > wrong, it doesn't need to be applied. > > IMHO, hashed addresses make very little sense for hex dumps, > which print addresses in 16- or 32-byte increments. Typical > use-case is to correlate an addresses in between one of these > increments with some other address, but that can't be done > if the addresses are hashed. I expect most developers to > want to replace their usage of DUMP_PREFIX_ADDRESS with > DUMP_PREFIX_UNHASHED, now that they have the opportunity. Yes, I'm sure most kernel developers actually do want to leak kernel addresses into kernel messages. The important thing though is that it should be hard for them to do that, and it should stick out like a sore thumb if they do it. Don't make it easy. And don't make it look like they're doing something innocent. DUMP_PREFIX_SECURITY_HOLE would be OK by me. DUMP_PREFIX_LEAK_INFORMATION would work fine too. DUMP_PREFIX_MAKE_ATTACKERS_LIFE_EASY might be a bit too far.