Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp733441ybc; Sat, 16 Nov 2019 07:45:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxEcX8Juzh0DyhrDNXtPd8XNs9zqnUcqXnUZpJRKjVHSubW9JzOPRqlSBcmxembXkF+7Kf/ X-Received: by 2002:a17:906:d72:: with SMTP id s18mr10857226ejh.29.1573919147506; Sat, 16 Nov 2019 07:45:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919147; cv=none; d=google.com; s=arc-20160816; b=AErQ4V7b0J9YkXB+h8moo/OzmI561xZY+o26zEkf4IVT/EX2Jzd0dKDDK8eu/Dbg1r ekv6cKuJUIEZ0Ra0/lnWWxOChpm+7pBHPTvVqvV4WLwdQlXO2TVbABrBvopBmtK44Joc BgXlc9O93PQMv3il/+gh18flXKFFGHXIzNgXw4LurCGp8Eq2fRkmlcBZiftick+AuePP Xlx+O8wfAbLqT4gcG7NhXUzBJ0Zdm3fTH50WpZR1hMChY0chuk9rki/T0ryhRUmE0l7m xJAYPrhQ9CovraJZRbM1ILSrfdEVn/2cR5K7TMHtDrKCM7dQ+tmALS+cJ4F7wU/Zsdhf tuhg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eelH8UKkc98xToIvA58h7WVU07AVaNQOeUS89IlLyww=; b=N9cQLDxnrQi7U7sdpD1/cG2hjzdZdkQLtPW4+K9COr7YqnLnuB551GYfn++K6IXMdW IO5AIDx9Phv7x+LqB8KmL3iE3sWax4BwOYRGn6ZzOFdVi6Pfte+mWfwVY/01S5GcmllA 2EhducJ1CDPlruV0ScYyYD0j955jonWvwzQ0Wp6jMeJgCEIlI+oSi5XLjGQeXx3smWsW IVJd7cHNjd5VXserDZUpsfkuHZhVDESc1boHJgrNR/UTUmM+aX5Pjsyys0l/uqErY4fk Xs5GA+oqArFvBf9heH9Ky/NpY/uaVuOgm2mjMC/3Xi07a5qMmLpbZDSTVN4JDq7cCkgq tuHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xPUA97ii; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si7855030ejj.427.2019.11.16.07.45.22; Sat, 16 Nov 2019 07:45:47 -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=xPUA97ii; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728783AbfKPPnh (ORCPT + 99 others); Sat, 16 Nov 2019 10:43:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:47638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728697AbfKPPne (ORCPT ); Sat, 16 Nov 2019 10:43:34 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 455902075B; Sat, 16 Nov 2019 15:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919013; bh=mUCR23AAMHP7FiMfk5lBhT3X/eTAIhQFLugWPOV1dys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xPUA97ii4w2GQDYn1GpkZuZF865JdU7fX4aLnmltBpA4e+7lmZScvexuephSl5Hfa OmjmPcBZjPMAbYfRFXvm4MKN+rBUcB+EYyZHhKRGT9n40kCFvTyzb+kclnKZM0/JDl +m0URu1dzVBAb5aviTHFbcVYqXCcoL99xVXXiT7A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Masami Hiramatsu , Shuah Khan , Sasha Levin , linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 116/237] selftests/ftrace: Fix to test kprobe $comm arg only if available Date: Sat, 16 Nov 2019 10:39:11 -0500 Message-Id: <20191116154113.7417-116-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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