From owner-freebsd-questions@freebsd.org Mon Nov 5 07:15:53 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67F0110FAA7B for ; Mon, 5 Nov 2018 07:15:53 +0000 (UTC) (envelope-from moh.aghamir@gmail.com) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AABA672E1F for ; Mon, 5 Nov 2018 07:15:52 +0000 (UTC) (envelope-from moh.aghamir@gmail.com) Received: by mail-ot1-x32c.google.com with SMTP id f24so7051857otl.5 for ; Sun, 04 Nov 2018 23:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/sT7smKqkjlKr230DH6xCl8JDmlH6jzpwPqaYfZ2d+Y=; b=JSmhx2opkinPqF01fb9T4bJlTwhWEAHEWB5gkAn00zxiQohfmo5s6nzDnBFDxEncYs oc97bBx4TZLGNKYSY48KO4Ow0jxnGWN7b8dJbeIH1C7OsKUhZzM7WEj2fIupHkb2NFpC LSLxeyKGK0BuBrYxunI5+bJ3EkJwqTrjrUILTs3cIujt4CeyqPvV/Hb8keysNtLaLM2u WvTp1becMujOgtL5dKeCcN4aVsDyZ5U0Ts9RzZViDo2EPVIp7a3XrAAIS2TMKY9sjmy5 DWZrtWUYBZ1vLrMZ3EjZyD5GT2o1ELHw6KNlM2USRgKK5H9ndwaz2e52z4iPmZhgImYw YPOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/sT7smKqkjlKr230DH6xCl8JDmlH6jzpwPqaYfZ2d+Y=; b=F0PB/k42ACUA+jcE9SePbZvFHRGzWIUXnJJPDxjBoqRHIONdFTv2RRjtNVED8CUkmB LwcadJL4L+e/gSEPOqKvz5PxNSiV2ZNBs9v5UJxARuLPmMp9J3S5IuY+dGuYGmgF1ONX eJ5vSkmOr+QU0YTbzp5SuMujJ8m+339jaSc382os5iNHvo/0Mq3xe2oOTiwFD7E/cN+V IMHQMBqXuY0E3q13YdPiXQFHnP3dWxB2WOr92q0XmMbNnaraM6hvulIyPv7J7qFc+Klx /IPzgZPlGeWHnnSaEyfnG8kb0/LspnaAaVFLS2zjjaSavuYoCi7cwK+vrOjPHojHhjYs JhMw== X-Gm-Message-State: AGRZ1gIFCHizkUq8DrvnV3X9El3XMcrl9IBXGChUeE1ORLBFvmunMB8Y axdH86Nxm1lIG107RnOZsooxihSjVw0QpnRj6tErZg== X-Google-Smtp-Source: AJdET5dbkOz3wdR4jBwQg2arbqFSvnSqQo4gf8ETCQUdLO5jyqlzUn32fK0HrFQEB/z5CQvO3UU1nmk8588fB/1K5Dk= X-Received: by 2002:a9d:38b9:: with SMTP id p54mr13137035otc.303.1541402151603; Sun, 04 Nov 2018 23:15:51 -0800 (PST) MIME-Version: 1.0 From: mohammad aghamir Date: Mon, 5 Nov 2018 10:45:40 +0330 Message-ID: Subject: Kernel mode processes To: freebsd-questions@freebsd.org X-Rspamd-Queue-Id: AABA672E1F X-Spamd-Result: default: False [-1.86 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.68)[-0.680,0]; R_DKIM_ALLOW(-0.20)[gmail.com]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.27)[ipnet: 2607:f8b0::/32(-0.09), asn: 15169(-1.22), country: US(-0.06)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[c.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_SPAM_SHORT(0.10)[0.102,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2018 07:15:53 -0000 I want to find the execution context of each process by looking at it proc struct . There is a solution in Linux which solve this by looking at thread_struct->sp(kernel stack pointer). Is there a similar solution or even better to finding process execution context? P.S.: I'm really sorry if this question is "how to" and if not considering as technical one. I'm really sticking to this and not found any solutions. I'm really appreciated if you guide me.