From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E27C04AB3 for ; Mon, 27 May 2019 12:06:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CD3320883 for ; Mon, 27 May 2019 12:06:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558958761; bh=S8BdTjAyTL8VsH7L4medG5M62c5MJESlWlKU0/7eb3w=; h=Subject:To:Cc:From:Date:List-ID:From; b=sljH/smZhJukgSIPkRpdgSSMCScS5iWrQAFJA1RqLtOxSm/ak+SSD7RHXDOMoE6L5 KGRhmdoqTHcm8zlcxZ95WgtXIflGG2Hp9W9xdWFRJm3avyctultY6IjY48yHXKrl20 bAapZSnbzqYWwKLm6VJLVQB7v1ls9q6IUl6HqngI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726115AbfE0MGB (ORCPT ); Mon, 27 May 2019 08:06:01 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:38641 "EHLO wout5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726071AbfE0MGB (ORCPT ); Mon, 27 May 2019 08:06:01 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 1866054D; Mon, 27 May 2019 08:06:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 27 May 2019 08:06:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ymo+PA QDcu0tPZoiWemFOB428JcrJykLk62aOwOMkPM=; b=qJpya/a/hnaq5aVQa4cMvk bEz5WF+prosuG1IM/sQGTkCDCqcuIxv9ray5k76Xxf8Xu8G6lzAIolSvw1RKZMWh f/Bw6PX25aqwmgNyWOIQdvSPKoNHoDlFpxMaGoexwEda1ro2k/ZNbary8dQMVDSW DIurJlsK/Vv2OyO9wQeRXdGLJWd8w8vAnjYSA1YHigukLdThzUUGKXLwumIfrbvK AwoE56AeWfLqH0bguU3JjJRfUg2pyuV6AE0vex4CROmGDk845WkD67AyqUoT3wVE iONRg9qr1MUid5ttT5N4OgzVijW2c0MWKF6fYNyIUiPH5cnF2J8bre55uQCcd8cg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddvvddggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepkeefrdekiedrkeelrd dutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomhen ucevlhhushhtvghrufhiiigvpedu X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 145D68005B; Mon, 27 May 2019 08:05:58 -0400 (EDT) Subject: FAILED: patch "[PATCH] tracing: Check keys for variable references in expressions" failed to apply to 5.0-stable tree To: tom.zanussi@linux.intel.com, rostedt@goodmis.org, vincent@bernat.ch Cc: From: Date: Mon, 27 May 2019 14:05:49 +0200 Message-ID: <155895874910192@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.0-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c8d94a1878342fdffedaaf15201d951dfc147065 Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Thu, 18 Apr 2019 10:18:51 -0500 Subject: [PATCH] tracing: Check keys for variable references in expressions too There's an existing check for variable references in keys, but it doesn't go far enough. It checks whether a key field is a variable reference but doesn't check whether it's an expression containing variable references, which can cause the same problems for callers. Use the existing field_has_hist_vars() function rather than a direct top-level flag check to catch all possible variable references. Link: http://lkml.kernel.org/r/e8c3d3d53db5ca90ceea5a46e5413103a6902fc7.1555597045.git.tom.zanussi@linux.intel.com Cc: stable@vger.kernel.org Fixes: 067fe038e70f6 ("tracing: Add variable reference handling to hist triggers") Reported-by: Vincent Bernat Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 06e7b9f66de6..2b76f9520bd0 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -59,7 +59,7 @@ C(NO_CLOSING_PAREN, "No closing paren found"), \ C(SUBSYS_NOT_FOUND, "Missing subsystem"), \ C(INVALID_SUBSYS_EVENT, "Invalid subsystem or event name"), \ - C(INVALID_REF_KEY, "Using variable references as keys not supported"), \ + C(INVALID_REF_KEY, "Using variable references in keys not supported"), \ C(VAR_NOT_FOUND, "Couldn't find variable"), \ C(FIELD_NOT_FOUND, "Couldn't find field"), @@ -4506,7 +4506,7 @@ static int create_key_field(struct hist_trigger_data *hist_data, goto out; } - if (hist_field->flags & HIST_FIELD_FL_VAR_REF) { + if (field_has_hist_vars(hist_field, 0)) { hist_err(tr, HIST_ERR_INVALID_REF_KEY, errpos(field_str)); destroy_hist_field(hist_field, 0); ret = -EINVAL;