Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1050083ybt; Wed, 24 Jun 2020 18:35:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvyeqzgH0xXFBfu79u9bZf5NoIB5siZELscFEYpPeKXdi0iUN1nktbm6zQ2D20rdYx9Aot X-Received: by 2002:a17:906:7253:: with SMTP id n19mr28645195ejk.31.1593048949202; Wed, 24 Jun 2020 18:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593048949; cv=none; d=google.com; s=arc-20160816; b=v9rJyppnbixaMHslm/KxRVWoZapajbaBqUMtKuv3vSx4A3jwvoRDjv2IQwmCBGRqkb 1cLd1BSqJpJTGMd5vMAd2PKSYlmiVaPi1xmH2N8xFNxQ427hoKqckRDdyGFNllaxM73u RjPmC6KvBiYcTVKBJGNJxwN01Tcqo3LLznqXvdsXQ7aEe3IaEZr1BbkZvvZb8q133xku VxouXxnsquRh88FO21dJ6Y3x2DXhqFToYmmf+gTcgIGuyip4U2RHwplY4EUzaFQNt1fN tYNdIWv9e/KiYbN/W5eD76y1R5cl6G3+TUR4WR6ptDIsdPW6bWkAV91CV5RRyOBhRIV8 LB+Q== 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; bh=XtRqnFKMq7QWn535IlFHjHWcZAxjN0VLjwC/896jlvU=; b=I1qA2KZsFfu8UIwpGLVcCP7kGaCdza8DDDEqihr4BMY8MZg9qKWjLYJP1RfqOrlCD6 w2bKlrikHjuPJgsiVFAJvXAcHk+395476+ui1Ay75JaquUiQ40JCA0dnkaAqFkezZZY7 vl8tEoxaN/x8ntkKAYJI455sclRBfoLMOCEiLhKiFC6AvmXVUAO8/EkzlkCgqCuedTjN 15akViYOCXMS1vtEW8zUCB9tBSLTfYUJ43LMa5n050JFvvgLqnIWgSBunSKdEex4iu6Z Ks5IoEgdMwmQ7puwUARKULMLAfjKe3LUsg7m6Y7uXPKFIYGsczaOzOdoveMMBK2bQWR5 MUqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=d1aVjd6y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si3735171ejv.385.2020.06.24.18.35.24; Wed, 24 Jun 2020 18:35:49 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=d1aVjd6y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388987AbgFYBcd (ORCPT + 99 others); Wed, 24 Jun 2020 21:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388778AbgFYBcc (ORCPT ); Wed, 24 Jun 2020 21:32:32 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D3FCC061573 for ; Wed, 24 Jun 2020 18:32:31 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id m62so2644888vsd.4 for ; Wed, 24 Jun 2020 18:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XtRqnFKMq7QWn535IlFHjHWcZAxjN0VLjwC/896jlvU=; b=d1aVjd6yxFbak1tHbsvs9zmZuPoJr3VYb++bxNsP3u/l0ck+vRZgAJqvzFSjV4ZQap 515974zSW7VEMAEsxtsT33Qc9Qp0eL9+ldEA9QO9+vKLwBXbOxEvXrXz8ZqkpKgDVSj1 GdAG9CIDOZ9mBvKspeI3J8f0+9jYSdLLlBodc= 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=XtRqnFKMq7QWn535IlFHjHWcZAxjN0VLjwC/896jlvU=; b=ukjNm5hHs/ds+ndU/+FhIgbKoaOTtJz6RrmGFlMYID7aqm2rsOwe/NBBz9GnfRrFMm /z9Dln811TymrIwJTPF+G1Vu4FBeJXtPSDLapOZq9N3m9gEOhWPZJhVU8yKDfDLC5vls bVizrnjpykQ2BUZs2mzQQQNczclzAoCzPvfoh0RsHlUvWpCKFUF1a+j/YK3GzusZ8IEB BQyYH4Aluq3TvL2h6pVid1dB3h8RdOTOZqMAOwBNWbFACdLDejMWTfjlTSf5sWxCKkqB qKdi8DAyXodfrA2fNFPRoFOy/iXCU89YArej2WCM2yYsJHf0sQ/GHxpsnex+/W7sqsVG Wxcg== X-Gm-Message-State: AOAM530WUQ7S7BEtq8+uRGvFeEm+Nad9R+utW94L2HZVUicNz8Z5y6EC ATA3oFn8WEmdeFgBBfOyBHAniEvcXfg+E4hWFeXDJA== X-Received: by 2002:a67:b405:: with SMTP id x5mr25629621vsl.79.1593048750350; Wed, 24 Jun 2020 18:32:30 -0700 (PDT) MIME-Version: 1.0 References: <20200624084524.259560-1-drinkcat@chromium.org> <20200624120408.12c8fa0d@oasis.local.home> In-Reply-To: <20200624120408.12c8fa0d@oasis.local.home> From: Nicolas Boichat Date: Thu, 25 Jun 2020 09:32:19 +0800 Message-ID: Subject: Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option To: Steven Rostedt Cc: lkml , Ingo Molnar , Andrew Morton , Kees Cook , Jason Gunthorpe , Daniel Vetter , Peter Zijlstra , Vinod Koul , Andy Shevchenko , Alexey Dobriyan , Tiezhu Yang , Thomas Gleixner , "Guilherme G . Piccoli" , Will Deacon , Douglas Anderson , Guenter Roeck 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 Thu, Jun 25, 2020 at 12:04 AM Steven Rostedt wrote: > > On Wed, 24 Jun 2020 16:45:24 +0800 > Nicolas Boichat wrote: > > > trace_printk is only meant as a debugging tool, and should never be > > compiled into production code without source code changes, as > > indicated by the warning that shows up on boot if any trace_printk > > is called: > > ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** > > ** ** > > ** trace_printk() being used. Allocating extra memory. ** > > ** ** > > ** This means that this is a DEBUG kernel and it is ** > > ** unsafe for production use. ** > > > > If this option is set to n, the kernel will generate a build-time > > error if trace_printk is used. > > > > Signed-off-by: Nicolas Boichat > > Interesting. Note, this will prevent modules with trace_printk from > being loaded as well. Err, all of these changes are in macros (nothing gets built in the kernel), so this will prevent modules with trace_printk from being _built_. Now, if you set the option to =y when building the module (separately, even though the rest of the kernel has =n) then I don't see why the module could not be loaded. > > -- Steve