From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31940C433E0 for ; Mon, 18 Jan 2021 18:42:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C34F922C9E for ; Mon, 18 Jan 2021 18:41:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C34F922C9E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EC66D8D0022; Mon, 18 Jan 2021 13:41:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E75838D0017; Mon, 18 Jan 2021 13:41:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8BC58D0022; Mon, 18 Jan 2021 13:41:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id C0A048D0017 for ; Mon, 18 Jan 2021 13:41:58 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7CFA9181AF5D0 for ; Mon, 18 Jan 2021 18:41:58 +0000 (UTC) X-FDA: 77719765116.29.grape88_2a153f22754b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id E2E811803DDBD for ; Mon, 18 Jan 2021 18:27:04 +0000 (UTC) X-HE-Tag: grape88_2a153f22754b X-Filterd-Recvd-Size: 3206 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Jan 2021 18:27:04 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.