Received: by 10.192.165.148 with SMTP id m20csp5009048imm; Tue, 24 Apr 2018 12:04:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Ke8G3wKDF3PIPN1EU/xAhc8o3ffCpkdgPUzNKAdZR5XIaPw6cF3GwcKV2oXcBj/X0EYfz X-Received: by 10.99.116.19 with SMTP id p19mr21075160pgc.230.1524596646705; Tue, 24 Apr 2018 12:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524596646; cv=none; d=google.com; s=arc-20160816; b=uvZpW1WgFuvWG5kDtV/zTT9RF01STeS7dIERMO4lULyGKMfGO0PMJ1+Fud17LItNhH 6ZiboHPAdxzKvOFUgvsZtS3t30P6LX2YFljP44HkWGZfmIjFiIoxF3gPP168mxNgWIZM 43dMlhq4EHdxCRKOF69SHPNw/Rs/XlFSjt3Yq3QOArXF0Lxic211E+iWXxnfjOzk8QN9 5NrwKoCu108aAx4zcAwQzGHJWlmY8ZwyVTLiS1DRABpLWwiczLVhIrTPMOkGSGSQbkLE J4WepO998veNfIJCtCJFxO9UsKKa2QTTzqUErJb0XIZwyxy+ubDBQsoMJu/KhZayrHEe OOAw== 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=4AXNzCfdUgDMxPYj+bNQNGR8UhgVM0T1je1iNaR9pzk=; b=fTpDnvv2LJqznbkz0UXw7wQ/oZbFoCLBiaVbaIBroP+5IhxB26RZDw/6M2lPjfL6zr ZsFSrO5oN+UHfH7HcLe0SWeOjZHvhx2yNuNNEeeq82fVyupil90ttPMqBkxEj4DIkiId AOE0dpAZjSypYLgq2Wt3J8+to0jasaMyZM+n8bDCSGZsVDal0zdC/Ad4DbupVRTsrDag AoZkfRnt25bZaBwspKE2nsGIjSoywEdaRPplgd16K5b+U7Qn3xec/tBSQWxHSeKjjZ8Q jnXORMBhvLeFYj62vS7U6enond5P1iBZMslqx+taBG6Zw8vNaSdy1ZlO+t9nH1PFxGfE 5dRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ZHE0Uu8Z; 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 r12si10489474pfd.193.2018.04.24.12.03.51; Tue, 24 Apr 2018 12:04:06 -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=ZHE0Uu8Z; 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 S1752518AbeDXTCr (ORCPT + 99 others); Tue, 24 Apr 2018 15:02:47 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40052 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003AbeDXTCq (ORCPT ); Tue, 24 Apr 2018 15:02:46 -0400 Received: by mail-wm0-f68.google.com with SMTP id j5so2607199wme.5 for ; Tue, 24 Apr 2018 12:02:45 -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=4AXNzCfdUgDMxPYj+bNQNGR8UhgVM0T1je1iNaR9pzk=; b=ZHE0Uu8ZO0/W8vKxotJTch/oPdjU+RExBDW2R9oKQOOfPfzwtmoRrQaOV9ZZnQ7Hlf vZbSKssgJjUMgerg/3qstabLk/VhlvBxhX7PYnpaAaBMpZLa3fmUEih35AaYcrBuGER4 JTdZWMvd3dvhPVTPLm/N+JfrSpLgy5T3t7UzpcbBjefqnr8G5nlr3dTL/9yWjaAKsjSG 2FIhgPJJwLEG/Qsxru3bO8DU6nFMqhOJZ2M2Rr3/JnzjL5z+VKNjzjgNIuEaHvvON/Gh tvjWXSsvRVGI6u7SsgBKuf/QiLIoAcwR60MVzOg5cfZSIhr7tnTueVMgDOJ/vzkfwtwm SMtw== 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=4AXNzCfdUgDMxPYj+bNQNGR8UhgVM0T1je1iNaR9pzk=; b=oq6et3+tVZgEafcbdlBQQFSkJ/V4rR/MWrieEjJaGGOwFgjtr/oyZdqohtGNS7YwD5 pdx/l0tP4ohcA0hLE266KCf3Ie0CAa4dxliy20GwuGhfClV6VPstnY6vw+QDYDk+8VOE fIdVzEzhTaierC5wSzCWbeRkeN28S0W4wnWZAeQtxzbeiVUUZ3taOGuUkoRmZtap/5Bg bZHDzd0q6jEaGJ4glmRnKrHaVwmx2QnsqQFXXlMcA73/Gxv3w30ZIx3RIUuqpfUnDo8u wZ2kPaVOU3hdbviEWldGp+luYsKFteOmKEZLNb3V5CH+MkckGAVQAQW9BnFrenFVDxGs ppsA== X-Gm-Message-State: ALQs6tAO1ubD5p1PfMuB52coAwiJPTlztHQ/R+00AIqleugxcXmP5jWK h2lSABZwkwYZ4a2FMxMS8U23CvkeXss1v/PM8lHomw== X-Received: by 10.80.246.27 with SMTP id c27mr32832221edn.196.1524596564912; Tue, 24 Apr 2018 12:02:44 -0700 (PDT) MIME-Version: 1.0 References: <20180424180812.215900-1-wvw@google.com> <20180424145056.7c29ea18@gandalf.local.home> In-Reply-To: <20180424145056.7c29ea18@gandalf.local.home> From: Wei Wang Date: Tue, 24 Apr 2018 19:02:34 +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 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 We have seen many cases vendor have shipped kernel/drivers with it, and have to clean up that every year. This was brought up in an internal discussion and Greg suggested have some feedback from upstream about what should be taken to prevent this globally besides fixing individual drivers. From him "I think this change makes sense at a high level, but there could be non-obvious reasons why this isn't the way things are handled right now." On Tue, Apr 24, 2018 at 11:51 AM Steven Rostedt wrote: > On Tue, 24 Apr 2018 11:08:10 -0700 > Wei Wang wrote: > > From: Wei Wang > > > > trace_printk will cause trace_printk_init_buffers executed in kernel > > start, which will increase memory and also show bad warnings in > > production kernel. > > > NAK! > Where is trace_printk() being used to trigger this? > trace_printk() is to be added while debugging, but one should not need > to enable DEBUG to use it. But it should be removed when finished. Yeah, ideal case is it *should* be removed, but if this is not for production use, does it make sense we limit the usage with DEBUG? > -- Steve > > Signed-off-by: Wei Wang