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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EFECC433EF for ; Mon, 18 Oct 2021 08:48:40 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 229E360F8F for ; Mon, 18 Oct 2021 08:48:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 229E360F8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mcOJs-0000wp-T0; Mon, 18 Oct 2021 04:48:32 -0400 Received: from mail.kernel.org ([198.145.29.99]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mcOJq-0000wE-2L for kernelnewbies@kernelnewbies.org; Mon, 18 Oct 2021 04:48:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE5A360F02; Mon, 18 Oct 2021 08:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634546908; bh=2dm5Ijkya2CLkLIjx7kqKKuqwSeDj7YfNf+Ugr1sE1Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p7cH8MGOxXrNNxRHyjfVe+rapoMxiG3DPUJ4YzFKPAIw4ycAhKbERTmMmbr9XuE92 eg5URdlYKJx1cvZ2ZWdjXia2KjHny/bLmI9pfeDRA1BQLG5ZXBghp8Bx1jvqGoszN9 iCJZtZ+YkPcw2c1S+ize4sIzjtFqlpyYOrT8M4R8= Date: Mon, 18 Oct 2021 10:48:25 +0200 From: Greg KH To: Dongliang Mu Subject: Re: Any tracing mechanism can track the executed instructions of a user process in the kernel? Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: Pavel Skripkin , FMDF , linux-kernel , Dan Carpenter , kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Mon, Oct 18, 2021 at 04:41:14PM +0800, Dongliang Mu wrote: > On Mon, Oct 18, 2021 at 4:07 PM FMDF wrote: > > > > On Mon, 18 Oct 2021, 04:46 Dongliang Mu, wrote: > >> > >> Hi all, > >> > >> I am writing to kindly ask one question: is there any tracing > >> mechanism in Linux kernel that can trace all the executed instructions > >> of a user process? If this user process is run on different > >> processors, traces of this process on different processors should be > >> also recorded. > > > > > > You've not explained in detail what is the purpose of the tracing that you want to do. Missing this information I can only provide you a list of links to various tools and methods. Take a look by yourself and try to figure out what is better suited for your needs... > > I want to log all the executed instructions of a user process (e.g., > poc.c in syzkaller) in the kernel mode and then would like to leverage > backward analysis to capture the root cause of kernel panic/crash. > > Therefore, I need the instruction-level tracing mechanisms or tools. Then use a userspace debugger like gdb, that is what they are designed for. good luck! greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies