Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5999005pxb; Mon, 14 Feb 2022 12:46:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrr61ZNYySr1ZxX3CgL/9DL4BIPgJU1tWqi4czLN1w/b61wyVpkcin0vCI85JfPPLwkFGz X-Received: by 2002:a05:6a00:c94:: with SMTP id a20mr860579pfv.41.1644871587985; Mon, 14 Feb 2022 12:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644871587; cv=none; d=google.com; s=arc-20160816; b=wA8CaGQcTvVwMAZS2JqpzHT8cnnJOvo0/L8CqekFj/jhjEyC8E6RXlDWhf5YEWpNZv kPqoqVsFuQ3EFnWRS2Fh2Ll3+p4kVhiKRsVMRTqiqWtW8Z5awIG1Esqfjm5j36BuHB9E /bE78VxA3j/gFWHyI6PfOdBgKFsFSmb/aXeVtiK00FKYB98fRyekeHHZPZdN8Jer4VfV +8kxhFd6FDXqLTIeJy/dc2a7A9ujCq3tkL2as1HbccDs0BfSChoOJF+bT1ozVVQ21+h6 WMdHEvwk2LmF2RPJeXKiP1cBx6er1HPv4UdpGbosrU/oHRgP6FnE+bGdwhJM4PUHlEtS lr1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sKDpQ66cAYEFaJM4nwFxXa8mpbZH/1S1y7n7/S27q/I=; b=MgEcRv+t24LPQ4YtQAFK6akwEMC6qU/TQrGx52Fkkg6CLnNM5fAHhf1C2sKH66aso1 mhx1+pXXDdaGtnBvOp6tr1KOGCf6H0ooRbtpiFmyUg7HKDUFtSA9FbBuZu9PBica2J3M 57NDndPSNDDopoDjZmXNpLYVWLYMN3rBYWcMJ2783lVsLpTq0vNRwyh+H5ETmXs3VSux NMOIgYaToFuVBy0AtFbXAkg9vtjXZyUO1qNnUre7y2IbYUDRA0GtaBiyXPnAh4ZJxfnC 3oTeBmcC7Yjj1FKkhobLcuBRsBxM9DhwtxDEEBESS/27cmUp3+LzY/VktSXNgCtOrNkw zUog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0iARKuZQ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ob12si7023988pjb.155.2022.02.14.12.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 12:46:27 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0iARKuZQ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 73F8A120545; Mon, 14 Feb 2022 12:12:26 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245646AbiBNJuK (ORCPT + 99 others); Mon, 14 Feb 2022 04:50:10 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245307AbiBNJpx (ORCPT ); Mon, 14 Feb 2022 04:45:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845AF60DA0; Mon, 14 Feb 2022 01:38:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 20D82611BC; Mon, 14 Feb 2022 09:38:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0C6DC340E9; Mon, 14 Feb 2022 09:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831532; bh=rmFaxeqV0WmNFAlFuIswJzBEHxPusxQB4kPuyZQRoGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0iARKuZQ4ssUFCPolUDnifxeZszQfQkpGZ8yZDr72A2zNQA8X1Hu59wzkt5zTibS9 6Y80f5ucQd/HW4PV6QuYzJKEeQPAhYC38wlGcPQwMXLEufVQfpGL5fHqliOXoL3yCv ryPPmDBgOBUvaTpUZEYWVloR/bTBdYilUC8BdHxE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yordan Karadzhov , Tom Zanussi , "Steven Rostedt (Google)" , Sudip Mukherjee Subject: [PATCH 5.10 013/116] tracing: Propagate is_signed to expression Date: Mon, 14 Feb 2022 10:25:12 +0100 Message-Id: <20220214092459.143523020@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Zanussi commit 097f1eefedeab528cecbd35586dfe293853ffb17 upstream. During expression parsing, a new expression field is created which should inherit the properties of the operands, such as size and is_signed. is_signed propagation was missing, causing spurious errors with signed operands. Add it in parse_expr() and parse_unary() to fix the problem. Link: https://lkml.kernel.org/r/f4dac08742fd7a0920bf80a73c6c44042f5eaa40.1643319703.git.zanussi@kernel.org Cc: stable@vger.kernel.org Fixes: 100719dcef447 ("tracing: Add simple expression support to hist triggers") Reported-by: Yordan Karadzhov BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215513 Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) [sudip: adjust context] Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_events_hist.c | 3 +++ 1 file changed, 3 insertions(+) --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -2154,6 +2154,8 @@ static struct hist_field *parse_unary(st (HIST_FIELD_FL_TIMESTAMP | HIST_FIELD_FL_TIMESTAMP_USECS); expr->fn = hist_field_unary_minus; expr->operands[0] = operand1; + expr->size = operand1->size; + expr->is_signed = operand1->is_signed; expr->operator = FIELD_OP_UNARY_MINUS; expr->name = expr_str(expr, 0); expr->type = kstrdup(operand1->type, GFP_KERNEL); @@ -2293,6 +2295,7 @@ static struct hist_field *parse_expr(str /* The operand sizes should be the same, so just pick one */ expr->size = operand1->size; + expr->is_signed = operand1->is_signed; expr->operator = field_op; expr->name = expr_str(expr, 0);