Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2588280ybl; Mon, 20 Jan 2020 05:50:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwG4PFlMCwif+HSgpxnBgq3Ey9LnyzAh0igyWnINVux2WUQOdSuXECsaGwuY6FGf3cagdM3 X-Received: by 2002:a05:6830:1d7b:: with SMTP id l27mr15105735oti.251.1579528229253; Mon, 20 Jan 2020 05:50:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579528229; cv=none; d=google.com; s=arc-20160816; b=qS4WWjPUkHERGsenUrugAt0jizD0hDvvBy89oOKvtbLBAa7i7fbO7dWrSPb///4Vg3 GXEEQe2xsMZyaymaGUhB3VreHAQpEoRMvfzM0tZKIZrCbn+aekqaxquhukGoHzq1Glh1 GQ3h7ZkjK7JmqB3hRL4wG5BTMk6/lmZ9n2ovRSD7p7GoA2/azXBKJejPWwvPNlDtrovB sqqWgSps/frDmauam8u7ziM46GxrX7/6I/nkys4VlhV2mEvI46uoljtrkhwhVlzwlZAR ObhD+G7XqGlUiPg+ZKE7BJQKpl8PZBmuqJWYNYyIOb7m2LKCAN4OMDBl7Z9Yfuxzh3O0 l4oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=0aEXILp2baTo66y21rbmcFcPls0aMdx/VgDgz8m0gpM=; b=rxk2GdIdAtkf2NtuOtR0ejC4HBKtv02GZs4ytzmLpqyYEzZ/UF7J36ntrvp4bYXfGo B4mpIDtwyySPdurRYOOwQvKPoYvQRO2ub9z07NWu1WUZmqPphltCIpcuKVmRkCmUVo3/ 4Et7H/DbUb3vW9dOToz8xnYa1Ce07h7BrdX8MNjTbU8U9JgslVDMiw6b3HcQfNqYjkd9 ZsbReTdmLGFFlLA3ZN7VvN4LQc9Gr6AqAvh67DsRH+IBSuJUx4OogQi1TWTDFHw7TJ9z YkolhStrTcx94ZwA7Q3cL7eyK4dAy0+tu9CUrfDvjXjkXkNvYXcM/pz399V4tAVEvCEF xxQA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si20196569otm.312.2020.01.20.05.50.16; Mon, 20 Jan 2020 05:50:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727045AbgATNtP (ORCPT + 99 others); Mon, 20 Jan 2020 08:49:15 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37432 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgATNtP (ORCPT ); Mon, 20 Jan 2020 08:49:15 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00KDHVhD043971 for ; Mon, 20 Jan 2020 08:20:27 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xmgcn8xar-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 20 Jan 2020 08:20:27 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Jan 2020 13:20:25 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 20 Jan 2020 13:20:22 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00KDJUPd19988804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Jan 2020 13:19:30 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 960D1A4068; Mon, 20 Jan 2020 13:20:20 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C529A4060; Mon, 20 Jan 2020 13:20:20 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 20 Jan 2020 13:20:20 +0000 (GMT) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: gor@linux.ibm.com, sumanthk@linux.ibm.com, heiko.carstens@de.ibm.com, Thomas Richter Subject: [PATCH v2] perf test: Fix test trace+probe_vfs_getname.sh Date: Mon, 20 Jan 2020 14:20:11 +0100 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200120132011.64698-1-tmricht@linux.ibm.com> References: <20200120132011.64698-1-tmricht@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 20012013-0028-0000-0000-000003D2CAF3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20012013-0029-0000-0000-00002496FCBA Message-Id: <20200120132011.64698-3-tmricht@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-20_02:2020-01-20,2020-01-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 phishscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 adultscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001200115 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This test places a kprobe to function getname_flags() in the kernel which has the following prototype: struct filename * getname_flags(const char __user *filename, int flags, int *empty) Variable filename points to a filename located in user space memory. Looking at commit 88903c464321c ("tracing/probe: Add ustring type for user-space string") the kprobe should indicate that user space memory is accessed. Fix this with a patch to specify user space memory access to parameter 'filename' and 'string' is replaced by 'ustring'. Signed-off-by: Thomas Richter --- tools/perf/tests/shell/lib/probe_vfs_getname.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh index 7cb99b433888..7ecf117651dd 100644 --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh @@ -13,8 +13,8 @@ add_probe_vfs_getname() { local verbose=$1 if [ $had_vfs_getname -eq 1 ] ; then line=$(perf probe -L getname_flags 2>&1 | egrep 'result.*=.*filename;' | sed -r 's/[[:space:]]+([[:digit:]]+)[[:space:]]+result->uptr.*/\1/') - perf probe -q "vfs_getname=getname_flags:${line} pathname=result->name:string" || \ - perf probe $verbose "vfs_getname=getname_flags:${line} pathname=filename:string" + perf probe -q "vfs_getname=getname_flags:${line} pathname=result->uptr:ustring" || \ + perf probe $verbose "vfs_getname=getname_flags:${line} pathname=filename:ustring" fi } -- 2.21.0