Received: by 10.192.165.148 with SMTP id m20csp176391imm; Thu, 26 Apr 2018 18:48:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpnoPTEuJUluMEzxYqz1NgaqkSxyujO+I52PFZWLoki0tePu6xnOwteViBjpHSiywbNFpgC X-Received: by 2002:a63:a50a:: with SMTP id n10-v6mr359273pgf.141.1524793701565; Thu, 26 Apr 2018 18:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524793701; cv=none; d=google.com; s=arc-20160816; b=SfQCWJTaZEhTHf1ey+IfSdeTNiaqIkJy1UFclW1mMLdpa4yhtIsJnSXvlMtpG1pmvq xGivkZIcZFJncvshjPHWVF563m+NeellKm4kSQHl/n1ArdA6SeoOHQ8AeuWz4yTmw31j 826gT6MqGsKWrjVQORuCh5xbsPTEG01EwI9yfpn3SUDjiscYt39NRlP3MXEMORnXNfNx yPSkU6HsNsdnd3o0y878dLxz0xUAg0p53Rms40kp1fRQKN3gyfGSjYM6pYRH0H6ssr1O FnjTCXfxSJ1caC5gVVCgFfnDNwbAsFfx1fqiO3IX8ALtHW5Nk34iNTr/zFPK5+DRquq8 Sdqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=HEy20rUCo0/cvvZIlvqZLaHeZkubAd8+H7OIn7uN8po=; b=s8jJnqGWF1vAty6lNAMx+qp3G8fsZ0gi4mwigcXZqfVhzIip6rJo6h18loub76CRrX 1QQwdCpevMWOJoqH7BuNHTC6r320HBp5BLiz2jjC5wP7O48td3kveA4wio+XmBkTsvAC cx3PcdlTajbmFNpPZjDL7evOWw9K5MFMa5c6bg3O+R+EWVFmfX0HwuR4VkeWpDlLH5pl wbUQ4gJHksmoMXI8CW0gvvDp/klMgGPeYoVeqVdhyqfA8Xxg9xpn7wsExDPMrV6faRth D40kN5a1DIrj2ySlh+IOOf8HArMaOrOBxtVNUMRhGRTbZUwr9zEJhITJ45GAEa/BItdQ 0OdA== 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 s6-v6si202246plp.18.2018.04.26.18.48.06; Thu, 26 Apr 2018 18:48:21 -0700 (PDT) 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 S1757152AbeD0BrC (ORCPT + 99 others); Thu, 26 Apr 2018 21:47:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:52598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbeD0BrB (ORCPT ); Thu, 26 Apr 2018 21:47:01 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 6EF352184E; Fri, 27 Apr 2018 01:46:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EF352184E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Thu, 26 Apr 2018 21:46:57 -0400 From: Steven Rostedt To: Wei Wang Cc: gregkh@linuxfoundation.org, Wei Wang , Ingo Molnar , Andrew Morton , Kees Cook , Peter Zijlstra , Thomas Gleixner , Crt Mori , Alexei Starovoitov , Randy Dunlap , linux-kernel@vger.kernel.org, Joe Perches Subject: Re: [PATCH] do not call trace_printk on non-debug build Message-ID: <20180426214657.612623a3@gandalf.local.home> In-Reply-To: References: <20180424180812.215900-1-wvw@google.com> <20180424145056.7c29ea18@gandalf.local.home> <20180424151416.397fbbde@gandalf.local.home> <20180424152607.71fbee34@gandalf.local.home> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Apr 2018 04:53:33 +0000 Wei Wang wrote: > On Tue, Apr 24, 2018 at 12:26 PM Steven Rostedt wrote: > > A lot of kernel developers use trace_printk() and I want to make it as > > easy to use as possible. I don't want to add a config to enable it, > > because that would be something that could be rather annoying. > > > Let's add it to checkpatch and see if that can draining the swamp of > > abusers. > > > Currently I see f2fs trace is using this when having CONFIG_F2FS_IO_TRACE, > so I am not sure how checkpatch would work. How about we add a BUILD_BUG > surrounded by a config which would let us flag abuse easily on build time? I don't want a config to have to be set for adding this. That would really irritate myself, as I constantly take configs from others for debugging purposes and then slam trace_printk() all over the place. It would be annoying to have to remember to enable a config. And having a config would also change the way the kernel gets built, and for debugging the less variables the better. But you are correct. I see lots of abusers with trace_printk(). I think it's time for me to start removing them. -- Steve