From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 05:30:36 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78C8716A4B3 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 05:30:36 -0700 (PDT) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1C4744003 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 05:30:34 -0700 (PDT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.12.9/8.12.9) with ESMTP id h8SCUUpj078128; Sun, 28 Sep 2003 16:30:31 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Sun, 28 Sep 2003 16:30:30 +0400 (MSD) From: Dmitry Morozovsky <marck@rinet.ru> To: David Gilbert <dgilbert@dclg.ca> In-Reply-To: <16245.45901.608214.604029@canoe.dclg.ca> Message-ID: <20030928162847.B77116@woozle.rinet.ru> References: <16244.53594.942762.784390@canoe.dclg.ca> <20030927115306.R34638@woozle.rinet.ru> <16245.45901.608214.604029@canoe.dclg.ca> X-NCC-RegID: ru.rinet MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: USB keyboard thoughts. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Sep 2003 12:30:36 -0000 On Sat, 27 Sep 2003, David Gilbert wrote: DG> Dmitry> On Fri, 26 Sep 2003, David Gilbert wrote: DG> DG> I acquired my first motherboard that does not have ps/2 keyboard DG> DG> and mouse connectors on it this week. It's a funny thing DG> DG> ... because a keyboard connector seems to be all it doesn't have. DG> DG> It has 6 ide channels, digital audio, firewire and 6 USB ports. DG> DG> Dmitry> Out of curiosity, who is the vendor and what is model no? DG> DG> I was going for cheap. I found a Belkin keyboard at the local shop DG> for $28 Cdn. I don't remember a model number on it, but other than DG> having both USB and ps/2 connectors, it was a fairly normal keyboard. Ughm, I meant mobo vendor/model ;-) DG> Actually... it sucks in one way. I'm a fairly quick touch typist, but DG> I've never trained on an underwood. This belkin seems to simulate the DG> underwood in that if you arn't careful enough to raise your fingers DG> off a key before pressing the next, you get extra characters on the DG> screen. PR kern/57273 ? Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 07:22:37 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFC4E16A4B3 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 07:22:37 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A32544027 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 07:22:36 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p1/8.12.9) with ESMTP id h8SEMWAD064128; Sun, 28 Sep 2003 08:22:33 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 Sep 2003 08:21:57 -0600 (MDT) Message-Id: <20030928.082157.55722541.imp@bsdimp.com> To: masta@wifibsd.org From: "M. Warner Losh" <imp@bsdimp.com> In-Reply-To: <10569.12.238.113.137.1064709820.squirrel@mail.yazzy.org> References: <10569.12.238.113.137.1064709820.squirrel@mail.yazzy.org> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: compressed kernel modules X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Sep 2003 14:22:37 -0000 In message: <10569.12.238.113.137.1064709820.squirrel@mail.yazzy.org> "masta" <masta@wifibsd.org> writes: : Does the -CURRENT kldload(8), and/or loader(8), understand how to : decompress gzip/bzip kernel modules? I'm assuming it is possible, but I : haven't seen that done in the wild, or documented. Not really. The boot loader loader can. Without help, kldload can't. However, I have a small script that does a simple: #!/bin/sh cp /modules/$1.ko.gz /tmp gunzip /tmp/$1.ko.gz kldload /tmp/$1.ko rm /tmp/$1.ko Warner From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 09:06:24 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FBE616A4B3 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 09:06:24 -0700 (PDT) Received: from Shenton.org (23.ebbed1.client.atlantech.net [209.190.235.35]) by mx1.FreeBSD.org (Postfix) with SMTP id B109D43FF3 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 09:06:22 -0700 (PDT) (envelope-from chris@Shenton.Org) Received: (qmail 22238 invoked by uid 1001); 28 Sep 2003 16:08:40 -0000 To: lemon <lemon@aldigital.co.uk> References: <20030924123003.B23100@tikitechnologies.com> <3F72F919.9040104@aldigital.co.uk> From: Chris Shenton <chris@shenton.org> Date: Sun, 28 Sep 2003 12:08:40 -0400 In-Reply-To: <3F72F919.9040104@aldigital.co.uk> (lemon@aldigital.co.uk's message of "Thu, 25 Sep 2003 15:18:01 +0100") Message-ID: <86vfrchp4n.fsf@PECTOPAH.shenton.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-hackers@freebsd.org cc: Clifton Royston <cliftonr@lava.net> Subject: Re: VIA EPIA-M10000 board "just works" with FreeBSD 4.8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Sep 2003 16:06:24 -0000 lemon <lemon@aldigital.co.uk> writes: > XFree86 is ok under x11-servers/XFree86-4-Server-snap's via code. Excellent tip, thanks! I have been running my EPIA 6000 on CURRENT with an add-on ATI PCI video card because I couldn't get the built-in one to work with the standard XFree86 load. Thanks to your point, I'm now running the XFree snapshot on the built-in CastleRock. I had to add into my kernel: options INET6 #IPv6 communications protocols to get X11 to work -- it complained about inability to open an IPv6 socket otherwise. One oddity: the text is noticeably smeared on my LCD versus text when using the ATI card. I'm running at the LCD's native 1280x1024 resolution. Same cable as when I used the ATI card. Poor analog circuitry? > sound works too, y'normal pcm(4). Hmmm, I see this in dmesg at boot: pci0: <multimedia, audio> at device 17.5 (no driver attached) but there's no /dev/pcm devices. There's also no /dev/MAKEDEV in FreeBSD-5.x so I'm confused about how I talk to this audio chip. Any clues? FWIW, I'm running diskless but don't see that should be a problem. Thanks. PS: Sorry if this is a bit off topic, 6000 vs 10000, but I figured the issues would be the same. From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 10:48:06 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E907316A4B3 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 10:48:06 -0700 (PDT) Received: from Shenton.org (23.ebbed1.client.atlantech.net [209.190.235.35]) by mx1.FreeBSD.org (Postfix) with SMTP id BAB474401A for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 10:48:05 -0700 (PDT) (envelope-from chris@Shenton.Org) Received: (qmail 47395 invoked by uid 1001); 28 Sep 2003 17:50:21 -0000 To: lemon <lemon@aldigital.co.uk> References: <20030924123003.B23100@tikitechnologies.com> <3F72F919.9040104@aldigital.co.uk> <86vfrchp4n.fsf@PECTOPAH.shenton.org> From: Chris Shenton <chris@shenton.org> Date: Sun, 28 Sep 2003 13:50:21 -0400 In-Reply-To: <86vfrchp4n.fsf@PECTOPAH.shenton.org> (Chris Shenton's message of "Sun, 28 Sep 2003 12:08:40 -0400") Message-ID: <86vfrc6bvm.fsf@PECTOPAH.shenton.org> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-hackers@freebsd.org cc: Clifton Royston <cliftonr@lava.net> Subject: Re: VIA EPIA-M10000 board "just works" with FreeBSD 4.8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Sep 2003 17:48:07 -0000 Chris Shenton <chris@shenton.org> writes: lemon> sound works too, y'normal pcm(4). > Hmmm, I see this in dmesg at boot: > > pci0: <multimedia, audio> at device 17.5 (no driver attached) > > but there's no /dev/pcm devices. There's also no /dev/MAKEDEV in > FreeBSD-5.x so I'm confused about how I talk to this audio chip. I'm an idiot, I didn't have "pcm" in my kernel. :-( I added "device pcm" to my kernel and now devices like dsp0[W].[0-5] and audio0.[0-5] appear in /dev and I've got audio. From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 15:14:32 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 389AD16A4B3 for <hackers@freebsd.org>; Sun, 28 Sep 2003 15:14:32 -0700 (PDT) Received: from pop016.verizon.net (pop016pub.verizon.net [206.46.170.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32A4B43FE0 for <hackers@freebsd.org>; Sun, 28 Sep 2003 15:14:31 -0700 (PDT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net ([138.89.158.162]) by pop016.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030928221429.TMFM10125.pop016.verizon.net@bellatlantic.net> for <hackers@freebsd.org>; Sun, 28 Sep 2003 17:14:29 -0500 Sender: root@FreeBSD.ORG Message-ID: <3F775D41.DF780001@bellatlantic.net> Date: Sun, 28 Sep 2003 18:14:25 -0400 From: Sergey Babkin <babkin@bellatlantic.net> X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop016.verizon.net from [138.89.158.162] at Sun, 28 Sep 2003 17:14:29 -0500 Subject: has anyone installed 5.1 from a SCSI CD? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 28 Sep 2003 22:14:32 -0000 Hi all, I've got the compiler on my -current partition hosed (I did a make install at a time when it was unstable, and now it dies when recompiling -current), so I decided to re-base it with 5.1. That's when I discovered an unpleasent issue: it could not mount SCSI CD-ROM! The devices (I have two of them) show up fine in dmesg and the entries in /dev are created fine but then when I try to mount it, it says that the operation is not supported by the device! Huh? Someone has been playing too much with the CD driver. BTW, I have another related issue too: since at least 4.7 all the disk device nodes have charcater device entries in /dev. That's very, very wrong. Even though there may be no difference any more between the charcater and block drivers, the type of device node still conveys the information about device types to the applications. One case in point being a viewer application (if anyone is interested, http://nac.sf.net ) which must handle the sequential and random-access devices differently: for the random-access device it can page in the data for viewing on demand (and discard when some part is not viewed, since it can be read again easily), with possibility to jump to a random address, while for a sequential device it must read the data sequentially to a local buffer and never discard data from that buffer. It works fine on every system except the recent FreeBSD :-( -SB From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 22:41:56 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A32316A4B3 for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 22:41:56 -0700 (PDT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id C295E4400D for <freebsd-hackers@freebsd.org>; Sun, 28 Sep 2003 22:41:55 -0700 (PDT) (envelope-from vova@sw.ru) Received: from localhost ([127.0.0.1]) by vbook.fbsd.ru with esmtp (Exim 4.22) id 1A3iNd-0006Jg-Kn for freebsd-hackers@freebsd.org; Mon, 29 Sep 2003 00:42:57 +0400 From: "Vladimir B. Grebenschikov" <vova@sw.ru> To: freebsd-hackers@freebsd.org Content-Type: text/plain Organization: SWsoft Inc. Message-Id: <1064781765.891.38.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 29 Sep 2003 00:42:46 +0400 Content-Transfer-Encoding: 7bit Subject: nmdm question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 05:41:56 -0000 Hi I have try to use nmdm to make short circuit between pppd and ssh (both need tty in my case). All is ok with pppd, but ssh client wait in ioctl(): # ps alxp 24269 UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND 207 24269 24267 0 6 0 3352 2000 ttywai S+ p4 0:00.08 ssh -v -v -v -t -i .ssh/id_tun 195.... # strace -p 24269 ioctl(0, TIOCSETAWS ... sshd debug shows: ... debug3: tty_make_modes: 91 1 debug3: tty_make_modes: 92 0 debug3: tty_make_modes: 93 0 debug2: fd 3 setting TCP_NODELAY debug1: Requesting authentication agent forwarding. debug1: Requesting shell. debug1: Entering interactive session. Looks like invalid support for that ioctl in nmdm driver ? Any ideas ? -- Vladimir B. Grebenschikov <vova@sw.ru> SWsoft Inc. From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 00:38:47 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1631616A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 00:38:47 -0700 (PDT) Received: from bjpu.edu.cn (egw.bjpu.edu.cn [202.112.78.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id F12BD43FBD for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 00:38:43 -0700 (PDT) (envelope-from liukang@bjpu.edu.cn) Received: (eyou gateway send program); Mon, 29 Sep 2003 15:41:55 +0800 X-EYOU-ORIGINAL-IP: 202.112.78.224 X-EYOU-ENVELOPE-MAILFROM: liukang@bjpu.edu.cn Received: from unknown (HELO lkatschool) (unknown@202.112.78.224) by 202.112.78.77 with ; Mon, 29 Sep 2003 15:41:55 +0800 From: "Kang Liu" <liukang@bjpu.edu.cn> To: <freebsd-hackers@freebsd.org> Date: Mon, 29 Sep 2003 15:35:11 +0800 Message-ID: <004901c3865c$37bf4120$e04e70ca@lkatschool> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: Can not dump on raid dev? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 07:38:47 -0000 Hi, I'm trying to save a crashdump into /var/crash but it fails. Here is my config files: # dmesg | grep amr amr0: <LSILogic MegaRAID> mem 0xf0000000-0xf7ffffff irq 3 at device 0.0 on pci3 amr0: <LSILogic PERC 3/DC> Firmware 1.92, BIOS 3.31, 128MB RAM amrd0: <LSILogic MegaRAID logical drive> on amr0 amrd0: 17278MB (35385344 sectors) RAID 0 (optimal) GEOM: create disk amrd0 dp=0xc7de088c amrd1: <LSILogic MegaRAID logical drive> on amr0 amrd1: 51834MB (106156032 sectors) RAID 0 (optimal) GEOM: create disk amrd1 dp=0xc7de078c ses0 at amr0 bus 0 target 6 lun 0 Mounting root from ufs:/dev/amrd0s1a in rc.conf: dumpdev="/dev/amrd0s1b" dumpdir="/var/crash" in my kernel conf-file: options DDB option DDB_UNATTENDED makeoptions DEBUG=-g # disklabel -r /dev/amrd0 # /dev/amrd0: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 524288 0 4.2BSD 2048 16384 32776 b: 8345024 524288 swap c: 35385344 0 unused 0 0 # "raw" part, don't edit d: 524288 8869312 4.2BSD 2048 16384 32776 e: 524288 9393600 4.2BSD 2048 16384 32776 f: 25467456 9917888 4.2BSD 2048 16384 28552 # cat /etc/fstab |grep amrd0s1b /dev/amrd0s1b none dump sw 0 0 #before I start the test, I run "dumpon -v /dev/amrd0s1b". It seems ok. # dumpon -v /dev/amrd0s1b kernel dumps on /dev/amrd0s1b when the system crashes, it doesn't save any crashdump. I've tried the same config on a machine with IDE disk, the crashdump can be saved. Do I miss something, or the crashdump can not be saved on a raid device? Kang. From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 00:46:26 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FEC516A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 00:46:26 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11A3D4400B for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 00:46:25 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h8T7jfLG005883; Mon, 29 Sep 2003 09:45:43 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: "Kang Liu" <liukang@bjpu.edu.cn> From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> In-Reply-To: Your message of "Mon, 29 Sep 2003 15:35:11 +0800." <004901c3865c$37bf4120$e04e70ca@lkatschool> Date: Mon, 29 Sep 2003 09:45:41 +0200 Message-ID: <5882.1064821541@critter.freebsd.dk> cc: freebsd-hackers@freebsd.org Subject: Re: Can not dump on raid dev? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 07:46:26 -0000 In message <004901c3865c$37bf4120$e04e70ca@lkatschool>, "Kang Liu" writes: >Hi, > I'm trying to save a crashdump into /var/crash but it fails. ># dumpon -v /dev/amrd0s1b >kernel dumps on /dev/amrd0s1b The AMR device driver does not support dumping. A missing check meant that dumpon didn't warn you about this. I have just fixed that. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 00:55:49 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADDCF16A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 00:55:49 -0700 (PDT) Received: from bjpu.edu.cn (egw.bjpu.edu.cn [202.112.78.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3955844015 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 00:55:47 -0700 (PDT) (envelope-from liukang@bjpu.edu.cn) Received: (eyou gateway send program); Mon, 29 Sep 2003 15:59:06 +0800 X-EYOU-ORIGINAL-IP: 202.112.78.224 X-EYOU-ENVELOPE-MAILFROM: liukang@bjpu.edu.cn Received: from unknown (HELO lkatschool) (unknown@202.112.78.224) by 202.112.78.77 with ; Mon, 29 Sep 2003 15:59:06 +0800 From: "Kang Liu" <liukang@bjpu.edu.cn> To: "'Poul-Henning Kamp'" <phk@phk.freebsd.dk> Date: Mon, 29 Sep 2003 15:52:23 +0800 Message-ID: <005201c3865e$9e8f11d0$e04e70ca@lkatschool> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: <264821412.18426@bjpu.edu.cn> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal cc: freebsd-hackers@freebsd.org Subject: RE: Can not dump on raid dev? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 07:55:49 -0000 > -----Original Message----- > From: owner-freebsd-hackers@freebsd.org > [mailto:owner-freebsd-hackers@freebsd.org] On Behalf Of > Poul-Henning Kamp > Sent: Monday, September 29, 2003 3:46 PM > To: Kang Liu > Cc: freebsd-hackers@freebsd.org > Subject: Re: Can not dump on raid dev? > > The AMR device driver does not support dumping. A missing check meant > that dumpon didn't warn you about this. > > I have just fixed that. > Thanks. I think I have to attach a IDE-disk to my server in order to record crashdump. :-( From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 00:58:16 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB91E16A4C4 for <hackers@freebsd.org>; Mon, 29 Sep 2003 00:58:16 -0700 (PDT) Received: from c211-28-27-130.belrs2.nsw.optusnet.com.au (c211-28-27-130.belrs2.nsw.optusnet.com.au [211.28.27.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D35343FE1 for <hackers@freebsd.org>; Mon, 29 Sep 2003 00:58:15 -0700 (PDT) (envelope-from peterjeremy@optushome.com.au) Received: from server.c211-28-27-130.belrs2.nsw.optusnet.com.au (localhost.c211-28-27-130.belrs2.nsw.optusnet.com.au [127.0.0.1]) ESMTP id h8T7wAdb003203; Mon, 29 Sep 2003 17:58:10 +1000 (EST) peter@server.c211-28-27-130.belrs2.nsw.optusnet.com.au) Received: (from peter@localhost) (8.12.9p1/8.12.9/Submit) id h8T7wAWM003202; Mon, 29 Sep 2003 17:58:10 +1000 (EST) (envelope-from peter) Date: Mon, 29 Sep 2003 17:58:10 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Sergey Babkin <babkin@bellatlantic.net> Message-ID: <20030929075809.GA3062@server.c211-28-27-130.belrs2.nsw.optusnet.com.au> References: <3F775D41.DF780001@bellatlantic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F775D41.DF780001@bellatlantic.net> User-Agent: Mutt/1.4.1i cc: hackers@freebsd.org Subject: Re: has anyone installed 5.1 from a SCSI CD? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 07:58:17 -0000 On Sun, Sep 28, 2003 at 06:14:25PM -0400, Sergey Babkin wrote: >BTW, I have another related issue too: since at least 4.7 >all the disk device nodes have charcater device entries in /dev. As of December 1999 - which is before 4.0-RELEASE. This was well advertised and discussed at the time. Your objections are about 4 years too late. >That's very, very wrong. Even though there may be no difference >any more between the charcater and block drivers, the type of >device node still conveys the information about device types >to the applications. One case in point being a viewer application >(if anyone is interested, http://nac.sf.net ) which must handle >the sequential and random-access devices differently: 'block' vs 'character' has nothing to do with random or sequential access and any application that thinks it does is broken. Any application that directly accesses devices must understand all the various quirks - ability to seek, block size(s) supported, side- effects of operations etc. Yes, block devices must be random access, but character devices can be either random or sequential-only depending on the physical device. The only purpose for block devices was to provide a cache for disk devices. It makes far more sense for this caching to be tightly coupled into the filesystem code where the cache characteristics can be better controlled. Peter From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 03:33:49 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 752E416A4B3 for <hackers@freebsd.org>; Mon, 29 Sep 2003 03:33:49 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F17E43FA3 for <hackers@freebsd.org>; Mon, 29 Sep 2003 03:33:48 -0700 (PDT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 2D8FC3F52; Mon, 29 Sep 2003 06:33:26 -0400 (EDT) From: "Dan Langille" <dan@langille.org> To: Daniel Eischen <eischen@vigrid.com> Date: Mon, 29 Sep 2003 06:34:38 -0400 MIME-Version: 1.0 Message-ID: <3F77D27E.6203.3321BA14@localhost> Priority: normal References: <3F683824.14446.AB8FEDA@localhost> In-reply-to: <Pine.GSO.4.10.10309180745410.24282-100000@pcnet5.pcnet.com> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body cc: hackers@freebsd.org Subject: Re: [PATCH] : libc_r/uthread/uthread_write.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 10:33:49 -0000 On 18 Sep 2003 at 7:50, Daniel Eischen wrote: > On Wed, 17 Sep 2003, Dan Langille wrote: > > > On 16 Sep 2003 at 20:49, Daniel Eischen wrote: > > > > > On Tue, 16 Sep 2003, Dan Langille wrote: > > > > > > > I've had preliminary success with this patch. More testing needs > > > > to be done, but in the meantime, I would appreciate reviews and > > > > comments. The patched code is available from > > > > http://beta.freebsddiary.org/tmp/uthread_write.c and the patch > > > > appears below. > > > > > > > > In short, the logic has been changed to ensure that if __sys_write > > > > returns zero, this value is returned by _write. > > > > > > I think this is not quite correct. Since libc_r is looping > > > and some data may have been read, then the partial byte count > > > should be returned, not zero. It is possible the partial byte > > > count could also be zero in some cases, so it would result > > > in zero being returned in those instances. > > > > I see what you mean. Please have a look at > > http://beta.freebsddiary.org/tmp/uthread_write.c2 > > The patch appears at the end of this message. > > Right, this seems correct to me. All our testing on this patch has been successful. I'm going to do a few more tests on different hardware under 4.8-stable. What's the next step? Commit it? Get others to test with it first? > > > I think the problem lies with the SCSI tape device. It should > > > either return 0 or -1 with errno=ENOSPC on a write that detects > > > an EOT, not partial byte count. > > > > You are referring to sa(4)? > > Yes. > > > > If you are using libkse or > > > libthr, you will get a partial byte count and not zero because > > > the tape driver returns the (partial) bytes written. So exiting > > > the loop in libc_r and returning 0 would only seem to correct > > > the "problem" for libc_r. > > If there is a difference, it could be because libc_r is using non-blocking > IO behind the scenes, and sa(4) may be returning partial byte count > in the non-blocking case and 0 (or -1 and ENOSPC) in the blocking case > (which is what you'd get using libkse/libthr). > > > The problem found when running under pthreads on 4.8-stable [i.e. > > EOT is not returned to the application code] is not found with libkse > > on 5.1-current. FWIW: our regression tests are failing under 5.1 and we suspect that MTIOCERRSTAT ioctl() has changed since 4.8. We're getting: btape: dev.c:1119 Doing MTIOCERRSTAT errno=22 ERR=Invalid argument We'll continue with our 5.1 work, but we'd like to finish up with 4.8 ASAP. -- Dan Langille : http://www.langille.org/ From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 05:26:06 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3EFB16A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 05:26:06 -0700 (PDT) Received: from brolloks.trispen.com (brolloks.trispen.com [196.7.146.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id A288B44005 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 05:26:04 -0700 (PDT) (envelope-from jacques@trispen.com) Received: by brolloks.trispen.com (Postfix, from userid 1000) id A261122E40; Mon, 29 Sep 2003 14:26:01 +0200 (SAST) Date: Mon, 29 Sep 2003 14:26:01 +0200 From: Jacques Fourie <jf@trispen.com> To: freebsd-hackers@freebsd.org Message-ID: <20030929142601.A71290@trispen.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" X-Mailer: Mutt 1.0.1i Subject: Bug in if_spppsubr.c ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jf@trispen.com List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 12:26:07 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Hi, I've come across what I believe to be a bug in if_spppsubr.c. I have verified that it also exists in 4-STABLE. When using PPP encapsulation and header compression, m->m_pkthdr.len is never adjusted after the call to sl_compress_tcp(). Included is a patch against 4-STABLE that seems to fix the problem. regards, jacques --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ppp.patch" --- if_spppsubr.c.orig Mon Sep 29 14:12:17 2003 +++ if_spppsubr.c Mon Sep 29 14:17:31 2003 @@ -778,6 +778,7 @@ int s, rv = 0; int ipproto = PPP_IP; int debug = ifp->if_flags & IFF_DEBUG; + int uc_len; s = splimp(); @@ -864,7 +865,9 @@ * Do IP Header compression */ if (sp->pp_mode != IFF_CISCO && (sp->ipcp.flags & IPCP_VJ) && - ip->ip_p == IPPROTO_TCP) + ip->ip_p == IPPROTO_TCP) { + uc_len = m->m_len; + switch (sl_compress_tcp(m, ip, sp->pp_comp, sp->ipcp.compress_cid)) { case TYPE_COMPRESSED_TCP: @@ -881,6 +884,10 @@ splx(s); return (EINVAL); } + + if (m->m_flags & M_PKTHDR) + m->m_pkthdr.len += m->m_len - uc_len; + } } #endif --k+w/mQv8wyuph6w0-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 06:02:20 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7855916A4BF for <hackers@freebsd.org>; Mon, 29 Sep 2003 06:02:20 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62B4644025 for <hackers@freebsd.org>; Mon, 29 Sep 2003 06:02:19 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id h8TD2IgG028463; Mon, 29 Sep 2003 09:02:18 -0400 (EDT) Date: Mon, 29 Sep 2003 09:02:18 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> X-Sender: eischen@pcnet5.pcnet.com To: Dan Langille <dan@langille.org> In-Reply-To: <3F77D27E.6203.3321BA14@localhost> Message-ID: <Pine.GSO.4.10.10309290859280.25117-100000@pcnet5.pcnet.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: [PATCH] : libc_r/uthread/uthread_write.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 13:02:20 -0000 On Mon, 29 Sep 2003, Dan Langille wrote: > On 18 Sep 2003 at 7:50, Daniel Eischen wrote: > > > > > Right, this seems correct to me. > > All our testing on this patch has been successful. I'm going to do a > few more tests on different hardware under 4.8-stable. > > What's the next step? Commit it? Get others to test with it first? Sure, it looks good enough to commit. > > > > > The problem found when running under pthreads on 4.8-stable [i.e. > > > EOT is not returned to the application code] is not found with libkse > > > on 5.1-current. > > FWIW: our regression tests are failing under 5.1 and we suspect that > MTIOCERRSTAT ioctl() has changed since 4.8. We're getting: > > btape: dev.c:1119 Doing MTIOCERRSTAT errno=22 ERR=Invalid argument > > We'll continue with our 5.1 work, but we'd like to finish up with 4.8 > ASAP. Well, I can commit it to -current first, then it can go into -stable. I'm not sure about the ioctl, though. -- Dan Eischen From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 06:21:04 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D149716A4B3 for <hackers@freebsd.org>; Mon, 29 Sep 2003 06:21:04 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AA994401A for <hackers@freebsd.org>; Mon, 29 Sep 2003 06:21:04 -0700 (PDT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 7296C3F52; Mon, 29 Sep 2003 09:20:41 -0400 (EDT) From: "Dan Langille" <dan@langille.org> To: Daniel Eischen <eischen@vigrid.com> Date: Mon, 29 Sep 2003 09:21:54 -0400 MIME-Version: 1.0 Message-ID: <3F77F9B2.31496.33BADDB7@localhost> Priority: normal References: <3F77D27E.6203.3321BA14@localhost> In-reply-to: <Pine.GSO.4.10.10309290859280.25117-100000@pcnet5.pcnet.com> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body cc: hackers@freebsd.org Subject: Re: [PATCH] : libc_r/uthread/uthread_write.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 13:21:04 -0000 On 29 Sep 2003 at 9:02, Daniel Eischen wrote: > On Mon, 29 Sep 2003, Dan Langille wrote: > > > On 18 Sep 2003 at 7:50, Daniel Eischen wrote: > > > > > > > > Right, this seems correct to me. > > > > All our testing on this patch has been successful. I'm going to do a > > few more tests on different hardware under 4.8-stable. > > > > What's the next step? Commit it? Get others to test with it first? > > Sure, it looks good enough to commit. Good. I'd commit it, but..... > > > > The problem found when running under pthreads on 4.8-stable [i.e. > > > > EOT is not returned to the application code] is not found with libkse > > > > on 5.1-current. > > > > FWIW: our regression tests are failing under 5.1 and we suspect that > > MTIOCERRSTAT ioctl() has changed since 4.8. We're getting: > > > > btape: dev.c:1119 Doing MTIOCERRSTAT errno=22 ERR=Invalid argument > > > > We'll continue with our 5.1 work, but we'd like to finish up with 4.8 > > ASAP. > > Well, I can commit it to -current first, then it can go into > -stable. I'm not sure about the ioctl, though. OK, please do commit to -current. How long do you think is an appropriate delay until MFC? 7 days? -- Dan Langille : http://www.langille.org/ From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 07:22:47 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37BFF16A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 07:22:47 -0700 (PDT) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37E0F43FE3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 07:22:46 -0700 (PDT) (envelope-from earthman@inbox.ru) Received: from [213.179.248.57] (port=3467 helo=hp6100) by mx3.mail.ru with esmtp id 1A3yvK-000Cyu-00 for freebsd-hackers@freebsd.org; Mon, 29 Sep 2003 18:22:51 +0400 Date: Mon, 29 Sep 2003 17:22:47 +0300 From: earthman <earthman@inbox.ru> X-Mailer: The Bat! (v1.62r) Organization: home!!! X-Priority: 3 (Normal) Message-ID: <811112091.20030929172247@inbox.ru> To: freebsd-hackers@freebsd.org In-Reply-To: <3F759589.9070700@mindspring.com> References: <16244.53594.942762.784390@canoe.dclg.ca> <20030927115306.R34638@woozle.rinet.ru> <3F759589.9070700@mindspring.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam: Not detected Subject: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: earthman <earthman@inbox.ru> List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 14:22:47 -0000 hi how to allocate some memory chunk in user space memory from kernel code? how to do it correctly? -- Best regards, earthman mailto:earthman@inbox.ru icq: 145680330 From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 07:37:23 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7358216A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 07:37:23 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 281F743F3F for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 07:37:22 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h8TEbHOP001408; Mon, 29 Sep 2003 16:37:17 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: earthman <earthman@inbox.ru> From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> In-Reply-To: Your message of "Mon, 29 Sep 2003 17:22:47 +0300." <811112091.20030929172247@inbox.ru> Date: Mon, 29 Sep 2003 16:37:17 +0200 Message-ID: <1407.1064846237@critter.freebsd.dk> cc: freebsd-hackers@freebsd.org Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 14:37:23 -0000 In message <811112091.20030929172247@inbox.ru>, earthman writes: >hi > > >how to allocate some memory chunk >in user space memory from kernel code? >how to do it correctly? You shouldn't and it would be very trick to do right if at all. Try to tell us what you're trying to do and maybe we can find a better way to do that ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 08:46:12 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 535DC16A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 08:46:12 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B7AC44030 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 08:46:11 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 4597D3ABB4E; Mon, 29 Sep 2003 17:47:41 +0200 (CEST) Date: Mon, 29 Sep 2003 17:47:41 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: earthman <earthman@inbox.ru> Message-ID: <20030929154741.GB520@garage.freebsd.pl> References: <16244.53594.942762.784390@canoe.dclg.ca> <20030927115306.R34638@woozle.rinet.ru> <3F759589.9070700@mindspring.com> <811112091.20030929172247@inbox.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <811112091.20030929172247@inbox.ru> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE-p9 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@freebsd.org Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 15:46:12 -0000 --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 29, 2003 at 05:22:47PM +0300, earthman wrote: +> how to allocate some memory chunk +> in user space memory from kernel code? +> how to do it correctly? Here you got sample kernel module which do this: http://garage.freebsd.pl/usmalloc.tgz http://garage.freebsd.pl/usmalloc.README --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBP3hUHT/PhmMH/Mf1AQEMUwP+NSkHrY3TWcGnuk42xxuP2bocLevr299T WV9xtz6J0hPHSRt7eqxCcJTM4zfkjjdMABTZaSe7qkUhVRsgUB5uUk9jru0UT1jj qzGkAvuUr47Ule8DfcGvEapw7kdD70c6WdXKLT5KUG4IJoKbA4b6EGKxBE8AOmEA VPReQeM39pI= =PufO -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 08:56:20 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9562016A4BF for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 08:56:20 -0700 (PDT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id EFAA744005 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 08:56:17 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 31593 invoked from network); 29 Sep 2003 15:48:07 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 29 Sep 2003 15:48:06 -0000 Received: (qmail 88214 invoked by uid 1000); 29 Sep 2003 15:56:13 -0000 Date: Mon, 29 Sep 2003 18:56:13 +0300 From: Peter Pentchev <roam@ringlet.net> To: Pawel Jakub Dawidek <nick@garage.freebsd.pl> Message-ID: <20030929155613.GB551@straylight.oblivion.bg> Mail-Followup-To: Pawel Jakub Dawidek <nick@garage.freebsd.pl>, earthman <earthman@inbox.ru>, freebsd-hackers@freebsd.org References: <16244.53594.942762.784390@canoe.dclg.ca> <20030927115306.R34638@woozle.rinet.ru> <3F759589.9070700@mindspring.com> <811112091.20030929172247@inbox.ru> <20030929154741.GB520@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS8CxjVDS/+yyDmU" Content-Disposition: inline In-Reply-To: <20030929154741.GB520@garage.freebsd.pl> User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org cc: earthman <earthman@inbox.ru> Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 15:56:20 -0000 --rS8CxjVDS/+yyDmU Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 29, 2003 at 05:47:41PM +0200, Pawel Jakub Dawidek wrote: > On Mon, Sep 29, 2003 at 05:22:47PM +0300, earthman wrote: > +> how to allocate some memory chunk > +> in user space memory from kernel code? > +> how to do it correctly? >=20 > Here you got sample kernel module which do this: >=20 > http://garage.freebsd.pl/usmalloc.tgz > http://garage.freebsd.pl/usmalloc.README Errrr... but won't this interfere *badly* with userland programs which attempt to allocate memory after making the syscall in question? I mean, won't the application's memory manager attempt to allocate the next chunk of memory right over the region that you have stolen with this brk(2) invocation? Thus, when the application tries to write into its newly-allocated memory, it will overwrite the data that the kernel has placed there, and any attempt to access the kernel's data later will fail in wonderfully unpredictable ways :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 No language can express every thought unambiguously, least of all this one. --rS8CxjVDS/+yyDmU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/eFYd7Ri2jRYZRVMRApIGAKCPKZ14wKikyHlUiogxyO3fmJ7vIgCgpuhO huiKdRC5rGXNtxTwkpwiBqI= =1m0S -----END PGP SIGNATURE----- --rS8CxjVDS/+yyDmU-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 12:11:25 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE62716A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 12:11:25 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7052043FFD for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 12:11:24 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 820683ABB5A; Mon, 29 Sep 2003 21:12:58 +0200 (CEST) Date: Mon, 29 Sep 2003 21:12:58 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: earthman <earthman@inbox.ru>, freebsd-hackers@freebsd.org Message-ID: <20030929191258.GC520@garage.freebsd.pl> References: <16244.53594.942762.784390@canoe.dclg.ca> <20030927115306.R34638@woozle.rinet.ru> <3F759589.9070700@mindspring.com> <811112091.20030929172247@inbox.ru> <20030929154741.GB520@garage.freebsd.pl> <20030929155613.GB551@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="DSayHWYpDlRfCAAQ" Content-Disposition: inline In-Reply-To: <20030929155613.GB551@straylight.oblivion.bg> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE-p9 i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 19:11:25 -0000 --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 29, 2003 at 06:56:13PM +0300, Peter Pentchev wrote: +> I mean, won't the application's memory manager attempt to allocate the +> next chunk of memory right over the region that you have stolen with +> this brk(2) invocation? Thus, when the application tries to write into +> its newly-allocated memory, it will overwrite the data that the kernel +> has placed there, and any attempt to access the kernel's data later will +> fail in wonderfully unpredictable ways :) I'm not sure if newly allocated memory will overwrite memory allocated in kernel, but for sure process is able to write to this memory. Sometime ago I proposed model which will allow to remove all copyin(9) calls and many copyout(9), but I'm not so skilled in VM to implement it. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --DSayHWYpDlRfCAAQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBP3iEOj/PhmMH/Mf1AQFkAgQAp5ZMnup/3Wi/eg/4IucKCGFDCniCuVdT YmncfReoV+Maofp5PqSk050QXNQxgfHn1I2mZQ03fcp2Y8u8CuJnB1wW1o6AOeYv JPtS6wwC3u4iOxclm2FHwVoyrL0B1lpoVDfDtxJZhPhj3aEs3zqgm/9JKWP6BiWh cb2DG8Zor9Q= =WNzp -----END PGP SIGNATURE----- --DSayHWYpDlRfCAAQ-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 12:14:15 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36FA316A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 12:14:15 -0700 (PDT) Received: from mail.advantagecom.net (mail.advantagecom.net [65.103.151.155]) by mx1.FreeBSD.org (Postfix) with ESMTP id F01E743FF3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 12:14:13 -0700 (PDT) (envelope-from andykinney@advantagecom.net) Received: from SCSI-MONSTER (scsi-monster.advantagecom.net [207.109.186.200]) by mail.advantagecom.net (8.11.6/8.11.6) with ESMTP id h8TJE9i17647; Mon, 29 Sep 2003 12:14:10 -0700 From: "Andrew Kinney" <andykinney@advantagecom.net> Organization: Advantagecom Networks, Inc. To: "Kang Liu" <liukang@bjpu.edu.cn> Date: Mon, 29 Sep 2003 12:14:50 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Message-ID: <3F78223A.9758.5C23391A@localhost> Priority: normal In-reply-to: <004901c3865c$37bf4120$e04e70ca@lkatschool> X-mailer: Pegasus Mail for Win32 (v3.12c) cc: freebsd-hackers@freebsd.org Subject: Re: Can not dump on raid dev? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: andykinney@advantagecom.net List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 19:14:15 -0000 On 29 Sep 2003, at 15:35, Kang Liu wrote: > Hi, > I'm trying to save a crashdump into /var/crash but it fails. > Here is my config files: > # dmesg | grep amr > amr0: <LSILogic MegaRAID> mem 0xf0000000-0xf7ffffff irq 3 at device 0.0 on pci3 > amr0: <LSILogic PERC 3/DC> Firmware 1.92, BIOS 3.31, 128MB RAM > amrd0: <LSILogic MegaRAID logical drive> on amr0 <snip> > when the system crashes, it doesn't save any crashdump. > I've tried the same config on a machine with IDE disk, the crashdump can be saved. > Do I miss something, or the crashdump can not be saved on a raid device? > We had the same trouble with the mlx driver under 4.5, 4.7, and 4.8. The driver doesn't support crash dumps. I even tried making a ccd device since the driver code for ccd appears to support crash dumps. Didn't have any luck with that either. Ended up taking an old 4GB IDE hard drive and setting it up as a dedicated crash dump device. Just be sure you don't mount the swap partition you create on it because you don't want to compromise the benefits of having a RAID if you're using it for redundancy. The only other trick with that is that you have to have a BIOS that will allow you to define SCSI/RAID as your primary boot device. Some automatically assume you want to use IDE for boot if you have and IDE hard drive installed. If you're using RAID, you're probably also using a decent server board that includes the necessary boot options. If memory serves correctly, from what I read in the code, the only block device drivers that support crash dumps are IDE and some Adaptec SCSI cards. Don't know for sure about those Adaptec SCSI cards since we're not using one and you can't always trust what you see in the code about dumps as evidenced by the ccd driver. I believe it has something to do with it being necessary to use BIOS routines to write to the device since by the time you're doing a crash dump all your high level drivers are not useable anyway. Hope that helps. Sincerely, Andrew Kinney President and Chief Technology Officer Advantagecom Networks, Inc. http://www.advantagecom.net From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 12:44:22 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B009F16A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 12:44:22 -0700 (PDT) Received: from dahlia.noc.ucla.edu (dahlia.noc.ucla.edu [169.232.46.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB05743FFB for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 12:44:21 -0700 (PDT) (envelope-from tafields@ucla.edu) Received: from helen.ucla.edu ([149.142.158.245]) by dahlia.noc.ucla.edu (8.12.8p2/8.12.8) with ESMTP id h8TJiLbM025348; Mon, 29 Sep 2003 12:44:21 -0700 Message-Id: <5.0.0.25.2.20030929124038.023ac5f0@mail.ucla.edu> X-Sender: tafields@mail.ucla.edu X-Mailer: QUALCOMM Windows Eudora Version 5.0 Date: Mon, 29 Sep 2003 12:45:35 -0700 To: freebsd-hackers@freebsd.org From: "Tony A, Fields" <tafields@ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: clwilson@ucla.edu Subject: nVidia nForce2 potential owners please read (take two) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 19:44:22 -0000 Thanks for your effort to get the nVidia folks to pony up the documentation. I unfortunately purchased a system that has a motherboard that uses the MCP2 network adapter chip set. I now have to rethink how I am going to configure the system as a file server that straddles the enterprise wide intranet and a local lab network while maintaining some isolation between the two. I am therefore signing your petition drive ( not for governator mind you). Thanks, Tony From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 14:34:13 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5310F16A4B3 for <hackers@freebsd.org>; Mon, 29 Sep 2003 14:34:13 -0700 (PDT) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id E72AA44001 for <hackers@freebsd.org>; Mon, 29 Sep 2003 14:34:11 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: (qmail 70694 invoked by uid 1002); 29 Sep 2003 21:34:11 -0000 Received: from unknown (HELO ?10.4.1.5?) (64.58.1.252) by smtp.mho.net with SMTP; 29 Sep 2003 21:34:11 -0000 Date: Mon, 29 Sep 2003 15:33:46 -0600 (MDT) From: Scott Long <scottl@freebsd.org> X-X-Sender: scottl@pooker.samsco.home To: hackers@freebsd.org Message-ID: <20030929152105.M2729@pooker.samsco.home> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Reminder: Call for FreeBSD status reports! X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Sep 2003 21:34:13 -0000 All, Don't forget to submit your FreeBSD status reports by Oct 1, 2003! These reports are open to not only official project memebers, but also to anyone who is engaged in the development of projects that relate to FreeBSD. Kernel, userland, ports, documentation, installation, integration, etc, reports are all welcome and encouraged. Reports should be 1-2 paragraphs in length, focus on one topic, and should follow the template that is available at http://www.freebsd.org/news/status/report-sample.xml. Submissions must be made to monthly@freebsd.org. Submissions for multiple projects per person are welcome. Thanks! Scott Long Robert Watson From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 17:04:07 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E21616A4BF for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 17:04:07 -0700 (PDT) Received: from web10509.mail.yahoo.com (web10509.mail.yahoo.com [216.136.130.192]) by mx1.FreeBSD.org (Postfix) with SMTP id D7A1C4400F for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 17:04:05 -0700 (PDT) (envelope-from b_oshea@yahoo.com) Message-ID: <20030930000405.12154.qmail@web10509.mail.yahoo.com> Received: from [156.153.254.42] by web10509.mail.yahoo.com via HTTP; Mon, 29 Sep 2003 17:04:05 PDT Date: Mon, 29 Sep 2003 17:04:05 -0700 (PDT) From: Brian O'Shea <b_oshea@yahoo.com> To: Peter Pentchev <roam@ringlet.net>, Pawel Jakub Dawidek <nick@garage.freebsd.pl> In-Reply-To: <20030929155613.GB551@straylight.oblivion.bg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-hackers@freebsd.org cc: earthman <earthman@inbox.ru> Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 00:04:07 -0000 --- Peter Pentchev <roam@ringlet.net> wrote: > > Here you got sample kernel module which do this: > > > > http://garage.freebsd.pl/usmalloc.tgz > > http://garage.freebsd.pl/usmalloc.README > > Errrr... but won't this interfere *badly* with userland programs > which attempt to allocate memory after making the syscall in question? Couldn't the user library interface to this new system call just malloc() the memory first in the process, and then pass the pointer and size to the kernel via the system call interface? This would ensure that malloc() doesn't touch the desired range of memory until it is freed by the user. You'd just have to be careful not to free it until the kernel is done with it. -brian __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 17:29:51 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C384F16A4B3 for <hackers@freebsd.org>; Mon, 29 Sep 2003 17:29:51 -0700 (PDT) Received: from pop016.verizon.net (pop016pub.verizon.net [206.46.170.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6E234401E for <hackers@freebsd.org>; Mon, 29 Sep 2003 17:29:49 -0700 (PDT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net ([138.89.157.47]) by pop016.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030930002947.HSGO10125.pop016.verizon.net@bellatlantic.net>; Mon, 29 Sep 2003 19:29:47 -0500 Sender: root@FreeBSD.ORG Message-ID: <3F78CE77.5878B57A@bellatlantic.net> Date: Mon, 29 Sep 2003 20:29:43 -0400 From: Sergey Babkin <babkin@bellatlantic.net> X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-Version: 1.0 To: Peter Jeremy <peterjeremy@optushome.com.au> References: <3F775D41.DF780001@bellatlantic.net> <20030929075809.GA3062@server.c211-28-27-130.belrs2.nsw.optusnet.com.au> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop016.verizon.net from [138.89.157.47] at Mon, 29 Sep 2003 19:29:46 -0500 cc: hackers@freebsd.org Subject: Re: has anyone installed 5.1 from a SCSI CD? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 00:29:51 -0000 Peter Jeremy wrote: > > On Sun, Sep 28, 2003 at 06:14:25PM -0400, Sergey Babkin wrote: > >BTW, I have another related issue too: since at least 4.7 > >all the disk device nodes have charcater device entries in /dev. > > As of December 1999 - which is before 4.0-RELEASE. This was well > advertised and discussed at the time. Your objections are about > 4 years too late. Well, the previous version I installed was 4.0-snapshot that did not have this change yet. Also it's never too late to fix the broken things. > >That's very, very wrong. Even though there may be no difference > >any more between the charcater and block drivers, the type of > >device node still conveys the information about device types > >to the applications. One case in point being a viewer application > >(if anyone is interested, http://nac.sf.net ) which must handle > >the sequential and random-access devices differently: > > 'block' vs 'character' has nothing to do with random or sequential > access and any application that thinks it does is broken. Any > application that directly accesses devices must understand all the > various quirks - ability to seek, block size(s) supported, side- The random-access devices are seekable by definition. And the OS interface is there to hide the block size issues. > The only purpose for block devices was to provide a cache for disk > devices. It makes far more sense for this caching to be tightly > coupled into the filesystem code where the cache characteristics > can be better controlled. What I'm saying is that it's good to have an easy way for applications to distinguish the random-access devices from the sequential-only-acces devices. Are they cacned internally or not is not that much of an application's concern. -SB From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 19:08:23 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 946A716A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 19:08:23 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id A09C144027 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 19:08:22 -0700 (PDT) (envelope-from grog@lemis.com) Received: from blackwater.lemis.com (blackwater.lemis.com [192.109.197.80]) by ozlabs.org (Postfix) with ESMTP id 171F12BC02 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 12:08:21 +1000 (EST) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 7B38F51837; Tue, 30 Sep 2003 11:38:19 +0930 (CST) Date: Tue, 30 Sep 2003 11:38:19 +0930 From: Greg 'groggy' Lehey <grog@FreeBSD.org> To: "Tony A, Fields" <tafields@ucla.edu> Message-ID: <20030930020819.GP45668@wantadilla.lemis.com> References: <5.0.0.25.2.20030929124038.023ac5f0@mail.ucla.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3bc47Eih9dS+biPM" Content-Disposition: inline In-Reply-To: <5.0.0.25.2.20030929124038.023ac5f0@mail.ucla.edu> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-hackers@freebsd.org cc: clwilson@ucla.edu Subject: Re: nVidia nForce2 potential owners please read (take two) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 02:08:23 -0000 --3bc47Eih9dS+biPM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Monday, 29 September 2003 at 12:45:35 -0700, Tony A, Fields wrote: > Thanks for your effort to get the nVidia folks to pony up the > documentation. I unfortunately purchased a system that has a motherboard > that uses the MCP2 network adapter chip set. I now have to rethink how I am > going to configure the system as a file server that straddles the > enterprise wide intranet and a local lab network while maintaining some > isolation between the two. A 100 Mb/s NIC will cost you about $10. Greg -- See complete headers for address and phone numbers. NOTE: Due to the currently active Microsoft-based worms, I am limiting all incoming mail to 131,072 bytes. This is enough for normal mail, but not for large attachments. Please send these as URLs. --3bc47Eih9dS+biPM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE/eOWTIubykFB6QiMRAnQHAKCZLS1kABlPgzchm7ooshZwAlXiMgCfVnlu gwWQI3F55TUOo7J1sB4ffvQ= =WrAE -----END PGP SIGNATURE----- --3bc47Eih9dS+biPM-- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 19:28:08 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EA4216A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 19:28:08 -0700 (PDT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8C1643F75 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 19:28:06 -0700 (PDT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.6/8.12.6) with ESMTP id h8U2S5PD025147; Mon, 29 Sep 2003 22:28:05 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.6/8.12.6/Submit) id h8U2S5NJ025146; Mon, 29 Sep 2003 22:28:05 -0400 (EDT) (envelope-from afields) Date: Mon, 29 Sep 2003 22:28:05 -0400 From: Allan Fields <bsd@afields.ca> To: freebsd-hackers@freebsd.org Message-ID: <20030930022804.GB94150@afields.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: ps,libkvm,ls malloc/free X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Allan Fields <bsd@afields.ca> List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 02:28:08 -0000 Hi, While trying to debug issues with libkvm access from an experimental tool (quick-hack) I've been working on, I've come across a segfault that occurs in _kvm_malloc(). This is a stock install of FreeBSD 5.1-RELEASE but the code invoking libkvm is originally taken from bin/ps/ps.c in the latest RELENG_5_1 source distribution. The situation is related to a call of kvm_openfiles() subsequent to a previous call and kvm_close(). I've poked around in the most recent libkvm sources and so-far didn't see why _kvm_malloc() would fail in this case. Further my backtrace doesn't show the same calling order one might expect: Program terminated with signal 11, Segmentation fault. #0 0x080ea74d in _kvm_malloc () #1 0x080eaa41 in kvm_openfiles () #2 0x08066e3a in main (argc=1, argv=0x82f4000) at /usr/src-5_1/bin/ps/ps.c:324 In the source it looks more like: kvm_openfiles() => _kvm_open() (and I can't find the _kvm_malloc() call.) Does this have anything to do with changes for descriptors being flagged close-on-exec? Has something changed recently so that I have to update libkvm? I solved a similar issue with fts_open() segfaulting bin/ls, on subsequent calls by cleaning up before traverse() returns. [Patch below.] To be truthful: it is my non-standard usage of these routines that has turned up these problems, and I was expecting some issues like this to appear. This problem is appearing only because of the atypical usage of these calls multiple times with-in the same process which could potentially be avoided. But my question is: why doesn't kvm_close() do the job? Is kvm_open*() allowed to be called more than once by the same process? I also noticed that certain binaries including ls and ps don't explicitly free memory and close file descriptors before return. Usually this is not a problem, however: is this the right approach to take from the standpoint of code style? Is it fair to assume a return from main() will always clean-up for us? I have made this assumption myself before. exit(3) usually does what we need. I can see that it wouldn't be hard to go through and create #ifdef CLEANUP blocks to give the option of explicit clean-up. Better still would be avoiding situations where there are items remaining to be free()ed on return by cleaning up directly after use. Also of concern to me here is the number of globals in the base system commands, but so far this hasn't been a serious problem. I'm actually suprised I have had the sucess with the approach that I have. -- Allan Fields ----- diff -u ls.c.orig ls.c: --- ls.c.orig Mon Sep 29 06:10:41 2003 +++ ls.c Mon Sep 29 06:39:28 2003 @@ -507,6 +507,12 @@ } if (errno) err(1, "fts_read"); + + /* Clean-up: */ + free(p); + if (fts_close(ftsp)) /* explicitly close descriptor */ + err(1, "fts_close"); + } /* ----- From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 20:27:03 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 769D016A4B3 for <hackers@freebsd.org>; Mon, 29 Sep 2003 20:27:03 -0700 (PDT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (B77d2.pppool.de [213.7.119.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 593D343FE9 for <hackers@freebsd.org>; Mon, 29 Sep 2003 20:26:51 -0700 (PDT) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from Mail.NOSPAM.DynDNS.dK (ipv6.NOSPAM.dyndns.dk [2002:d507:77d2:0:220:afff:fed4:dbcb]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id h8U3QYp12998 verified NO) for <hackers@freebsd.org>; Tue, 30 Sep 2003 05:26:36 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost) by Mail.NOSPAM.DynDNS.dK (8.11.6/FNORD) id h8U3QXx12997; Tue, 30 Sep 2003 05:26:33 +0200 (CEST) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Tue, 30 Sep 2003 05:26:33 +0200 (CEST) Message-Id: <200309300326.h8U3QXx12997@Mail.NOSPAM.DynDNS.dK> X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: beer set sender to bounce@NOSPAM.dyndns.dk using -f X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed from queue /tmp X-Authentication-Warning: localhost.newsbastards.org.72.27.172.IN-addr.A: Processed by beer with -C /etc/mail/sendmail.cf-LOCAL From: Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk> To: FreeBSD Hacking Group <hackers@freebsd.org> Subject: USB2.0 external hub and ehci question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 03:27:03 -0000 [Drop hostname part of IPv6-only address above to obtain IPv4-capable e-mail, or just drop me from the recipients and I'll catch up from the archives] Hallo Hackers, I suppose I should post this to -current as the code in question is derived from there, but I'm running it on RELENG_4, so... I've ported the USB controller codes (uhci, ohci, and ehci) from -current to 4.9-PRERELEASE in order to try and add USB2.0 support to 4.x, and I see something that I also saw with the NetBSD ehci codes back last December; namely, that I can't attach an external hub, supposedly with USB2.0 capability, and have it be recognized. First, I seem to have no problems building just the uhci and ohci codes into the usb.ko kernel module, and using them, though I haven't thoroughly crash-tested them. I've mixed all three controller codes, with the result that the hub is not seen. Nor is the external drive. Which I attribute to my own incompetence more than anything. So to make things easier, I ditched all but the ehci code and ignored the check for companion controllers, to limit testing to just that. With an external USB2.0 drive connected, I am able to see and mount it. When I connect the external hub in its place, I get the error that the port was disabled, STALLED -- just as I saw under old NetBSD. I haven't built -current, or a more recent NetBSD, to see if their behaviour is any different when faced with this hub. Is it possible I need some sort of quirks entry for this device, which I can use as a USB1.x device fine? Or do I not even get that far? Here's the dmesg with uhubdebug and ehcidebug set to 1, with a few comments... (I may have added a few additional debug printf()s too) ehci0: <NEC uPD 720100 USB 2.0 controller> mem 0xfdffdc00-0xfdffdcff irq 10 at device 8.2 on pci1 using shared irq10. ehci_init: start usb0: EHCI version 0.95 ehci_init: sparams=0x2395 usb0: wrong number of companions (2 != 0) This here is the PCI card, along with my hack mentioned. [ snip ... ] usb0: <NEC uPD 720100 USB 2.0 controller> on ehci0 usb0: USB revision 2.0 usbd_new_device bus=0xc1728000 port=0 depth=0 speed=0 ehci_open: pipe=0xc1727580, addr=0, endpt=0 (0) usbd_new_device: adding unit addr=1, rev=200, class=9, subclass=0, protocol=1, maxpacket=64, len=18, speed=0 uhub0: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub0: 5 ports with 5 removable, self powered ehci_open: pipe=0xc1727400, addr=1, endpt=129 (1) usb_init_port: turn on port 1 power usb_init_port: turn on port 2 power usb_init_port: turn on port 3 power usb_init_port: turn on port 4 power usb_init_port: turn on port 5 power ehci_pcd: change=0x02 uhub_explore: port 1 status 0x0501 0x0001 uhub_explore: status change hub=1 port=1 ehci after reset, status=0x00001005 ehci port 1 reset, status = 0x00001005 uhub speed is 3 usbd_new_device bus=0xc1728000 port=1 depth=1 speed=3 ehci_open: pipe=0xc1727180, addr=0, endpt=0 (1) ehci_device_ctrl_close: pipe=0xc1727180 ehci_intr1: door bell uhub_explore: usb_new_device failed, error=STALLED uhub0: device problem, disabling port 1 I can provide a dmesg with a higher debug level, if it would be desired. This is the same regardless of which of two USB2.0 PCI cards that I have I am using. The external hub that causes problems is seen with the USB1.x codes as Sep 28 23:12:34 chubby /kernel: uhub2: Cypress Semiconductor product 0x6560, class 9/0, rev 2.00/0.07, addr 2 Sep 28 23:12:34 chubby /kernel: uhub2: 4 ports with 4 removable, self powered And I can provide a patch I've used to usbdevs* to make this a bit more descriptive... Under NetBSD of last year, I could unplug and somewhat quickly re-plug the external hub after the ehci port was disabled, and after a few tries, I'd get it to be attached as a functioning USB1.x hub while ehci was snoozing or something. Of course, the ehci support was clearly marked as beta then. Oh heck, below I've attached an echidebug=3 dmesg, as it includes a few <ACTIVE> and <HALTED> for anyone who can make sense out of it, with a failed attempt at trying a random quirk. I'll see about downloading some USB utilities while I'm online to nab more useful info. Thanks, Barry Bouwsma uhub_explore: port 1 status 0x0501 0x0001 uhub_explore: status change hub=1 port=1 ehci after reset, status=0x00001005 ehci port 1 reset, status = 0x00001005 uhub speed is 3 usbd_new_device bus=0xc1728000 port=1 depth=1 speed=3 ehci_open: pipe=0xc1727180, addr=0, endpt=0 (1) ehci_alloc_sqtd: allocating chunk ehci_alloc_sqtd_chain: start len=8 ehci_check_intr: ex=0xc1729400 ehci_idone: ex=0xc1729400 ehci_idone: xfer=0xc1729400, pipe=0xc1727180 ready ehci_idone: len=8, actlen=8, status=0x40 ehci_idone: error, addr=0, endpt=0x00, status 0x40<HALTED> QH(0xc174af80) at 0x00fedf80: link=0x00fedfc2<QH> endp=0x80082000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=0 mpl=0x8 ctl=0 nrl=8 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00f6ef80<> Overlay qTD: next=0x00000001<T> altnext=0x00000011<T> status=0x00008c40: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x40<HALTED> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bfc0) at 0x00f6efc0: next=0x00f6ef40<> altnext=0x00f6ef40<> status=0x80000e00: toggle=1 bytes=0x0 ioc=0 c_page=0x0 cerr=3 pid=2 stat=0x0 buffer[0]=0x045823a8 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf40) at 0x00f6ef40: next=0x00f6ef80<> altnext=0x00f6ef80<> status=0x00008d00: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x0 buffer[0]=0x04582398 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf80) at 0x00f6ef80: next=0x00000001<T> altnext=0x00000001<T> status=0x00008c40: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x40<HALTED> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 ehci_idone: ex=0xc1729400 done ehci_alloc_sqtd_chain: start len=2 ehci_check_intr: ex=0xc1729400 ehci_idone: ex=0xc1729400 ehci_idone: xfer=0xc1729400, pipe=0xc1727180 ready ehci_idone: len=2, actlen=0, status=0x40 ehci_idone: error, addr=0, endpt=0x00, status 0x40<HALTED> QH(0xc174af80) at 0x00fedf80: link=0x00fedfc2<QH> endp=0x80082000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=0 mpl=0x8 ctl=0 nrl=8 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00f6efc0<> Overlay qTD: next=0x00f6ef40<> altnext=0x00f6ef50<> status=0x80028d40: toggle=1 bytes=0x2 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x40<HALTED> buffer[0]=0x04582390 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf80) at 0x00f6ef80: next=0x00f6efc0<> altnext=0x00f6efc0<> status=0x80000e00: toggle=1 bytes=0x0 ioc=0 c_page=0x0 cerr=3 pid=2 stat=0x0 buffer[0]=0x045823a8 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bfc0) at 0x00f6efc0: next=0x00f6ef40<> altnext=0x00f6ef40<> status=0x80028d40: toggle=1 bytes=0x2 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x40<HALTED> buffer[0]=0x04582390 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf40) at 0x00f6ef40: next=0x00000001<T> altnext=0x00000001<T> status=0x00008c80: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x80<ACTIVE> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 ehci_idone: ex=0xc1729400 done ehci_alloc_sqtd_chain: start len=8 ehci_check_intr: ex=0xc1729400 ehci_idone: ex=0xc1729400 ehci_idone: xfer=0xc1729400, pipe=0xc1727180 ready ehci_idone: len=8, actlen=8, status=0x40 ehci_idone: error, addr=0, endpt=0x00, status 0x40<HALTED> QH(0xc174af80) at 0x00fedf80: link=0x00fedfc2<QH> endp=0x80082000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=0 mpl=0x8 ctl=0 nrl=8 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00f6efc0<> Overlay qTD: next=0x00000001<T> altnext=0x00000011<T> status=0x00008c40: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x40<HALTED> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf40) at 0x00f6ef40: next=0x00f6ef80<> altnext=0x00f6ef80<> status=0x80000e00: toggle=1 bytes=0x0 ioc=0 c_page=0x0 cerr=3 pid=2 stat=0x0 buffer[0]=0x045823a8 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf80) at 0x00f6ef80: next=0x00f6efc0<> altnext=0x00f6efc0<> status=0x00008d00: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x0 buffer[0]=0x04582398 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bfc0) at 0x00f6efc0: next=0x00000001<T> altnext=0x00000001<T> status=0x00008c40: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x40<HALTED> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 ehci_idone: ex=0xc1729400 done ehci_alloc_sqtd_chain: start len=2 ehci_check_intr: ex=0xc1729400 ehci_idone: ex=0xc1729400 ehci_idone: xfer=0xc1729400, pipe=0xc1727180 ready ehci_idone: len=2, actlen=0, status=0x40 ehci_idone: error, addr=0, endpt=0x00, status 0x40<HALTED> QH(0xc174af80) at 0x00fedf80: link=0x00fedfc2<QH> endp=0x80082000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=0 mpl=0x8 ctl=0 nrl=8 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00f6ef40<> Overlay qTD: next=0x00f6ef80<> altnext=0x00f6ef90<> status=0x80028d40: toggle=1 bytes=0x2 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x40<HALTED> buffer[0]=0x04582390 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bfc0) at 0x00f6efc0: next=0x00f6ef40<> altnext=0x00f6ef40<> status=0x80000e00: toggle=1 bytes=0x0 ioc=0 c_page=0x0 cerr=3 pid=2 stat=0x0 buffer[0]=0x045823a8 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf40) at 0x00f6ef40: next=0x00f6ef80<> altnext=0x00f6ef80<> status=0x80028d40: toggle=1 bytes=0x2 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x40<HALTED> buffer[0]=0x04582390 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf80) at 0x00f6ef80: next=0x00000001<T> altnext=0x00000001<T> status=0x00008c80: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x80<ACTIVE> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 ehci_idone: ex=0xc1729400 done ehci_alloc_sqtd_chain: start len=8 ehci_check_intr: ex=0xc1729400 ehci_idone: ex=0xc1729400 ehci_idone: xfer=0xc1729400, pipe=0xc1727180 ready ehci_idone: len=8, actlen=8, status=0x40 ehci_idone: error, addr=0, endpt=0x00, status 0x40<HALTED> QH(0xc174af80) at 0x00fedf80: link=0x00fedfc2<QH> endp=0x80082000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=0 mpl=0x8 ctl=0 nrl=8 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00f6ef40<> Overlay qTD: next=0x00000001<T> altnext=0x00000011<T> status=0x00008c40: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x40<HALTED> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf80) at 0x00f6ef80: next=0x00f6efc0<> altnext=0x00f6efc0<> status=0x80000e00: toggle=1 bytes=0x0 ioc=0 c_page=0x0 cerr=3 pid=2 stat=0x0 buffer[0]=0x045823a8 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bfc0) at 0x00f6efc0: next=0x00f6ef40<> altnext=0x00f6ef40<> status=0x00008d00: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x0 buffer[0]=0x04582398 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf40) at 0x00f6ef40: next=0x00000001<T> altnext=0x00000001<T> status=0x00008c40: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x40<HALTED> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 ehci_idone: ex=0xc1729400 done ehci_alloc_sqtd_chain: start len=2 ehci_check_intr: ex=0xc1729400 ehci_idone: ex=0xc1729400 ehci_idone: xfer=0xc1729400, pipe=0xc1727180 ready ehci_idone: len=2, actlen=0, status=0x40 ehci_idone: error, addr=0, endpt=0x00, status 0x40<HALTED> QH(0xc174af80) at 0x00fedf80: link=0x00fedfc2<QH> endp=0x80082000 addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=0 mpl=0x8 ctl=0 nrl=8 endphub=0x40000000 smask=0x00 cmask=0x00 huba=0x00 port=0 mult=1 curqtd=0x00f6ef80<> Overlay qTD: next=0x00f6efc0<> altnext=0x00f6efd0<> status=0x80028d40: toggle=1 bytes=0x2 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x40<HALTED> buffer[0]=0x04582390 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf40) at 0x00f6ef40: next=0x00f6ef80<> altnext=0x00f6ef80<> status=0x80000e00: toggle=1 bytes=0x0 ioc=0 c_page=0x0 cerr=3 pid=2 stat=0x0 buffer[0]=0x045823a8 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bf80) at 0x00f6ef80: next=0x00f6efc0<> altnext=0x00f6efc0<> status=0x80028d40: toggle=1 bytes=0x2 ioc=1 c_page=0x0 cerr=3 pid=1 stat=0x40<HALTED> buffer[0]=0x04582390 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 QTD(0xc174bfc0) at 0x00f6efc0: next=0x00000001<T> altnext=0x00000001<T> status=0x00008c80: toggle=0 bytes=0x0 ioc=1 c_page=0x0 cerr=3 pid=0 stat=0x80<ACTIVE> buffer[0]=0x00000000 buffer[1]=0x00000000 buffer[2]=0x00000000 buffer[3]=0x00000000 buffer[4]=0x00000000 ehci_idone: ex=0xc1729400 done ehci_device_ctrl_close: pipe=0xc1727180 ehci_sync_hc: enter ehci_sync_hc: cmd=0x00080061 sts=0x00008000 ehci_intr1: door bell ehci_sync_hc: cmd=0x00080021 sts=0x00008000 ehci_sync_hc: exit uhub_explore: usb_new_device failed, error=STALLED uhub0: device problem, disabling port 1 uhub_explore: port 2 status 0x0500 0x0000 uhub_explore: port 3 status 0x0500 0x0000 uhub_explore: port 4 status 0x0500 0x0000 uhub_explore: port 5 status 0x0500 0x0000 From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 29 21:36:30 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31B5A16A4B3 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 21:36:30 -0700 (PDT) Received: from smtp102.mail.sc5.yahoo.com (smtp102.mail.sc5.yahoo.com [216.136.174.140]) by mx1.FreeBSD.org (Postfix) with SMTP id 2344444030 for <freebsd-hackers@freebsd.org>; Mon, 29 Sep 2003 21:36:29 -0700 (PDT) (envelope-from q_dolan@yahoo.com.au) Received: from vdub.onthenet.net (HELO ?172.22.1.10?) (q?dolan@203.10.89.16 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 30 Sep 2003 04:36:28 -0000 From: Q <q_dolan@yahoo.com.au> To: freebsd-hackers@freebsd.org Message-Id: <1064896584.35687.63.camel@boxster> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 30 Sep 2003 14:36:25 +1000 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-hardware@freebsd.org Subject: nForce MCP network driver - working X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 04:36:30 -0000 Hi, I am in the final stages of porting the NVidia Linux nForce MCP network driver to FreeBSD-5.1 and am after some experienced users/developers with access to this hardware to do some testing to find out what breaks, and what doesn't work. My driver makes use of the Linux nvnetlib.o API library, and should therefore be compliant with the NVidia Linux distribution license. The driver currently appears to be stable on my hardware (an MSI K7N420 Pro), although I haven't done much stress testing, nor do I have access to an nForce2 based motherboard to test. This is still very much a work in progress, but it has been stable enough for me to actually use productively so I thought I would share the wealth, so to speak, with the rest of the community. If you are interested in testing this, email me offline. I am also interested in how many people would like to see a FreeBSD-4.x version. PS: I am still waiting for NVidia to reply to any of my emails. :( -- Seeya...Q -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _____ / Quinton Dolan q_dolan@yahoo.com.au __ __/ / / __/ / / / __ / _/ / / Gold Coast, QLD, Australia __/ __/ __/ ____/ / - / Ph: +61 419 729 806 _______ / _\ From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 01:11:08 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D4EC16A4BF for <hackers@freebsd.org>; Tue, 30 Sep 2003 01:11:08 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AD9843FF7 for <hackers@freebsd.org>; Tue, 30 Sep 2003 01:11:07 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc1ac.dialup.mindspring.com ([209.86.5.76] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1A4FWA-0003a1-00; Tue, 30 Sep 2003 01:05:59 -0700 Message-ID: <3F793938.D9E715C3@mindspring.com> Date: Tue, 30 Sep 2003 01:05:12 -0700 From: Terry Lambert <tlambert2@mindspring.com> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Peter Jeremy <peterjeremy@optushome.com.au> References: <3F775D41.DF780001@bellatlantic.net> <20030929075809.GA3062@server.c211-28-27-130.belrs2.nsw.optusnet.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a40ec50d310886d6fd95fe797859d448e0666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: Sergey Babkin <babkin@bellatlantic.net> cc: hackers@freebsd.org Subject: Re: has anyone installed 5.1 from a SCSI CD? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 08:11:08 -0000 Peter Jeremy wrote: > On Sun, Sep 28, 2003 at 06:14:25PM -0400, Sergey Babkin wrote: > >BTW, I have another related issue too: since at least 4.7 > >all the disk device nodes have charcater device entries in /dev. > > 'block' vs 'character' has nothing to do with random or sequential > access and any application that thinks it does is broken. Any > application that directly accesses devices must understand all the > various quirks - ability to seek, block size(s) supported, side- > effects of operations etc. As opposed to the kernel understanding them, and representing the classes of devices uniformly to the user level software. > Yes, block devices must be random access, > but character devices can be either random or sequential-only > depending on the physical device. But character devices can't be "random-only". Therefore, you can assume the ability to perform random access on block devices, and you can assume character devices require sequential access, and your software will "just work", without a lot of buffer copying around in user space. > The only purpose for block devices was to provide a cache for disk > devices. It makes far more sense for this caching to be tightly > coupled into the filesystem code where the cache characteristics > can be better controlled. Actually, there are a number of other uses for this. The number one use is for devices whose physical block size is not an even power of two less than or equal to the page size. The primary place you see this is in reading audio tracks directly off CD's. Another place this is useful is in the UDF file system that Apple was prepared to donate to the FreeBSD project several years ago. DVD's are recorded in two discrete areas, one of which is an index section, recorded as ISO9660, and one of which is recorded as UDF. By providing two distinct devices to access the drive, it was possible to mount the character device as ISO9660, and then access the UDF data via the block device. Again, we are talking about physical block sizes of which the page size is not an even power of 2 multiple. Another use for these devices is to avoid the need for some form of intermediary blocking program (e.g. "dd", etc.) for accessing historical archives on tape devices. Traditional blocking on tape devices is 20K, and by enforcing this at the block device layer, it's possible to deal with streaming of tape devices without adding an unacceptable CPU overhead. Another issue is Linux emulation; Linux itself has only block devices, not character, and when things are the right size and alignment, the block devices "pass through" and act like character devices. However... this means that Linux software which depends on this behaviour will not run on FreeBSD under emulation. Finally, block devices serve the function of double-buffering a device for unaligned and/or non-physical block sized accesses. The benefit to this is that you do not need to replicate code in *every single user space program* in order deal with buffering issues. There has historically been a lot of pain involved in maintaining disk utilities, and in porting new FS's to FreeBSD, as a result of the lack of block devices to deal with issues like this. I'll agree that the change has been "mostly harmless" -- additional pain, rather than actually obstructing code from being written (except that Apple didn't donate the UDF code and it took years to reproduce it, of course, FreeBSD doesn't appear to have suffered anything other than a migration of FS developers to other platforms). On the other hand, a lot of the promised benefits of this change never really materialized; for example, even though it's "more efficient" in theory, Linux performance still surpasses FreeBSD performance when it comes to raw device I/O (and Linux has only *block* devices). We still have to use a hack ("foot shooting") to allow us to edit disklabels, rather than using an ioctl() to retrive thm or rewrite them as necessary, etc., and thus use user space utilities to do the work that belongs below an abstract layer in the kernel. I'm not saying that FreeBSD should switch to the Linux model -- though doing so would benefit Linux emulation, and, as Linux demonstrates, it does not have to mean a loss of performance -- but to paint it as something "everyone agreed upon" or even something "everyone has grown to accept" is also not a fair characterization. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 01:14:25 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45F5F16A4B3 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 01:14:25 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9416843FB1 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 01:14:24 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc1ac.dialup.mindspring.com ([209.86.5.76] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1A4FeD-0004WO-00; Tue, 30 Sep 2003 01:14:17 -0700 Message-ID: <3F793B2F.F5CB8416@mindspring.com> Date: Tue, 30 Sep 2003 01:13:35 -0700 From: Terry Lambert <tlambert2@mindspring.com> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: earthman <earthman@inbox.ru> References: <16244.53594.942762.784390@canoe.dclg.ca> <3F759589.9070700@mindspring.com> <811112091.20030929172247@inbox.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a40ec50d310886d6fd5f5b65725fbce8dd667c3043c0873f7e350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 08:14:25 -0000 earthman wrote: > how to allocate some memory chunk > in user space memory from kernel code? > how to do it correctly? If your intent is to allocate a chunk of memory which is shared between your kernel and a single process in user space, the normal way of doing this is to allocate the memory to a device driver in the kernel, and then support mmap() on it to establish a user space mapping for the kernel allocated memory. In general, you must do this so that the memory is wired down in the kernel address space, so that if you attempt to access it in the kernel while the process you are interested in sharing with is swapped out, you do not segfault and trap-12 ("page not present") panic your kernel. If your intent is to share memory with every process in user space (e.g. similar to what some OS's use to implement zero system call gettimeofday() functions, etc.), then you want to allocate the memory in kernel space (still), make sure it's on a page boundary, and set the PG_G and PG_U bits on the page(s) in question. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 01:29:09 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAA8216A4B3 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 01:29:09 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB29644022 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 01:29:08 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc1ac.dialup.mindspring.com ([209.86.5.76] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1A4FsT-0007lY-00; Tue, 30 Sep 2003 01:29:02 -0700 Message-ID: <3F793E9E.4164593F@mindspring.com> Date: Tue, 30 Sep 2003 01:28:14 -0700 From: Terry Lambert <tlambert2@mindspring.com> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Pawel Jakub Dawidek <nick@garage.freebsd.pl> References: <16244.53594.942762.784390@canoe.dclg.ca> <3F759589.9070700@mindspring.com> <20030929154741.GB520@garage.freebsd.pl> <20030929191258.GC520@garage.freebsd.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a499c1d3e69414d6d2afbf0d49792343c6a2d4e88014a4647c350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: earthman <earthman@inbox.ru> Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 08:29:09 -0000 Pawel Jakub Dawidek wrote: > On Mon, Sep 29, 2003 at 06:56:13PM +0300, Peter Pentchev wrote: > +> I mean, won't the application's memory manager attempt to allocate the > +> next chunk of memory right over the region that you have stolen with > +> this brk(2) invocation? Thus, when the application tries to write into > +> its newly-allocated memory, it will overwrite the data that the kernel > +> has placed there, and any attempt to access the kernel's data later will > +> fail in wonderfully unpredictable ways :) > > I'm not sure if newly allocated memory will overwrite memory allocated > in kernel, but for sure process is able to write to this memory. > > Sometime ago I proposed model which will allow to remove all copyin(9) > calls and many copyout(9), but I'm not so skilled in VM to implement it. You probably need two pages; one R/O in user space and R/W in kernel space, and one R/W in both user and kernel space. The copyin() elimination would use the R/W page. Frankly, I have to say that you aren't saving much by eliminating copyin() this way, and most of your overhead is going to be data copies with pointers, and it doesn't really matter where you get the pointers into the kernel, the bummer is going to be copying around the data pointed to by the pointers. For the copyout, you'd probably get a rather larger benefit if you could implement getpid(), getuid(), getgid(), getppid(), and so on, in user space entirely, just by referencing the common read-only page. You could probably also benefit significantly by deobfuscating the timer code and using a flip-flop timer and externalizing the calibration information in a single globally read-only page (PG_G, PG_U, R/O mapping one place, kernel-only R/W mapping another), and then using it to implement a zero system call gettimeofday() operation (there's really no need to have a huge list of timers, if updates are effectively atomic at the clock interrupt, and you use a flip-flop pointer to only two contexts instead of a huge number of them). Specifically, you could find yourself with a huge performance improvement in anything that has to log in the Apache/SQUID styles, which require a *lot* of logging, which would mean a *lot* of system calls. You could also use a knote for this, which is only returned when other knote's are returned, and not otherwise, but that would be a lot less friendly to third party source code that was not specifically adulterated for FreeBSD. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 02:11:25 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9D0416A4D7 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 02:11:25 -0700 (PDT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id C8AB24403B for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 02:11:22 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 943 invoked from network); 30 Sep 2003 09:11:21 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by gandalf.online.bg with SMTP; 30 Sep 2003 09:11:21 -0000 Received: (qmail 26391 invoked by uid 1000); 30 Sep 2003 08:59:13 -0000 Date: Tue, 30 Sep 2003 11:59:13 +0300 From: Peter Pentchev <roam@ringlet.net> To: Brian O'Shea <b_oshea@yahoo.com> Message-ID: <20030930085913.GJ551@straylight.oblivion.bg> Mail-Followup-To: Brian O'Shea <b_oshea@yahoo.com>, Pawel Jakub Dawidek <nick@garage.freebsd.pl>, freebsd-hackers@freebsd.org, earthman <earthman@inbox.ru> References: <20030929155613.GB551@straylight.oblivion.bg> <20030930000405.12154.qmail@web10509.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3ecMC0kzqsE2ddMN" Content-Disposition: inline In-Reply-To: <20030930000405.12154.qmail@web10509.mail.yahoo.com> User-Agent: Mutt/1.5.4i cc: earthman <earthman@inbox.ru> cc: freebsd-hackers@freebsd.org Subject: Re: user malloc from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 09:11:26 -0000 --3ecMC0kzqsE2ddMN Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 29, 2003 at 05:04:05PM -0700, Brian O'Shea wrote: > --- Peter Pentchev <roam@ringlet.net> wrote: [actually, Pawel wrote this:] > > > Here you got sample kernel module which do this: > > >=20 > > > http://garage.freebsd.pl/usmalloc.tgz > > > http://garage.freebsd.pl/usmalloc.README [and then I replied] > >=20 > > Errrr... but won't this interfere *badly* with userland programs > > which attempt to allocate memory after making the syscall in question? >=20 > Couldn't the user library interface to this new system call just > malloc() the memory first in the process, and then pass the pointer > and size to the kernel via the system call interface? This would > ensure that malloc() doesn't touch the desired range of memory until > it is freed by the user. You'd just have to be careful not to free > it until the kernel is done with it. This would be my preferred solution, too, although it might mean that when you are not exactly sure of how much memory the kernel will need, you either overallocate and pass a max-size argument (see most of the socket calls like accept(2), getsockname(2), getpeername(2), etc), or you do two syscalls, one for determining the size needed, and another for actually copying the data (see sysctl(3)). The second approach is more robust, but it does have the overhead of an additional syscall and might also possibly be vulnerable to a race (if the data should change between the two invocations). This, of course, could be worked around by having another couple of syscalls for locking and unlocking the data - lock, query size, fetch, unlock - but that would open a whole new can of worms :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If wishes were fishes, the antecedent of this conditional would be true. --3ecMC0kzqsE2ddMN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/eUXh7Ri2jRYZRVMRAmnMAJ9+MA181BQI8/vi4SzOe5vDTYUYhgCgrOlb Lswoo3ZyAYABUX1UERrxifk= =NGxk -----END PGP SIGNATURE----- --3ecMC0kzqsE2ddMN-- From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 03:33:48 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E04AF16A4B3 for <hackers@freebsd.org>; Tue, 30 Sep 2003 03:33:47 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E1EE43F3F for <hackers@freebsd.org>; Tue, 30 Sep 2003 03:33:45 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) h8UAXfFs008388 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 30 Sep 2003 12:33:43 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id h8UAXeWZ091389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Sep 2003 12:33:40 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h8UAXdrY049817; Tue, 30 Sep 2003 12:33:39 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h8UAXchm049812; Tue, 30 Sep 2003 12:33:38 +0200 (CEST) Date: Tue, 30 Sep 2003 12:33:38 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: Barry Bouwsma <freebsd-misuser@NOSPAM.dyndns.dk> Message-ID: <20030930103337.GL18891@cicely12.cicely.de> References: <200309300326.h8U3QXx12997@Mail.NOSPAM.DynDNS.dK> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309300326.h8U3QXx12997@Mail.NOSPAM.DynDNS.dK> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: FreeBSD Hacking Group <hackers@freebsd.org> Subject: Re: USB2.0 external hub and ehci question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 10:33:48 -0000 On Tue, Sep 30, 2003 at 05:26:33AM +0200, Barry Bouwsma wrote: > [Drop hostname part of IPv6-only address above to obtain IPv4-capable e-mail, > or just drop me from the recipients and I'll catch up from the archives] > > > Hallo Hackers, I suppose I should post this to -current as the code in > question is derived from there, but I'm running it on RELENG_4, so... > > I've ported the USB controller codes (uhci, ohci, and ehci) from -current > to 4.9-PRERELEASE in order to try and add USB2.0 support to 4.x, and I see > something that I also saw with the NetBSD ehci codes back last December; > namely, that I can't attach an external hub, supposedly with USB2.0 > capability, and have it be recognized. > > First, I seem to have no problems building just the uhci and ohci codes > into the usb.ko kernel module, and using them, though I haven't thoroughly > crash-tested them. > > I've mixed all three controller codes, with the result that the hub is > not seen. Nor is the external drive. Which I attribute to my own > incompetence more than anything. So to make things easier, I ditched > all but the ehci code and ignored the check for companion controllers, > to limit testing to just that. > > With an external USB2.0 drive connected, I am able to see and mount it. > When I connect the external hub in its place, I get the error that the > port was disabled, STALLED -- just as I saw under old NetBSD. > > I haven't built -current, or a more recent NetBSD, to see if their > behaviour is any different when faced with this hub. Is it possible > I need some sort of quirks entry for this device, which I can use as > a USB1.x device fine? Or do I not even get that far? cypress hubs stall the controll endpoint without a reason when running high speed - even if it had one the specs say that the control endpoint shouldn't stall at all. I have a workaround for the probing problem, but USB2 hubs won't work anyway, because at ehci is missing support for interrupt endpoints. Maybe there are other show stopppers too. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 07:44:13 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B02016A4B3 for <hackers@freebsd.org>; Tue, 30 Sep 2003 07:44:13 -0700 (PDT) Received: from c001.snv.cp.net (h024.c001.snv.cp.net [209.228.32.139]) by mx1.FreeBSD.org (Postfix) with SMTP id 84D8743FBD for <hackers@freebsd.org>; Tue, 30 Sep 2003 07:44:10 -0700 (PDT) (envelope-from port@lifehost.org) Received: (cpmta 22883 invoked from network); 30 Sep 2003 07:44:08 -0700 Received: from 62.135.6.162 (HELO sirus) by smtp.register-admin.com (209.228.32.139) with SMTP; 30 Sep 2003 07:44:08 -0700 X-Sent: 30 Sep 2003 14:44:08 GMT Message-ID: <00e201c38760$fd414830$a206873e@sirus> From: "LiFeHosting Internet" <port@lifehost.org> To: <hackers@freebsd.org> Date: Tue, 30 Sep 2003 16:41:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: IPFW X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 14:44:13 -0000 hello there, I was thinking you have to add some thing about the limiting rules some more control about the way it makes the dynamic rules like in allow tcp from any to any 21,22,80 limit dst-port 50 this would make a dynamic rules to limit each port to 50 but what if I want to control this to limit the total of these ports into 50 ? same with hosts there should be some control over how IPFW creates the dynamic rules. Thanks Regards, From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 09:27:39 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9393816A4B3 for <hackers@freebsd.org>; Tue, 30 Sep 2003 09:27:39 -0700 (PDT) Received: from smtp.well.com (smtp.well.com [206.14.209.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id E159043FEA for <hackers@freebsd.org>; Tue, 30 Sep 2003 09:27:38 -0700 (PDT) (envelope-from howardjp@well.com) Received: from well.com (well.com [206.14.209.5]) by smtp.well.com (8.12.10/8.12.10) with ESMTP id h8UGRcra012028 for <hackers@freebsd.org>; Tue, 30 Sep 2003 09:27:38 -0700 (PDT) Received: from localhost (howardjp@localhost) by well.com (8.12.10/8.12.10/Submit) with ESMTP id h8UGRccr024033 for <hackers@freebsd.org>; Tue, 30 Sep 2003 09:27:38 -0700 (PDT) Date: Tue, 30 Sep 2003 09:27:38 -0700 (PDT) From: James Howard <howardjp@well.com> To: hackers@freebsd.org Message-ID: <Pine.GSO.4.58.0309300926530.23140@well.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Custom installworld X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 16:27:39 -0000 It's sometimes necessary to have a set of custom scripts run as part of the installation routine (possibly security changes, possibly local customizations). Is there a hook in the makefiles which would allow local functions to be run? What about generalizing this to work for most common (buildworld, installworld, etc) or all targets? Thank you, James -- James Howard howardjp@well.com 202-390-4933 From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 09:50:41 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5A1316A4C2 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 09:50:40 -0700 (PDT) Received: from bjpu.edu.cn (egw.bjpu.edu.cn [202.112.78.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id E349144011 for <freebsd-hackers@freebsd.org>; Tue, 30 Sep 2003 09:50:34 -0700 (PDT) (envelope-from liukang@bjpu.edu.cn) Received: (eyou gateway send program); Wed, 01 Oct 2003 00:54:05 +0800 X-EYOU-ORIGINAL-IP: 202.112.78.224 X-EYOU-ENVELOPE-MAILFROM: liukang@bjpu.edu.cn Received: from unknown (HELO lkatschool) (unknown@202.112.78.224) by 202.112.78.77 with ; Wed, 01 Oct 2003 00:54:05 +0800 From: "Kang Liu" <liukang@bjpu.edu.cn> To: <freebsd-gnats-submit@FreeBSD.org> Date: Wed, 1 Oct 2003 00:47:17 +0800 Message-ID: <012901c38772$8288c9d0$e04e70ca@lkatschool> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal cc: freebsd-ipfw@freebsd.org cc: cokane@FreeBSD.ORG cc: freebsd-hackers@freebsd.org Subject: Re: kern/50216: kernel panic on 5.0-current when use ipfw2 with dynamic rules X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 16:50:41 -0000 I reproduced it on the latest 5.1current. Here is the backtrace: ##### GNU gdb 5.2.1 (FreeBSD) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-undermydesk-freebsd"... panic: Most recently used by cred panic messages: --- panic: Most recently used by cred Stack backtrace: syncing disks, buffers remaining... 628 628 628 628 628 628 628 628 628 628 628 628 628 628 628 628 628 628 628 628 giving up on 520 buffers Uptime: 16m0s Dumping 255 MB 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 --- Reading symbols from /usr/obj/usr/src/sys/IPFW/modules/usr/src/sys/modules/acpi/acpi.ko.debug...done. Loaded symbols for /usr/obj/usr/src/sys/IPFW/modules/usr/src/sys/modules/acpi/acpi.ko.debug Reading symbols from /boot/kernel/daemon_saver.ko...done. Loaded symbols for /boot/kernel/daemon_saver.ko #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:240 240 dumping++; (kgdb) bt #0 doadump () at /usr/src/sys/kern/kern_shutdown.c:240 #1 0xc01a0221 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:372 #2 0xc01a05b7 in panic () at /usr/src/sys/kern/kern_shutdown.c:550 #3 0xc02817f7 in mtrash_ctor (mem=0xc29f8a80, size=0, arg=0x0) at /usr/src/sys/vm/uma_dbg.c:137 #4 0xc028002e in uma_zalloc_arg (zone=0xc083ab40, udata=0x0, flags=257) at /usr/src/sys/vm/uma_core.c:1413 #5 0xc0194a23 in malloc (size=3229854528, type=0xc03020c0, flags=257) at /usr/src/sys/vm/uma.h:234 #6 0xc021e03f in add_dyn_rule (id=0xcd7bfc90, dyn_type=39 '\'', rule=0xc2815e00) at /usr/src/sys/netinet/ip_fw2.c:976 #7 0xc021e43e in install_state (rule=0xc28f3a80, cmd=0xc28f3ac0, args=0xcd7bfc70) at /usr/src/sys/netinet/ip_fw2.c:1140 #8 0xc021f4dc in ipfw_chk (args=0xcd7bfc70) at /usr/src/sys/netinet/ip_fw2.c:1942 #9 0xc0221dd7 in ip_input (m=0xc0ed9800) at /usr/src/sys/netinet/ip_input.c:489 #10 0xc0211a82 in swi_net (dummy=0x0) at /usr/src/sys/net/netisr.c:236 #11 0xc018c762 in ithread_loop (arg=0xc0ebec80) at /usr/src/sys/kern/kern_intr.c:534 #12 0xc018b76f in fork_exit (callout=0xc018c5e0 <ithread_loop>, arg=0x0, frame=0x0) at /usr/src/sys/kern/kern_fork.c:796 (kgdb) ##### Here is my full ipfw rule set script: # cat ./ipfwpanic.sh dumpon -v /dev/ad0s1b /sbin/ipfw add allow tcp from any to any established /sbin/ipfw add allow ip from a.b.c.0 to a.b.c.d /sbin/ipfw add allow tcp from any to a.b.c.d 80 limit src-addr 20 setup /sbin/ipfw add allow ip from a.b.c.d to any And I added "IPFIREWALL_DEFAULT_TO_ACCEPT" into kernel configure file. ##### Here is my test script. I installed an apache on that machine, and use ab to connect 80 port. cat panicstart.sh #!/bin/sh number=0 while (test $number -lt 10000) do echo "$number" ab -c 100 http://a.b.c.d/ number=`expr $number + 1` done ##### This problem can be reproduced on both MP and UP machine. I've tested it on a dell poweredge2650(with 2 P4xeon, HTT enabled/disabled) and a DIY PC(1 PIII CPU). The backtrace I post above is produced on PC(1CPU). From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 30 13:45:13 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA43116A4B3; Tue, 30 Sep 2003 13:45:13 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D019344005; Tue, 30 Sep 2003 13:45:12 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id BD2CC2A7EA; Tue, 30 Sep 2003 13:45:12 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Q <q_dolan@yahoo.com.au> In-Reply-To: <1064896584.35687.63.camel@boxster> Date: Tue, 30 Sep 2003 13:45:12 -0700 From: Peter Wemm <peter@wemm.org> Message-Id: <20030930204512.BD2CC2A7EA@canning.wemm.org> cc: freebsd-hackers@freebsd.org cc: freebsd-hardware@freebsd.org Subject: Re: nForce MCP network driver - working X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 30 Sep 2003 20:45:14 -0000 Q wrote: > Hi, > > I am in the final stages of porting the NVidia Linux nForce MCP network > driver to FreeBSD-5.1 and am after some experienced users/developers > with access to this hardware to do some testing to find out what breaks, > and what doesn't work. My driver makes use of the Linux nvnetlib.o API > library, and should therefore be compliant with the NVidia Linux > distribution license. > > The driver currently appears to be stable on my hardware (an MSI K7N420 Pro), > although I haven't done much stress testing, nor do I have access to an > nForce2 based motherboard to test. I have a set of nForce2 and nForce3 based boards, but they all run 5.x and the nForce3 is an athlon64 system. > This is still very much a work in progress, but it has been stable > enough for me to actually use productively so I thought I would share > the wealth, so to speak, with the rest of the community. > > If you are interested in testing this, email me offline. I am also > interested in how many people would like to see a FreeBSD-4.x version. > > PS: I am still waiting for NVidia to reply to any of my emails. :( Fun fun. :-( Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 01:28:08 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB3CE16A4B3 for <freebsd-hackers@freebsd.org>; Wed, 1 Oct 2003 01:28:08 -0700 (PDT) Received: from ipnet.ru (relay.ipnet.ru [62.16.100.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id B535543F85 for <freebsd-hackers@freebsd.org>; Wed, 1 Oct 2003 01:28:06 -0700 (PDT) (envelope-from tsypa@post.spbip.net) Received: from [127.0.0.1] (HELO post.spbip.net) by ipnet.ru (CommuniGate Pro SMTP 4.0.5) with ESMTP-TLS id 2675522 for freebsd-hackers@FreeBSD.ORG; Wed, 01 Oct 2003 08:28:04 +0000 Received: (from tsypa@localhost) by post.spbip.net (8.12.8p1/8.12.8/Submit) id h918S4IV032328 for freebsd-hackers@FreeBSD.ORG; Wed, 1 Oct 2003 08:28:04 GMT Date: Wed, 1 Oct 2003 08:28:04 +0000 From: Igor Tseglevsky <tsypa@ipnet.ru> To: freebsd-hackers@FreeBSD.ORG Message-ID: <20031001082803.GQ38424@ipnet.ru> References: <20030923091257.GF88647@ipnet.ru> <200309231549.h8NFnhYY021877@spider.deepcore.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200309231549.h8NFnhYY021877@spider.deepcore.dk> User-Agent: Mutt/1.4i Subject: Re: raid (atacontrol) problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 01 Oct 2003 08:28:09 -0000 On Tue, Sep 23, 2003 at 05:49:42PM +0200, Soren Schmidt wrote: > It seems Igor Tseglevsky wrote: > [ Charset KOI8-R unsupported, converting... ] > > Strange problems with RAID. If disks are located on different controllers > > after rebooting one of disks disappears. Disks on one controller coexist in > > RAID normally. > > Is that Promise controller a fasttrak ie with a RAID BIOS ? > In that case you cant span controllers, that only works on > generic ATA controllers (ie those without any RAID). No, I use a 'Promise Ultra ATA/133', it is simple ATA controller, without any RAID in BIOS. > > Any ideas? Please, help! > > > > cf# atacontrol status 0 > > atacontrol: ioctl(ATARAIDSTATUS): Device not configured > > cf# atacontrol create mirror ad1 ad4 > > ar0 created > > cf# atacontrol status 0 > > ar0: ATA RAID1 subdisks: ad1 ad4 status: READY > > cf# fastboot > > > > cf# atacontrol status 0 > > ar0: ATA RAID1 subdisks: ad1 DOWN status: DEGRADED > > > > In dmesg: > > > > ad0: 76319MB <ST380011A> [155061/16/63] at ata0-master UDMA66 > > ad1: 76319MB <ST380011A> [155061/16/63] at ata0-slave UDMA66 > > ad2: DMA limited to UDMA33, non-ATA66 cable or device > > ad2: 76319MB <ST380011A> [155061/16/63] at ata1-master UDMA33 > > ad4: 76319MB <ST380011A> [155061/16/63] at ata2-master UDMA100 > > ad6: 76319MB <ST380011A> [155061/16/63] at ata3-master UDMA100 > > ar0: WARNING - mirror lost > > ar0: 76319MB <ATA RAID1 array> [9729/255/63] status: DEGRADED subdisks: > > disk0 READY on ad1 at ata0-slave > > disk1 DOWN no device found for this disk > > > > Similarly for ad2 and ad6. > > > > Other situation with same controller: > > > > cf# atacontrol status 0 > > atacontrol: ioctl(ATARAIDSTATUS): Device not configured > > cf# atacontrol create mirror ad1 ad2 > > ar0 created > > cf# atacontrol status 0 > > ar0: ATA RAID1 subdisks: ad1 ad2 status: READY > > cf# fastboot > > > > cf# atacontrol status 0 > > ar0: ATA RAID1 subdisks: ad1 ad2 status: READY > > > > Similarly for ad4 and ad6. > > > > cf# uname -a > > FreeBSD cf 5.1-RELEASE-p5 FreeBSD 5.1-RELEASE-p5 #0: Mon Sep 22 07:46:00 GMT 2003 tsypa@cf:/usr/obj/usr/src/sys/GENERIC i386 > > cf# > > > > Some dmesg about controllers: > > > > atapci0: <Promise PDC20269 UDMA133 controller> port 0xdf90-0xdf9f,0xdfe0-0xdfe3,0xdfa8-0xdfaf,0xdfe4-0xdfe7,0xdff0-0xdff7 mem 0xfeafc000-0xfeafffff irq 11 at device 8.0 on pci2 > > ata2: at 0xdff0 on atapci0 > > ata3: at 0xdfa8 on atapci0 > > > > atapci1: <Intel ICH UDMA66 controller> port 0xffa0-0xffaf at device 31.1 on pci0 > > ata0: at 0x1f0 irq 14 on atapci1 > > ata1: at 0x170 irq 15 on atapci1 > > > > Igor. > > > > _______________________________________________ > > 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" > > > > -S?ren > _______________________________________________ > 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" From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 02:45:25 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1694A16A4B3; Wed, 1 Oct 2003 02:45:25 -0700 (PDT) Received: from upsn231.cri.u-psud.fr (upsn231.cri.u-psud.fr [129.175.34.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F5BA43FCB; Wed, 1 Oct 2003 02:45:23 -0700 (PDT) (envelope-from invalid@kma.eu.org) Received: from ikaria.inria-futurs.pcri.u-psud.fr (ikaria.inria-futurs.pcri.u-psud.fr [129.175.144.36])h919iPaT029274; Wed, 1 Oct 2003 11:44:25 +0200 Received: from kma.eu.org (localhost [127.0.0.1])h919jJD14283; Wed, 1 Oct 2003 11:45:19 +0200 Message-ID: <3F7AA0D8.1080801@kma.eu.org> Date: Wed, 01 Oct 2003 11:39:36 +0200 From: Grumble <invalid@kma.eu.org> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned: by amavis X-Spam-Status: score=-10.5 tests=BAYES_10,QUOTED_EMAIL_TEXT,USER_AGENT_MOZILLA_UA autolearn=ham version=2.53 X-Spam-Level: X-Spam-Score: X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) cc: freebsd-ia32@freebsd.org Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 01 Oct 2003 09:45:25 -0000 [ First posted to freebsd-questions and freebsd-ia32 ] [ Add freebsd-hackers which I hope is appropriate ] The References: and In-Reply-To: headers are missing from this message. If your mail client does not thread it correctly, please accept my apologies. Before mailman, I could display messages in raw format, with full headers, e.g. docs.freebsd.org/cgi/getmsg.cgi?fetch=2771331+0+archive/2003/freebsd-questions/20030928.freebsd-questions+raw >> I've been playing with my Athlon's timestamp counter for a while, >> and I would like to experiment with the performance-monitoring >> counters now. >> >> I can execute the RDTSC instruction from ring 3 because the TSD >> (TimeStamp Disable) bit in CR4 (Control Register 4) is cleared. >> >> However, I am not allowed to use the RDPMC instruction from ring 3 >> because the PCE (Performance-monitoring Counters Enable) bit is not set. > > You can do it with /dev/perfmon. man 4 perfmon. I have read the perfmon documentation and source code. For several reasons, I do not think it is totally adequate in my situation. It was designed in 1996 with the Pentium Pro in mind, which, apparently, only has two performance counters: #define NPMC 2 if (pmc < 0 || pmc >= NPMC) return EINVAL; I mentioned kernel modules because I want to avoid having to recompile my kernel. Even if I did set NPMC to 4 and recompiled, I am not convinced that perfmon would still work. void perfmon_init(void) { ... case CPUCLASS_686: perfmon_cpuok = 1; msr_ctl[0] = 0x186; msr_ctl[1] = 0x187; msr_pmc[0] = 0xc1; msr_pmc[1] = 0xc2; writectl = writectl6; break; /* if NPMC>2 then msr_ctl[] and msr_pmc[] are not completely * initialized, is this a problem? */ Assume I get perfmon to work with my K7's 4 performance-monitoring counters. Since PCE is not set, I am not allowed to call RDPMC from ring 3. I have to make a system call, just to read the counters. I will pay in terms of computation overhead to process a system call, instead of a single instruction. But more importantly, it will wreck the cache, and possibly the TLB. There is no point in monitoring an event if the monitoring tools disturb the environment too much. >> Is there a reason (security? performance? other?) why FreeBSD does >> not set PCE at boot time? Is it just an oversight that FreeBSD does not set PCE at boot time, or is there a reason? I can provide a patch if nobody opposes the idea. Or write a kernel module that will do it when loaded. >> On a related subject, is there a way for a kernel module to catch a >> general-protection fault caused by an application trying to execute >> RDMSR or WRMSR, and have the kernel module execute the instruction >> for the application? Or is it cleaner to register two new system >> calls to achieve the same thing? > > That would (probably) require adding superuser-configurable permissions > to read/write to a specific MSR, as some of them are critical. I doubt > it's worth creating extra device nodes, and I wonder if there's a > "cleaner" way to do that. My intent is to allow an application access to the 4 performance monitoring control registers ONLY. The application would try to execute WRMSR (a privileged instruction) which would cause a GPF. The kernel module would catch the fault, sanity-check the arguments, and proceed with the WRMSR when the arguments are valid. Could you point me to some documentation, or is the source the only documentation available in this situation? :-) -- Shill (shill at free dot fr) From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 04:42:02 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D317F16A4B3; Wed, 1 Oct 2003 04:42:02 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5ACB543FDF; Wed, 1 Oct 2003 04:42:01 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id C1AD1654DD; Wed, 1 Oct 2003 12:41:59 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 70447-01-7; Wed, 1 Oct 2003 12:41:58 +0100 (BST) Received: from saboteur.dek.spc.org (unknown [81.3.72.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 7A68A654E7; Wed, 1 Oct 2003 12:41:58 +0100 (BST) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id C16861F; Wed, 1 Oct 2003 12:41:56 +0100 (BST) Date: Wed, 1 Oct 2003 12:41:56 +0100 From: Bruce M Simpson <bms@spc.org> To: Grumble <invalid@kma.eu.org> Message-ID: <20031001114155.GA12991@saboteur.dek.spc.org> Mail-Followup-To: Grumble <invalid@kma.eu.org>, freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org, freebsd-ia32@freebsd.org References: <3F7AA0D8.1080801@kma.eu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <3F7AA0D8.1080801@kma.eu.org> cc: freebsd-hackers@freebsd.org cc: freebsd-ia32@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 01 Oct 2003 11:42:03 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 01, 2003 at 11:39:36AM +0200, Grumble wrote: > >>However, I am not allowed to use the RDPMC instruction from ring 3 > >>because the PCE (Performance-monitoring Counters Enable) bit is not set. > > > >You can do it with /dev/perfmon. man 4 perfmon. > > I have read the perfmon documentation and source code. For several > reasons, I do not think it is totally adequate in my situation. [snip] Hi, Eat this. Diff attached. Test this and I'll commit it to -CURRENT if you're happy with it. If you can tell me more about what perfmon needs I'll give it love too. This is an extension to the i386_vm86() syscall which will let you turn PCE on and off if you're the superuser. BMS --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="i386pce.col.diff" Generated by diffcoll on Wed 1 Oct 2003 12:39:07 BST diff -uN src/lib/libc/i386/sys/i386_vm86.2.orig src/lib/libc/i386/sys/i386_vm86.2 --- /usr/src/lib/libc/i386/sys/i386_vm86.2.orig Wed Oct 1 12:13:50 2003 +++ /usr/src/lib/libc/i386/sys/i386_vm86.2 Wed Oct 1 12:36:44 2003 @@ -112,6 +112,26 @@ .Fa state will contain the state of the VME flag on return. .\" .It Dv VM86_SET_VME +.It Dv VM86_GET_PCE +This is used to retrieve the current state of the Pentium(r) processor's +PCE (Performance Counter Enable) flag, which is bit 8 of CR4. +.Bd -literal +struct vm86_pce_args { + int state; /* status */ +}; +.Ed +.Pp +.Fa state +will contain the state of the VME flag on return. +.It Dv VM86_SET_PCE +This is used to set the current state of the PCE flag. +Enabling this bit allows any code to execute the +.Li RDPMC +instruction. +Disabling this bit will allow only code running at protection level 0 to +execute this instruction. +Because this bit has system-wide granularity, it may only be enabled by +the superuser. .El .Pp vm86 mode is entered by calling @@ -133,6 +153,13 @@ .It Bq Er ENOMEM There is not enough memory to initialize the kernel data structures. .El +.Sh BUGS +The +.Dv VM86_SETPCE +and +.Dv VM86_GETPCE +functions are only guaranteed to work for uniprocessor kernels; their +results on SMP systems are undefined. .Sh AUTHORS .An -nosplit This man page was written by diff -uN src/sys/i386/i386/vm86.c.orig src/sys/i386/i386/vm86.c --- /usr/src/sys/i386/i386/vm86.c.orig Wed Oct 1 12:16:23 2003 +++ /usr/src/sys/i386/i386/vm86.c Wed Oct 1 12:39:01 2003 @@ -734,6 +734,29 @@ } break; + case VM86_SET_PCE: { + struct vm86_pce_args sa; + + if ((error = suser(td))) + return (error); + if (!(cpu_feature & CPUID_TSC) || !(cpu_feature & CPUID_MMX)) + return (ENODEV); + if ((error = copyin(ua.sub_args, &sa, sizeof(sa)))) + return (error); + if (sa.state) + load_cr4(rcr4() | CR4_PCE); + else + load_cr4(rcr4() & ~CR4_PCE); + } + break; + + case VM86_GET_PCE: { + struct vm86_pce_args sa; + + sa.state = (rcr4() & CR4_PCE ? 1 : 0); + error = copyout(&sa, ua.sub_args, sizeof(sa)); + } + default: error = EINVAL; } diff -uN src/sys/i386/include/vm86.h.orig src/sys/i386/include/vm86.h --- /usr/src/sys/i386/include/vm86.h.orig Wed Oct 1 12:22:53 2003 +++ /usr/src/sys/i386/include/vm86.h Wed Oct 1 12:37:56 2003 @@ -128,6 +128,8 @@ #define VM86_SET_VME 2 #define VM86_GET_VME 3 #define VM86_INTCALL 4 +#define VM86_SET_PCE 5 +#define VM86_GET_PCE 6 struct vm86_init_args { int debug; /* debug flag */ @@ -136,6 +138,10 @@ }; struct vm86_vme_args { + int state; /* status */ +}; + +struct vm86_pce_args { int state; /* status */ }; --DocE+STaALJfprDB-- From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 04:42:25 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3215416A4B3; Wed, 1 Oct 2003 04:42:25 -0700 (PDT) Received: from mccinet.ru (relay.cell.ru [212.119.96.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9294B43F75; Wed, 1 Oct 2003 04:42:23 -0700 (PDT) (envelope-from dolgop@mccinet.ru) Received: from [212.1.235.150] (HELO server.dep624) by mccinet.ru (CommuniGate Pro SMTP 4.1.4) with ESMTP-TLS id 7524781; Wed, 01 Oct 2003 15:42:21 +0400 From: Evgeny Dolgopiat <dolgop@mccinet.ru> To: "freebsd-cluster" <freebsd-cluster@FreeBSD.ORG> Date: Wed, 1 Oct 2003 15:44:36 +0400 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310011544.36182.dolgop@mccinet.ru> cc: freebsd-hackers <freebsd-hackers@FreeBSD.ORG> Subject: ng_one2many heartbeat algorithm for LAN fault tolerance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: evg_dolgop@mail.ru List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 01 Oct 2003 11:42:25 -0000 Hi all, The link to the patches and some docs: http://www.watson.org/~ilmar/download/ng_one2many.tbz What is it Link failure determination for one2many netgraph node. How it works It is implemented as "heartbeat" packet counters on all one2many tranked interfaces. If the number of packest hook received is less for some specified value than max number of packest, received by another hooks of the node, then interface is marked as failed (subnet or link failure). If this difference is less than this value and interface is marked as failed, then interface is up and working. How to setup Algorithm number is 2, so to configure node one should issue "setconfig {xmitAlg=1 failAlg=2}" message for ng_one2many node. There are two params of algorithm: timeout - time between sending of hearbeat packets (integer number of 1/10 sec) period - number of timeouts for failure determination statistics Default values are timeout=10 and period=10. Two new node messages: "gethbconfig" and "sethbconfig {timeout=X period=Y}" for getting and setting heartbeat algorithm params. Author: Evgeny Dolgopiat <dolgop@mccinet.ru> From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 05:41:34 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B20F516A4B3 for <freebsd-hackers@freebsd.org>; Wed, 1 Oct 2003 05:41:34 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCE0B43FF7 for <freebsd-hackers@freebsd.org>; Wed, 1 Oct 2003 05:41:33 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id E339C65495; Wed, 1 Oct 2003 13:41:32 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 70902-02-7; Wed, 1 Oct 2003 13:41:32 +0100 (BST) Received: from saboteur.dek.spc.org (unknown [81.3.72.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 54F7D65449; Wed, 1 Oct 2003 13:41:32 +0100 (BST) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id C11031F; Wed, 1 Oct 2003 13:41:29 +0100 (BST) Date: Wed, 1 Oct 2003 13:41:29 +0100 From: Bruce M Simpson <bms@spc.org> To: Grumble <invalid@kma.eu.org>, freebsd-hackers@freebsd.org Message-ID: <20031001124129.GB13612@saboteur.dek.spc.org> Mail-Followup-To: Grumble <invalid@kma.eu.org>, freebsd-hackers@freebsd.org References: <3F7AA0D8.1080801@kma.eu.org> <20031001114155.GA12991@saboteur.dek.spc.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031001114155.GA12991@saboteur.dek.spc.org> Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 01 Oct 2003 12:41:34 -0000 [crossposting trimmed] On Wed, Oct 01, 2003 at 12:41:56PM +0100, Bruce M Simpson wrote: > > I have read the perfmon documentation and source code. For several > > reasons, I do not think it is totally adequate in my situation. > This is an extension to the i386_vm86() syscall which will let you turn > PCE on and off if you're the superuser. Now that I think on this a bit more, a sysctl might be a better place to put this, but it seemed to belong with the i386_vm86() bits, rather than polluting initcpu.c right away. Mind you, if you're going to hack perfmon, perhaps putting this in initcpu isn't such a bad idea after all, with a loader tunable instead. That way perfmon can pickup on the tunable when attached by nexus during boot. A few people want to see i386_vm86() die. Its death is inevitable given x86-64 and the other new platforms. So perhaps the other way is better. In any event, I reconsider my decision to commit the code, and simply offer it as an example of one way to do things, not necessarily the right way. BMS From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 1 06:43:51 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A146116A4B3 for <hackers@freebsd.org>; Wed, 1 Oct 2003 06:43:51 -0700 (PDT) Received: from webmail.tiscali.de (relay1.tiscali.de [62.26.116.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E76543FAF for <hackers@freebsd.org>; Wed, 1 Oct 2003 06:43:50 -0700 (PDT) (envelope-from walter@pelissero.de) Received: from daemon.home.loc (62.246.17.49) by webmail.tiscali.de (6.7.019) id 3F79A3DD0006DF6A for hackers@freebsd.org; Wed, 1 Oct 2003 15:43:49 +0200 Received: from hyde.home.loc (hyde.home.loc [10.0.0.2]) by daemon.home.loc (8.12.9/8.12.8) with ESMTP id h91Df6oB001015 for <hackers@freebsd.org>; Wed, 1 Oct 2003 15:41:06 +0200 (CEST) (envelope-from wcp@hyde.home.loc) Received: from hyde.home.loc (localhost [127.0.0.1]) by hyde.home.loc (8.12.9/8.12.8) with ESMTP id h91Df1tl018980 for <hackers@freebsd.org>; Wed, 1 Oct 2003 15:41:01 +0200 (CEST) (envelope-from wcp@hyde.home.loc) Received: (from wcp@localhost) by hyde.home.loc (8.12.9/8.12.6/Submit) id h91Df1i3018977; Wed, 1 Oct 2003 15:41:01 +0200 (CEST) (envelope-from wcp) From: "Walter C. Pelissero" <walter@pelissero.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16250.55661.682838.198052@hyde.home.loc> Date: Wed, 1 Oct 2003 15:41:01 +0200 To: hackers@freebsd.org X-Mailer: VM 7.16 under Emacs 21.3.50.1 X-Attribution: WP Subject: CAM suspend X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: walter@pelissero.de List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 01 Oct 2003 13:43:51 -0000 Having noticed that there is not a big interest in it, among the fellow FreeBSDers, I was about to set off and hack up the scsi subsystem to implement spindown on suspend and spinup on resume of the da devices, when I realized that there seems to be no hook in the SCSI code for this events. I'm not a device driver expert, so I'm looking for clues. What I mean is that the ata-pci driver, for instance, specifies hooks via the device_method_t structure which is not available in the scsi_all or scsi_da modules. I understand that they are simply different kind of beasts (sitting on different layers of the kernel code), but I was wondering if there might be a similar mechanism to do what I want. So, what is the recommended way (if there is one), to hook a function of the SCSI subsystem to an event like suspend/resume? I would most appreciate if anyone could point me to a suitable document or even anything related to FreeBSD kernel hacking. Cheers, -- walter pelissero http://www.pelissero.de From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 02:42:50 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8798616A4B3 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 02:42:50 -0700 (PDT) Received: from mail.cybertinker.com (mail.cybertinker.com [69.9.134.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id D632243F3F for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 02:42:49 -0700 (PDT) (envelope-from jjf@mail.cybertinker.com) Received: from mail.cybertinker.com (localhost.localdomain [127.0.0.1]) by mail.cybertinker.com (8.12.10/8.12.10) with ESMTP id h929gqZQ001464 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 02:42:52 -0700 Received: (from jjf@localhost) by mail.cybertinker.com (8.12.10/8.12.9/Submit) id h929gqNi001463 for freebsd-hackers@freebsd.org; Thu, 2 Oct 2003 02:42:52 -0700 Date: Thu, 2 Oct 2003 02:42:52 -0700 From: jjf@mail.cybertinker.com To: freebsd-hackers@freebsd.org Message-ID: <20031002094252.GC32658@mail.cybertinker.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: Mount error: "Specified device does not match mounted device" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 09:42:50 -0000 Hello to all. Sorry if this is a little terse, but a production machine is down and I'm very tired. Our mailserver (running 4.5-STABLE) died today, due to massive read errros from /dev/sd0s1a -- the root partition. I figured we'd just replace the primary drive and all would be well. I put the spare drive into a 4.9 box -- all I had available -- and created my slice and partitions. I did not match the parition sizes exactly with previous drive, but in each case they were larger, so I knew I'd have plenty of space. So having made my slice and partitioned it, I pulled my backups off of tape, transferred them to the 4.9 machine, and used 'tar xpzf' to write them to the shiny new partitions. All seemed well. We put the new drive into the dead server, and fire it up. Boot was halted due to inability to load mount a vinum device. But set that vinum issue aside for now. '/' was mounted read-only, and I attempted to force it into read-write with 'mount -f /', which has always worked for me. But not this time. I got: mount; /dev/ad0s1a on /: specified device does not match mounted device. First thing I did was to verify that I had the proper entry for '/' in /etc/fstab, and indeed I did. I was however, able to successfully mount the other partitions I'd created on the replacement disk. I ran 'mount' after mounting the other partitions, and I saw a strange thing. All but one of the partitions were labled with their full device name (i.e. "/dev/ad01s1f on /usr (ufs, local)"), but it was different for ad0s1a (the root partition). It said "ad0s1a on / (read-only)". What is the significance of this, the root partition, being only partially labled like that? Note: this drive was ad0 on the mail server, but was ad1 on the 4.9 machine. Could this be the cause of the problem? Do the drives somehow cache their most recent system designation? I was also wondering if maybe the problem is related to disk partitioning on a 4.9 machine and sticking the disk into a 4.5 machine. I have seen in the archives other people with this general problem, but it seems that in those cases the problem was incorrect entires in /etc/fstab, so we're very confused here. Any help would be appreciated, John From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 06:00:05 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 144CB16A4B3 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 06:00:05 -0700 (PDT) Received: from upsn231.cri.u-psud.fr (upsn231.cri.u-psud.fr [129.175.34.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4CAF43F3F for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 06:00:03 -0700 (PDT) (envelope-from invalid@kma.eu.org) Received: from ikaria.inria-futurs.pcri.u-psud.fr (ikaria.inria-futurs.pcri.u-psud.fr [129.175.144.36])h92Cx3aT007029 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 14:59:03 +0200 Received: from kma.eu.org (localhost [127.0.0.1])h92CxxD17761 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 14:59:59 +0200 Message-ID: <3F7C209F.7000205@kma.eu.org> Date: Thu, 02 Oct 2003 14:57:03 +0200 From: Grumble <invalid@kma.eu.org> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Scanned: by amavis X-Spam-Status: score=-10.5 tests=BAYES_10,QUOTED_EMAIL_TEXT,USER_AGENT_MOZILLA_UA autolearn=ham version=2.53 X-Spam-Level: X-Spam-Score: X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp) Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 13:00:05 -0000 >>> I have read the perfmon documentation and source code. For several >>> reasons, I do not think it is totally adequate in my situation. >> >> This is an extension to the i386_vm86() syscall which will let you turn >> PCE on and off if you're the superuser. > > Now that I think on this a bit more, a sysctl might be a better place to > put this, but it seemed to belong with the i386_vm86() bits, rather than > polluting initcpu.c right away. Is vm86 related to virtual-8086 mode? Probably not... What does vm86 stand for? Virtual machine? > Mind you, if you're going to hack perfmon, perhaps putting this in initcpu > isn't such a bad idea after all, with a loader tunable instead. That way > perfmon can pickup on the tunable when attached by nexus during boot. I am tempted to remove perfmon from the kernel, and write a kernel module for Athlon and another one for NetBurst. Can a kernel module catch #UD (Invalid Opcode) and #GP (General Protection) exceptions generated from within the kernel module itself? Can I use sigaction(2)? Can a kernel module catch a specific #GP exception generated from user land? Can I register a signal handler with sigaction(2)? BTW, are performance-monitoring counters saved and restored on a context switch? Shill From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 10:18:27 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC12116A4BF; Thu, 2 Oct 2003 10:18:27 -0700 (PDT) Received: from firecrest.mail.pas.earthlink.net (firecrest.mail.pas.earthlink.net [207.217.121.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 247F043FDF; Thu, 2 Oct 2003 10:18:27 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfi2e.dialup.mindspring.com ([165.247.200.78] helo=mindspring.com) by firecrest.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1A575o-0006J6-00; Thu, 02 Oct 2003 10:18:21 -0700 Message-ID: <3F7C5DAE.CC3C3518@mindspring.com> Date: Thu, 02 Oct 2003 10:17:34 -0700 From: Terry Lambert <tlambert2@mindspring.com> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bruce M Simpson <bms@spc.org> References: <3F7AA0D8.1080801@kma.eu.org> <20031001114155.GA12991@saboteur.dek.spc.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a46b5750f76495a6d87d32e6f758e4c9d22601a10902912494350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Grumble <invalid@kma.eu.org> cc: freebsd-ia32@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 17:18:28 -0000 Bruce M Simpson wrote: > On Wed, Oct 01, 2003 at 11:39:36AM +0200, Grumble wrote: > > >>However, I am not allowed to use the RDPMC instruction from ring 3 > > >>because the PCE (Performance-monitoring Counters Enable) bit is not set. > > > > > >You can do it with /dev/perfmon. man 4 perfmon. > > > > I have read the perfmon documentation and source code. For several > > reasons, I do not think it is totally adequate in my situation. [ ... ] > > This is an extension to the i386_vm86() syscall which will let you turn > PCE on and off if you're the superuser. I like this a lot better. To answer the inevitable question of "why": PCE counters are a scarce resource, and the kernel needs to run interference on their allocation and deallocation by user space applications, to avoid collisions between applications; this is the same reason we have AGP and sound card device drivers in the kernel. I'm not sure if restricting this to root users is exactly necessary, but it can't hurt, given that there is a performance denial of service possible otherwise. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 10:21:52 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6691F16A4B3 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 10:21:52 -0700 (PDT) Received: from razorbill.mail.pas.earthlink.net (razorbill.mail.pas.earthlink.net [207.217.121.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C2A243FB1 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 10:21:51 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfi2e.dialup.mindspring.com ([165.247.200.78] helo=mindspring.com) by razorbill.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1A5799-0005Eh-00; Thu, 02 Oct 2003 10:21:47 -0700 Message-ID: <3F7C5E80.C71F2551@mindspring.com> Date: Thu, 02 Oct 2003 10:21:04 -0700 From: Terry Lambert <tlambert2@mindspring.com> X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Bruce M Simpson <bms@spc.org> References: <3F7AA0D8.1080801@kma.eu.org> <20031001124129.GB13612@saboteur.dek.spc.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a46b5750f76495a6d8e400f4b47f6e6fe6666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Grumble <invalid@kma.eu.org> Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 17:21:52 -0000 Bruce M Simpson wrote: > Now that I think on this a bit more, a sysctl might be a better place to > put this, but it seemed to belong with the i386_vm86() bits, rather than > polluting initcpu.c right away. The important thing is to allow the kernel to intermediate and control allocation of counters to applications, so where you put it is less important than that it be a procedural interface. A sysctl can be a procedural interface, but it's kind of ugly. -- Terry From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 11:21:59 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C26C216A4B3 for <hackers@freebsd.org>; Thu, 2 Oct 2003 11:21:59 -0700 (PDT) Received: from mail.synology.com (dns1.synology.com [210.202.102.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56D1043FCB for <hackers@freebsd.org>; Thu, 2 Oct 2003 11:21:58 -0700 (PDT) (envelope-from jsli@mail2000.com.tw) Received: from mail2000.com.tw (61-230-111-172.HINET-IP.hinet.net [61.230.111.172]) (authenticated bits=0) by mail.synology.com (8.12.10/8.12.10) with ESMTP id h92ILFDb088619; Fri, 3 Oct 2003 02:21:27 +0800 (CST) Message-ID: <3F7C6C9F.5060401@mail2000.com.tw> Date: Fri, 03 Oct 2003 02:21:19 +0800 From: Jia-Shiun Li <jsli@mail2000.com.tw> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: walter@pelissero.de References: <16250.55661.682838.198052@hyde.home.loc> In-Reply-To: <16250.55661.682838.198052@hyde.home.loc> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: CAM suspend X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 18:21:59 -0000 Since the memory content will be kept across suspension, I guess there is no need for da to take special care. Just like what ad does. The actual suspend/resume method is for ata-pci. For hardware devices to come back to previous state, the correct place may be in SCSI HBA driver like ahc, sym, etc.? Jia-Shiun. Walter C. Pelissero wrote: > Having noticed that there is not a big interest in it, among the > fellow FreeBSDers, I was about to set off and hack up the scsi > subsystem to implement spindown on suspend and spinup on resume of the > da devices, when I realized that there seems to be no hook in the SCSI > code for this events. > > I'm not a device driver expert, so I'm looking for clues. > > What I mean is that the ata-pci driver, for instance, specifies hooks > via the device_method_t structure which is not available in the > scsi_all or scsi_da modules. I understand that they are simply > different kind of beasts (sitting on different layers of the kernel > code), but I was wondering if there might be a similar mechanism to do > what I want. > > So, what is the recommended way (if there is one), to hook a function > of the SCSI subsystem to an event like suspend/resume? > > I would most appreciate if anyone could point me to a suitable > document or even anything related to FreeBSD kernel hacking. > > Cheers, > From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 12:26:10 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A6C816A4B3 for <hackers@freebsd.org>; Thu, 2 Oct 2003 12:26:10 -0700 (PDT) Received: from alicia.nttmcl.com (alicia.nttmcl.com [216.69.69.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA67E43F93 for <hackers@freebsd.org>; Thu, 2 Oct 2003 12:26:09 -0700 (PDT) (envelope-from ab@astralblue.net) Received: from astralblue.net (dhcp245.nttmcl.com [216.69.69.245]) by alicia.nttmcl.com (8.12.9/8.12.5) with ESMTP id h92JQ9HB047114 for <hackers@freebsd.org>; Thu, 2 Oct 2003 12:26:09 -0700 (PDT) (envelope-from ab@astralblue.net) Message-ID: <3F7C7BB5.9040402@astralblue.net> Date: Thu, 02 Oct 2003 12:25:41 -0700 From: "Eugene M. Kim" <ab@astralblue.net> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: en-us, en, ko-kr, ko MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: pam_opieaccess.so and opiepasswd -d X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 19:26:10 -0000 Greetings, pam_opieaccess.so is documented to allow cleartext password (by returning PAM_SUCCESS) when OPIE is disabled for the user. However, on both -current and 4-stable, pam_opieaccess.so checks whether OPIE is enabled only by checking the existence of the user's record from /etc/opiekeys. Since a valid /etc/opiekeys record can also indicate that the OPIE access is disabled (i.e. one runs opiepasswd -d to set the value field to `****************'), I guess the module should check this as well. Currently this check is not performed, so when one has pam_opie.so plus pam_opieaccess.so combination, users with explicitly disabled OPIE record and a cleartext password won't be able to log in even when /etc/opieaccess allows cleartext password logins. Is the current behavior an intended feature, or should it be fixed (the patch would be trivial)? Eugene From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 13:37:54 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@www.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5CF816A4BF for <freebsd-hackers@www.freebsd.org>; Thu, 2 Oct 2003 13:37:54 -0700 (PDT) Received: from daemon.uop.edu (daemon.uop.edu [138.9.200.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id F387243FDF for <freebsd-hackers@www.freebsd.org>; Thu, 2 Oct 2003 13:37:53 -0700 (PDT) (envelope-from wfroning@pacific.edu) Received: from daemon (localhost [127.0.0.1]) by daemon.uop.edu (8.12.9p1/8.12.9) with SMTP id h92KaZvx017958; Thu, 2 Oct 2003 13:37:51 -0700 (PDT) (envelope-from wfroning@pacific.edu) Date: Thu, 2 Oct 2003 13:36:34 -0700 From: Will Froning <wfroning@pacific.edu> To: freebsd-hackers@www.freebsd.org Message-Id: <20031002133634.716f25e2.wfroning@pacific.edu> Organization: OIT, University of the Pacific X-Mailer: Sylpheed version 0.9.3claws (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: 4.6.2-p23 and [tcp bad cksum] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 20:37:54 -0000 After upgrading my 2 Sendmail servers to 4.6.2-p23 last week I ran into an amazing issue sending mail to hotmail.com and msn.com addresses. I noticed it because of the large queue for those domains building up daily. In the process of troubleshooting I noticed massive [bad tcp cksum] messages in the tcpdump of a hotmail queue run. At first I thought it was a networking problem maybe on our side, maybe theirs. To save disk space I moved it to a 4.9-PRE box and ran the queue for the heck of it. Amazingly all messages went through. I was still experiencing [bad tcp cksum] messages, but at a much lower rate (enough to process all the messages). For the heck of it I upgraded the lower volume box to 4.8 (was on my schedule for this weekend anyhow) and messages started being sent out to hotmail.com and msn.com address. Once that worked I upgraded the other 4.6.2 box and mail is going smoothly. So, this problem didn't happen until -p23 (arp patch). If anyone needs more information please send me a message. If needed I have a partial tcpdump of the working 4.9-PRE box with cksum errors, but at a greatly reduced quantity. Thanks, Will P.S. the lower volume was running patched sendmail that came w/ 4.6.2 (8.12.3p2 I think?). The other is running 8.12.10. -- Will Froning Unix Sys. Admin. (209)946-7470 (209)662-4725 wfroning@pacific.edu From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 13:48:21 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C62EA16A4BF for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 13:48:21 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5477043FB1 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 13:48:21 -0700 (PDT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 4C6C12ED481; Thu, 2 Oct 2003 13:48:21 -0700 (PDT) Date: Thu, 2 Oct 2003 13:48:21 -0700 From: Paul Saab <ps@mu.org> To: Will Froning <wfroning@pacific.edu> Message-ID: <20031002204821.GA30153@elvis.mu.org> References: <20031002133634.716f25e2.wfroning@pacific.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031002133634.716f25e2.wfroning@pacific.edu> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org Subject: Re: 4.6.2-p23 and [tcp bad cksum] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 20:48:21 -0000 What NIC? From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 14:08:23 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@www.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FA4B16A4B3 for <freebsd-hackers@www.freebsd.org>; Thu, 2 Oct 2003 14:08:23 -0700 (PDT) Received: from daemon.uop.edu (daemon.uop.edu [138.9.200.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id D058743FDF for <freebsd-hackers@www.freebsd.org>; Thu, 2 Oct 2003 14:08:19 -0700 (PDT) (envelope-from wfroning@pacific.edu) Received: from daemon (localhost [127.0.0.1]) by daemon.uop.edu (8.12.9p1/8.12.9) with SMTP id h92L8Ivx018236 for <freebsd-hackers@lists.freebsd.org>; Thu, 2 Oct 2003 14:08:18 -0700 (PDT) (envelope-from wfroning@pacific.edu) Date: Thu, 2 Oct 2003 14:02:28 -0700 From: Will Froning <wfroning@pacific.edu>(by way of Will Froning <wfroning@pacific.edu>) To: Paul Saab <ps@mu.org> Message-Id: <20031002140228.679892a6.wfroning@pacific.edu> In-Reply-To: <20031002205137.GA30467@elvis.mu.org> References: <20031002133634.716f25e2.wfroning@pacific.edu> <20031002204821.GA30153@elvis.mu.org> <20031002135014.34a4e129.wfroning@pacific.edu> <20031002205137.GA30467@elvis.mu.org> Organization: OIT, University of the Pacific X-Mailer: Sylpheed version 0.9.3claws (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Date: Thu, 2 Oct 2003 14:08:18 -0700 Resent-From: Will Froning <wfroning@pacific.edu> Resent-Message-Id: <20031002140818.10a86995.wfroning@pacific.edu> Resent-To: freebsd-hackers@www.freebsd.org Subject: Re: 4.6.2-p23 and [tcp bad cksum] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 21:08:23 -0000 > Which is which? The 2 boxes that didn't work, one had a Fiber EM and the other had a copper BGE running at 100 full (Dell 1650 and 2550 respectively) The 4.9-pre is a Fiber EM (dell 2600). > Which one was causing large amount of checksum errors? Both of the 4.6.2 boxes. > Which one fixed it? etc etc etc etc. Upgrading the 4.6.2 boxes to 4.8 fixed the problem allowed the messages to pass through. Although I didn't record a tcpdump when it started working, as it scrolled by I noticed a reduction in the number of errors. Shoot me an e-mail if you need more info. Thanks, Will > Will Froning (wfroning@pacific.edu) wrote: > > one was copper BGE the other a Fiber EM. > > > > Will > > > > On Thu, 2 Oct 2003 13:48:21 -0700 > > Paul Saab <ps@mu.org> wrote: > > > > > What NIC? > > > > > > -- > > Will Froning > > Unix Sys. Admin. > > (209)946-7470 > > (209)662-4725 > > wfroning@pacific.edu > > > > -- > -ps -- Will Froning Unix Sys. Admin. (209)946-7470 (209)662-4725 wfroning@pacific.edu From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 14:28:05 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D88F16A4B3 for <hackers@freebsd.org>; Thu, 2 Oct 2003 14:28:05 -0700 (PDT) Received: from fever.boogie.com (cpe-66-87-52-132.co.sprintbbd.net [66.87.52.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B84443F85 for <hackers@freebsd.org>; Thu, 2 Oct 2003 14:28:03 -0700 (PDT) (envelope-from durian@boogie.com) Received: from man.boogie.com (man.boogie.com [192.168.1.3]) by fever.boogie.com (8.12.9/8.12.9) with ESMTP id h92LS2PR035593 for <hackers@freebsd.org>; Thu, 2 Oct 2003 15:28:02 -0600 (MDT) (envelope-from durian@boogie.com) From: Mike Durian <durian@boogie.com> To: hackers@freebsd.org Date: Thu, 2 Oct 2003 15:28:02 -0600 User-Agent: KMail/1.5.4 References: <200309161647.38197.durian@boogie.com> In-Reply-To: <200309161647.38197.durian@boogie.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310021528.02180.durian@boogie.com> Subject: Re: tty layer and lbolt sleeps X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Oct 2003 21:28:05 -0000 On Tuesday 16 September 2003 04:47 pm, Mike Durian wrote: > I'm trying to implement a serial protocol that is timing sensitive. > I'm noticing things like drains and reads and blocking until the > next kernel tick. I believe this is due to the lbolt sleeps > in the tty.c code. Following up on my own post in case anyone was interested. My assumption about the lbolt sleep was incorrect. The delay I'm seeing is not in the tty layer, it is in the sio driver. If I change the tick count for the siobusycheck timeout from (hz / 100) to just 1 and bump up HZ to 5000, I can get some reasonable responsiveness with write and drain. To get good responsiveness in the read direction, I need to force the RX FIFO trigger level down to FIFO_RX_LOW. After doing both those things, I can acheive the control I need. However, I don't really like cranking up HZ just to get decent sio(4) latencies. I'm assuming the use of siobusycheck in a polled manner is just an artifact from old crufty serial devices. I suppose uart(4) will clear this up when it is stable. Adding an ioctl to set UART RX trigger levels would be something I would find useful. Perhaps others too. I disagree with the following comment in the sio.c source: * Use a fifo trigger level low enough so that the input * latency from the fifo is less than about 16 msec and * the total latency is less than about 30 msec. These * latencies are reasonable for humans. Serial comms * protocols shouldn't expect anything better since modem * latencies are larger. It makes the tacit assumption that all serial protocols go through a modem and thus latency isn't important. I suspect I'm not the only person out there using a serial port that isn't connected to a modem or a terminal. mike From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 2 21:43:44 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0374E16A4B3 for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 21:43:44 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD52943FEA for <freebsd-hackers@freebsd.org>; Thu, 2 Oct 2003 21:43:41 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id C893D654DF; Fri, 3 Oct 2003 05:43:40 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 90345-02-3; Fri, 3 Oct 2003 05:43:40 +0100 (BST) Received: from saboteur.dek.spc.org (unknown [81.3.72.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 155F5654DD; Fri, 3 Oct 2003 05:43:40 +0100 (BST) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 8FB9231; Fri, 3 Oct 2003 05:43:35 +0100 (BST) Date: Fri, 3 Oct 2003 05:43:35 +0100 From: Bruce M Simpson <bms@spc.org> To: Grumble <invalid@kma.eu.org> Message-ID: <20031003044335.GI5194@saboteur.dek.spc.org> Mail-Followup-To: Grumble <invalid@kma.eu.org>, freebsd-hackers@freebsd.org References: <3F7C209F.7000205@kma.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F7C209F.7000205@kma.eu.org> cc: freebsd-hackers@freebsd.org Subject: Re: Why is PCE not set in CR4? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 04:43:44 -0000 On Thu, Oct 02, 2003 at 02:57:03PM +0200, Grumble wrote: > Is vm86 related to virtual-8086 mode? Probably not... What does vm86 > stand for? Virtual machine? vm86 is something of a catchall for vm86-related functions. One of the things it implements is a means of getting in and out of Virtual 8086 mode from a userland process. doscmd(1) uses this, as does my s3switch port for getting into an S3 card's video BIOS to execute the functions required to enable the video-out port. A few other knobs exist in there for dealing with i386-specific things, such as permitting access to an IO port range for a user process (by changing the appropriate state in the TSS). > I am tempted to remove perfmon from the kernel, and write a kernel > module for Athlon and another one for NetBurst. I would ask you to please consider patching perfmon to do what you need it to do. > Can a kernel module catch #UD (Invalid Opcode) and #GP (General > Protection) exceptions generated from within the kernel module > itself? Can I use sigaction(2)? > Can a kernel module catch a specific #GP exception generated from > user land? Can I register a signal handler with sigaction(2)? What'll happen is that DDB will most likely catch the exception, unless you specifically patch trap.c to catch those exceptions. You should also look at the special exception handlers in identcpu.c. > BTW, are performance-monitoring counters saved and restored on a > context switch? Look at i386's definition of cpu_switch(). You'll need to find some unused space in the TSS and do it yourself. BMS From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 00:45:31 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B642C16A4B3 for <freebsd-hackers@freebsd.org>; Fri, 3 Oct 2003 00:45:31 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD91B4400B for <freebsd-hackers@freebsd.org>; Fri, 3 Oct 2003 00:45:29 -0700 (PDT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h937jRs3043566; Fri, 3 Oct 2003 11:45:27 +0400 (MSD) Date: Fri, 3 Oct 2003 11:45:27 +0400 (MSD) From: Igor Sysoev <is@rambler-co.ru> X-Sender: is@is To: Will Froning <wfroning@pacific.edu> In-Reply-To: <20031002140228.679892a6.wfroning@pacific.edu> Message-ID: <Pine.BSF.4.21.0310031137430.21673-100000@is> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: 4.6.2-p23 and [tcp bad cksum] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 07:45:31 -0000 On Thu, 2 Oct 2003, Will Froning wrote: > > Which is which? > > The 2 boxes that didn't work, one had a Fiber EM and the other had a > copper BGE running at 100 full (Dell 1650 and 2550 respectively) > > The 4.9-pre is a Fiber EM (dell 2600). > > > Which one was causing large amount of checksum errors? > > Both of the 4.6.2 boxes. > > > Which one fixed it? etc etc etc etc. > > Upgrading the 4.6.2 boxes to 4.8 fixed the problem allowed the messages > to pass through. Although I didn't record a tcpdump when it started > working, as it scrolled by I noticed a reduction in the number of > errors. I'm not sure but I think you had built your kernels with -O2 and encountered a seldom bug that was fixed in 4.6-STABLE: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=727930+0+/usr/local/www/db/text/2002/cvs-all/20020707.cvs-all Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 10:01:09 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B52716A4B3; Fri, 3 Oct 2003 10:01:09 -0700 (PDT) Received: from mta3.xnet.ro (mta3.xnet.ro [217.10.192.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41D4F43FF3; Fri, 3 Oct 2003 10:01:08 -0700 (PDT) (envelope-from clau@reversedhell.net) Received: from reversedhell.net (81-196-92-42.arad.cablelink.ro [81.196.92.42]) (authenticated bits=0)h93H15Ci014629; Fri, 3 Oct 2003 20:01:06 +0300 Message-ID: <3F7DAA8F.9050600@reversedhell.net> Date: Fri, 03 Oct 2003 19:57:51 +0300 From: Clau <clau@reversedhell.net> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20030906 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms030607080005010903070401" X-RAVMilter-Version: 8.4.3(snapshot 20030212) (mta3.xnet.ro) Subject: "can't find kernel source tree" error when building the kernel. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 17:01:09 -0000 This is a cryptographically signed message in MIME format. --------------ms030607080005010903070401 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit hello, i just downloaded via cvsup the latest kernel for freebsd 5.1. i had a problem with it, more exactly when i did a "make depend" it stopped at some place, and gave me this error: "can't find kernel source tree" i fixed this by modifying this piece of code from /usr/src/sys/conf/kmod.mk (it starts with line 167 in the file) .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys .if !defined(SYSDIR) && exists(${_dir}/kern/) SYSDIR= ${_dir} .endif .endfor .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) .error "can't find kernel source tree" .endif i removed the last "/" from "/kern/" and now it seems it can find the directory. i don't know if this is a general problem, or it is just in the case of my system. Claudiu Dragalina-Paraipan. clau@reversedhell.net --------------ms030607080005010903070401 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII+TCC AtcwggJAoAMCAQICAwqpfzANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDMwOTAyMTQzMTQxWhcNMDQwOTAxMTQzMTQx WjBHMR8wHQYDVQQDExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSQwIgYJKoZIhvcNAQkBFhVj bGF1QHJldmVyc2VkaGVsbC5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe MEnT7xIRivGAKKVinTKmxu9HwtWHEdFdddPFwQrlf1H0ndutRvYubR3f0gR/eq3Y2Acrzl2n pNc6xuodEAQ5+5MJFWLywPHN4OG6Ljl1RXAnDHD14iIxafhcgQzKG1681RqMTg2ZeBeMi4E2 EKB0FA0+Kd0cGwNgZ/kHE0CFnIN9NP1yaLhfXoO1Az7p32ARAJvI4aHrVkc0KGWZPcl8FRZ9 oXlnpbAYdT5jwYU6Xzn5ABifjJ/jJQ2IvDBLNOP4D1cBmLuPmTAOxhyI2OXJMrpNsy6MEDs5 f0CViFp7X9ffq4TyzKk65npZwk13To4ghLgMfhIUVQZkQ2A8U4STAgMBAAGjMjAwMCAGA1Ud EQQZMBeBFWNsYXVAcmV2ZXJzZWRoZWxsLm5ldDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEB BAUAA4GBAFGEe01LdZX8404hp8vvcLVI4xwQ4fiIBkN3zX0LKi0BQiEEyDg1C/z2U9UehLaQ R/Qd7riu71U4YiZYXqY+fi7Cg4WxUaWmwzDEs2Ns1DqGdrK6DVJFpyegjLSjirmVdw2ppyLq nFeNMer0JxFu6O8EYBGRHdbvxMa2NpHH4g7TMIIC1zCCAkCgAwIBAgIDCql/MA0GCSqGSIb3 DQEBBAUAMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5 KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQTAe Fw0wMzA5MDIxNDMxNDFaFw0wNDA5MDExNDMxNDFaMEcxHzAdBgNVBAMTFlRoYXd0ZSBGcmVl bWFpbCBNZW1iZXIxJDAiBgkqhkiG9w0BCQEWFWNsYXVAcmV2ZXJzZWRoZWxsLm5ldDCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN4wSdPvEhGK8YAopWKdMqbG70fC1YcR0V11 08XBCuV/UfSd261G9i5tHd/SBH96rdjYByvOXaek1zrG6h0QBDn7kwkVYvLA8c3g4bouOXVF cCcMcPXiIjFp+FyBDMobXrzVGoxODZl4F4yLgTYQoHQUDT4p3RwbA2Bn+QcTQIWcg300/XJo uF9eg7UDPunfYBEAm8jhoetWRzQoZZk9yXwVFn2heWelsBh1PmPBhTpfOfkAGJ+Mn+MlDYi8 MEs04/gPVwGYu4+ZMA7GHIjY5ckyuk2zLowQOzl/QJWIWntf19+rhPLMqTrmelnCTXdOjiCE uAx+EhRVBmRDYDxThJMCAwEAAaMyMDAwIAYDVR0RBBkwF4EVY2xhdUByZXZlcnNlZGhlbGwu bmV0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAUYR7TUt1lfzjTiGny+9wtUjj HBDh+IgGQ3fNfQsqLQFCIQTIODUL/PZT1R6EtpBH9B3uuK7vVThiJlhepj5+LsKDhbFRpabD MMSzY2zUOoZ2sroNUkWnJ6CMtKOKuZV3DamnIuqcV40x6vQnEW7o7wRgEZEd1u/ExrY2kcfi DtMwggM/MIICqKADAgECAgENMA0GCSqGSIb3DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMG A1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0 ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u MSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgQ0ExKzApBgkqhkiG9w0BCQEW HHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3MDAwMDAwWhcNMTMwNzE2 MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0 eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0Ew gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUEcJ3f6f+jHuy9 zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH5/EfkTYkKhPP K9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBlyYLf7AgMBAAGj gZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3Js LnRoYXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNVHQ8EBAMCAQYw KQYDVR0RBCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqGSIb3DQEB BQUAA4GBAEiM0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCTcDz9 reFhYsPZOhl+hLGZGwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo0 5RAaWzVNd+NWIXiC3CEZNd4ksdMdRv9dX2VPMYIDOzCCAzcCAQEwaTBiMQswCQYDVQQGEwJa QTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhh d3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAwqpfzAJBgUrDgMCGgUAoIIBpzAY BgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wMzEwMDMxNjU3NTJa MCMGCSqGSIb3DQEJBDEWBBSSoQQHbqWxjSgMQVxqMFQ/OjrW7DBSBgkqhkiG9w0BCQ8xRTBD MAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzAN BggqhkiG9w0DAgIBKDB4BgkrBgEEAYI3EAQxazBpMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQK ExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29u YWwgRnJlZW1haWwgSXNzdWluZyBDQQIDCql/MHoGCyqGSIb3DQEJEAILMWugaTBiMQswCQYD VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAwqpfzANBgkqhkiG9w0B AQEFAASCAQBFJEwlfY0Hu+XLwnDRF1rMLRdPad+D9CS4lp7LtbYiKky5Xuzq7QFKSiC6gTWk z1RsSv7KdT6WMzuVOMAsqkAMkPFyHU3/zAyoZYGiI48wiPo+wlcqFGNzSUpZ6FtpDYvL/jvv xd7JVO3bxXSVNy013EaQKsZkyS+suZuvS7gOc4iBrAjwFI6OCpbJaZLabTVAoKi/lG3Ec09z 6WpL4Bo4MRYjzt7qUDbpV3RtHfrrQD6jpOQQ3aZUdjGojJVuQZj4b6niNbdwCyLYsIeQYQ9s zcCVauDRjnOaGmOt9KRZNDUHvCuRJIoB0aJffwwUGIGptMrJbEHc2L2nNuzoQtcUAAAAAAAA --------------ms030607080005010903070401-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 10:12:19 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A767616A4B3; Fri, 3 Oct 2003 10:12:19 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFDCE43FA3; Fri, 3 Oct 2003 10:12:18 -0700 (PDT) (envelope-from max@love2party.net) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1A5TTU-00065X-00; Fri, 03 Oct 2003 19:12:16 +0200 Received: from [217.227.144.12] (helo=maxlap) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1A5TTU-0007Oz-00; Fri, 03 Oct 2003 19:12:16 +0200 Date: Fri, 3 Oct 2003 19:12:48 +0200 From: Max Laier <max@love2party.net> X-Mailer: The Bat! (v2.00.6) Business X-Priority: 3 (Normal) Message-ID: <18226445076.20031003191248@love2party.net> To: Clau <clau@reversedhell.net> In-Reply-To: <3F7DAA8F.9050600@reversedhell.net> References: <3F7DAA8F.9050600@reversedhell.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: "can't find kernel source tree" error when building the kernel. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Max Laier <max@love2party.net> List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 17:12:19 -0000 Hello Clau, C> i removed the last "/" from "/kern/" and now it seems it can find the C> directory. C> i don't know if this is a general problem, or it is just in the case of C> my system. Same here. Setting SYSDIR helped for now. But the last commit message to kmod.mk: "Revert rev. 1.86, I've fixed make(1) (make/dir.c,v 1.32)." Hints that rebuilding make would be an alternative fix. -- Best regards, Max mailto:max@love2party.net From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 10:28:48 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9B7E16A4B3; Fri, 3 Oct 2003 10:28:48 -0700 (PDT) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9607143FE1; Fri, 3 Oct 2003 10:28:43 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id 426A954887; Fri, 3 Oct 2003 12:28:43 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id D49CB6D476; Fri, 3 Oct 2003 12:28:42 -0500 (CDT) Date: Fri, 3 Oct 2003 12:28:42 -0500 From: "Jacques A. Vidrine" <nectar@FreeBSD.org> To: Clau <clau@reversedhell.net> Message-ID: <20031003172842.GA62106@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" <nectar@FreeBSD.org>, Clau <clau@reversedhell.net>, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ru@freeBSD.org References: <3F7DAA8F.9050600@reversedhell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F7DAA8F.9050600@reversedhell.net> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.4i-ja.1 cc: freebsd-hackers@freebsd.org cc: freebsd-current@freebsd.org cc: ru@freeBSD.org Subject: Re: "can't find kernel source tree" error when building the kernel. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 17:28:48 -0000 On Fri, Oct 03, 2003 at 07:57:51PM +0300, Clau wrote: > hello, > > i just downloaded via cvsup the latest kernel for freebsd 5.1. > i had a problem with it, more exactly when i did a "make depend" > it stopped at some place, and gave me this error: > "can't find kernel source tree" > i fixed this by modifying this piece of code from /usr/src/sys/conf/kmod.mk > (it starts with line 167 in the file) > > .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys > .if !defined(SYSDIR) && exists(${_dir}/kern/) > SYSDIR= ${_dir} > .endif > .endfor > .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) > .error "can't find kernel source tree" > .endif > > i removed the last "/" from "/kern/" and now it seems it can find the > directory. > i don't know if this is a general problem, or it is just in the case of > my system. How are you building the kernel? Are you using `make buildworld' first and then `make buildkernel' (or `make kernel')? Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 10:34:54 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B38116A4BF; Fri, 3 Oct 2003 10:34:54 -0700 (PDT) Received: from mta3.xnet.ro (mta3.xnet.ro [217.10.192.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35CFF44008; Fri, 3 Oct 2003 10:34:52 -0700 (PDT) (envelope-from clau@reversedhell.net) Received: from reversedhell.net (81-196-92-42.arad.cablelink.ro [81.196.92.42]) (authenticated bits=0)h93HYoCi024410; Fri, 3 Oct 2003 20:34:51 +0300 Message-ID: <3F7DB279.50802@reversedhell.net> Date: Fri, 03 Oct 2003 20:31:37 +0300 From: Clau <clau@reversedhell.net> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20030906 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jacques A. Vidrine" <nectar@FreeBSD.org> References: <3F7DAA8F.9050600@reversedhell.net> <20031003172842.GA62106@madman.celabo.org> In-Reply-To: <20031003172842.GA62106@madman.celabo.org> Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms010503010306090009080804" X-RAVMilter-Version: 8.4.3(snapshot 20030212) (mta3.xnet.ro) cc: freebsd-hackers@FreeBSD.org cc: freebsd-current@FreeBSD.org cc: ru@FreeBSD.org Subject: Re: "can't find kernel source tree" error when building the kernel. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 17:34:54 -0000 This is a cryptographically signed message in MIME format. --------------ms010503010306090009080804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jacques A. Vidrine wrote: >On Fri, Oct 03, 2003 at 07:57:51PM +0300, Clau wrote: > > >>hello, >> >>i just downloaded via cvsup the latest kernel for freebsd 5.1. >>i had a problem with it, more exactly when i did a "make depend" >>it stopped at some place, and gave me this error: >>"can't find kernel source tree" >>i fixed this by modifying this piece of code from /usr/src/sys/conf/kmod.mk >>(it starts with line 167 in the file) >> >>.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys >>.if !defined(SYSDIR) && exists(${_dir}/kern/) >>SYSDIR= ${_dir} >>.endif >>.endfor >>.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) >>.error "can't find kernel source tree" >>.endif >> >>i removed the last "/" from "/kern/" and now it seems it can find the >>directory. >>i don't know if this is a general problem, or it is just in the case of >>my system. >> >> > >How are you building the kernel? Are you using `make buildworld' first >and then `make buildkernel' (or `make kernel')? > >Cheers, > > cd /sys/i386/conf /usr/sbin/config MYCONFIG cd ../compile/MYCONFIG make depend make make install this is the entire process i do. With respect, Claudiu Dragalina-Paraipan. clau@reversedhell.net --------------ms010503010306090009080804 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII+TCC AtcwggJAoAMCAQICAwqpfzANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDMwOTAyMTQzMTQxWhcNMDQwOTAxMTQzMTQx WjBHMR8wHQYDVQQDExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSQwIgYJKoZIhvcNAQkBFhVj bGF1QHJldmVyc2VkaGVsbC5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDe MEnT7xIRivGAKKVinTKmxu9HwtWHEdFdddPFwQrlf1H0ndutRvYubR3f0gR/eq3Y2Acrzl2n pNc6xuodEAQ5+5MJFWLywPHN4OG6Ljl1RXAnDHD14iIxafhcgQzKG1681RqMTg2ZeBeMi4E2 EKB0FA0+Kd0cGwNgZ/kHE0CFnIN9NP1yaLhfXoO1Az7p32ARAJvI4aHrVkc0KGWZPcl8FRZ9 oXlnpbAYdT5jwYU6Xzn5ABifjJ/jJQ2IvDBLNOP4D1cBmLuPmTAOxhyI2OXJMrpNsy6MEDs5 f0CViFp7X9ffq4TyzKk65npZwk13To4ghLgMfhIUVQZkQ2A8U4STAgMBAAGjMjAwMCAGA1Ud EQQZMBeBFWNsYXVAcmV2ZXJzZWRoZWxsLm5ldDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEB BAUAA4GBAFGEe01LdZX8404hp8vvcLVI4xwQ4fiIBkN3zX0LKi0BQiEEyDg1C/z2U9UehLaQ R/Qd7riu71U4YiZYXqY+fi7Cg4WxUaWmwzDEs2Ns1DqGdrK6DVJFpyegjLSjirmVdw2ppyLq nFeNMer0JxFu6O8EYBGRHdbvxMa2NpHH4g7TMIIC1zCCAkCgAwIBAgIDCql/MA0GCSqGSIb3 DQEBBAUAMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5 KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQTAe Fw0wMzA5MDIxNDMxNDFaFw0wNDA5MDExNDMxNDFaMEcxHzAdBgNVBAMTFlRoYXd0ZSBGcmVl bWFpbCBNZW1iZXIxJDAiBgkqhkiG9w0BCQEWFWNsYXVAcmV2ZXJzZWRoZWxsLm5ldDCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN4wSdPvEhGK8YAopWKdMqbG70fC1YcR0V11 08XBCuV/UfSd261G9i5tHd/SBH96rdjYByvOXaek1zrG6h0QBDn7kwkVYvLA8c3g4bouOXVF cCcMcPXiIjFp+FyBDMobXrzVGoxODZl4F4yLgTYQoHQUDT4p3RwbA2Bn+QcTQIWcg300/XJo uF9eg7UDPunfYBEAm8jhoetWRzQoZZk9yXwVFn2heWelsBh1PmPBhTpfOfkAGJ+Mn+MlDYi8 MEs04/gPVwGYu4+ZMA7GHIjY5ckyuk2zLowQOzl/QJWIWntf19+rhPLMqTrmelnCTXdOjiCE uAx+EhRVBmRDYDxThJMCAwEAAaMyMDAwIAYDVR0RBBkwF4EVY2xhdUByZXZlcnNlZGhlbGwu bmV0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAUYR7TUt1lfzjTiGny+9wtUjj HBDh+IgGQ3fNfQsqLQFCIQTIODUL/PZT1R6EtpBH9B3uuK7vVThiJlhepj5+LsKDhbFRpabD MMSzY2zUOoZ2sroNUkWnJ6CMtKOKuZV3DamnIuqcV40x6vQnEW7o7wRgEZEd1u/ExrY2kcfi DtMwggM/MIICqKADAgECAgENMA0GCSqGSIb3DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMG A1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0 ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u MSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgQ0ExKzApBgkqhkiG9w0BCQEW HHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3MDAwMDAwWhcNMTMwNzE2 MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0 eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0Ew gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUEcJ3f6f+jHuy9 zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH5/EfkTYkKhPP K9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBlyYLf7AgMBAAGj gZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3Js LnRoYXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNVHQ8EBAMCAQYw KQYDVR0RBCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqGSIb3DQEB BQUAA4GBAEiM0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCTcDz9 reFhYsPZOhl+hLGZGwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo0 5RAaWzVNd+NWIXiC3CEZNd4ksdMdRv9dX2VPMYIDOzCCAzcCAQEwaTBiMQswCQYDVQQGEwJa QTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhh d3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAwqpfzAJBgUrDgMCGgUAoIIBpzAY BgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wMzEwMDMxNzMxMzda MCMGCSqGSIb3DQEJBDEWBBRkY9apqShKwPNnRICkM7FLx4sA1TBSBgkqhkiG9w0BCQ8xRTBD MAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzAN BggqhkiG9w0DAgIBKDB4BgkrBgEEAYI3EAQxazBpMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQK ExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29u YWwgRnJlZW1haWwgSXNzdWluZyBDQQIDCql/MHoGCyqGSIb3DQEJEAILMWugaTBiMQswCQYD VQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UE AxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAwqpfzANBgkqhkiG9w0B AQEFAASCAQDc7kQu0q+9O1/TAdO2iTwqoKDupKFTAnA4G25rUZE6S+lepB2iyYhfNQTslZTF Kjlinu+hukSdHiKpAl1eQaegH9hoI3fvnuMpAMNfC6ahiH7nIsSvI8zBOLq4Ij+7kONwCVrM MpYQVa+GiWQmHkxLgj4+NIJS9q/PIi402Is/5Cqt/+8ykmAvBaOoTt0cK2IUK23CiIJXqVLN L7bK27kHcIqiRdq/e0QuylPF9lcN6eik97scXtope6tZM5LzLL4weCyahK//4OolZHHk0/4k t34wNTDmGRw7kKMKtnUEQDB5mNh0uEzoMrcx5Da9Y2nquYbGNWbWGvMQZfTOS3dQAAAAAAAA --------------ms010503010306090009080804-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 11:02:51 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8945B16A4BF for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:02:51 -0700 (PDT) Received: from tx0.oucs.ox.ac.uk (tx0.oucs.ox.ac.uk [129.67.1.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id D55CD43FA3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:02:49 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan0.oucs.ox.ac.uk ([129.67.1.162] helo=localhost) by tx0.oucs.ox.ac.uk with esmtp (Exim 4.20) id 1A5UGP-00072M-Cz for hackers@freebsd.org; Fri, 03 Oct 2003 19:02:49 +0100 Received: from rx0.oucs.ox.ac.uk ([129.67.1.161]) by localhost (scan0.oucs.ox.ac.uk [129.67.1.162]) (amavisd-new, port 25) with ESMTP id 27012-01 for <hackers@freebsd.org>; Fri, 3 Oct 2003 19:02:48 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx0.oucs.ox.ac.uk with smtp (Exim 4.20) id 1A5UGO-00072E-2h for hackers@freebsd.org; Fri, 03 Oct 2003 19:02:48 +0100 Received: (qmail 16509 invoked by uid 0); 3 Oct 2003 18:02:48 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.16 (sweep: 2.14/3.71. spamassassin: 2.53. Clear:. Processed in 2.510537 secs); 03 Oct 2003 18:02:48 -0000 X-Qmail-Scanner-Mail-From: colin.percival@wadham.ox.ac.uk via gateway X-Qmail-Scanner: 1.16 (Clear:. Processed in 2.510537 secs) Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 3 Oct 2003 18:02:45 -0000 Message-Id: <5.0.2.1.1.20031003184821.020c4c48@popserver.sfu.ca> X-Sender: cperciva@popserver.sfu.ca X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Fri, 03 Oct 2003 19:02:44 +0100 To: hackers@freebsd.org From: Colin Percival <colin.percival@wadham.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: settimeofday within jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 18:02:51 -0000 Ok, this is a wierd question: How hard would it be to allow jails to have local clocks which could be manipulated within those jails? The reason I'm asking is this: As those of you who attended my BSDCon talk will know, FreeBSD Update plays games with the clock (specifically, it sets the clock forward by 400 days) in order to locate timestamps embedded in binary files. I'd like to put as much as possible into a jail, to protect my buildbox against the unlikely possibility that some malware gets into the FreeBSD CVS repository. If jailed clocks would be too difficult, I can certainly work around it; but since I have almost no knowledge of kernel internals I thought I'd ask. Colin Percival From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 11:21:33 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9855516A4BF for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:21:33 -0700 (PDT) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E31D43FAF for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:21:32 -0700 (PDT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.12.9/8.12.6) with ESMTP id h93ILTR6001296 for <hackers@freebsd.org>; Fri, 3 Oct 2003 20:21:29 +0200 (CEST) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.12.9/8.12.6/Submit) id h93ILSVI001295 for hackers@freebsd.org; Fri, 3 Oct 2003 20:21:28 +0200 (CEST) Date: Fri, 3 Oct 2003 20:21:28 +0200 (CEST) From: "C. Kukulies" <kuku@www.kukulies.org> Message-Id: <200310031821.h93ILSVI001295@www.kukulies.org> To: hackers@freebsd.org Subject: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 18:21:33 -0000 I have disabled the SIO on my ASUS P4SX board because I have a PCI modem card inserted. But the modem card or the sio on it doesn't seem to be detected by the kernel. Instead I see two sios (sio0 and sio1) which are flagged as possibly disabled (?) - why are they seen when I disabled them in the BIOS? When I run getty (or mgetty) on that port or when I do a cu -l /dev/cuaa0 the system freezes. Need help urgently to get this solved. I've been running a second box for months now only to have a working fax/modem . -- Chris Christoph P. U. Kukulies From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 11:31:27 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BA7F16A4B3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:31:27 -0700 (PDT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id E668543FFB for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:31:26 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by comcast.net (rwcrmhc11) with ESMTP id <2003100318312501300ln15he>; Fri, 3 Oct 2003 18:31:25 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA17018; Fri, 3 Oct 2003 11:31:25 -0700 (PDT) Date: Fri, 3 Oct 2003 11:31:23 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: Colin Percival <colin.percival@wadham.ox.ac.uk> In-Reply-To: <5.0.2.1.1.20031003184821.020c4c48@popserver.sfu.ca> Message-ID: <Pine.BSF.4.21.0310031131090.16775-100000@InterJet.elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: settimeofday within jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 18:31:27 -0000 it'd be good for testing the 2038 bug :-) On Fri, 3 Oct 2003, Colin Percival wrote: > Ok, this is a wierd question: How hard would it be to allow jails to > have local clocks which could be manipulated within those jails? > > The reason I'm asking is this: As those of you who attended my BSDCon > talk will know, FreeBSD Update plays games with the clock (specifically, it > sets the clock forward by 400 days) in order to locate timestamps embedded > in binary files. I'd like to put as much as possible into a jail, to > protect my buildbox against the unlikely possibility that some malware gets > into the FreeBSD CVS repository. > If jailed clocks would be too difficult, I can certainly work around it; > but since I have almost no knowledge of kernel internals I thought I'd ask. > > Colin Percival > > _______________________________________________ > 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" > From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 11:36:24 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A98F16A4B3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:36:24 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9B0743FBF for <hackers@freebsd.org>; Fri, 3 Oct 2003 11:36:22 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h93IaL1g017662; Fri, 3 Oct 2003 20:36:21 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Colin Percival <colin.percival@wadham.ox.ac.uk> From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> In-Reply-To: Your message of "Fri, 03 Oct 2003 19:02:44 BST." <5.0.2.1.1.20031003184821.020c4c48@popserver.sfu.ca> Date: Fri, 03 Oct 2003 20:36:21 +0200 Message-ID: <17661.1065206181@critter.freebsd.dk> cc: hackers@freebsd.org Subject: Re: settimeofday within jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 18:36:24 -0000 In message <5.0.2.1.1.20031003184821.020c4c48@popserver.sfu.ca>, Colin Percival writes: > Ok, this is a wierd question: How hard would it be to allow jails to >have local clocks which could be manipulated within those jails? Not hard. How hard would it be to keep track of all the weird options we can think off for jails: much. :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 13:15:20 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF1DF16A4B3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 13:15:20 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F8E243FBF for <hackers@freebsd.org>; Fri, 3 Oct 2003 13:15:19 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) h93KFBFs079024 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 3 Oct 2003 22:15:16 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id h93KF9WZ018547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Oct 2003 22:15:10 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.10/8.12.10) with ESMTP id h93KF92u004979; Fri, 3 Oct 2003 22:15:09 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.10/8.12.10/Submit) id h93KF9Zr004978; Fri, 3 Oct 2003 22:15:09 +0200 (CEST) (envelope-from ticso) Date: Fri, 3 Oct 2003 22:15:08 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: "C. Kukulies" <kuku@www.kukulies.org> Message-ID: <20031003201507.GK886@cicely12.cicely.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310031821.h93ILSVI001295@www.kukulies.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: hackers@freebsd.org Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 20:15:21 -0000 On Fri, Oct 03, 2003 at 08:21:28PM +0200, C. Kukulies wrote: > > > I have disabled the SIO on my ASUS P4SX board because I have a PCI modem > card inserted. But the modem card or the sio on it doesn't seem to be detected > by the kernel. Instead I see two sios (sio0 and sio1) which are flagged > as possibly disabled (?) - why are they seen when I disabled them in the BIOS? PCI serials shouldn't collide with legacy ones - PCI has different IO Space. Many boards don't disable interfaces completely - I wouldn't be suprised if just the irq was dropped. You need a different driver for your PCI one - e.g. puc. The modem coild also be something proprietary for which there is no driver available. > When I run getty (or mgetty) on that port or when I do a cu -l /dev/cuaa0 > the system freezes. Why do you expect anything usefull by accessing half working hardware? -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 14:23:48 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45C8E16A4B3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 14:23:48 -0700 (PDT) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDA2643FE9 for <hackers@freebsd.org>; Fri, 3 Oct 2003 14:23:46 -0700 (PDT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.12.9/8.12.6) with ESMTP id h93LNZR6002127; Fri, 3 Oct 2003 23:23:36 +0200 (CEST) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.12.9/8.12.6/Submit) id h93LNYvK002122; Fri, 3 Oct 2003 23:23:34 +0200 (CEST) Date: Fri, 3 Oct 2003 23:23:34 +0200 From: "Christoph P. Kukulies" <kuku@physik.rwth-aachen.de> To: ticso@cicely.de Message-ID: <20031003212334.GA2076@gilberto.physik.rwth-aachen.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> <20031003201507.GK886@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031003201507.GK886@cicely12.cicely.de> User-Agent: Mutt/1.4.1i cc: "C. Kukulies" <kuku@www.kukulies.org> cc: hackers@freebsd.org Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 21:23:48 -0000 On Fri, Oct 03, 2003 at 10:15:08PM +0200, Bernd Walter wrote: > On Fri, Oct 03, 2003 at 08:21:28PM +0200, C. Kukulies wrote: > > > > > > I have disabled the SIO on my ASUS P4SX board because I have a PCI modem > > card inserted. But the modem card or the sio on it doesn't seem to be detected > > by the kernel. Instead I see two sios (sio0 and sio1) which are flagged > > as possibly disabled (?) - why are they seen when I disabled them in the BIOS? > > PCI serials shouldn't collide with legacy ones - PCI has different IO > Space. > Many boards don't disable interfaces completely - I wouldn't be suprised > if just the irq was dropped. > You need a different driver for your PCI one - e.g. puc. > The modem coild also be something proprietary for which there is no > driver available. > > > When I run getty (or mgetty) on that port or when I do a cu -l /dev/cuaa0 > > the system freezes. > > Why do you expect anything usefull by accessing half working hardware? Well, I would expect an I/O error or no such device. Wouldn't that be at least a minimum one could expect? But a crash or hand? No. one could expect? But a crash or hand? No. -- Chris Christoph P. U. Kukulies From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 14:36:49 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3AA616A4B3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 14:36:49 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50DA443FE0 for <hackers@freebsd.org>; Fri, 3 Oct 2003 14:36:48 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) h93LaWFs080188 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 3 Oct 2003 23:36:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id h93LaUWZ018992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Oct 2003 23:36:30 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.10/8.12.10) with ESMTP id h93LaT2u005208; Fri, 3 Oct 2003 23:36:29 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.10/8.12.10/Submit) id h93LaTVB005207; Fri, 3 Oct 2003 23:36:29 +0200 (CEST) (envelope-from ticso) Date: Fri, 3 Oct 2003 23:36:29 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: "Christoph P. Kukulies" <kuku@physik.rwth-aachen.de> Message-ID: <20031003213628.GN886@cicely12.cicely.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> <20031003201507.GK886@cicely12.cicely.de> <20031003212334.GA2076@gilberto.physik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031003212334.GA2076@gilberto.physik.rwth-aachen.de> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: "C. Kukulies" <kuku@www.kukulies.org> cc: hackers@freebsd.org cc: ticso@cicely.de Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 21:36:50 -0000 On Fri, Oct 03, 2003 at 11:23:34PM +0200, Christoph P. Kukulies wrote: > On Fri, Oct 03, 2003 at 10:15:08PM +0200, Bernd Walter wrote: > > On Fri, Oct 03, 2003 at 08:21:28PM +0200, C. Kukulies wrote: > > > > > > > > > I have disabled the SIO on my ASUS P4SX board because I have a PCI modem > > > card inserted. But the modem card or the sio on it doesn't seem to be detected > > > by the kernel. Instead I see two sios (sio0 and sio1) which are flagged > > > as possibly disabled (?) - why are they seen when I disabled them in the BIOS? > > > > PCI serials shouldn't collide with legacy ones - PCI has different IO > > Space. > > Many boards don't disable interfaces completely - I wouldn't be suprised > > if just the irq was dropped. > > You need a different driver for your PCI one - e.g. puc. > > The modem coild also be something proprietary for which there is no > > driver available. > > > > > When I run getty (or mgetty) on that port or when I do a cu -l /dev/cuaa0 > > > the system freezes. > > > > Why do you expect anything usefull by accessing half working hardware? > > Well, I would expect an I/O error or no such device. Wouldn't that be > at least a minimum one could expect? But a crash or hand? No. > one could expect? But a crash or hand? No. You can't expect anything reliable from a device which is broken. The kernel already warned you that something seems to be questionable. In the same way you can't expect getting an IO error if someone cuts into your computer with a chainsaw - you may get one, but nobody can predict. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 16:04:31 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 199E116A4B3 for <hackers@freebsd.org>; Fri, 3 Oct 2003 16:04:31 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7915D43FE5 for <hackers@freebsd.org>; Fri, 3 Oct 2003 16:04:29 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p1/8.12.9) with ESMTP id h93N4LAD038885; Fri, 3 Oct 2003 17:04:22 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 03 Oct 2003 17:04:22 -0600 (MDT) Message-Id: <20031003.170422.72479132.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely12.cicely.de From: "M. Warner Losh" <imp@bsdimp.com> In-Reply-To: <20031003201507.GK886@cicely12.cicely.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> <20031003201507.GK886@cicely12.cicely.de> X-Mailer: Mew version 2.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: kuku@www.kukulies.org cc: hackers@freebsd.org Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 23:04:31 -0000 In message: <20031003201507.GK886@cicely12.cicely.de> Bernd Walter <ticso@cicely12.cicely.de> writes: : You need a different driver for your PCI one - e.g. puc. actually, puc still uses sio/uart. puc just manages the bus resources. : The modem coild also be something proprietary for which there is no : driver available. I've helped people locally that have 'supported' pci modems that no longer work. Causes an interrupt storm the first time they are accessed. :-( Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 16:17:06 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2373916A4B3 for <freebsd-hackers@freebsd.org>; Fri, 3 Oct 2003 16:17:06 -0700 (PDT) Received: from boeing.ieo-research.it (boeing.ieo-research.it [213.92.108.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64CCB44005 for <freebsd-hackers@freebsd.org>; Fri, 3 Oct 2003 16:17:04 -0700 (PDT) (envelope-from andrea.cocito@ieo-research.it) Received: (qmail 25020 invoked from network); 3 Oct 2003 23:17:02 -0000 Received: from unknown (HELO ieo-research.it) (acocito@[62.211.141.36]) (envelope-sender <andrea.cocito@ieo-research.it>) by smtp.ieo-research.it (qmail-ldap-1.03) with SMTP for <freebsd-hackers@freebsd.org>; 3 Oct 2003 23:17:02 -0000 Mime-Version: 1.0 (Apple Message framework v578) To: freebsd-hackers@freebsd.org Message-Id: <A27EE0A6-F5F7-11D7-9328-000A9573A0F0@ieo-research.it> Content-Type: multipart/mixed; boundary=Apple-Mail-5-1016450387 From: Andrea Cocito <andrea.cocito@ieo-research.it> Date: Sat, 4 Oct 2003 01:16:36 +0200 X-Mailer: Apple Mail (2.578) Subject: agp broken for ali... this is the patch, PLEASE import it :) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Oct 2003 23:17:06 -0000 --Apple-Mail-5-1016450387 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hallo, I sent a temporary patch a while ago, no answer. So sorry for the report but *please* fix this: this makes non-bootable several laptops and industrial systems. On some ALI chipsets the agp bus returns an aperture size of zero, and the kernel panics. The way it is handled for *any* agp bus if the aperture size is zero (or the window can not be allocated) is deadly broken. Attached the patch to fix the broken code and handle it "at the best effort" as the coded was supposed to do, PLEASE someone import it. Sorry for attaching it. Is only 4k and I cannot currently send-pr it. Thanks, A. --Apple-Mail-5-1016450387 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="agp.patch" Content-Disposition: attachment; filename=agp.patch diff -u -r /sys/pci/agp_ali.c /sys_patched/pci/agp_ali.c --- /sys/pci/agp_ali.c Mon Aug 4 09:25:13 2003 +++ /sys_patched/pci/agp_ali.c Tue Aug 5 22:30:17 2003 @@ -101,21 +101,20 @@ return error; sc->initial_aperture = AGP_GET_APERTURE(dev); + gatt = NULL; - for (;;) { + while (AGP_GET_APERTURE(dev) != 0) { gatt = agp_alloc_gatt(dev); - if (gatt) + if (gatt != NULL) break; - - /* - * Probably contigmalloc failure. Try reducing the - * aperture so that the gatt size reduces. - */ - if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) { - agp_generic_detach(dev); - return ENOMEM; - } + AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2); + } + + if (gatt == NULL) { + agp_generic_detach(dev); + return ENOMEM; } + sc->gatt = gatt; /* Install the gatt. */ diff -u -r /sys/pci/agp_amd.c /sys_patched/pci/agp_amd.c --- /sys/pci/agp_amd.c Mon Aug 4 09:33:42 2003 +++ /sys_patched/pci/agp_amd.c Tue Aug 5 22:30:56 2003 @@ -239,19 +239,20 @@ sc->bsh = rman_get_bushandle(sc->regs); sc->initial_aperture = AGP_GET_APERTURE(dev); + gatt = NULL; - for (;;) { - gatt = agp_amd_alloc_gatt(dev); - if (gatt) + while (AGP_GET_APERTURE(dev) != 0) { + gatt = agp_amd_alloc_gatt(dev); + if (gatt != NULL) break; + AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2); + } - /* - * Probably contigmalloc failure. Try reducing the - * aperture so that the gatt size reduces. - */ - if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) - return ENOMEM; + if (gatt == NULL) { + agp_generic_detach(dev); + return ENOMEM; } + sc->gatt = gatt; /* Install the gatt. */ diff -u -r /sys/pci/agp_intel.c /sys_patched/pci/agp_intel.c --- /sys/pci/agp_intel.c Mon Aug 4 09:33:28 2003 +++ /sys_patched/pci/agp_intel.c Tue Aug 5 22:36:23 2003 @@ -147,21 +147,20 @@ MAX_APSIZE; pci_write_config(dev, AGP_INTEL_APSIZE, value, 1); sc->initial_aperture = AGP_GET_APERTURE(dev); + gatt = NULL; - for (;;) { + while (AGP_GET_APERTURE(dev) != 0) { gatt = agp_alloc_gatt(dev); - if (gatt) + if (gatt != NULL) break; - - /* - * Probably contigmalloc failure. Try reducing the - * aperture so that the gatt size reduces. - */ - if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) { - agp_generic_detach(dev); - return ENOMEM; - } + AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2); + } + + if (gatt == NULL) { + agp_generic_detach(dev); + return ENOMEM; } + sc->gatt = gatt; /* Install the gatt. */ diff -u -r /sys/pci/agp_sis.c /sys_patched/pci/agp_sis.c --- /sys/pci/agp_sis.c Tue Apr 15 06:37:29 2003 +++ /sys_patched/pci/agp_sis.c Tue Aug 5 22:36:54 2003 @@ -103,21 +103,20 @@ return error; sc->initial_aperture = AGP_GET_APERTURE(dev); + gatt = NULL; - for (;;) { + while (AGP_GET_APERTURE(dev) != 0) { gatt = agp_alloc_gatt(dev); - if (gatt) + if (gatt != NULL) break; - - /* - * Probably contigmalloc failure. Try reducing the - * aperture so that the gatt size reduces. - */ - if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) { - agp_generic_detach(dev); - return ENOMEM; - } + AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2); + } + + if (gatt == NULL) { + agp_generic_detach(dev); + return ENOMEM; } + sc->gatt = gatt; /* Install the gatt. */ diff -u -r /sys/pci/agp_via.c /sys_patched/pci/agp_via.c --- /sys/pci/agp_via.c Tue Apr 15 06:37:29 2003 +++ /sys_patched/pci/agp_via.c Tue Aug 5 22:37:15 2003 @@ -109,21 +109,20 @@ return error; sc->initial_aperture = AGP_GET_APERTURE(dev); + gatt = NULL; - for (;;) { + while (AGP_GET_APERTURE(dev) != 0) { gatt = agp_alloc_gatt(dev); - if (gatt) + if (gatt != NULL) break; - - /* - * Probably contigmalloc failure. Try reducing the - * aperture so that the gatt size reduces. - */ - if (AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2)) { - agp_generic_detach(dev); - return ENOMEM; - } + AGP_SET_APERTURE(dev, AGP_GET_APERTURE(dev) / 2); + } + + if (gatt == NULL) { + agp_generic_detach(dev); + return ENOMEM; } + sc->gatt = gatt; /* Install the gatt. */ --Apple-Mail-5-1016450387 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed --Apple-Mail-5-1016450387-- From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 3 22:44:47 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from green.bikeshed.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id DA1CA16A4B3 for <hackers@FreeBSD.org>; Fri, 3 Oct 2003 22:44:46 -0700 (PDT) Received: from green.bikeshed.org (localhost [127.0.0.1]) by green.bikeshed.org (8.12.10/8.12.9) with ESMTP id h945cEUW014196 for <hackers@FreeBSD.org>; Sat, 4 Oct 2003 01:38:14 -0400 (EDT) (envelope-from green@green.bikeshed.org) Received: from localhost (green@localhost)h945cDxp014188 for <hackers@FreeBSD.org>; Sat, 4 Oct 2003 01:38:13 -0400 (EDT) Message-Id: <200310040538.h945cDxp014188@green.bikeshed.org> To: hackers@FreeBSD.org From: Brian Fundakowski Feldman <green@FreeBSD.org> Date: Sat, 04 Oct 2003 01:38:13 -0400 Sender: green@green.bikeshed.org Subject: Is socket buffer locking as questionable as it seems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 05:44:47 -0000 I keep getting these panics on my SMP box (no backtrace or DDB or crash dump of course, because panic() == hang to FreeBSD these days): panic: receive: m == 0 so->so_rcv.sb_cc == 52 >From what I can tell, all sorts of socket-related calls are "MP-safe" and yet never even come close to locking the socket buffer. From what I can tell, the easiest way for this occur would be sbrelease() being called from somewhere that it's supposed to, but doesn't, have sblock(). Has anyone seen these, or a place to start looking? Maybe a way to get panics to stop hanging the machine? TIA if anyone has some enlightenment. From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 01:25:58 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA48916A4B3 for <hackers@freebsd.org>; Sat, 4 Oct 2003 01:25:58 -0700 (PDT) Received: from accms33.physik.rwth-aachen.de (accms33.physik.RWTH-Aachen.DE [137.226.46.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72F5643FE0 for <hackers@freebsd.org>; Sat, 4 Oct 2003 01:25:57 -0700 (PDT) (envelope-from kuku@accms33.physik.rwth-aachen.de) Received: (from kuku@localhost) by accms33.physik.rwth-aachen.de (8.11.6/8.9.3) id h948Pm309281; Sat, 4 Oct 2003 10:25:48 +0200 Date: Sat, 4 Oct 2003 10:25:48 +0200 From: "Christoph P. Kukulies" <kuku@physik.rwth-aachen.de> To: ticso@cicely.de Message-ID: <20031004082548.GA9168@gilberto.physik.rwth-aachen.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> <20031003201507.GK886@cicely12.cicely.de> <20031003212334.GA2076@gilberto.physik.rwth-aachen.de> <20031003213628.GN886@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031003213628.GN886@cicely12.cicely.de> User-Agent: Mutt/1.4i cc: hackers@freebsd.org cc: "C. Kukulies" <kuku@www.kukulies.org> cc: "Christoph P. Kukulies" <kuku@physik.rwth-aachen.de> Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 08:25:58 -0000 On Fri, Oct 03, 2003 at 11:36:29PM +0200, Bernd Walter wrote: > > > The modem coild also be something proprietary for which there is no > > > driver available. > > > > > > > When I run getty (or mgetty) on that port or when I do a cu -l /dev/cuaa0 > > > > the system freezes. > > > > > > Why do you expect anything usefull by accessing half working hardware? > > > > Well, I would expect an I/O error or no such device. Wouldn't that be > > at least a minimum one could expect? But a crash or hand? No. ^^ I believe I wanted to say 'hangup'. > > one could expect? But a crash or hand? No. Smoteihng got colbbreed drunig tpynig. ;-) > > You can't expect anything reliable from a device which is broken. > The kernel already warned you that something seems to be questionable. > In the same way you can't expect getting an IO error if someone cuts > into your computer with a chainsaw - you may get one, but nobody can > predict. A device disabled by the BIOS should not be accessible in any way by the kernel. It's not broken nor has anyone cut the devices with a chainsaw. I don't read dmesg before I try to open /dev/cuaa0. So an open on /dev/cuaa0 when sio is disabled in the BIOS should not result in a bad hangup. That's my point. > B.Walter BWCT http://www.bwct.de -- Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 01:36:16 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06A2616A4B3 for <hackers@freebsd.org>; Sat, 4 Oct 2003 01:36:16 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64FF843FCB for <hackers@freebsd.org>; Sat, 4 Oct 2003 01:36:10 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) h948a0Fs094392 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Sat, 4 Oct 2003 10:36:07 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id h948ZuWZ057435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Oct 2003 10:35:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.10/8.12.10) with ESMTP id h948Zu2u010680; Sat, 4 Oct 2003 10:35:56 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.10/8.12.10/Submit) id h948Zu1R010679; Sat, 4 Oct 2003 10:35:56 +0200 (CEST) (envelope-from ticso) Date: Sat, 4 Oct 2003 10:35:55 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: "Christoph P. Kukulies" <kuku@physik.rwth-aachen.de> Message-ID: <20031004083554.GP886@cicely12.cicely.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> <20031003201507.GK886@cicely12.cicely.de> <20031003212334.GA2076@gilberto.physik.rwth-aachen.de> <20031003213628.GN886@cicely12.cicely.de> <20031004082548.GA9168@gilberto.physik.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031004082548.GA9168@gilberto.physik.rwth-aachen.de> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: "C. Kukulies" <kuku@www.kukulies.org> cc: hackers@freebsd.org cc: ticso@cicely.de Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 08:36:16 -0000 On Sat, Oct 04, 2003 at 10:25:48AM +0200, Christoph P. Kukulies wrote: > On Fri, Oct 03, 2003 at 11:36:29PM +0200, Bernd Walter wrote: > > You can't expect anything reliable from a device which is broken. > > The kernel already warned you that something seems to be questionable. > > In the same way you can't expect getting an IO error if someone cuts > > into your computer with a chainsaw - you may get one, but nobody can > > predict. > > A device disabled by the BIOS should not be accessible in any way > by the kernel. It's not broken nor has anyone cut the devices with a chainsaw. > I don't read dmesg before I try to open /dev/cuaa0. > > So an open on /dev/cuaa0 when sio is disabled in the BIOS should not result > in a bad hangup. That's my point. If it really is disabled then you would not have a /dev/cuaa0 to open and you would see a correct error when trying to do. The point is that the kernel sees partially disabled hardware. A device that is something between enabled and disabled cause unpredicable behavour - it's a completely undefined situation. The easiest way is to disable the device in the kernel too. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 02:27:06 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E86A16A4B3 for <hackers@freebsd.org>; Sat, 4 Oct 2003 02:27:06 -0700 (PDT) Received: from www.kukulies.org (www.kukulies.org [213.146.112.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EBAF44005 for <hackers@freebsd.org>; Sat, 4 Oct 2003 02:27:04 -0700 (PDT) (envelope-from kuku@www.kukulies.org) Received: from www.kukulies.org (localhost [127.0.0.1]) by www.kukulies.org (8.12.9/8.12.6) with ESMTP id h949QnR6005494; Sat, 4 Oct 2003 11:26:50 +0200 (CEST) (envelope-from kuku@www.kukulies.org) Received: (from kuku@localhost) by www.kukulies.org (8.12.9/8.12.6/Submit) id h949QmHm005493; Sat, 4 Oct 2003 11:26:48 +0200 (CEST) Date: Sat, 4 Oct 2003 11:26:48 +0200 From: "Christoph P. Kukulies" <kuku@physik.rwth-aachen.de> To: "M. Warner Losh" <imp@bsdimp.com> Message-ID: <20031004092648.GA5474@gilberto.physik.rwth-aachen.de> References: <200310031821.h93ILSVI001295@www.kukulies.org> <20031003201507.GK886@cicely12.cicely.de> <20031003.170422.72479132.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031003.170422.72479132.imp@bsdimp.com> User-Agent: Mutt/1.4.1i cc: ticso@cicely12.cicely.de cc: kuku@www.kukulies.org cc: hackers@freebsd.org cc: ticso@cicely.de Subject: Re: total hang when cu -l /dev/cuaa0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 09:27:06 -0000 On Fri, Oct 03, 2003 at 05:04:22PM -0600, M. Warner Losh wrote: > In message: <20031003201507.GK886@cicely12.cicely.de> > Bernd Walter <ticso@cicely12.cicely.de> writes: > : You need a different driver for your PCI one - e.g. puc. > > actually, puc still uses sio/uart. puc just manages the bus > resources. So puc would not help me here, wouldn't it? Where do I find puc, btw? I don't see a device puc in /sys/i386/conf/* > > : The modem coild also be something proprietary for which there is no > : driver available. So what would be the way to go from here ? What card is supported? Or should I set out for an external modem? USB modem? > > I've helped people locally that have 'supported' pci modems that no > longer work. Causes an interrupt storm the first time they are > accessed. :-( > > Warner -- Chris Christoph P. U. Kukulies From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 05:58:41 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD67116A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 05:58:41 -0700 (PDT) Received: from k.k.ro (www.k.ro [194.102.255.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46DB443FB1 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 05:58:40 -0700 (PDT) (envelope-from liviu_cornel@k.ro) Received: from k.k.ro (www@localhost [127.0.0.1]) by k.k.ro (8.12.10/8.12.9) with ESMTP id h94CwcEH024059 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 15:58:38 +0300 Received: (from www@localhost) by k.k.ro (8.12.10/8.12.9/Submit) id h94CwcVG024058; Sat, 4 Oct 2003 15:58:38 +0300 Date: Sat, 04 Oct 2003 15:58:38 +0300 Message-Id: <200310041258.h94CwcVG024058@k.k.ro> From: Tinta Liviu <liviu_cornel@k.ro> X-Mailer: Super-Mail@k.ro http://mail.k.ro/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-IP: 217.73.164.14 To: freebsd-hackers@freebsd.org Subject: CMI8330 freeBSD problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 12:58:42 -0000 Hello Andrei, I'm now having the same problem as you deed with my ISA sound card (CMI8330). It does not work. Already I've recompiled the kernel with the following lines added to the kernel configuration file: device pcm device sbc as stated on the freeBSD.org site. If you solved your problem, please tell me how you did it. Thanks, Liviu ------------------------------ K Free E-mail http://www.k.ro/ Vacante si calatorii prin http://www.romaniantourism.ro/ From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 07:17:03 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A0E716A4B3 for <hackers@freebsd.org>; Sat, 4 Oct 2003 07:17:03 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3161043FD7 for <hackers@freebsd.org>; Sat, 4 Oct 2003 07:17:02 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id h94EH0gG017665; Sat, 4 Oct 2003 10:17:01 -0400 (EDT) Date: Sat, 4 Oct 2003 10:17:00 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> X-Sender: eischen@pcnet5.pcnet.com To: Dan Langille <dan@langille.org> In-Reply-To: <3F77D27E.6203.3321BA14@localhost> Message-ID: <Pine.GSO.4.10.10310041015390.16685-100000@pcnet5.pcnet.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: [PATCH] : libc_r/uthread/uthread_write.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 14:17:03 -0000 On Mon, 29 Sep 2003, Dan Langille wrote: > > All our testing on this patch has been successful. I'm going to do a > few more tests on different hardware under 4.8-stable. > > What's the next step? Commit it? Get others to test with it first? It's already in -current. You'll have to wait for the code freeze to thaw in -stable before it goes in there. -- Dan Eischen From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 07:18:17 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35C4B16A4B3 for <hackers@freebsd.org>; Sat, 4 Oct 2003 07:18:17 -0700 (PDT) Received: from april.chuckr.org (dsl092-151-030.wdc2.dsl.speakeasy.net [66.92.151.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id E22084400D for <hackers@freebsd.org>; Sat, 4 Oct 2003 07:18:15 -0700 (PDT) (envelope-from chuckr@april.chuckr.org) Received: from april.chuckr.org (localhost [127.0.0.1]) by april.chuckr.org (8.12.10/8.12.5) with ESMTP id h94Dusku016199 for <hackers@freebsd.org>; Sat, 4 Oct 2003 09:56:54 -0400 (EDT) (envelope-from chuckr@april.chuckr.org) Received: (from chuckr@localhost) by april.chuckr.org (8.12.10/8.12.5/Submit) id h94DurYX016198 for hackers@freebsd.org; Sat, 4 Oct 2003 09:56:53 -0400 (EDT) Date: Sat, 4 Oct 2003 09:56:53 -0400 (EDT) From: Chuck Robey <chuckr@april.chuckr.org> Message-Id: <200310041356.h94DurYX016198@april.chuckr.org> To: hackers@freebsd.org Subject: X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 14:18:17 -0000 I need some startup help in moving my new systems. Sure would appreciate it if I could get a pointer here on a couple of matters. My new physical location has really improved things, but my mail isn't working yet, right, and my keyboard is also going wrong. My mail has to come first, here the setup: I want to use my FreeBSD box, april, to relay mail from my Mac OS/X box, which has the address of "may". Actually, I have 4 static IPs, and I want april to allow me to send mail from anything in my domain to anywhere I want to send it. That's the only relaying I want to allow, I want to be careful and not become a spam-source. I tried to send a mail to my work, and may correctly tried to relay through april. I caught the transaction in ethereal, and it looks like april is looking at the destination of the mail, my work address, and denying it based on that. I thought it would only be using the source address to allow or disallow the relaying. Guess I'm wrong. I have all my local machine names in /etc/mail/local-host-names. What else do I have to do to get my relaying (to anywhere I want to send it, here) working? Second part, the usb. I'm running current, BTW. I have done the stuff in the kernel config, I hope: I took out the "device atkbd" line and replaced it with the ukbd line. I put in the ukbd device, rebooted. Now, it's started to recognize the keyboard, but very oddly ... it seems to recognize about 1 key a minute, and it also seems to get hung up on a signle key (recognize it as if I was leaning on the key for 30 seconds, like maybe it saw the down but not the up). I tried the line from the kbdcontrol manpage, "kbdcontrol -k /dev/kbd1 < /dev/console", that keeps on telling me that the device is busy. The usb device I'm using is the one on the motherboard of this Tyan Thunder K7X, no hub. Here's the section of my config file that applies: # usb devices device usb device uhid device udbp device ugen device uhci device ohci device ulpt device uscanner device umass device ums # tell the kernel to make the device, it's not automatic options KBD_INSTALL_CDEV # The AT keyboard device atkbd device ukbd # new syscons stuff device vga device sc device sio Thanks for the help, fellas, I sure hope this gets to you. I am reading my mail fine, at least! From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 07:19:58 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25D2A16A4B3 for <hackers@freebsd.org>; Sat, 4 Oct 2003 07:19:58 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7457F43FCB for <hackers@freebsd.org>; Sat, 4 Oct 2003 07:19:57 -0700 (PDT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 1558F3D28; Sat, 4 Oct 2003 10:19:28 -0400 (EDT) From: "Dan Langille" <dan@langille.org> To: Daniel Eischen <eischen@vigrid.com> Date: Sat, 04 Oct 2003 10:21:17 -0400 MIME-Version: 1.0 Message-ID: <3F7E9F1D.14593.4DB108E2@localhost> Priority: normal References: <3F77D27E.6203.3321BA14@localhost> In-reply-to: <Pine.GSO.4.10.10310041015390.16685-100000@pcnet5.pcnet.com> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body cc: hackers@freebsd.org Subject: Re: [PATCH] : libc_r/uthread/uthread_write.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 14:19:58 -0000 On 4 Oct 2003 at 10:17, Daniel Eischen wrote: > On Mon, 29 Sep 2003, Dan Langille wrote: > > > > All our testing on this patch has been successful. I'm going to do a > > few more tests on different hardware under 4.8-stable. > > > > What's the next step? Commit it? Get others to test with it first? > > It's already in -current. Thanks for that commit. > You'll have to wait for the code > freeze to thaw in -stable before it goes in there. Bugger... which means it won't be into 4.9-RELEASE. -- Dan Langille : http://www.langille.org/ From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 07:39:06 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F10F16A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 07:39:06 -0700 (PDT) Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz [195.113.31.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7135A43FCB for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 07:39:05 -0700 (PDT) (envelope-from mikulas@artax.karlin.mff.cuni.cz) Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 17421) id 21F653FB1; Sat, 4 Oct 2003 16:39:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by artax.karlin.mff.cuni.cz (Postfix) with ESMTP id 202B12FBD9 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 16:39:03 +0200 (CEST) Date: Sat, 4 Oct 2003 16:39:03 +0200 (CEST) From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> To: freebsd-hackers@freebsd.org Message-ID: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 14:39:06 -0000 Hi I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see drastic slowdown when kernel with hyperthreading is booted. For example program compilation took this time: hyperthreading kernel, make -j 1 --- 1:09 hyperthreading kernel, make -j 2 --- 0:42 singlethreading kernel, make -j 1 --- 0:45 singlethreading kernel, make -j 2 --- 0:41 Compilation does very few system calls so when I compile with only one process (-j 1), it should be as fast as with singlethreading kernel. Do you have any idea why is it so slow? Mikulas From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 08:21:50 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1129C16A4B3; Sat, 4 Oct 2003 08:21:50 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FDF943FCB; Sat, 4 Oct 2003 08:21:49 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id h94FLkMg006995; Sat, 4 Oct 2003 11:21:46 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h94FLjoK006992; Sat, 4 Oct 2003 11:21:45 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sat, 4 Oct 2003 11:21:45 -0400 (EDT) From: Robert Watson <rwatson@FreeBSD.org> X-Sender: robert@fledge.watson.org To: Brian Fundakowski Feldman <green@FreeBSD.org> In-Reply-To: <200310040538.h945cDxp014188@green.bikeshed.org> Message-ID: <Pine.NEB.3.96L.1031004111742.6830A-100000@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@FreeBSD.org Subject: Re: Is socket buffer locking as questionable as it seems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 15:21:50 -0000 On Sat, 4 Oct 2003, Brian Fundakowski Feldman wrote: > I keep getting these panics on my SMP box (no backtrace or DDB or crash > dump of course, because panic() == hang to FreeBSD these days): panic: > receive: m == 0 so->so_rcv.sb_cc == 52 From what I can tell, all sorts > of socket-related calls are "MP-safe" and yet never even come close to > locking the socket buffer. From what I can tell, the easiest way for > this occur would be sbrelease() being called from somewhere that it's > supposed to, but doesn't, have sblock(). Has anyone seen these, or a > place to start looking? Maybe a way to get panics to stop hanging the > machine? TIA if anyone has some enlightenment. The system calls are marked MPSAFE in the case of the socket calls because the grabbing of Giant has been pushed down into the system call, as opposed to Giant being grabbed by the system call code itself. Giant should be held across all the relevant socket-related events -- if you find a place where it's not, send some details :-). As you observe, there is currently no socket locking in the source tree, although I'm hopeful that will be remedied in the next couple of months. The lower levels of the IP stack can be run Giant-free at this point, although my local patches to run multiple input paths in parallel runs into a panic due to insufficient locking in ip_forward() (bug report already filed with Sam). One of the conclusions from the recent developer summit was that a big focus needs to be placed on interrupt processing latency and device driver improvements so that we get the benefits of finger-grained locking. Peter's has picked up the task of doing a driver API sweep to provide better facilities for doing this. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 11:41:40 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0CB616A4B3; Sat, 4 Oct 2003 11:41:40 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF53B43FEA; Sat, 4 Oct 2003 11:41:39 -0700 (PDT) (envelope-from sam@errno.com) Received: from 66.127.85.91 ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id h94Ifc0x002070 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 4 Oct 2003 11:41:39 -0700 (PDT) (envelope-from sam@errno.com) From: Sam Leffler <sam@errno.com> Organization: Errno Consulting To: Brian Fundakowski Feldman <green@freebsd.org>, hackers@freebsd.org Date: Sat, 4 Oct 2003 11:39:52 -0700 User-Agent: KMail/1.5.2 References: <200310040538.h945cDxp014188@green.bikeshed.org> In-Reply-To: <200310040538.h945cDxp014188@green.bikeshed.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310041139.52357.sam@errno.com> Subject: Re: Is socket buffer locking as questionable as it seems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 18:41:40 -0000 On Friday 03 October 2003 10:38 pm, Brian Fundakowski Feldman wrote: > I keep getting these panics on my SMP box (no backtrace or DDB or crash > dump of course, because panic() == hang to FreeBSD these days): > panic: receive: m == 0 so->so_rcv.sb_cc == 52 > From what I can tell, all sorts of socket-related calls are "MP-safe" > and yet never even come close to locking the socket buffer. From > what I can tell, the easiest way for this occur would be sbrelease() > being called from somewhere that it's supposed to, but doesn't, have > sblock(). Has anyone seen these, or a place to start looking? Maybe > a way to get panics to stop hanging the machine? TIA if anyone has > some enlightenment. Haven't seen anything on my SMP test box. As Robert has already said sockets are still implicitly locked by Giant. You need to provide more information like what version you are running and what your system is doing when the panic occurs. FWIW panic does not hang for me so you might first try to figure out why that's occuring. Sam From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 12:03:01 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3514D16A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 12:03:01 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-64-169-107-253.dsl.lsan03.pacbell.net [64.169.107.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id C03E743FFD for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 12:02:59 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id E738266C9E; Sat, 4 Oct 2003 12:02:51 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id 263A1A88; Sat, 4 Oct 2003 12:02:52 -0700 (PDT) Date: Sat, 4 Oct 2003 12:02:52 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Message-ID: <20031004190251.GA60026@rot13.obsecurity.org> References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 19:03:01 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 04, 2003 at 04:39:03PM +0200, Mikulas Patocka wrote: > Hi >=20 > I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see > drastic slowdown when kernel with hyperthreading is booted. For example > program compilation took this time: >=20 > hyperthreading kernel, make -j 1 --- 1:09 > hyperthreading kernel, make -j 2 --- 0:42 > singlethreading kernel, make -j 1 --- 0:45 > singlethreading kernel, make -j 2 --- 0:41 >=20 > Compilation does very few system calls so when I compile with only one > process (-j 1), it should be as fast as with singlethreading kernel. Do > you have any idea why is it so slow? Do you realise that hyperthreading !=3D a secret extra CPU in your system? Kris --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/fxlbWry0BWjoQKURAoSJAJ0Up/hgcoIghVZ94g0wS3E05SemqwCgrVW0 vmx8fz6AFu9oKRYpNs2b1kM= =2WqZ -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 12:20:08 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22F8A16A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 12:20:08 -0700 (PDT) Received: from razorbill.mail.pas.earthlink.net (razorbill.mail.pas.earthlink.net [207.217.121.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id B58FB43FB1 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 12:20:05 -0700 (PDT) (envelope-from richardcoleman@mindspring.com) Received: from c-24-98-233-138.atl.client2.attbi.com ([24.98.233.138] helo=mindspring.com) by razorbill.mail.pas.earthlink.net with asmtp (Exim 3.33 #1) id 1A5rwg-0002tE-00; Sat, 04 Oct 2003 12:20:02 -0700 Message-ID: <3F7F1D63.2010703@mindspring.com> Date: Sat, 04 Oct 2003 15:20:03 -0400 From: Richard Coleman <richardcoleman@mindspring.com> Organization: Critical Magic, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Kennaway <kris@obsecurity.org> References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> In-Reply-To: <20031004190251.GA60026@rot13.obsecurity.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: 1ee258965991efcb0865379cdb43356e5e89bb4777695beb702e37df12b9c9efc482133be8463073d38faee61c9d66a3350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: richardcoleman@mindspring.com List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 19:20:08 -0000 Kris Kennaway wrote: > On Sat, Oct 04, 2003 at 04:39:03PM +0200, Mikulas Patocka wrote: >>I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see >>drastic slowdown when kernel with hyperthreading is booted. For example >>program compilation took this time: >> >>hyperthreading kernel, make -j 1 --- 1:09 >>hyperthreading kernel, make -j 2 --- 0:42 >>singlethreading kernel, make -j 1 --- 0:45 >>singlethreading kernel, make -j 2 --- 0:41 >> >>Compilation does very few system calls so when I compile with only one >>process (-j 1), it should be as fast as with singlethreading kernel. Do >>you have any idea why is it so slow? > > Do you realise that hyperthreading != a secret extra CPU in your system? > > Kris I didn't see anywhere in the message where he implied that. To me, the interesting thing is that there is such a larger difference between the compile time for -j1 and -j2 when using hyperthreading as compared to the difference between -j1 and -j2 for a single threaded kernel. It's over a 50% slowdown. Richard Coleman From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 13:10:53 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E33316A4E6 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 13:10:53 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-64-169-107-253.dsl.lsan03.pacbell.net [64.169.107.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC1C744013 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 13:07:21 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from rot13.obsecurity.org (rot13.obsecurity.org [10.0.0.5]) by obsecurity.dyndns.org (Postfix) with ESMTP id CA72866D84; Sat, 4 Oct 2003 13:04:35 -0700 (PDT) Received: by rot13.obsecurity.org (Postfix, from userid 1000) id C6067B64; Sat, 4 Oct 2003 13:04:35 -0700 (PDT) Date: Sat, 4 Oct 2003 13:04:35 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Richard Coleman <richardcoleman@mindspring.com> Message-ID: <20031004200435.GA60432@rot13.obsecurity.org> References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <3F7F1D63.2010703@mindspring.com> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 20:10:53 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 04, 2003 at 03:20:03PM -0400, Richard Coleman wrote: > Kris Kennaway wrote: > >On Sat, Oct 04, 2003 at 04:39:03PM +0200, Mikulas Patocka wrote: > >>I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see > >>drastic slowdown when kernel with hyperthreading is booted. For example > >>program compilation took this time: > >> > >>hyperthreading kernel, make -j 1 --- 1:09 > >>hyperthreading kernel, make -j 2 --- 0:42 > >>singlethreading kernel, make -j 1 --- 0:45 > >>singlethreading kernel, make -j 2 --- 0:41 > >> > >>Compilation does very few system calls so when I compile with only one > >>process (-j 1), it should be as fast as with singlethreading kernel. Do > >>you have any idea why is it so slow? > > > >Do you realise that hyperthreading !=3D a secret extra CPU in your syste= m? > > > >Kris >=20 > I didn't see anywhere in the message where he implied that. To me, the= =20 > interesting thing is that there is such a larger difference between the= =20 > compile time for -j1 and -j2 when using hyperthreading as compared to=20 > the difference between -j1 and -j2 for a single threaded kernel. It's=20 > over a 50% slowdown. Yes, that's because (as discussed in the archives) the kernel treats it like an extra, completely decoupled physical CPU and schedules processes on it without further consideration. This is presumably the cause of the slowdown, because it's only efficient to use the virtual CPU under certain workload patterns. HTT is not magic performance beans. Kris --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/fyfTWry0BWjoQKURAlBWAKD3sjB59L46XLP+m6bkP7IYbc9aCQCfX278 eZSzkqA5MYRYYmTByyF81zg= =XUkm -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 14:54:47 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A953F16A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 14:54:47 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE8BD43FE3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 14:54:46 -0700 (PDT) (envelope-from richardcoleman@mindspring.com) Received: from c-24-98-233-138.atl.client2.attbi.com ([24.98.233.138] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (Exim 3.33 #1) id 1A5uMP-0004hM-00; Sat, 04 Oct 2003 14:54:45 -0700 Message-ID: <3F7F41A5.7020202@mindspring.com> Date: Sat, 04 Oct 2003 17:54:45 -0400 From: Richard Coleman <richardcoleman@mindspring.com> Organization: Critical Magic, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Kennaway <kris@obsecurity.org> References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com> <20031004200435.GA60432@rot13.obsecurity.org> In-Reply-To: <20031004200435.GA60432@rot13.obsecurity.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: 1ee258965991efcb0865379cdb43356e5e89bb4777695beb702e37df12b9c9ef0c5f199c920c3aab780ffe4a04a8ad24350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: richardcoleman@mindspring.com List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 21:54:47 -0000 Kris Kennaway wrote: > On Sat, Oct 04, 2003 at 03:20:03PM -0400, Richard Coleman wrote: > >>Kris Kennaway wrote: >> >>>On Sat, Oct 04, 2003 at 04:39:03PM +0200, Mikulas Patocka wrote: >>> >>>>I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see >>>>drastic slowdown when kernel with hyperthreading is booted. For example >>>>program compilation took this time: >>>> >>>>hyperthreading kernel, make -j 1 --- 1:09 >>>>hyperthreading kernel, make -j 2 --- 0:42 >>>>singlethreading kernel, make -j 1 --- 0:45 >>>>singlethreading kernel, make -j 2 --- 0:41 >>>> >>>>Compilation does very few system calls so when I compile with only one >>>>process (-j 1), it should be as fast as with singlethreading kernel. Do >>>>you have any idea why is it so slow? >>> >>>Do you realise that hyperthreading != a secret extra CPU in your system? >>> >>>Kris >> >>I didn't see anywhere in the message where he implied that. To me, the >>interesting thing is that there is such a larger difference between the >>compile time for -j1 and -j2 when using hyperthreading as compared to >>the difference between -j1 and -j2 for a single threaded kernel. It's >>over a 50% slowdown. > > > Yes, that's because (as discussed in the archives) the kernel treats > it like an extra, completely decoupled physical CPU and schedules > processes on it without further consideration. This is presumably the > cause of the slowdown, because it's only efficient to use the virtual > CPU under certain workload patterns. HTT is not magic performance > beans. > > Kris Sigh. No one is claiming HTT is magic performance beans. The 50% slowdown I'm talking about is between -j1 and -j2 BOTH ARE WHICH ARE USING HTT. It's just an interesting observation. That's all. Richard Coleman From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 14:56:33 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F5E516A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 14:56:33 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id B86DF43FBF for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 14:56:31 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id <aa22200@salmon>; 4 Oct 2003 22:56:31 +0100 (BST) To: Kris Kennaway <kris@obsecurity.org> In-Reply-To: Your message of "Sat, 04 Oct 2003 13:04:35 PDT." <20031004200435.GA60432@rot13.obsecurity.org> Date: Sat, 04 Oct 2003 22:56:27 +0100 From: Ian Dowse <iedowse@maths.tcd.ie> Message-ID: <200310042256.aa22200@salmon.maths.tcd.ie> cc: Richard Coleman <richardcoleman@mindspring.com> cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> cc: freebsd-hackers@freebsd.org Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 21:56:33 -0000 In message <20031004200435.GA60432@rot13.obsecurity.org>, Kris Kennaway writes: >Yes, that's because (as discussed in the archives) the kernel treats >it like an extra, completely decoupled physical CPU and schedules >processes on it without further consideration. This is presumably the >cause of the slowdown, because it's only efficient to use the virtual >CPU under certain workload patterns. HTT is not magic performance >beans. Try also setting the sysctl variable "machdep.cpu_idle_hlt" to 1, as it doesn't help to have the idle logical CPUs spinning. Ian From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 16:27:55 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from green.bikeshed.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 477DA16A4B3; Sat, 4 Oct 2003 16:27:53 -0700 (PDT) Received: from green.bikeshed.org (localhost [127.0.0.1]) by green.bikeshed.org (8.12.10/8.12.9) with ESMTP id h94NRlpb005282; Sat, 4 Oct 2003 19:27:47 -0400 (EDT) (envelope-from green@green.bikeshed.org) Received: from localhost (green@localhost)h94NRh0s005278; Sat, 4 Oct 2003 19:27:45 -0400 (EDT) Message-Id: <200310042327.h94NRh0s005278@green.bikeshed.org> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: Sam Leffler <sam@errno.com> In-Reply-To: Message from Sam Leffler <sam@errno.com> of "Sat, 04 Oct 2003 11:39:52 PDT." <200310041139.52357.sam@errno.com> From: "Brian F. Feldman" <green@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 04 Oct 2003 19:27:43 -0400 Sender: green@green.bikeshed.org cc: hackers@freebsd.org Subject: Re: Is socket buffer locking as questionable as it seems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 23:27:55 -0000 Sam Leffler <sam@errno.com> wrote: > On Friday 03 October 2003 10:38 pm, Brian Fundakowski Feldman wrote: > > I keep getting these panics on my SMP box (no backtrace or DDB or crash > > dump of course, because panic() == hang to FreeBSD these days): > > panic: receive: m == 0 so->so_rcv.sb_cc == 52 > > From what I can tell, all sorts of socket-related calls are "MP-safe" > > and yet never even come close to locking the socket buffer. From > > what I can tell, the easiest way for this occur would be sbrelease() > > being called from somewhere that it's supposed to, but doesn't, have > > sblock(). Has anyone seen these, or a place to start looking? Maybe > > a way to get panics to stop hanging the machine? TIA if anyone has > > some enlightenment. > > Haven't seen anything on my SMP test box. As Robert has already said sockets > are still implicitly locked by Giant. You need to provide more information > like what version you are running and what your system is doing when the > panic occurs. > > FWIW panic does not hang for me so you might first try to figure out why > that's occuring. I turned off sync on panic so maybe I'll be okay now. That never, ever, worked for me starting a couple years ago and I forgot I had it disabled locally. I see it immediately on boot and I couldn't tell you why; this is a NAT box, and a million other things. I'm running the most current current I can possibly run, of course. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 16:54:03 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E1F416A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 16:54:03 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A7BC4400D for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 16:54:01 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h94Ns08i021092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 19:54:00 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h94Ns0QK021091 for freebsd-hackers@freebsd.org; Sat, 4 Oct 2003 19:54:00 -0400 (EDT) Date: Sat, 4 Oct 2003 19:54:00 -0400 From: Leo Bicknell <bicknell@ufp.org> To: freebsd-hackers@freebsd.org Message-ID: <20031004235400.GA20943@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Changing the NAT IP on demand? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 04 Oct 2003 23:54:03 -0000 I'm considering options for a new project, and I think I've discovered what I think is the best idea, but I don't think current software supports the config. I'd like to get some confirmation, and comments on if it would be hard to implement. Consider: ISP #1-------\ \ FreeBSD Box----LAN / ISP #2-------/ In this case the LAN would be 1918 space, the two ISP's would each provide a public IP for the FreeBSD box. Now, NAT would be required. What I want to do is write an external application to decide the performance of ISP #1 and ISP#2, and somehow tell NAT which outside address to use. That, by itself, is not hard. Here's the trick. I want the switch to be seamless. That is, if NAT is translating to ISP #1 and the application says switch to #2 the existing translations to #1 (until they go away naturally) should be kept, while new ones go to #2. The only ways I know to change the outside address seem to tear down all existing connections. Is it possible to make this work today? Would it be hard to fix if it doesn't work today? -- Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 18:37:04 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5330A16A4B3; Sat, 4 Oct 2003 18:37:04 -0700 (PDT) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA73843FE0; Sat, 4 Oct 2003 18:37:03 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (66-91-236-204.san.rr.com [66.91.236.204]) by smtp-relay.omnis.com (Postfix) with ESMTP id B447172DCF; Sat, 4 Oct 2003 18:35:44 -0700 (PDT) From: Wes Peters <wes@softweyr.com> Organization: Softweyr To: Sam Leffler <sam@errno.com>, Brian Fundakowski Feldman <green@freebsd.org>, hackers@freebsd.org Date: Sat, 4 Oct 2003 18:37:01 -0700 User-Agent: KMail/1.5.4 References: <200310040538.h945cDxp014188@green.bikeshed.org> <200310041139.52357.sam@errno.com> In-Reply-To: <200310041139.52357.sam@errno.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310041837.01922.wes@softweyr.com> Subject: Re: Is socket buffer locking as questionable as it seems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 05 Oct 2003 01:37:04 -0000 On Saturday 04 October 2003 11:39 am, Sam Leffler wrote: > On Friday 03 October 2003 10:38 pm, Brian Fundakowski Feldman wrote: > > I keep getting these panics on my SMP box (no backtrace or DDB or > > crash dump of course, because panic() == hang to FreeBSD these days): > > panic: receive: m == 0 so->so_rcv.sb_cc == 52 > > From what I can tell, all sorts of socket-related calls are "MP-safe" > > and yet never even come close to locking the socket buffer. From > > what I can tell, the easiest way for this occur would be sbrelease() > > being called from somewhere that it's supposed to, but doesn't, have > > sblock(). Has anyone seen these, or a place to start looking? Maybe > > a way to get panics to stop hanging the machine? TIA if anyone has > > some enlightenment. > > Haven't seen anything on my SMP test box. As Robert has already said > sockets are still implicitly locked by Giant. You need to provide more > information like what version you are running and what your system is > doing when the panic occurs. > > FWIW panic does not hang for me so you might first try to figure out > why that's occuring. Is this one of the areas you are planning to get to, Sam? -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 18:45:06 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93C7516A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 18:45:06 -0700 (PDT) Received: from mail.silverwraith.com (66-214-182-79.la-cbi.charterpipeline.net [66.214.182.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AC8143F75 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 18:45:05 -0700 (PDT) (envelope-from avleen@silverwraith.com) Received: from avleen by mail.silverwraith.com with local (Exim 4.22) id 1A5xxE-0005ax-SO; Sat, 04 Oct 2003 18:45:00 -0700 Date: Sat, 4 Oct 2003 18:45:00 -0700 From: Avleen Vig <lists-freebsd@silverwraith.com> To: Richard Coleman <richardcoleman@mindspring.com> Message-ID: <20031005014500.GD12128@silverwraith.com> References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com> <20031004200435.GA60432@rot13.obsecurity.org> <3F7F41A5.7020202@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F7F41A5.7020202@mindspring.com> User-Agent: Mutt/1.5.4i Sender: Avleen Vig <avleen@silverwraith.com> cc: freebsd-hackers@freebsd.org cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 05 Oct 2003 01:45:06 -0000 On Sat, Oct 04, 2003 at 05:54:45PM -0400, Richard Coleman wrote: > >>>>hyperthreading kernel, make -j 1 --- 1:09 > >>>>hyperthreading kernel, make -j 2 --- 0:42 > >>>>singlethreading kernel, make -j 1 --- 0:45 > >>>>singlethreading kernel, make -j 2 --- 0:41 [snip] > >Yes, that's because (as discussed in the archives) the kernel treats > >it like an extra, completely decoupled physical CPU and schedules > >processes on it without further consideration. This is presumably the > >cause of the slowdown, because it's only efficient to use the virtual > >CPU under certain workload patterns. HTT is not magic performance > >beans. > > Sigh. No one is claiming HTT is magic performance beans. The 50% > slowdown I'm talking about is between -j1 and -j2 BOTH ARE WHICH ARE > USING HTT. > It's just an interesting observation. That's all. Yeah, that's precisely what Kris said :-) When you have one processes hitting either one of two CPU's, that one CPU is going to get used to the fullest. When you are splitting the processes over two CPU's extra time needs to be taken for the extra scheduling and other extra work. The increase here is significant, but not unexpected :-) Now, if you had two seperate processes fighting for CPU time, you'd see a performance increase: Try running 'make -j 1' twice, on two different kernel configs files who's contents are the same. First try it without hyperthreading and then try it with hyperthreading. -- Avleen Vig Systems Administrator Personal: www.silverwraith.com EFnet: irc.mindspring.com (Earthlink user access only) From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 18:47:17 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEA7C16A4BF for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 18:47:17 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 90E8C43F75 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 18:47:16 -0700 (PDT) (envelope-from mdcki@gmx.net) Received: (qmail 30489 invoked by uid 65534); 5 Oct 2003 01:47:15 -0000 Received: from cvpn009.gwdg.de (EHLO gmx.net) (134.76.22.9) by mail.gmx.net (mp016) with SMTP; 05 Oct 2003 03:47:15 +0200 X-Authenticated: #17236065 Message-ID: <3F7F7838.4070707@gmx.net> Date: Sun, 05 Oct 2003 03:47:36 +0200 From: Marcin Dalecki <mdcki@gmx.net> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20030911 X-Accept-Language: en-us, en MIME-Version: 1.0 To: richardcoleman@mindspring.com References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com> <20031004200435.GA60432@rot13.obsecurity.org> <3F7F41A5.7020202@mindspring.com> In-Reply-To: <3F7F41A5.7020202@mindspring.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 05 Oct 2003 01:47:18 -0000 Richard Coleman wrote: > Kris Kennaway wrote: > >> On Sat, Oct 04, 2003 at 03:20:03PM -0400, Richard Coleman wrote: >> >>> Kris Kennaway wrote: >>> >>>> On Sat, Oct 04, 2003 at 04:39:03PM +0200, Mikulas Patocka wrote: >>>> >>>>> I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see >>>>> drastic slowdown when kernel with hyperthreading is booted. For >>>>> example >>>>> program compilation took this time: >>>>> >>>>> hyperthreading kernel, make -j 1 --- 1:09 >>>>> hyperthreading kernel, make -j 2 --- 0:42 >>>>> singlethreading kernel, make -j 1 --- 0:45 >>>>> singlethreading kernel, make -j 2 --- 0:41 >>>>> >>>>> Compilation does very few system calls so when I compile with only one >>>>> process (-j 1), it should be as fast as with singlethreading >>>>> kernel. Do >>>>> you have any idea why is it so slow? >>>> >>>> >>>> Do you realise that hyperthreading != a secret extra CPU in your >>>> system? >>>> >>>> Kris >>> >>> >>> I didn't see anywhere in the message where he implied that. To me, >>> the interesting thing is that there is such a larger difference >>> between the compile time for -j1 and -j2 when using hyperthreading as >>> compared to the difference between -j1 and -j2 for a single threaded >>> kernel. It's over a 50% slowdown. >> >> >> >> Yes, that's because (as discussed in the archives) the kernel treats >> it like an extra, completely decoupled physical CPU and schedules >> processes on it without further consideration. This is presumably the >> cause of the slowdown, because it's only efficient to use the virtual >> CPU under certain workload patterns. HTT is not magic performance >> beans. >> >> Kris > > > Sigh. No one is claiming HTT is magic performance beans. The 50% > slowdown I'm talking about is between -j1 and -j2 BOTH ARE WHICH ARE > USING HTT. > > It's just an interesting observation. That's all. It's not interresting. It is to be expected. The only gains one could exepect are in the case where sufficently differrent execution units of the CPU would be used. Like for example doing floating point vers. integer calculations. But exen then Amdahl will bite you by the incurrend synchronisation verhead anyway.. From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 4 19:55:17 2003 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A587716A4B3 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 19:55:17 -0700 (PDT) Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz [195.113.31.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id E76B543FE5 for <freebsd-hackers@freebsd.org>; Sat, 4 Oct 2003 19:55:16 -0700 (PDT) (envelope-from mikulas@artax.karlin.mff.cuni.cz) Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 17421) id 075F33FAA; Sun, 5 Oct 2003 04:55:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by artax.karlin.mff.cuni.cz (Postfix) with ESMTP id EEEFB2FBD9; Sun, 5 Oct 2003 04:55:14 +0200 (CEST) Date: Sun, 5 Oct 2003 04:55:14 +0200 (CEST) From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> To: Ian Dowse <iedowse@maths.tcd.ie> In-Reply-To: <200310042256.aa22200@salmon.maths.tcd.ie> Message-ID: <Pine.LNX.4.58.0310050452140.7806@artax.karlin.mff.cuni.cz> References: <200310042256.aa22200@salmon.maths.tcd.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Richard Coleman <richardcoleman@mindspring.com> cc: freebsd-hackers@freebsd.org cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Hyperthreading slowdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 05 Oct 2003 02:55:17 -0000 > In message <20031004200435.GA60432@rot13.obsecurity.org>, Kris Kennaway writes: > >Yes, that's because (as discussed in the archives) the kernel treats > >it like an extra, completely decoupled physical CPU and schedules > >processes on it without further consideration. This is presumably the > >cause of the slowdown, because it's only efficient to use the virtual > >CPU under certain workload patterns. HTT is not magic performance > >beans. > > Try also setting the sysctl variable "machdep.cpu_idle_hlt" to 1, as > it doesn't help to have the idle logical CPUs spinning. I did and it solved the problem (-j1 is as fast on hyperthreading kernel as on singlethreading kernel). It should be default setting on hyperthreading system (or at least there should be comment around option HTT that people must set it), because otherwise performance is really terrible --- the idle thread is spinning, taking half of the CPU. Mikulas