Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1565285pxb; Fri, 26 Feb 2021 14:24:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVgc2ExAz/sHNdRRMegFj6sDEptqNjfgUhsC3DHFLSZFv/yPKOBcDaNRGfaFBdnyk4YYi4 X-Received: by 2002:a17:906:3488:: with SMTP id g8mr5494790ejb.282.1614378272412; Fri, 26 Feb 2021 14:24:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614378272; cv=none; d=google.com; s=arc-20160816; b=cGGwd72GidxDB3ctV0dB6Isq+fUFpJO7iXWrAqErG6mcCnUBHqWzxF+I0IL26JwGsj DEQ3AcgJV2DZIVuTU81IuoZijNiBLZ/F9ra3f7P8gK9XtUktqCkCChGzdhxcD/h8Z6iL wyz6j3Kwd+iwScpGmvNHiI5LRqyyA8+SfjfhGtSJNm8WK2750klf6+0Wghps4roSE59w joTcXgV9M13o3XIVddsZ13ti8MWaH5kvY4UGcWjkvAo8Sb6ylmyh4hyLg6abBY27Qr8B /39pk5sO0DH0QdKT7bDzndU/98G7LrVztG3y/Awxj1B8XSX7wlvtxN0nf2/K8EvemQxA CDHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1K6EFKaL76TU0vrMptcFpOpukPudyQ834mCnGUOJSJ8=; b=kRi9Avu255uIZzq3eK3dXPRSt7jzF+TUybzMOeAxAo/6Wim13VxbBV9mA3cNp33qvB PTNgeyjcMMTNbWwPSuGbMVzfkm3uGmJtcXWO6Lry4rcNyDzzD8tg9rmyV19XbIJ1TMC2 PYQMZ75Ta6CVe3KV65FsdcCwTKNfDMX/UuNZ33RXqTHb17qofRsfZf5budYKqOMHbLKd rVh/jstoqyEeP0K2m/h7HhlRFrKeMETSkqND7ZVFxPzgcuHyAzFlG62Ki7t4ii+T5chS BAViOzf7Dg0d0S/NfDx/thI/ikar9vbi80Gi06okidKHHkAdlXqbXarRMGgbWW1OBU2h dntg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Qhtf5tMC; 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 k14si7194251ejp.62.2021.02.26.14.24.10; Fri, 26 Feb 2021 14:24:32 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Qhtf5tMC; 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 S230095AbhBZWWA (ORCPT + 99 others); Fri, 26 Feb 2021 17:22:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbhBZWV7 (ORCPT ); Fri, 26 Feb 2021 17:21:59 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BAB5C061788 for ; Fri, 26 Feb 2021 14:21:19 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id c8so12329897ljd.12 for ; Fri, 26 Feb 2021 14:21:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1K6EFKaL76TU0vrMptcFpOpukPudyQ834mCnGUOJSJ8=; b=Qhtf5tMCa15jexl+5eTT5kTjnjjKcjh+MOzsBgl+VAlfoHFzs6WF9ewHaZ59fgo6AR OdUYAUftiv8WvzHb6IHXe0Xcy4yBfJxotfV8HMi/PcYFw3wNvGZRLi7nACTZRizzTvUx xTdELz+t64JchV2azQj4hqWYnobLy8HBJLebs= 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=1K6EFKaL76TU0vrMptcFpOpukPudyQ834mCnGUOJSJ8=; b=EBIDCkAkfsDjkhgXw4AUeXiLRniOng5KBE9QsvUrf/lLVfl9u55kQclJN1xZGqTGgi xPfR1GctenrY2SEM9w1Nt6tBLabsi/h2opf6q5jTuPBPu0tHvCYvJpSnUNhNBhiTaq4W TkC9BT/rp16TUXvTnvLn/UhiUImO0fx7mrorJLO7rTqglI80dj9nLutQlZ7w544i1tSa 8VdOUzsAWwjwkzLC4akC7jVrrjB5YtNyfdgRP3+aRsDdl8TbjiuHpOSt9F91VdvI/n3T bhNrfFosTvCg6a5SPtDmPPg2JFduvtBY4YNq/BV6FxPsjAL3aEUAz2q1ViGbzZkIyhFk /ljw== X-Gm-Message-State: AOAM532l7lqy2HrNEMCNTuXUFTK1jabLEfQo4zY7BooMgaimhlSIURFD AHuvPCihaK4fh10QUl6GgtaEXHndOQBnmA== X-Received: by 2002:a2e:87c6:: with SMTP id v6mr2803925ljj.372.1614378077404; Fri, 26 Feb 2021 14:21:17 -0800 (PST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id t192sm1304186lff.295.2021.02.26.14.21.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Feb 2021 14:21:16 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id m22so16118978lfg.5 for ; Fri, 26 Feb 2021 14:21:16 -0800 (PST) X-Received: by 2002:a05:6512:a8c:: with SMTP id m12mr2960904lfu.253.1614378075864; Fri, 26 Feb 2021 14:21:15 -0800 (PST) MIME-Version: 1.0 References: <20210226185909.100032746@goodmis.org> In-Reply-To: <20210226185909.100032746@goodmis.org> From: Linus Torvalds Date: Fri, 26 Feb 2021 14:21:00 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] tracing: Detect unsafe dereferencing of pointers from trace events To: Steven Rostedt Cc: Linux Kernel Mailing List , Ingo Molnar , Andrew Morton , Masami Hiramatsu , Jacob Wen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 26, 2021 at 11:07 AM Steven Rostedt wrote: > > The first patch scans the print fmts of the trace events looking for > dereferencing pointers from %p*, and making sure that they refer back > to the trace event itself. > > The second patch handles strings "%s" [..] Doing this at runtime really feels like the wrong thing to do. It won't even protect us from what happened - people like me and Andrew won't even run those tracepoints in the first place, so we won't notice. It really would be much better in every respect to have this done by checkpatch, I think. Linus