Received: by 10.192.165.148 with SMTP id m20csp5096661imm; Tue, 24 Apr 2018 13:42:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+PAAN2rjbS7YVbxQjF0zN4doFFx2bMznun+lXQ3yCex3GGPCVrSPIxSIxtoLDKYELjsr71 X-Received: by 10.99.165.79 with SMTP id r15mr22074230pgu.236.1524602531791; Tue, 24 Apr 2018 13:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524602531; cv=none; d=google.com; s=arc-20160816; b=z690035Xzl/AH9meWYSWVyVPewheuUX7Js5u0E26UrhWHzlaIgtOVlbaxaFb7PQmHV stYS63zN1iqEzyMhZF5lXzhXv/xSC/bICqyo6AArO4klmTjca7ye6TnzZKEdrj5UhOyj 5shsiJ/hHYAU/GjF3X41XTVgU4oPgvKuuUZTfiLNipJ/Oi6Rw1FpUH8MDmB7zz3mRfi2 Z77PCBoe8Y8TQwSJ2ivgRfflt+qNB0JmIPkVgzUu0WQj/gCuj4EFFvt2RlDC2OC82lFv wKeppPvGIeuCKczugbmL3DeefXKSu33iGByM5kDfjex1X++E5FCtwgQcXG9PnrAsxWV0 ULVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=EIbvTsDFJFM76ftJi3V3r7423OaRP15Ty8clscqRxI0=; b=gaJbdDk7ms4ufCRuQtFrdq+l7mHmYa45LOvRlYsZhQyHJbcFgEPF0kXT8xsrkP8ezY uIgFkhkaGt7vII61tpTz73uV+EGEdjmOaSrKUGeovmgr4PGyi794uU7RhrHa2wvMLJi8 4SCZrbusA44m9nwXVPdAv/du0RogO85zGmnDGJjppspHUb5NCoZOr55YpRRZLt/DxtgS TPN5hEdvnP0s0/9JBN5qpycENnwsIkRNcMfTu2m6fSJKH3SGvlr/YSwOHz+4oercTBNU cuOdnyVnCZfGY9DC+BgYmWFRjBu+nh0dZylJASgpzUEmbKi+rkqtU3re+my25s5sMAnc lVbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rzeV+KGz; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12-v6si2067174plz.33.2018.04.24.13.41.56; Tue, 24 Apr 2018 13:42:11 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=rzeV+KGz; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbeDXUjp (ORCPT + 99 others); Tue, 24 Apr 2018 16:39:45 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33912 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbeDXUjk (ORCPT ); Tue, 24 Apr 2018 16:39:40 -0400 Received: by mail-wm0-f65.google.com with SMTP id w2so2009750wmw.1 for ; Tue, 24 Apr 2018 13:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EIbvTsDFJFM76ftJi3V3r7423OaRP15Ty8clscqRxI0=; b=rzeV+KGzRV18zsbDdR/FLfbIuL2Hk9RHcZD+9oK9J415+qX5lKdBkQUro6IdXnv+NZ k8KaKpjBdljXH4Caq/UZOxZZsiUsG2oB9ZcfU4iL62UPu05Ev3dxuuLLW7Hs8Xb+SkPZ IH+OVDe7XJVx07NCiSQ6VQUmmQEndwNqle1utqWWG4b23PM1e3D+Pl8Qiw5+fenjTyc0 3I7YCqk8ouno5Frsu4+BFFNjDWQCFRLrOImEVZYbkMz1dHPAy5U36mLJihJCqtVyF1wN Ciy3LbCqYTST3lDbkHMjEKlEC+7z3RxXEU2D+UjvvoSr01OaaQgTjPtUQtLUSePlY3zG 0xyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EIbvTsDFJFM76ftJi3V3r7423OaRP15Ty8clscqRxI0=; b=pxMSfKWZhUSQfWPNtisuPnnT04C3DVOqfUyIn8Y0JQe27RF3eAd9hmEJ6r8Em5LW/M rJ7CjvsFWlljzKdQWN+MhXvxFiak7FYPdGRwmKxcgewGvgVe0ovn3h4j6Vv/5Ses+FH2 pI7UkdCGSTtMLSBQDy7wFHsn7fI39TX1FwaY/panU9gvn2xKcm9KNpkeiFAXovoBZNIc C9AfX7NSWprtDRcruxGbUVI9RjROBY1ykCGFWN+LZvPXscoY4nIWFEaaCTWa3qYdw8f4 86mXptE5DvtTRhvkjRWErZEUDall7uS6QSSvPZzS7HRMZv5BPCXwzeY+slIEGStmGnkD lECA== X-Gm-Message-State: ALQs6tD6agZN1nRrdTClZR3U4BXfdr7fcAPTPz6n8xJXPXcdYYKVIWEY e/sR2pKkaVm2zA44J1rqYC54sal1xffHSvtswiPKKA== X-Received: by 10.167.194.208 with SMTP id m16mr17694795edp.171.1524602379083; Tue, 24 Apr 2018 13:39:39 -0700 (PDT) MIME-Version: 1.0 References: <20180424180812.215900-1-wvw@google.com> <20180424145056.7c29ea18@gandalf.local.home> <20180424151416.397fbbde@gandalf.local.home> <20180424152607.71fbee34@gandalf.local.home> In-Reply-To: <20180424152607.71fbee34@gandalf.local.home> From: Wei Wang Date: Tue, 24 Apr 2018 20:39:27 +0000 Message-ID: Subject: Re: [PATCH] do not call trace_printk on non-debug build To: Steven Rostedt 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018, 12:26 Steven Rostedt wrote: > On Tue, 24 Apr 2018 19:20:03 +0000 > Wei Wang wrote: > > checkpatch.pl sounds good. One thing to add is we have many off tree > > patches with abuse trace_printk. Also as you mentioned, given this is > > really not for use in production and we have been cleaning this our on our > > side for years, could we consider to enforce this in kernel? > That nasty warning was suppose to be the enforcement. I would expect > nobody would ship a kernel where it produced such a message on boot (or > loading of a module). If they don't notice, then they are not testing > their code. > 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. The config is not something new and it is controlling pr_debug and pr_devel, so might not be too annoying, IMHO. But I agree this is not a problem from us but from abusers. Thanks! -Wei > Let's add it to checkpatch and see if that can draining the swamp of > abusers. > -- Steve