From patchwork Fri Jul 12 13:52:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 13731815 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 D0D9026AFF; Fri, 12 Jul 2024 13:52:46 +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=1720792367; cv=none; b=LmIr7mznD0l8NVpEYYMUMlOdOiYz3faqYo7W3EJpQeW+7FUJohp6LoOsRPVCXheJ5NNDSs/Gc2LCWr6yZpGzX3LTubKp1Uh49tCU4XSNJmjm45co1UTtLwK0RMFf+zAgFmDd8CrUbPEnag06bzFAYU7B3uMNh/9W0T3JrRPkXsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720792367; c=relaxed/simple; bh=1cII6ySGlnmVXZAUPI/X1maOWXfNSd9jw8IGVPQERh8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B01CS0x2Z1Zmctg9vkHb7jie2ly9IW3ytTRdIgN7rqTfttFiDJPKGFBXIeyKPOZ3XC17uVX+899bext1ZSPVNXA3TIAPY58wCjO7ZbJKfpz5OVtFv5A2sQ1Y7x5rHpfrwQao3sxByl/kU0YbVtdrkTHKhNpzwCFwRHrogU5XGDs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E1u5kVD9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E1u5kVD9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A259C32782; Fri, 12 Jul 2024 13:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720792366; bh=1cII6ySGlnmVXZAUPI/X1maOWXfNSd9jw8IGVPQERh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E1u5kVD9o6HQmKdlpkMrvmbvXY47MZjiYCucG9zMpLJYIsrrZPl9TCubkwI9F+CTV JCroOX7rjXMH0OZ6s/eSAT39S1H8nePp8ZtiLmrFQcEQ186qRUsQcVoYvFdcgbbb2e 8e/oY0J6kNkHTA23xHiKLWGKl2G3dR67dBwk0WFLt0OI9UGTEW2pZvYXUW0mBqN2iP GLDq6t46iE52z3DvCeKFgRFsPLbRJAKB93CWQHxQLAchlypy0nuGoiaSTjGJGU8wCG Ge80h3UayiXAop3rFZO0UGwzvXGXKnX5XbeRKwn8Agf+efpF5i92vfkTLQxrwtXSFN XNAr0KNM+IUwg== From: Jiri Olsa To: Steven Rostedt , Masami Hiramatsu , Oleg Nesterov , Peter Zijlstra , Andrii Nakryiko , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, bpf@vger.kernel.org, Thomas Gleixner , "Borislav Petkov (AMD)" , Ingo Molnar , Andy Lutomirski , Deepak Gupta , Stephen Rothwell Subject: [PATCH 1/2] uprobe: Change uretprobe syscall scope and number Date: Fri, 12 Jul 2024 15:52:27 +0200 Message-ID: <20240712135228.1619332-2-jolsa@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712135228.1619332-1-jolsa@kernel.org> References: <20240712135228.1619332-1-jolsa@kernel.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After discussing with Arnd [1] it's preferable to change uretprobe syscall number to 467 to omit the merge conflict with xattrat syscalls. Also changing the ABI to 'common' which will ease up the global scripts/syscall.tbl management. One consequence is we generate uretprobe syscall numbers for ABIs that do not support uretprobe syscall, but the syscall still returns -ENOSYS when called in that ABI. [1] https://lore.kernel.org/lkml/784a34e5-4654-44c9-9c07-f9f4ffd952a0@app.fastmail.com/ Fixes: 190fec72df4a ("uprobe: Wire up uretprobe system call") Suggested-by: Arnd Bergmann Signed-off-by: Jiri Olsa Acked-by: Andrii Nakryiko --- arch/x86/entry/syscalls/syscall_64.tbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 6452c2ec469a..dabf1982de6d 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -384,7 +384,7 @@ 460 common lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules 462 common mseal sys_mseal -463 64 uretprobe sys_uretprobe +467 common uretprobe sys_uretprobe # # Due to a historical design error, certain syscalls are numbered differently From patchwork Fri Jul 12 13:52:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Olsa X-Patchwork-Id: 13731816 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 A795226AFF; Fri, 12 Jul 2024 13:52:58 +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=1720792378; cv=none; b=uoz0BIccXECNQ+LKwx5BBBA6MdVUYjSd6ESOiVCwXj7iwl6+VNmFZeHWBLlwpawvAb/0pWErNsMLjGdO2BIl0AEEnqGBn1ovtWWXKrpsIDRzyFS7owxK/llET4Rs8eox0+I/Uh09VwQAkwbktvA9MNEGo36I692WdXtoUG1hbsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720792378; c=relaxed/simple; bh=R9G9wwPftutPeaaExTJ6lpEMwJ9MWKMZZnuGnq3/zxk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NcgRcZCTK2C7r+7phf1YHv0FJFYQJg1oI/H8ANS6KJqrhNsTQHGCBvbfzSqh7Ix3gQdUJ2LX/9gMUfA3tQ7SGn36Fw5OmMpKjWn5T8Ngu+P83YGzv0Lp/cwhLgszefLLSIOiv+8b9eJHJ1DQH9KKDyzIOwi+23LNO5VVWxMLXSg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l7/JyyFG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l7/JyyFG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDAF3C32782; Fri, 12 Jul 2024 13:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720792378; bh=R9G9wwPftutPeaaExTJ6lpEMwJ9MWKMZZnuGnq3/zxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l7/JyyFGRzRJk6RiHso3Yw8FRyAiuQtYOWdEVk4e0EblvsrsT7DNWkQ0yQR1sW4wm 7vlJZmN6CWDXj0hA5w7X25WMWt/p2AWUChOtYW9tJfGNROFTRTor1uudfwCzLBgeLp +JIPsataZdsdeeArLNAQS2OASb6d/j7oLd4ogtYWhXj0gmUZv6dyYiy8FPbc6AoX1K VsdId2oll5FXCvi2rw9DT+px/Ad38i/0nnURMjepA35/sqxmotAdu4TqxnmqLlG94l r95UgJoHaMSMt667314RhybeZ71BbMy94UEhVLOMOnad+V8STICWHaOSQXDMmcywUx kB1GCbtTa58FQ== From: Jiri Olsa To: Steven Rostedt , Masami Hiramatsu , Oleg Nesterov , Peter Zijlstra , Andrii Nakryiko , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, bpf@vger.kernel.org, Thomas Gleixner , "Borislav Petkov (AMD)" , Ingo Molnar , Andy Lutomirski , Deepak Gupta , Stephen Rothwell Subject: [PATCH 2/2] selftests/bpf: Change uretprobe syscall number in uprobe_syscall test Date: Fri, 12 Jul 2024 15:52:28 +0200 Message-ID: <20240712135228.1619332-3-jolsa@kernel.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712135228.1619332-1-jolsa@kernel.org> References: <20240712135228.1619332-1-jolsa@kernel.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Fixing the syscall number value. Fixes: 9e7f74e64ae5 ("selftests/bpf: Add uretprobe syscall call from user space test") Signed-off-by: Jiri Olsa Acked-by: Andrii Nakryiko --- tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c index c8517c8f5313..bd8c75b620c2 100644 --- a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c +++ b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c @@ -216,7 +216,7 @@ static void test_uretprobe_regs_change(void) } #ifndef __NR_uretprobe -#define __NR_uretprobe 463 +#define __NR_uretprobe 467 #endif __naked unsigned long uretprobe_syscall_call_1(void)