Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp121498lqm; Mon, 10 Jun 2024 15:05:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJzrp+KVb1oJ5uq1zUsAssiJUtYmZfnBOzI6yRxbML4DI+GXN0V8b9fLZZ4fsMDFZziTMhr+8VbSTRE22u8XWCR+Jh6lmQDEMNINUNSw== X-Google-Smtp-Source: AGHT+IEsz0QcdwmzxRKIH8ULW7WQcXGPGoQw1I1DnoCXiYdp3ZZVD+w0zN4M2UY9emG7Te8ozBnV X-Received: by 2002:a05:6a20:244d:b0:1b8:2211:b7dd with SMTP id adf61e73a8af0-1b82211b8fcmr3358941637.30.1718057137733; Mon, 10 Jun 2024 15:05:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718057137; cv=pass; d=google.com; s=arc-20160816; b=j4IM1rZsIw+lE4Hauo0Y5qGnfuQEQQIzS+4oJkUvAYkFIVHkbk3RSgKv5CYXvkATgo 8whDaXbLb5MguDVtjOzejiJYS+s6iZYKjv2810E/cOJ+Gc48lhNz3LReSBL1ZQXA0xh9 PvNiJ57dsqIz7FVGE5Pg1nARq829uGOt/qbKr/zO1NzKfes84YGknnbQc7s4x+9vRRlS npeWtP/aZsUPoN7kh8FTWPlhrwG9R1OBKUx9eCwpr8wYhD//ColVZU4vwZreHfEeUyXt 2GDIZiIZbiKEjI1L9YH7soZRfhsjMNqnQweCST8UVGc/QXPgzp3wBUcOFWIIEHPlLNt/ SnLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=IBpu5Bx6CUUEofoPrOwdBm/7evD8OYiqmQtEykDvmgk=; fh=2dAi7si8Z+XN5ZyLSTvXSAWP46xa+cehGwk27I2ZBig=; b=GNmQDIxqRZHNdxXK3oquOzv6mwKQdRO95CZKHOLrXPvLHfU3ivt9AX9WMepy6aLtKe R+/ELUkqJetV5Jf/P80pLqY5KtnsDIk33WnBXFD0x0jb7c2W9WPr39w2GT09QInYUfFU 2xaX3Ogbo4ct8WoNaosQlb66WyJ/nLEoffWmBKvX8QZ4K5sTQVGdBUnj5ThK6+W/KoH5 qxuBcp36871qi3rEhZLg2S8TiWEIjNhVPaLgYXl+88JSUUf6f/27XqmVnjVkjLCtLCq/ HkK3oWUdLNno+S3mkyoFE1fasQNgA603iLrWcW/jMAuhwz7+Fr+ROyc19m4DGpAqd2dK TqFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P2AXnLZX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208980-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2760ae41si4144492a12.548.2024.06.10.15.05.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 15:05:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208980-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P2AXnLZX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-208980-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 230DB2820E9 for ; Mon, 10 Jun 2024 22:05:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3653C14F9E7; Mon, 10 Jun 2024 22:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="P2AXnLZX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4834339FD9; Mon, 10 Jun 2024 22:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718057129; cv=none; b=n2fcAI21fHT3wmGaOR9doK4EdLXBdyqAWsTGFx+er5FDP+VBtC50z/+S+ogUnHSuSpmpC+eOChRAwlwwqmlLSbJTXIBZQ9x4lOowt7kH0l/WiuNn5f/EJjWDjP8wmKp3t/0MpA/hZUC8DCwOeUifPEW+QkHJGg+Gznn+B7nl5Ak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718057129; c=relaxed/simple; bh=Dd+yBPaESTKQx9vEdcOxtFwciiZjEqNGYLDlRuD6KxQ=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=NQpQ6JWtWUVEBMj+fGtTDNE6Ui3atH2nviZnNdpJogz3VfxxXSE43IltH7M5n0vNsmjmgOaSLI+ZEbgvgdGqd4+p2DGfjMxE9/8h2Dylh5yxtOpo8iIx1Z9mxtQj+U21CVYj5rYL9eYpAsln6MhRIG9qSTOtojDu2AjMTwAZJRk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=P2AXnLZX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2498C32789; Mon, 10 Jun 2024 22:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718057128; bh=Dd+yBPaESTKQx9vEdcOxtFwciiZjEqNGYLDlRuD6KxQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P2AXnLZXOC5I2okLMJo1JIIFgI5VKbiGE1fFfaYlRtPtwd+nbLx07lh/QU1pruKH0 2SGZyzgTR52o6BOHLZQexSvj+i5B9BETcjYdXRMhR2B6YwRx78aYraqB7WrDe/rUE/ L64gvK3qRsfRzAtRjfLas5eYOJWFAvIYtmZ123lyrIJjwF/CVOwfr4Pkq7vpbLsz36 CZAOkonMoxiEeXvgkqKva38Dqx/ol9yyIj5B6tIiEKopxhGrgw2WRx6m6TqqIFxt3w EMRG+nv6kpNRavLY6wr+hEtnp9pyhcaEnhEUlFGb9OWiWX926T6rWF7EJoDQ5oYM/9 Nx+yPILj3l3Eg== Date: Tue, 11 Jun 2024 07:05:21 +0900 From: Masami Hiramatsu (Google) To: Jiri Olsa 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, linux-man@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 , "Edgecombe, Rick P" , Deepak Gupta Subject: Re: [PATCHv7 bpf-next 2/9] uprobe: Wire up uretprobe system call Message-Id: <20240611070521.82da62690e8865ff498327f7@kernel.org> In-Reply-To: <20240523121149.575616-3-jolsa@kernel.org> References: <20240523121149.575616-1-jolsa@kernel.org> <20240523121149.575616-3-jolsa@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Thu, 23 May 2024 14:11:42 +0200 Jiri Olsa wrote: > Wiring up uretprobe system call, which comes in following changes. > We need to do the wiring before, because the uretprobe implementation > needs the syscall number. > > Note at the moment uretprobe syscall is supported only for native > 64-bit process. > BTW, this does not cleanly applied to probes/for-next, based on 6.10-rc1. Which version did you use? Thank you, > Reviewed-by: Oleg Nesterov > Reviewed-by: Masami Hiramatsu (Google) > Acked-by: Andrii Nakryiko > Signed-off-by: Jiri Olsa > --- > arch/x86/entry/syscalls/syscall_64.tbl | 1 + > include/linux/syscalls.h | 2 ++ > include/uapi/asm-generic/unistd.h | 5 ++++- > kernel/sys_ni.c | 2 ++ > 4 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl > index cc78226ffc35..47dfea0a827c 100644 > --- a/arch/x86/entry/syscalls/syscall_64.tbl > +++ b/arch/x86/entry/syscalls/syscall_64.tbl > @@ -383,6 +383,7 @@ > 459 common lsm_get_self_attr sys_lsm_get_self_attr > 460 common lsm_set_self_attr sys_lsm_set_self_attr > 461 common lsm_list_modules sys_lsm_list_modules > +462 64 uretprobe sys_uretprobe > > # > # Due to a historical design error, certain syscalls are numbered differently > diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h > index e619ac10cd23..5318e0e76799 100644 > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -972,6 +972,8 @@ asmlinkage long sys_lsm_list_modules(u64 *ids, u32 *size, u32 flags); > /* x86 */ > asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); > > +asmlinkage long sys_uretprobe(void); > + > /* pciconfig: alpha, arm, arm64, ia64, sparc */ > asmlinkage long sys_pciconfig_read(unsigned long bus, unsigned long dfn, > unsigned long off, unsigned long len, > diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h > index 75f00965ab15..8a747cd1d735 100644 > --- a/include/uapi/asm-generic/unistd.h > +++ b/include/uapi/asm-generic/unistd.h > @@ -842,8 +842,11 @@ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr) > #define __NR_lsm_list_modules 461 > __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules) > > +#define __NR_uretprobe 462 > +__SYSCALL(__NR_uretprobe, sys_uretprobe) > + > #undef __NR_syscalls > -#define __NR_syscalls 462 > +#define __NR_syscalls 463 > > /* > * 32 bit systems traditionally used different > diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c > index faad00cce269..be6195e0d078 100644 > --- a/kernel/sys_ni.c > +++ b/kernel/sys_ni.c > @@ -391,3 +391,5 @@ COND_SYSCALL(setuid16); > > /* restartable sequence */ > COND_SYSCALL(rseq); > + > +COND_SYSCALL(uretprobe); > -- > 2.45.1 > -- Masami Hiramatsu (Google)