Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3861100pxb; Tue, 17 Nov 2020 05:37:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZwkAWJpwLkIkWmVcIIBKm1jgQVLwqX8JfrUT9dtcKDW1BjISjQ8EvFLAjXERhXDdSj19A X-Received: by 2002:a17:906:1945:: with SMTP id b5mr19218167eje.388.1605620258225; Tue, 17 Nov 2020 05:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605620258; cv=none; d=google.com; s=arc-20160816; b=AHBxH+AHEpydY2fw+Msp3S8kYwq4K4htfdo0gYaiIHH8fbxfad6RXd5TNzkLXKXvD1 73MX1dtzLu799ucfHuvA7n56sMsR4sqDSgo+hj+K+M7lJ2QC/7pFi6ycK/6p6rM9NRLQ E1F0UUSPwyFcr/cCj3ZJq1+tOFVPmbz5DHZupna23DUAS49Yqg/JbTCyY78oVVTmnM2/ 1OZfdgPuLQqkkNpFM8gP0ibOw2PuXUCBH7AIPqKY9PhzO2oaaLmq2cK9WuRE4+HH1p98 al0ipfS8ZLjxhbtr6yqxupHJ9L9cixxRJrYMz9T9z1V46/x4OCgjpiZkilk89QU0pqEA O8Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EchkguNSX3SOI6RTVeNxG8tfRZaDZUC8jIvTijGCXjQ=; b=zkpGFHYvkLPw/g6sBrOy/MJBwnWSWf6MEGdascLv0RI4KsleFUemEGVumSetM3fl9u x0g6zi5N9/NQh4NcHoXotu9ToF5vMol35AwzOBLR1GEFDURqzfW9BwZ/KzAJC7YFl/QO L8KHy8WXVfAHU5boi1oLIZgMoN2qHUIiENa/HNZHJGRdOfUKR400arNaEQ3xCeza6m4o MSg79O+bMsRJt3R2of/TVbGvDH9MOU5Jdg6BkY6y6q4erRRcGJrMPwUoGzsE9x9cqwR3 DdlSIOXJc2R4DsviiUWUj8PsVSPxgRoLJQtPWrQX/WIvjkGhxnpPJPR2ko84E391R8Gb Tz8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0mrjuWde; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si13134763ejd.391.2020.11.17.05.37.15; Tue, 17 Nov 2020 05:37:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0mrjuWde; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731634AbgKQNd5 (ORCPT + 99 others); Tue, 17 Nov 2020 08:33:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:44074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730570AbgKQNdv (ORCPT ); Tue, 17 Nov 2020 08:33:51 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 59ADE2168B; Tue, 17 Nov 2020 13:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605620029; bh=BzJ5fn01EUmgbhvM1Ni9TpmnHvKjX7Qmq6br3wANDC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0mrjuWdee1LTuUiEySZImNtvP5/eomf44t2F/b6zR+TigTOmNiDHMnNnn/0+VVGtL Y+nx67NmNuHlYxu4PP5p+Xt5Iilnhvy8calrkftOME1YmiJ+G63ns6Gv4IZlbCFRr9 86/3HDq9QtjKYI636tR5kS3bsvt3jMCIvfGo0s6Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Masami Hiramatsu , "Steven Rostedt (VMware)" , Shuah Khan , Sasha Levin Subject: [PATCH 5.9 084/255] selftests/ftrace: check for do_sys_openat2 in user-memory test Date: Tue, 17 Nov 2020 14:03:44 +0100 Message-Id: <20201117122143.045428181@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122138.925150709@linuxfoundation.org> References: <20201117122138.925150709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King [ Upstream commit e3e40312567087fbe6880f316cb2b0e1f3d8a82c ] More recent libc implementations are now using openat/openat2 system calls so also add do_sys_openat2 to the tracing so that the test passes on these systems because do_sys_open may not be called. Thanks to Masami Hiramatsu for the help on getting this fix to work correctly. Signed-off-by: Colin Ian King Acked-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- .../selftests/ftrace/test.d/kprobe/kprobe_args_user.tc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc index a30a9c07290d0..d25d01a197781 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc @@ -9,12 +9,16 @@ grep -A10 "fetcharg:" README | grep -q '\[u\]' || exit_unsupported :;: "user-memory access syntax and ustring working on user memory";: echo 'p:myevent do_sys_open path=+0($arg2):ustring path2=+u0($arg2):string' \ > kprobe_events +echo 'p:myevent2 do_sys_openat2 path=+0($arg2):ustring path2=+u0($arg2):string' \ + >> kprobe_events grep myevent kprobe_events | \ grep -q 'path=+0($arg2):ustring path2=+u0($arg2):string' echo 1 > events/kprobes/myevent/enable +echo 1 > events/kprobes/myevent2/enable echo > /dev/null echo 0 > events/kprobes/myevent/enable +echo 0 > events/kprobes/myevent2/enable grep myevent trace | grep -q 'path="/dev/null" path2="/dev/null"' -- 2.27.0