From owner-freebsd-hackers@freebsd.org Sat Aug 12 19:42:42 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8CEADC6F93 for ; Sat, 12 Aug 2017 19:42:42 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (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 9CEF16EF67 for ; Sat, 12 Aug 2017 19:42:42 +0000 (UTC) (envelope-from khanzf@gmail.com) Received: by mail-pg0-x22a.google.com with SMTP id y129so27267410pgy.4 for ; Sat, 12 Aug 2017 12:42:42 -0700 (PDT) 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=bB6Fyc/yvlFyww0dTbBc2r4JTVfm76eu+nOPGPKnSB8=; b=I/UsEvTZVRQ6oquvyIAndfdhaBv7GWq8Pc1uAep3I7zV/6W0eLseWzmt9p1cOjiLmW NDLwskm06AbgiSaqZNEUp3sjkd9mTSY2UQQSVZA/qY9r+x89jGfcVr76fzoZVYpuIdgT OOOnVZgGPRDsAmtBZ7A1zGy5dkuncSf6cfFCHDBUgkn1ydkl2aS0eBqtEzFosxwk8I4t ddHE76DNz+waY44Xv2OT7LEa96clO4V+/pYg/mOtpZkIJUBUhoMNu0Xcbb4Jkcy1F4M7 L5ZJ7ZKhZfQfhs2Qc/B8LkMZCMUWJFC+k0H1kc1rBxjQO2oOyEyrlk6srSWqQiFoIRuq puXA== 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=bB6Fyc/yvlFyww0dTbBc2r4JTVfm76eu+nOPGPKnSB8=; b=awHIjbauIzrkkr55juSKLPpPewRoxePNb5rwcQge3RtcMhxgtxQUjhxng6H11Dh/nk j8t23gD3VD5EZq4ttyjs4x4tlYwb0AQdS8GW2aaBJNL/CxGeND9wxbUWgvPUZNrkDT5x XIGi1d6xFheB6+bv9LMjQlrPUm8ypgJf815ZvaBTLw6pPW1EyzWWrcy1OYXZq7qDKAKQ OAJfoq33TT8/4+cHYtMp+LnW5UU8WwrcafU7/M3dxojUJKQPc8Rrjvu9Wt3czSHJcdKK l5BNcdspUhS0uRYXPBwrhjQHVQWuRYMQJUAF+CbTgSDAgLk4MkPtU/g+AlCD2yR8lhO6 yeNw== X-Gm-Message-State: AHYfb5hPL4G9Kf9fY5EuQJrqv3SFKGIWtW0lZK9s27Y6v0qBcxPArwi2 43KFoLFbTx0RsU3iFD8tg9fW8rO/G7TSG+E= X-Received: by 10.98.138.22 with SMTP id y22mr20485802pfd.9.1502566961831; Sat, 12 Aug 2017 12:42:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.183.208 with HTTP; Sat, 12 Aug 2017 12:42:21 -0700 (PDT) From: Farhan Khan Date: Sat, 12 Aug 2017 15:42:21 -0400 Message-ID: Subject: Monitor kernel variable with ddb(4) To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2017 19:42:42 -0000 Hi all, I am trying to figure out where a net80211's vap flags are modified. I see that memory is originally allocated here: http://src.illumos.org/source/xref/freebsd-head/sys/net/if.c#445. However, I cannot figure out where the ifp->if_flags and if->if_drv_flags are ever modified in the kernel. Someone suggested using ddb(4), so I entered the live debugger using sysctl debug.kdb.enter=1 I then set a breakpoint at if_alloc. However, I cannot seem to figure out the next steps to monitor where the ifp->if_flags or if->if_drv_flags are updated. Full explanation - My kernel module is immediately unloading, but I am not certain why. I traced it back in the ieee80211 code to those flags, but not sure where they are updated. Any ideas? Thank you! -- Farhan Khan PGP Fingerprint: 782F 342B 5B08 0D2F F4E8 82C3 FFA1 CAE1 6536 51CA