Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp589755pxb; Wed, 3 Feb 2021 12:28:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3eU6avuEaWDyp80GxQ4+ttNkfhQHhYWCM/bVQW2mEQeZ2qt9bl7eGXSUM51rXlL7kpwi1 X-Received: by 2002:a17:906:8519:: with SMTP id i25mr5155012ejx.106.1612384100965; Wed, 03 Feb 2021 12:28:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612384100; cv=none; d=google.com; s=arc-20160816; b=HhHob5eR9sc3RoDoCO0BvSLNfOsb+YshCaQ8OIVOp6gDjB9Yd29dedODXkpIgext48 FzrXvFTJolJMkKJWjiSf6WU7UNcDEqUIh65dysNRgTNsl8CPeT3xP5RBxRA9ZooDXy7n XJvak3VnRGgV5MWpTrq683viyfb8kGd/0qpCGOsg6zvz6Stt1tm1YuO3VETUjzoDaSAa DvNCavjPNknTp2T00lUfkrnEJtvppb7w+r+B/7i84pbEAwtfDXRghMSph7KuyzUslk4I XQ4jnjMIfMvJAHDZXXLTCRQ1cseDW7VS0a9mxFQXmF5Hyo5hHYXFGZQxW+B7xD8ul2fo yHdg== 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; bh=CYLts/IbGkx6O1JfvVmdgmlzJlb6fPLwN/g1eiUYaBc=; b=diptod3OYFp5N+Jhyhau8tasCYyTXkZgBJSfOLlp6ma1ZZ4KB3UMO/i0ZDGNZyNfCI Sbyz45IYfvozVpEPIv10ubGCajcXz23i1oC7vNdtpnknuz2nfS08mIudT4UXNZcR2Mbd 3jzCOjV5eG+edqaU1YSX4vGRJEsKd9F4g8uIdrxQq5R5xvGhHyc6zwhEKidCbm2QB29U p90bPG6cCPKsatTG/jxy3gJd+wzEpiajj+VgvaWuUwYh/N0023A9mk1GnKWJzxweyNb1 TvDWa4vpW2KsVsAHqNG8l2E2VXNjWTwiEkiCpc5zTBbAP1MHLnUakMbv+nacN1Dxs1Ga 69qQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l18si2013573eje.178.2021.02.03.12.27.55; Wed, 03 Feb 2021 12:28:20 -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; 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 S231754AbhBCUZ6 (ORCPT + 99 others); Wed, 3 Feb 2021 15:25:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:50056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbhBCUZ5 (ORCPT ); Wed, 3 Feb 2021 15:25:57 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F5BA64F6C; Wed, 3 Feb 2021 20:25:15 +0000 (UTC) Date: Wed, 3 Feb 2021 15:25:13 -0500 From: Steven Rostedt To: Kees Cook Cc: Timur Tabi , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, vbabka@suse.cz, linux-mm@kvack.org, willy@infradead.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, roman.fietze@magna.com, john.ogness@linutronix.de, Andy Shevchenko , Rasmus Villemoes , akinobu.mita@gmail.com Subject: Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed Message-ID: <20210203152513.34492916@gandalf.local.home> In-Reply-To: <202102031201.FFED9547D@keescook> References: <20210202213633.755469-1-timur@kernel.org> <19c1c17e-d0b3-326e-97ec-a4ec1ebee749@kernel.org> <202102031201.FFED9547D@keescook> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; 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 Wed, 3 Feb 2021 12:02:05 -0800 Kees Cook wrote: > On Wed, Feb 03, 2021 at 12:58:41PM -0600, Timur Tabi wrote: > > On 2/3/21 7:31 AM, Petr Mladek wrote: > > > Also please make sure that lib/test_printf.c will work with > > > the new option. > > > > As you suspected, it doesn't work: > > > > [ 206.966478] test_printf: loaded. > > [ 206.966528] test_printf: plain 'p' does not appear to be hashed > > [ 206.966740] test_printf: failed 1 out of 388 tests > > > > What should I do about this? > > > > On one hand, it is working as expected: %p is not hashed, and that should be > > a warning. > > > > On the other hand, maybe test_printf should be aware of the command line > > parameter and test to make sure that %p is NOT hashed? > > It seems like it'd be best for the test to fail, yes? It _is_ a problem > that %p is unhashed; it's just that the failure was intended. > I disagree. With a big notice that all pointers of unhashed, I don't think we need to print it failed when we expect it to fail. If anything, skip the test and state: test_printf: hash test skipped because "make-printk-non-secret" is on the command line. -- Steve