Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4815949ybv; Mon, 17 Feb 2020 06:31:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzGxN+3qwVlqgl1+jC7KOC8VwHGkQb3X2ezWROAXcLiJTaecJlyMlgFbOoM11YBJXDyDcKz X-Received: by 2002:a54:448b:: with SMTP id v11mr9867984oiv.74.1581949860830; Mon, 17 Feb 2020 06:31:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581949860; cv=none; d=google.com; s=arc-20160816; b=BYQC/8bZ+mIByuXK+QlJ4fWmYkdHGvBarAfZY61gI0yppbLCHeOyYx9jKWDmdA7uo4 I8HsaaJwLijFaDS7xGFBXe0mjh+5U2HhcLOvxEsZpfIVboCIm20QJTvsbTQ/fmIc45GZ DYDwbRDE5JOp95Y18+p+SNji9+RnZB4euPKhQnY1tfjuqlvPdWVhsJIj5nMgSl4X2Y1u EvbK0zQCNNSt+hWlVZJ/jSYMJgh9Fc6yB8wmJZfNkUf6zrqOUh/aZf7Ga/7F9yyp3bfE eLtZXgHJSndWgRJVH5daiS/0/Blt02p+/l3Y5FQ2sezn+fJPZ5xy/nsfVDNU4A1S8Pkz lMfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=ifhvgKgI6cTWHXPEnaAyEUDSTCBWJ+KZaGmCrBza/1c=; b=YZVHHIkrxjT1CifJs7BC6fFGFlkIYojtZkStNg102fCggZSrtBYJHo/r+FT0WKpt/3 8fXmnrPAJc/5NmOb9ciOR+dSy1EBXOSBiIiOxoAymYSO9lBsizIUucHXEQRlSkUvhKEy x1qJqCCLH2V281all8r9NKPdKZiF5P+0FL2lfPWAhU+jRp9xWYWk3OpyQmmpdpIMo/N4 Yz/uFUNRA4/emBWNcFEqRQ2YkGRDMCf3op60naA4DviSgqCQprnL4HQPEPt1RZhWrNlL 7ramsqwB/JtPhhqtqHKAPjoi//Y6trXUmUPeiiblbJ8tAjdzJ5H8TE9hAYizsrbFPJpV BgtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C1c9Ac3d; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si6641745oic.190.2020.02.17.06.30.44; Mon, 17 Feb 2020 06:31:00 -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=@gmail.com header.s=20161025 header.b=C1c9Ac3d; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728821AbgBQO3k (ORCPT + 99 others); Mon, 17 Feb 2020 09:29:40 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:46663 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728054AbgBQO3k (ORCPT ); Mon, 17 Feb 2020 09:29:40 -0500 Received: by mail-qk1-f195.google.com with SMTP id u124so15814039qkh.13; Mon, 17 Feb 2020 06:29:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ifhvgKgI6cTWHXPEnaAyEUDSTCBWJ+KZaGmCrBza/1c=; b=C1c9Ac3dO4qTNAxrehHi5Lee1eIVFDCiei2+1u8WVmCTxz3+U0Hsq3ay+xNSl8pMrS J2VuTVV9mR5kCb8QXP6HX9EM00EkseoO78/ijG1qDu29USrGHRPnUFfYgvDUl1kEywAm op+qplXMh4i34wjCpUlAgzuRFl5m3gfVGYwnHeCQK/oOE3vsz9XJtSxLBvJXkxYCdvJ9 oUvMCUYRihGZ70hNrAvUEpbmVRn6C8ulkqRAu3c5bo+8XpcL03btqRICOrMshb7mEx50 3czipOu3udEuoZ3QfU6WAc/IVIgAE51iwpfhfDiZW77skX7D6Fkfver0nn5SR+dHsbDa yPlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ifhvgKgI6cTWHXPEnaAyEUDSTCBWJ+KZaGmCrBza/1c=; b=Z7WFxjPxtgbi23SzaEUikJe4E2q56q+7nzwy8YZU87YNj2RcAqz7laTqjRDNG3JbZ1 BRD5dtNXWIojO18hjkKbVYl8qLM0FLQ5Fjx7dOlz/1mGCeo/6PE9R1gnRj0FFsxYVeCy vzN2vrA8wQ5YkCFdxtjkUsxTUf9h706661kNBzEdDCPSCg9o0zmvFMz/+Wl3Kw9t5uoL 9GfQncskXS9x2r8T8eIg0LruQ0TfVds4ntMhuHIcSg7xky6dCrNLVMMeD7VEi8O9gXJ6 RecUihYye0nerBI0NBOfcQfTv5tF4h6pR2v/zXE9Veow8I5WlIdD2esR126ujc2T1K/y mxpQ== X-Gm-Message-State: APjAAAUeuA+XCoJbK6K6LagAUKdVCkrbRFiqeKGb+kZLKD7SNhiScGYx fireGP8UpsLuqMedIa4Ydks= X-Received: by 2002:a37:652:: with SMTP id 79mr14604728qkg.464.1581949778766; Mon, 17 Feb 2020 06:29:38 -0800 (PST) Received: from quaco.ghostprotocols.net ([179.97.37.151]) by smtp.gmail.com with ESMTPSA id n189sm291877qke.9.2020.02.17.06.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 06:29:37 -0800 (PST) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B7F57403AD; Mon, 17 Feb 2020 11:29:35 -0300 (-03) Date: Mon, 17 Feb 2020 11:29:35 -0300 To: Masami Hiramatsu Cc: Thomas Richter , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, gor@linux.ibm.com, sumanthk@linux.ibm.com, heiko.carstens@de.ibm.com Subject: Re: [PATCH v4] perf test: Fix test trace+probe_vfs_getname.sh on s390 Message-ID: <20200217142935.GA19953@kernel.org> References: <20200217102111.61137-1-tmricht@linux.ibm.com> <20200217211010.fa9c643c517c110abaa5b554@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200217211010.fa9c643c517c110abaa5b554@kernel.org> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Feb 17, 2020 at 09:10:10PM +0900, Masami Hiramatsu escreveu: > On Mon, 17 Feb 2020 11:21:11 +0100 > Thomas Richter wrote: > > > 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. > > > > Output before: > > [root@m35lp76 perf]# ./perf test 66 67 > > 66: Use vfs_getname probe to get syscall args filenames : FAILED! > > 67: Check open filename arg using perf trace + vfs_getname: FAILED! > > [root@m35lp76 perf]# > > > > Output after: > > [root@m35lp76 perf]# ./perf test 66 67 > > 66: Use vfs_getname probe to get syscall args filenames : Ok > > 67: Check open filename arg using perf trace + vfs_getname: Ok > > [root@m35lp76 perf]# > > > > Comments from Masami Hiramatsu: > > This bug doesn't happen on x86 or other archs on which user-address > > space and kernel address space is same. On some arch (ppc64 in this case?) > > user-address space is partially or completely same as kernel address space. > > (Yes, they switch the world when running into the kernel) In this case, > > we need to use different data access functions for each spaces. > > That is why I introduced "ustring" type for kprobe event. > > As far as I can see, Thomas's patch is sane. Thomas, could you show us > > your result on your test environment? > > Thank you > > > > Comments from Thomas Richter: > > Test results included above. > > > > Signed-off-by: Thomas Richter > > Looks good to me. > > Acked-by: Masami Hiramatsu Thanks, I tested it successfully on x86-64, applying. - Arnaldo