From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 22 16:59:37 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8959C106566B for ; Mon, 22 Nov 2010 16:59:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1008FC1D for ; Mon, 22 Nov 2010 16:59:36 +0000 (UTC) Received: by wwd20 with SMTP id 20so7299428wwd.31 for ; Mon, 22 Nov 2010 08:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Fs8MdaCCbTow/q5/QpOQ3QDb3ROMPdR1W4BbpM9soAA=; b=QWgRdSPgnlnWr64aFhuRRW0TKKlTsvPpcUrN1CwsqYOaNChCzEuVesb7gHmTZi8n05 ozqLLbbaKva/I748/dakpAvIUGVngOqd//ge9A2+TNzvpNQ0AVIYU+/LOpXA7vtHwCa7 LGktw9U/am3YmFqgPPzPTo3fAe5VCm9TG1xC8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=c9GmR9MZ1ws/VGcboql9+0Traw5eDQMV+nZc9uz9HYUMec27DkipU0K8YyD7PiABCI GMphr5MiUSZEV1UBmVxpjKi9lgXLsxOvE3O0IxB+F0kE/sMYkZS7nT+X3MuVlUkpNS+X 5mG8iEAu3jod65oBvqiUA/Hse+UgMVfBfCTYo= MIME-Version: 1.0 Received: by 10.216.82.197 with SMTP id o47mr5958081wee.45.1290445174812; Mon, 22 Nov 2010 08:59:34 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Mon, 22 Nov 2010 08:59:34 -0800 (PST) In-Reply-To: References: Date: Mon, 22 Nov 2010 08:59:34 -0800 X-Google-Sender-Auth: 1enCK5mWe3en3XwMrkDKnuBo-jw Message-ID: From: Garrett Cooper To: Dmitry Krivenok Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: printf doesn't work from kernel modules X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 16:59:37 -0000 On Mon, Nov 22, 2010 at 5:38 AM, Dmitry Krivenok wrote: > Hello Hackers, > Recently I installed 8.1 on my laptop and recompiled the kernel. > The system works fine, but I have a strange problem with my own > trivial kernel module. > I noticed that printf function doesn't produce any output (according to > dmesg) if I call it from a module. Note, that the same module works > perfectly on another 8.1 and CURRENT systems. Moreover, I added > debug message (printf ("Bla bla bla\n");) =A0in my kernel and found that > it works fine (i.e. works if compiled directly in kernel, but doesn't wor= k > from module). Same effect with stock 8.1 kernel. > > I see the same problem with examples in /usr/share/examples/kld. > > I don't believe this is a real problem in FreeBSD. I'm sure this is some > kind of configuration issue, but I cannot understand what exactly is wron= g. > > What could cause such behaviour? > Any ideas? Which example did you try and run (it looks like the dyn_sysctl test would be a good one to try)? -Garrett