Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3797104ybl; Mon, 3 Feb 2020 06:44:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzJSRo9wTQ0QqL9eoVGo0WaVA1SOkRgpCWnl4ZBDdF8GADckuz0ukonhdDlvdysqYQfubG/ X-Received: by 2002:a9d:5e9:: with SMTP id 96mr12720499otd.307.1580741050539; Mon, 03 Feb 2020 06:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580741050; cv=none; d=google.com; s=arc-20160816; b=up5ZqY8dkD6ST34k/cyed9a6DpShN2y5KuBMoSaM6aaf30Tjhk21JeQ+5R/3QH7yhl AM+pNTbfyl/SkMIYQ5Sk8CcmzlHvXN9qviffcSmrwEfJ4pnSRsZPAdcs+Oz0Pu+KWrnI eSqrwnhqK/PnxMb9Rajz3wj61EbOWh+FGOPvlJzO1OUh9VzcTWcu4KeL8+w4Y5flfRtz C2cTjfYVPUxh7rDyLgpWD7CJALninx2At2fGVUNakEoCDXo8AuwPqFpbiDrIeb/pjs2z bfFuS71B6VMWRXaEMMcnwpGCWbeFl/MQYIcjiMPD1KSKd6NziW/e7oC8sHmTuBr/6XIs +Bbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=RjY4bcGA8a41KREenja3vc9b/1rke7H7AanTjIdCTT4=; b=woxsESgwm2tX9ydd99gRwvYjNHr+0fviPYV/kxbCy9Fo465eFR0iWNuYd0sZCxVA/v Xa2dyCxQ2JHADPp2ze8JMt/sga+lVa8yXwEGny5lswF5ta8aT7i7ncawpCKo9gA3no5r AIZj2OCiQ+Pe9ZNLc0zF2HymPsNm2Fi4ElZDkDymAlPRSJolYpLADwjB/v5NDO0AuBzt v7lR3mbxeZT11+kfyZMyHiH2Vg6AHTjcQ4U0jBymyHQ1JhNeWrlkuMK2cQUfwHzs/yAb h+EnPKGsvST1xDY5NkUeY6ci+8qR6T8BSPtnavHT5M8ipD7DOG7akipWJwc2KpZd771n qG6w== 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 j70si8586783oib.219.2020.02.03.06.43.58; Mon, 03 Feb 2020 06:44:10 -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 S1727751AbgBCMtK (ORCPT + 99 others); Mon, 3 Feb 2020 07:49:10 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50536 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727728AbgBCMtK (ORCPT ); Mon, 3 Feb 2020 07:49:10 -0500 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 013ClAfU112451 for ; Mon, 3 Feb 2020 07:49:09 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xxdtwtdd0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 03 Feb 2020 07:49:08 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Feb 2020 12:49:05 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 3 Feb 2020 12:49:03 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 013Cn1Gq43188550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Feb 2020 12:49:02 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D82F211C050; Mon, 3 Feb 2020 12:49:01 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9AAF811C054; Mon, 3 Feb 2020 12:49:01 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 3 Feb 2020 12:49:01 +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, 3 Feb 2020 13:48:56 +0100 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 20020312-0020-0000-0000-000003A68F4F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20020312-0021-0000-0000-000021FE5048 Message-Id: <20200203124856.53492-1-tmricht@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-03_03:2020-02-02,2020-02-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 impostorscore=0 clxscore=1015 mlxscore=0 adultscore=0 phishscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1911200001 definitions=main-2002030097 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. So I suggest the following patch to specify user space memory access. Try type 'ustring' first and use type 'string' in case 'ustring' is not supported. Signed-off-by: Thomas Richter --- tools/perf/tests/shell/lib/probe_vfs_getname.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh index 7cb99b433888..30c1eadbc5be 100644 --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh @@ -13,7 +13,9 @@ 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 -q "vfs_getname=getname_flags:${line} pathname=result->uptr:ustring" || \ + perf probe $verbose "vfs_getname=getname_flags:${line} pathname=filename:ustring" || \ + perf probe -q "vfs_getname=getname_flags:${line} pathname=result->uptr:string" || \ perf probe $verbose "vfs_getname=getname_flags:${line} pathname=filename:string" fi } -- 2.21.0