Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1187609ybf; Thu, 27 Feb 2020 06:31:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxqF+HEFSBiH2T41EbMQD+xCmiUb63Tb5IqzCM3ByUe39MgCizqmTZ7CDV8yBBv9mzTtxy4 X-Received: by 2002:a05:6830:15c2:: with SMTP id j2mr3353898otr.351.1582813898816; Thu, 27 Feb 2020 06:31:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582813898; cv=none; d=google.com; s=arc-20160816; b=0DWYKkcYMY7kENX6/eOsPj3vr0LqrPYZJcJDRyVALJISce5ydhBjMAVslyVG+pl/bN 0oL+YEkro5B8g75HdpBmTo0edFk6RSFabi2c3vaM5HKpb8zyfqqGprH6dBWcJ0RkFnjX HQzpClSRwVWfy9nJyYu5OkpnZeb/cmERB1YK9iLIpwI4J6qdquMPAUJHAEU9FXA4bCRr U/oFEL6/UqrZ3lqhayvTsrh8Li5+y5pXZJULsU8QhEmRMcP2memL8t6g+GxAS6kx/VnP FVXGqRnqqMvZpmFLsUTGSjArMizIWefpjlZN+48BlkguTQRbPBCrUIW6CHX5x6FnTpOv 13+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=Gl8JS12WvcJNOmDpd4LHLuycbPzNhiMhR+lzIPk1quw=; b=R6a96Pumcop/kBRQeG4N5LLMdHWN/JCbNnP6UTktLuxOzQnjXflj9PapQeeqrmp2J6 IxTsBgomZYx8WLGImbmoTQi050lo/riamJiw9BrjE32DtZMMvtce0p1vqJdfHHNvsH85 1UYWrdDYFdnwmWndq6C+QBbetGmiFZ1AhwinohCuyE9IhDgp38gd8I2E1X5gryWFfuGS 1M5k1/CW4nGW4YVcO2av9UCIxoqGsH/1APoPz1Vl/0fvfg3cw058Yw14UbG9+1eml9pZ t4PXf0lLcB19Jm/XJ0ejr3KxUyudhSuIqp+Um+ZiQHPJACMmr1SQFSN5RW2UVfsehgtp MbRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si1501657oie.32.2020.02.27.06.31.25; Thu, 27 Feb 2020 06:31:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388198AbgB0ObW (ORCPT + 99 others); Thu, 27 Feb 2020 09:31:22 -0500 Received: from antares.kleine-koenig.org ([94.130.110.236]:41044 "EHLO antares.kleine-koenig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387668AbgB0ObU (ORCPT ); Thu, 27 Feb 2020 09:31:20 -0500 Received: from localhost (localhost [127.0.0.1]) by antares.kleine-koenig.org (Postfix) with ESMTP id EBBB991CA1A; Thu, 27 Feb 2020 15:31:17 +0100 (CET) Received: from antares.kleine-koenig.org ([127.0.0.1]) by localhost (antares.kleine-koenig.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LcGdnC_537OI; Thu, 27 Feb 2020 15:31:16 +0100 (CET) Received: from taurus.defre.kleine-koenig.org (unknown [IPv6:2a02:8071:b5ad:20fc:dcaf:fc88:2737:d4ae]) by antares.kleine-koenig.org (Postfix) with ESMTPSA; Thu, 27 Feb 2020 15:31:16 +0100 (CET) Subject: Re: [PATCH 1/3] lib/test_printf: Clean up test of hashed pointers To: Petr Mladek , Andy Shevchenko , Sergey Senozhatsky , Steven Rostedt Cc: Rasmus Villemoes , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Ilya Dryomov , Kees Cook , "Tobin C . Harding" References: <20200227130123.32442-1-pmladek@suse.com> <20200227130123.32442-2-pmladek@suse.com> From: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= Autocrypt: addr=uwe@kleine-koenig.org; prefer-encrypt=mutual; keydata= mQINBEwXmCYBEACoJSJcKIlkQcTYia0ymmMOBk2veFoy/a0LlqGUEjQ4WECBL19F2BYX1dSp 5/ZdfKuV605usI6oq4x6k/LKmqZDl6YnqW/YmN/iZVCRunBRfvpTlL4lcNUu5Va/4GBRzBRr rrIhCIVL5zMV6hKywhHKTdOHVSZRftf+eRSBwENKXahmfOMDmekyf585etDPdzkFrLHNVFOC sFOU0gCK0uVPyY0LH13eo4qEEMi88RCOfwYCFQqKXDdo41DWoDPB5OGCMaphIx9wC/nvtdcv MowsGde5iGgmHWK6sdC/O/xaV7fnz1sJzoJB1eT91LkGbdGxsLAT6nqlaNJiJtiBoRhscguV xVbn/I9mnUu7bLmTFBEAlaQGU/J7uQ4w94FXfosNGROt/otqltetMZlPbNvNhKnXv8U6eRyA P3ZMKTJa4hGr3UdYdt4+MIiHcsANWp8T7oLYVxRbHPXPG49IURnhXUoGbscZmpptWcl29ebo qCxL9n3KIyUT3ZB1xHbW3Sk/Dqzf52tQOxZubzrpUJ8zaGIwYVUjfcPFwf3R3zrQvJq7mI4S ddNIE8w3WJOPXDOYx7GjOa+IubhSpCrr74NbN8q9oS3hnsqWw16i3HSUuPuYeZo1t6D5p/mX EVyZ2QrS1kGgGi7bmlQMSFkb6g1T8aWSYuX3PBYq2VntnWAXPwARAQABtClVd2UgS2xlaW5l LUvDtm5pZyA8dXdlQGtsZWluZS1rb2VuaWcub3JnPokCVwQTAQoAQQIbAwULCQgHAwUVCgkI CwUWAgMBAAIeAQIXgAIZARYhBA0lEfMiv6scFYAma+Lc3ZEyZpvWBQJdD2/6BQkaXdlU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BehURYaTu1U0UL9v4KhDIBPpHMI3Ia/yOe8x NgaAqD54tC3LAtxbOAq1jQBnBOAMInyioFDCP1bscVqePHILf33qCZG8PUZrFR4h8xIXFp5U 6uMoO1VgFtcQHWHTtbSYLQ8YHVFZMQ== Message-ID: Date: Thu, 27 Feb 2020 15:30:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200227130123.32442-2-pmladek@suse.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hqSDMiKsd8o5YzHaXusAbuclKGGNjTjfM" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hqSDMiKsd8o5YzHaXusAbuclKGGNjTjfM Content-Type: multipart/mixed; boundary="I0VyUx4H1cFryB8nUb4I59EwMx3eAsZbz"; protected-headers="v1" From: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= To: Petr Mladek , Andy Shevchenko , Sergey Senozhatsky , Steven Rostedt Cc: Rasmus Villemoes , Sergey Senozhatsky , linux-kernel@vger.kernel.org, Ilya Dryomov , Kees Cook , "Tobin C . Harding" Message-ID: Subject: Re: [PATCH 1/3] lib/test_printf: Clean up test of hashed pointers References: <20200227130123.32442-1-pmladek@suse.com> <20200227130123.32442-2-pmladek@suse.com> In-Reply-To: <20200227130123.32442-2-pmladek@suse.com> --I0VyUx4H1cFryB8nUb4I59EwMx3eAsZbz Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hello Petr, On 2/27/20 2:01 PM, Petr Mladek wrote: > The commit ad67b74d2469d9b82a ("printk: hash addresses printed with %p"= ) > helps to prevent leaking kernel addresses. >=20 > The testing of this functionality is a bit problematic because the outp= ut > depends on a random key that is generated during boot. Though, it is > still possible to check some aspects: >=20 > + output string length > + hash differs from the original pointer value > + top half bits are zeroed on 64-bit systems Is "hash differs from the original pointer value" a valid check? Depending on the random value and the actual pointer I can imagine a valid match. Such a match is unlikely but not necessarily bogus, is it? Best regards Uwe --I0VyUx4H1cFryB8nUb4I59EwMx3eAsZbz-- --hqSDMiKsd8o5YzHaXusAbuclKGGNjTjfM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl5X0qgACgkQwfwUeK3K 7Am7Zwf/QFJPockuSqgbcRyQUGHjcZY28uGxdP3pAqN/YBVAm3baFOgnjy4GeTWm 3xGi7C3/VQKM+MyJq312hQYVHqIOfm5bGJMH2GffFV0OJQc8HdAZUequpMbYLmVE jDd5wQJko8g5ELWX+nywC9pobceqxTFa1fgiDCO8zQMx8fV994SSc/kkt3TL88k7 1IJZj9BI6Hy3sAp/4S+jPU0zG7/95en6vEwpDAgfxguCtqGv7Os65CVj46itYht6 QSK4p6qUv1t9nA7yiuwN6RQph8gpoZGRtXmya+4UF2L2W4qzA8gDTRUZ8MgDBw6t P5xEk/N3jcwu1J27DfYPmFu7ryPEhA== =GhfM -----END PGP SIGNATURE----- --hqSDMiKsd8o5YzHaXusAbuclKGGNjTjfM--