Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5993191ybc; Wed, 27 Nov 2019 13:04:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyE+FBoYAUi/iHbNK+5lHAzNE6cU5ASth4C9PU15dVTLc9jStAzaeft/8asnhwj6MZcp5Yc X-Received: by 2002:a17:907:1114:: with SMTP id qu20mr52681713ejb.42.1574888648014; Wed, 27 Nov 2019 13:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888648; cv=none; d=google.com; s=arc-20160816; b=QTqhr32kv3UgwwLr0C06qranWVEJOM2mLcvY3xPm59ige+o2UonZ2O+WJkFk7IP2aT 7Fw1jOlJVixPPnKuUXhhTjqphj133HT65WjzjeOc6dOkhbqZeG3SsHQ7/3v5AIBIPpGe cNEylnJdJdHkfvpMgvPFFYakVQoyJiOVXPZ6OnIj5Ms5KJ2ojDRyCOnoz7mt93ilJV/f E3Q9ec31atHkYsAUl0tHATCU3Ri8EbzroAJRQYc9D8vd4IFrXUJYceciDyO4bvV1hzS4 Pa95Z/ztp66l13LR1J5gtJbzj4BPUIzTUd75pF98cYBs7Ji0g9ujIBfp6tobJDGsubG5 8Tyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eelH8UKkc98xToIvA58h7WVU07AVaNQOeUS89IlLyww=; b=azmIue9QPEAU7SkeuHLBpzMEkWEHJ7b1zKLieCLqV4Q+8k3IiLOEOR0g6AgeZnMyHV DFChhbLmUMhSIHbWeVNPg4uL/RQumxnohvC61Lg3DXVlN6QFlNDOGhx9QljW/qQXDTBb FLRdhrIjkkVfWvV0GVn/PamsL2UvEAsbHsqf9277tGJaQo4xq24Yami13N4ICHh/qiXf p7A1qjGUfGIWu4Ac7qXcG4+tsLyFp5eIiW9LyhmP6IKAMKwj8KXT1nKnKJYVH5xKtS7U LDV23BfnFFYtEEGN3gT7z5zUjss3ffeAzuq/2iMHBptKjxMTh706N1sHfXFOicvd20dk M83A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0Ch633NN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o28si12003085edc.353.2019.11.27.13.03.36; Wed, 27 Nov 2019 13:04:08 -0800 (PST) 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=@kernel.org header.s=default header.b=0Ch633NN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727995AbfK0VAo (ORCPT + 99 others); Wed, 27 Nov 2019 16:00:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:52650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729117AbfK0VAl (ORCPT ); Wed, 27 Nov 2019 16:00:41 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 474E82158A; Wed, 27 Nov 2019 21:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888440; bh=mUCR23AAMHP7FiMfk5lBhT3X/eTAIhQFLugWPOV1dys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0Ch633NNAyYgvijYkeEB+b1kNo5Xlmw8d/i/o0yxeXyYckEyVrut+6s+QCtBGH+JO SNhykguY+Wtv3AXdbqQMetV2TDYtWdUNKzI8LKsCs21pKgEuHAfmckCLU7LW89vRie 4pbs/o5Z1c2MgzCaZQCEtfF1vEV+8vvdf9tp/Ws0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masami Hiramatsu , "Shuah Khan (Samsung OSG)" , Sasha Levin Subject: [PATCH 4.19 134/306] selftests/ftrace: Fix to test kprobe $comm arg only if available Date: Wed, 27 Nov 2019 21:29:44 +0100 Message-Id: <20191127203124.854258005@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masami Hiramatsu [ Upstream commit 2452c96e617a0ff6fb2692e55217a3fa57a7322c ] Test $comm in kprobe-event argument syntax testcase only if it is supported on the kernel because $comm has been introduced 4.8 kernel. So on older stable kernel, it should be skipped. Signed-off-by: Masami Hiramatsu Signed-off-by: Shuah Khan (Samsung OSG) Signed-off-by: Sasha Levin --- .../selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc index d026ff4e562f3..92ffb3bd33d82 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc @@ -78,8 +78,11 @@ test_badarg "\$stackp" "\$stack0+10" "\$stack1-10" echo "r ${PROBEFUNC} \$retval" > kprobe_events ! echo "p ${PROBEFUNC} \$retval" > kprobe_events +# $comm was introduced in 4.8, older kernels reject it. +if grep -A1 "fetcharg:" README | grep -q '\$comm' ; then : "Comm access" test_goodarg "\$comm" +fi : "Indirect memory access" test_goodarg "+0(${GOODREG})" "-0(${GOODREG})" "+10(\$stack)" \ -- 2.20.1