Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5978280ybc; Wed, 27 Nov 2019 12:46:48 -0800 (PST) X-Google-Smtp-Source: APXvYqybbZIESifif2B2DFSHP+z5QJD3OLcAynv3xv4CqXD1PgKpIq+3n6FpCk3YZ5CBw5uMDXRH X-Received: by 2002:aa7:d04f:: with SMTP id n15mr29604474edo.76.1574887608762; Wed, 27 Nov 2019 12:46:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574887608; cv=none; d=google.com; s=arc-20160816; b=Hsr7LTMtpxwyfNm+nYxmT2Cda7OU1xuzhkSgRER63lOOdj/Rq++FGqHDHiLq4TeGU0 Gdf0Uaa9+rZKZls47SEleVze5q/Zv+yQrBq7q01LunVKq6dL7OtnJ6+yMmI4U39Swwzy IVZXsRoV1iX4Cz18jFoVQSrLluDhO1N1GATa3WwcIrbIr/oF6HDEiAcaDWfItefaknW6 R5w7tC+dubyXq0j3RUCI6SzZZ9dncrTNBPyd30gyRjLYITMI2ns26UfrDhRoOgzBo2WZ 0oC34FKdrJOliLAfKmhc2CBtq8o6zL8yiFJf1ySoZPJOEIve1Ckcebt0pLyWBa4Qus9y HhZQ== 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=IzHRVXL4ADrXQeNB5D0ijSjZbOod5ahs4rQj6lDN2C4=; b=SjgGebwoa7SXD1GanS0v0eUPo0oYLF14AShh1qsdkGA93Pi5/vVlke1YmEpjkpOadg oUONc1867vAKxd8uOrZ9DVtcdLPZaVYB3bnBc1q9Izm9nvw6/emgt5VLuks5OypXb44I CPPjKrYqKkBXhJlc2wf5r0uKPZJFbkreBxX80WrvHpvYVmyoZ0fjdSSumI2iYXcj7MTq EdRRacyR3A2rNeafojgOh8La3obpS2+OHJZXtYVXDRSdXEGTqIXOrOX9WzdptptvAM0I xswQvi75cTpOWE/A1B36fXuPgvzxZ0g7lVKh6KFDN0riQucWZ3HyvtHnlIGRuYQDwmw0 DhAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eWqtUSia; 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 o21si10285270ejj.188.2019.11.27.12.46.24; Wed, 27 Nov 2019 12:46:48 -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=eWqtUSia; 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 S1729266AbfK0Ul5 (ORCPT + 99 others); Wed, 27 Nov 2019 15:41:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:47572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729260AbfK0Ulx (ORCPT ); Wed, 27 Nov 2019 15:41:53 -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 C00A221775; Wed, 27 Nov 2019 20:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887313; bh=G+bUnZIIGo0TF/ZYi61/DRntB0hbkjdnF5/2+ThSJ3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eWqtUSiaujTVjKd1y1iyel02RwGPB098IoS4sQ43p50P2MVI5DJMMDx5IniTW++I/ f8hojvgnOcmXGoB9c+obBIapCLiv7dS5DCLcD8ViYJH5EZx0/J00JeEBuE2FP17IYm JRhT8BDc5smWQx4JOGeQCkC3iWhNwldAKXj8T9eI= 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.9 060/151] selftests/ftrace: Fix to test kprobe $comm arg only if available Date: Wed, 27 Nov 2019 21:30:43 +0100 Message-Id: <20191127203032.997599346@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@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 231bcd2c4eb59..1e7ac6f3362ff 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 @@ -71,8 +71,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