Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2527420lqt; Mon, 22 Apr 2024 13:21:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVI2KdfRCUn1lFjUBqgc9laJXRYVHIf5Q1Z+eeAPrTHLd0G3esYgZ5k+2261cBqzqsYpje9e4PP1MCJya8bPxesgVPHbkeR92Cwoxc07g== X-Google-Smtp-Source: AGHT+IHEWkShNa+IWN/BG+COCvRqcnjCdg7lzMFGzXS7AqRl5gPxauvjukJbvbRACz7W0KKM/gTj X-Received: by 2002:a05:6a00:4fd3:b0:6e6:9f47:38c6 with SMTP id le19-20020a056a004fd300b006e69f4738c6mr13824891pfb.27.1713817283733; Mon, 22 Apr 2024 13:21:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713817283; cv=pass; d=google.com; s=arc-20160816; b=TlWVR+ol1e9g7wnyY79JPUFtw0KHyBo6j7ojhD4i52KZBY6D90Pf1hr/aF/tdeCzrv BLikzfS1VkpzTiiCq4lwxfPwmWjLl2NzLgxvnCUR6Rj3IGauOKDKVYh5LcA5KSa7R07Z gpGroZSJ6xaWYH6PupdgUzEEpazFMf+lpcWREE9RVldAYBl9fZm1xl30g6MrEFI/94hP M2M5ITOe2pIBOUYZWEeroanETbjhvV/pKm8zLM6I/3SmlcSBdoymPEaddKXHteA3UNhe yR119TETVJerZ+uUSMz0lMEtlRojLJx6PXwhYKWubZm0np3ksO5XKjC7GK4mXLOrECTR VDyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from:dkim-signature; bh=/Eu3JFTPdyU8Z03j2EuYpTwgYH2/Fv3qtXMU2BdFdug=; fh=0ABRMhIDxXWSH2n++GRyODEpzf0cACm9jMKEsTVq/gI=; b=MEB/rlDYTDMdtFmO01POSF6qQMJ8SDG5KJNxn9gjq2uKO97CiWePujZb0g8xa5T27B H7nAfxRfWqdwPdSemS/7dFfCyB3HoPjpD8Gwj5oaF1XHsMXeTI1v/eMkBpdCL2VjwWMi evlhDy5E3UG5hXF11l+dQs8ArfdQY7lWTjtd3Zbpcmg3i3g1AD3Kz5A+hLW0MgbbzAHI tLNXY2RhQy1xAUlrC5xHrDGWHbJfo/mR4mUxoFs4KTyc0Yvv4dCoPQxdQweTsf/uQjJV hhmpOJf5eSX1Bm6wibd7xFOLvjk+6X0dtcDrIgWkAgSFSt4eIhD7wChCvvEfl6NEIf5d yh8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BtAz2R+n; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b128-20020a633486000000b005f7fd3f8252si6636433pga.652.2024.04.22.13.21.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 13:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BtAz2R+n; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-153990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 31948B213C8 for ; Mon, 22 Apr 2024 20:15:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45115155740; Mon, 22 Apr 2024 20:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BtAz2R+n" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB77A15539E; Mon, 22 Apr 2024 20:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816921; cv=none; b=YibNI7v8yMmrkUu1p2AMZkuR9vbyk3oFeO8frSE0YJR8yLCn8OaYRgWOSluySWnFEOSuCGtuU8ULa0P415vx85yY7XMXQtiyX9feailvsHnfVpcddTphL3YTwtZevQuS5rsZsuSp93SH8rCBMQEAuTTcpIrxhOq4ROWQC046OB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713816921; c=relaxed/simple; bh=CO9sWn4TGwS+F6HGsjPCnompyAUQtRvkshYYjb0v0KM=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ux4Ny+e8eMdT1draNTl/NLYZ70vW7PDLtrqhP6Iv3DondZnpzykuJ/meVXhkMQ9pnKyIc4bQYCfKWy2SPzlYuOH9T2SYMNNd2UMAyHp4vajcBQxIS+7JE92ZR1b9p/T2o2h8gGRxp18TW54Cr7PBxiwYf6miVSVQ3f2Thkd/Em0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BtAz2R+n; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41aa2f6ff00so3741005e9.3; Mon, 22 Apr 2024 13:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713816918; x=1714421718; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=/Eu3JFTPdyU8Z03j2EuYpTwgYH2/Fv3qtXMU2BdFdug=; b=BtAz2R+nC/KvxGa5WfpGt90866DOXerVcmJiaX/5SXuSwWEfX6gQcoy6hLy4PIQyvF ST1qFFp5RQyTeHJfzKTaerj60GjYW2SL4c3Vp/VCtFol7WSFrxyb1h71S3V3eFN3yHxt 03q/3c8BX7kKxpk86DDMPh7iRTzAN/cQhn88tiIPWSY1Xealwiww+CdVeL4SuykdWPD1 yeJv57RtZb3oYq/xhtkwr2IbAD8lPUn2ZrtDOL7H2W9xYx/Yp2UCdwbZHvODTpkyHVQv fv1nSh8luw978+b8PTt/qdASrEPoeQmgpY0TTSh5DtCdt4TjNE2uTOPwRnmp0YmvvDlh 6vHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713816918; x=1714421718; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/Eu3JFTPdyU8Z03j2EuYpTwgYH2/Fv3qtXMU2BdFdug=; b=Q5Ey15UaTcIEhLGyAkyrOgwtMRNXwYuAVxXVbYPrb/VEmz5981P/C/on5DseIEBw16 iW2d1PvJGd8BK80LcbHupWWe5ZiNGFGNai6ujuZxPJlaY1mFjR47mGLL2cjcHxV1k5R8 yvqcQaiiEjcEtHlHCa6psNgGZ9GXY416aCsNf3fIqlBa+m7x/chkm+YkNt3uRWSIsnos SQ/gbOsjQeb8L6IaLU9OZDUvJ1Q0+ugkyshWfpk+pz222ymGhj+GK8060H8IVyx+AvWA TeolA4GH5pHzBNntkAXqSamq2l0cwOVBK6HHHdlG5zNPxd/D8h5tT4+dojlo/uDKMFt6 2LVA== X-Forwarded-Encrypted: i=1; AJvYcCWixELHkYf1yCqVR0QGmOdcm8+9eSSzWppsVnCaYmdxL7MZXZr1S3jJ4HRIoC6VJt9oULuVE9V7ykOMbsNev4iqY572k9Wu1MxWEeXzYmUKlxha/9M26NLsKvnxGAXE0O3o0bddzWGU0XLhxg1P6CENavVKI3WBvKeFXJlwzxGtH/C2kGlLg6GfIu4Mp/+482x1GA+GHha085pnScvw/Ktc X-Gm-Message-State: AOJu0YyC6uQLx/VIcBb/eHeBDqn058dIrshsNdeyr0w4BrSC66QQrxnS k3+55PDqGVuEy1O7+R0j5IgoW/KKUHA0kyIygs+1iXfw//APIywyBMXt4d1n X-Received: by 2002:a05:600c:1c21:b0:418:ee1e:3445 with SMTP id j33-20020a05600c1c2100b00418ee1e3445mr10483617wms.26.1713816917679; Mon, 22 Apr 2024 13:15:17 -0700 (PDT) Received: from krava ([83.240.62.18]) by smtp.gmail.com with ESMTPSA id s6-20020a05600c45c600b00418244d459esm17861156wmo.4.2024.04.22.13.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 13:15:17 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Mon, 22 Apr 2024 22:15:14 +0200 To: Masami Hiramatsu Cc: Steven Rostedt , Oleg Nesterov , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, bpf@vger.kernel.org, Song Liu , Yonghong Song , John Fastabend , Peter Zijlstra , Thomas Gleixner , "Borislav Petkov (AMD)" , Ingo Molnar , Andy Lutomirski Subject: Re: [PATCH 7/7] man2: Add uretprobe syscall page Message-ID: References: <20240421194206.1010934-1-jolsa@kernel.org> <20240421194206.1010934-8-jolsa@kernel.org> <20240423000729.f1d58443100c3994afca0a7f@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240423000729.f1d58443100c3994afca0a7f@kernel.org> On Tue, Apr 23, 2024 at 12:07:29AM +0900, Masami Hiramatsu wrote: > On Sun, 21 Apr 2024 21:42:06 +0200 > Jiri Olsa wrote: > > > Adding man page for new uretprobe syscall. > > > > Signed-off-by: Jiri Olsa > > --- > > man2/uretprobe.2 | 40 ++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 40 insertions(+) > > create mode 100644 man2/uretprobe.2 > > > > diff --git a/man2/uretprobe.2 b/man2/uretprobe.2 > > new file mode 100644 > > index 000000000000..c0343a88bb57 > > --- /dev/null > > +++ b/man2/uretprobe.2 > > @@ -0,0 +1,40 @@ > > +.\" Copyright (C) 2024, Jiri Olsa > > +.\" > > +.\" SPDX-License-Identifier: Linux-man-pages-copyleft > > +.\" > > +.TH uretprobe 2 (date) "Linux man-pages (unreleased)" > > +.SH NAME > > +uretprobe \- execute pending return uprobes > > +.SH SYNOPSIS > > +.nf > > +.B int uretprobe(void) > > +.fi > > +.SH DESCRIPTION > > +On x86_64 architecture the kernel is using uretprobe syscall to trigger > > +uprobe return probe consumers instead of using standard breakpoint instruction. > > +The reason is that it's much faster to do syscall than breakpoint trap > > +on x86_64 architecture. > > Do we specify the supported architecture as this? Currently it is supported > only on x86-64, but it could be extended later, right? yes, that's the idea, but I can't really speak other than x86 ;-) so not sure abour other archs details > > This should be just noted as NOTES. Something like "This syscall is initially > introduced on x86-64 because a syscall is faster than a breakpoint trap on it. > But this will be extended to the architectures whose syscall is faster than > breakpoint trap." 's/will be extended/might be will be extended/' seems better to me, other than that it looks ok thanks, jirka > > Thank you, > > > + > > +The uretprobe syscall is not supposed to be called directly by user, it's allowed > > +to be invoked only through user space trampoline provided by kernel. > > +When called from outside of this trampoline, the calling process will receive > > +.BR SIGILL . > > + > > +.SH RETURN VALUE > > +.BR uretprobe() > > +return value is specific for given architecture. > > + > > +.SH VERSIONS > > +This syscall is not specified in POSIX, > > +and details of its behavior vary across systems. > > +.SH STANDARDS > > +None. > > +.SH NOTES > > +.BR uretprobe() > > +exists only to allow the invocation of return uprobe consumers. > > +It should > > +.B never > > +be called directly. > > +Details of the arguments (if any) passed to > > +.BR uretprobe () > > +and the return value are specific for given architecture. > > -- > > 2.44.0 > > > > > -- > Masami Hiramatsu (Google)