From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52D4BC32792 for ; Sat, 20 Aug 2022 01:48:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244517AbiHTBs3 (ORCPT ); Fri, 19 Aug 2022 21:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbiHTBs0 (ORCPT ); Fri, 19 Aug 2022 21:48:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE59F140BA for ; Fri, 19 Aug 2022 18:48:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 564F661943 for ; Sat, 20 Aug 2022 01:48:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A78CAC433C1; Sat, 20 Aug 2022 01:48:19 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oPDbE-004uU4-2f; Fri, 19 Aug 2022 21:48:32 -0400 Message-ID: <20220820014035.531145719@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 19 Aug 2022 21:40:35 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Masami Hiramatsu , Tzvetomir Stoyanov , Tom Zanussi Subject: [PATCH 0/4] tracing/eprobes: Fixes for unexpected arguments Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While using eprobes, I decided to entertain the thougth of what would happen if I tried to get the instruction pointer "%rip", knowing full well that eprobes do not have access to pt_regs. Well, I found out, and it led me down a rabbit hole of bugs. This series fixes those bugs, by not allowing register access for eprobes, and also filling the holes of @symbol and @immediate argument. Steven Rostedt (Google) (4): tracing/eprobes: Do not allow eprobes to use $stack, or % for regs tracing/eprobes: Do not hardcode $comm as a string tracing/eprobes: Fix reading of string fields tracing/eprobes: Have event probes be consistent with kprobes and uprobes ---- kernel/trace/trace_eprobe.c | 88 +++++++++++++++++++++++++++++++++++++++++---- kernel/trace/trace_probe.c | 26 ++++++++------ 2 files changed, 98 insertions(+), 16 deletions(-)