From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 22 20:58:51 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 463CFB7C for ; Sun, 22 Mar 2015 20:58:51 +0000 (UTC) Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 057A03E8 for ; Sun, 22 Mar 2015 20:58:50 +0000 (UTC) Received: by ykcn8 with SMTP id n8so63504045ykc.3 for ; Sun, 22 Mar 2015 13:58:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=v8kGrE9is0tYmip61Nr/RoMSz/DmQKc4qS/ZgYgkMnA=; b=JHhlczbWjZDUjtRdTX3Vm8oC1nIbpdunJWlNFg9YAqpYz6u+YdaSrPpe4Cs0QA4uNd KSe9HUJcCY7GkoVGxSHW5omABjEDVdNO0k67C6O0wGWNU20wl+j0/iXWMf13BNdGO56l Xr/x3g0wrcUArCU6M4kcmY4Bc997mztNXBTUad9/g1NyfPBS3h/O5YRhEVEoOryL7I3b YcgdR5zxJ+VKb0ynN8FuKU3RJs3N2nvSG7lGvJuA8VG6739g1spCVPnshBgtRVg5Gm8G eAigRTTze2E9+YO7743Bds3XAx4f+uuI9vLmIFIt/RWVMYCwKj4EA49AcfCjr1Oe7VtU XQuQ== X-Gm-Message-State: ALoCoQn+ghoeYphgV7BOTt66+NEkAIvBWu7vBs2F3rEZhWHLT3LvHrnOZXFczeqFxpECBb3rJN8L MIME-Version: 1.0 X-Received: by 10.236.0.193 with SMTP id 41mr93295437yhb.146.1427057923089; Sun, 22 Mar 2015 13:58:43 -0700 (PDT) Received: by 10.170.104.86 with HTTP; Sun, 22 Mar 2015 13:58:43 -0700 (PDT) In-Reply-To: References: <20150321220246.GE14650@dft-labs.eu> <20150321232622.GF14650@dft-labs.eu> Date: Sun, 22 Mar 2015 21:58:43 +0100 Message-ID: Subject: Re: How to traverse kernel threads? From: Oliver Pinter To: Benjamin Kaduk Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , Mateusz Guzik , Yue Chen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 20:58:51 -0000 Probably take a look at DDB: https://github.com/HardenedBSD/hardenedBSD/blob/hardened/current/master/sys/ddb/db_thread.c#L88 On Sun, Mar 22, 2015 at 9:45 PM, Benjamin Kaduk wrote: > On Sat, 21 Mar 2015, Mateusz Guzik wrote: > >> But once more the real question is what are you trying to do. I don't >> see any use for stack info of random threads. > > One thing that comes to mind is for live binary-patching the kernel, to > confirm that no thread is currently in a routine which would be patched. > > -Ben > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"