From owner-freebsd-arch@FreeBSD.ORG Wed May 5 06:00:17 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9726416A4CE for ; Wed, 5 May 2004 06:00:17 -0700 (PDT) Received: from mxa.sbone.cz (mxa.sbone.cz [62.84.132.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFDC943D46 for ; Wed, 5 May 2004 06:00:15 -0700 (PDT) (envelope-from pbednar@vop025.cz) Received: from postant.vop025.cz ([62.77.79.106]) by mxa.sbone.cz (8.11.6/8.11.6) with ESMTP id i45D0DW32365 for ; Wed, 5 May 2004 15:00:13 +0200 Received: from 172.16.32.2 ([172.16.32.2]) by postant.vop025.cz (WinRoute Pro 4.2.5) with SMTP; Wed, 5 May 2004 15:02:07 +0200 Message-ID: <4098E5AD.1090702@vop025.cz> Date: Wed, 05 May 2004 15:01:33 +0200 From: =?UTF-8?B?UGV0ciBCZWRuw6HFmQ==?= User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-arch@FreeBSD.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Linux/Unix for server HP9000? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2004 13:00:17 -0000 I looking for Linux or Unix system for server HP 9000. Support the Freebsd HP9000 server? Thank You very much Petr Bednar From owner-freebsd-arch@FreeBSD.ORG Wed May 5 06:24:04 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5FBF16A4CE for ; Wed, 5 May 2004 06:24:04 -0700 (PDT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 021B843D31 for ; Wed, 5 May 2004 06:24:02 -0700 (PDT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 0A8BF1FF903; Wed, 5 May 2004 15:24:00 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 1A7171FF9A6; Wed, 5 May 2004 15:23:58 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 8AD2315659; Wed, 5 May 2004 13:23:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 8030C15384; Wed, 5 May 2004 13:23:45 +0000 (UTC) Date: Wed, 5 May 2004 13:23:45 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: =?UTF-8?B?UGV0ciBCZWRuw6HFmQ==?= In-Reply-To: <4098E5AD.1090702@vop025.cz> Message-ID: References: <4098E5AD.1090702@vop025.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-arch@FreeBSD.org Subject: Re: Linux/Unix for server HP9000? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2004 13:24:04 -0000 On Wed, 5 May 2004, [UTF-8] Petr Bedn=C3=A1=C5^Y wrote: > I looking for Linux or Unix system for server HP 9000. Support the > Freebsd HP9000 server? IMHO FreeBSD doesn't support PARISC. depending on the machine you may be lucky at - http://www.netbsd.org/ - http://www.openbsd.org/ - http://www.parisc-linux.org/ --=20 Bjoern A. Zeeb=09=09=09=09bzeeb at Zabbadoz dot NeT 56 69 73 69 74=09=09=09=09http://www.zabbadoz.net/ From owner-freebsd-arch@FreeBSD.ORG Wed May 5 14:36:35 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40B4316A4CF for ; Wed, 5 May 2004 14:36:35 -0700 (PDT) Received: from palrel10.hp.com (palrel10.hp.com [156.153.255.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id B92BD43D99 for ; Wed, 5 May 2004 14:36:08 -0700 (PDT) (envelope-from gene.dinkey@hp.com) Received: from xparelay2.ptp.hp.com (xparelay2.ptp.hp.com [15.1.28.65]) by palrel10.hp.com (Postfix) with ESMTP id 8AD8F1C018F6; Wed, 5 May 2004 14:34:58 -0700 (PDT) Received: from xpabh1.ptp.hp.com (xpabh1.ptp.hp.com [15.1.28.60]) by xparelay2.ptp.hp.com (Postfix) with ESMTP id 7EEEC1F0E; Wed, 5 May 2004 17:34:58 -0400 (EDT) Received: by xpabh1.ptp.hp.com with Internet Mail Service (5.5.2657.72) id ; Wed, 5 May 2004 14:34:58 -0700 Message-ID: From: "DINKEY,GENE (HP-Loveland,ex1)" To: "'Bjoern A. Zeeb'" , =?iso-8859-1?Q?Petr_Bedn=E1r?= Date: Wed, 5 May 2004 14:34:47 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable cc: freebsd-arch@FreeBSD.org Subject: RE: Linux/Unix for server HP9000? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2004 21:36:35 -0000 Last I checked the only BSD that supported PA-RISC was NetBSD. This = was a few years ago and the port was very much in its infancy, I'm not sure = if any work has been done on it since. I believe that Linux has a PA-RISC = port available, otherwise you're stuck with HPUX. Regards Gene Dinkey Hewlett Packard Disk Team -----Original Message----- From: owner-freebsd-arch@freebsd.org = [mailto:owner-freebsd-arch@freebsd.org] On Behalf Of Bjoern A. Zeeb Sent: Wednesday, May 05, 2004 7:24 AM To: Petr Bedn=E1r Cc: freebsd-arch@FreeBSD.org Subject: Re: Linux/Unix for server HP9000? On Wed, 5 May 2004, [UTF-8] Petr Bedn=C3=A1=C5^Y wrote: > I looking for Linux or Unix system for server HP 9000. Support the=20 > Freebsd HP9000 server? IMHO FreeBSD doesn't support PARISC. depending on the machine you may be lucky at - http://www.netbsd.org/ - http://www.openbsd.org/ - http://www.parisc-linux.org/ --=20 Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/ _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" From owner-freebsd-arch@FreeBSD.ORG Thu May 6 01:13:12 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A824216A4CE for ; Thu, 6 May 2004 01:13:12 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 7DCCE43D1F for ; Thu, 6 May 2004 01:13:11 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 39660 invoked by uid 1000); 6 May 2004 08:13:14 -0000 Date: Thu, 6 May 2004 01:13:14 -0700 (PDT) From: Nate Lawson To: arch@freebsd.org Message-ID: <20040506010929.A39605@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Testing needed: legacy CPU device X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2004 08:13:12 -0000 The attached patch backs out the previous attempt at adding a newbus attachment for CPUs and adds it instead as the i386 legacy device. I need someone with SMP or UP to compile and boot this _without_ ACPI enabled. Then send me the output of "devinfo". For the curious, I plan to rename acpi_cpu to cpu and thus drivers can probe/attach to a CPU via a dependency on "cpu". We'll enumerate processors via ACPI if enabled, or this legacy attachment if disabled. This will handle i386 (both with and without acpi), ia64, and amd64. Thanks, -Nate Index: sys/i386/i386/legacy.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/legacy.c,v retrieving revision 1.52 diff -u -r1.52 legacy.c --- sys/i386/i386/legacy.c 25 Aug 2003 09:48:47 -0000 1.52 +++ sys/i386/i386/legacy.c 6 May 2004 06:33:56 -0000 @@ -41,7 +41,9 @@ #include #include #include +#include #include +#include #include "opt_mca.h" #ifdef DEV_MCA @@ -143,7 +145,9 @@ static int legacy_attach(device_t dev) { - device_t child; + device_t child; + int i; + struct pcpu *pc; /* * First, let our child driver's identify any child devices that @@ -178,6 +182,20 @@ device_probe_and_attach(child); } + if (!devclass_get_device(devclass_find("cpu"), 0)) { + for (i = 0; i <= mp_maxid; i++) + if (!CPU_ABSENT(i)) { + pc = pcpu_find(i); + KASSERT(pc != NULL, ("pcpu_find failed")); + child = BUS_ADD_CHILD(dev, 0, "cpu", i); + if (child == NULL) + panic("legacy_attach cpu"); + device_probe_and_attach(child); + pc->pc_device = child; + device_set_ivars(child, pc); + } + } + return 0; } @@ -323,4 +341,61 @@ struct resource_list *rl = &atdev->lg_resources; resource_list_delete(rl, type, rid); +} + +/* + * Legacy CPU attachment when ACPI is not available. Drivers like + * cpufreq(4) hang off this. + */ +static int cpu_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result); + +static device_method_t cpu_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, bus_generic_probe), + DEVMETHOD(device_attach, bus_generic_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus interface */ + DEVMETHOD(bus_read_ivar, cpu_read_ivar), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), +#ifdef notyet + DEVMETHOD(bus_add_child, cpu_add_child), + DEVMETHOD(bus_set_resource, bus_generic_set_resource), + DEVMETHOD(bus_get_resource, bus_generic_get_resource), + DEVMETHOD(bus_delete_resource, bus_generic_delete_resource), +#endif + + { 0, 0 } +}; + +static driver_t cpu_driver = { + "cpu", + cpu_methods, + 1, /* no softc */ +}; +static devclass_t cpu_devclass; +DRIVER_MODULE(cpu, legacy, cpu_driver, cpu_devclass, 0, 0); + +static int +cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) +{ + struct pcpu *pc; + + if (index != 0) + return (ENOENT); + pc = device_get_ivars(child); + if (pc == NULL) + return (ENOENT); + *result = (uintptr_t)pc; + return (0); } Index: sys/kern/subr_smp.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_smp.c,v retrieving revision 1.186 diff -u -r1.186 subr_smp.c --- sys/kern/subr_smp.c 27 Mar 2004 18:21:24 -0000 1.186 +++ sys/kern/subr_smp.c 23 Apr 2004 16:38:52 -0000 @@ -83,48 +83,6 @@ SYSCTL_INT(_kern_smp, OID_AUTO, cpus, CTLFLAG_RD, &smp_cpus, 0, "Number of CPUs online"); -#if !__sparc64__ && !__powerpc__ -static void cpu_identify(driver_t *driver, device_t parent); -static device_t cpu_add_child(device_t bus, int order, const char *name, - int unit); - -static device_method_t cpu_methods[] = { - /* Device interface */ - DEVMETHOD(device_identify, cpu_identify), - DEVMETHOD(device_probe, bus_generic_probe), - DEVMETHOD(device_attach, bus_generic_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), - - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_add_child, cpu_add_child), - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), -#ifdef notyet - DEVMETHOD(bus_set_resource, bus_generic_set_resource), - DEVMETHOD(bus_get_resource, bus_generic_get_resource), - DEVMETHOD(bus_delete_resource, bus_generic_delete_resource), -#endif - - { 0, 0 } -}; - -static driver_t cpu_driver = { - "cpu", - cpu_methods, - 1, /* no softc */ -}; -static devclass_t cpu_devclass; -DRIVER_MODULE(cpu, nexus, cpu_driver, cpu_devclass, 0, 0); -#endif - #ifdef SMP /* Enable forwarding of a signal to a process running on a different CPU */ static int forward_signal_enabled = 1; @@ -416,31 +374,3 @@ teardown_func(arg); } #endif /* SMP */ - -#if !__sparc64__ && !__powerpc__ -static void -cpu_identify(driver_t *driver, device_t parent) -{ - struct pcpu *pc; - int i; - - /* Protect against multiple scans of the bus. */ - if (!cold || device_find_child(parent, "cpu", 0) != NULL) - return; - - for (i = 0; i <= mp_maxid; i++) - if (!CPU_ABSENT(i)) { - pc = pcpu_find(i); - KASSERT(pc != NULL, ("pcpu_find failed")); - pc->pc_device = BUS_ADD_CHILD(parent, 0, "cpu", i); - if (pc->pc_device == NULL) - panic("failed adding cpu child"); - } -} - -static device_t -cpu_add_child(device_t bus, int order, const char *name, int unit) -{ - return (device_add_child_ordered(bus, order, name, unit)); -} -#endif From owner-freebsd-arch@FreeBSD.ORG Fri May 7 02:28:40 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A678F16A4CE for ; Fri, 7 May 2004 02:28:40 -0700 (PDT) Received: from web14808.mail.yahoo.com (web14808.mail.yahoo.com [216.136.224.224]) by mx1.FreeBSD.org (Postfix) with SMTP id 8210043D46 for ; Fri, 7 May 2004 02:28:40 -0700 (PDT) (envelope-from rosti_bsd@yahoo.com) Message-ID: <20040507092840.24516.qmail@web14808.mail.yahoo.com> Received: from [212.143.154.227] by web14808.mail.yahoo.com via HTTP; Fri, 07 May 2004 02:28:40 PDT Date: Fri, 7 May 2004 02:28:40 -0700 (PDT) From: Rostislav Krasny To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: question about "IRQ 2 problem" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2004 09:28:40 -0000 Hello everybody. About 5 monthes ago I wrote to this mailing list about the "IRQ 2 problem". You can read that discussion thread by following links: http://lists.freebsd.org/pipermail/freebsd-arch/2003-December/thread.html http://lists.freebsd.org/pipermail/freebsd-arch/2004-January/thread.html I just want to know what is the satus of this problem now? Thank you. __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From owner-freebsd-arch@FreeBSD.ORG Fri May 7 11:10:11 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C16FF16A4CE for ; Fri, 7 May 2004 11:10:11 -0700 (PDT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19B9943D49 for ; Fri, 7 May 2004 11:10:09 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 12707 invoked from network); 7 May 2004 18:10:08 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 7 May 2004 18:10:08 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i47IA5pw078812; Fri, 7 May 2004 14:10:05 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-arch@FreeBSD.org Date: Fri, 7 May 2004 10:12:34 -0400 User-Agent: KMail/1.6 References: <20040507092840.24516.qmail@web14808.mail.yahoo.com> In-Reply-To: <20040507092840.24516.qmail@web14808.mail.yahoo.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405071012.34816.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Rostislav Krasny Subject: Re: question about "IRQ 2 problem" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2004 18:10:11 -0000 On Friday 07 May 2004 05:28 am, Rostislav Krasny wrote: > Hello everybody. > > About 5 monthes ago I wrote to this mailing list about the "IRQ 2 > problem". You can read that discussion thread by following links: > > http://lists.freebsd.org/pipermail/freebsd-arch/2003-December/thread.html > http://lists.freebsd.org/pipermail/freebsd-arch/2004-January/thread.html > > I just want to know what is the satus of this problem now? > > Thank you. Not fixed yet. Someone needs to sit down and verify if the resource manager is silently adding in the IRQ 2 resource when it hasn't beek asked to. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-arch@FreeBSD.ORG Fri May 7 20:45:19 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D448316A4CE; Fri, 7 May 2004 20:45:19 -0700 (PDT) Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C97043D53; Fri, 7 May 2004 20:45:18 -0700 (PDT) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (eugen@localhost [127.0.0.1]) by grosbein.pp.ru (8.12.11/8.12.11) with ESMTP id i483jFi4000983; Sat, 8 May 2004 11:45:15 +0800 (KRAST) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.12.11/8.12.11/Submit) id i483jF0P000982; Sat, 8 May 2004 11:45:15 +0800 (KRAST) (envelope-from eugen) Date: Sat, 8 May 2004 11:45:14 +0800 From: Eugene Grosbein To: net@freebsd.org, arch@freebsd.org Message-ID: <20040508034514.GA937@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i cc: yar@freebsd.org Subject: Re: bin/65928: [PATCH] stock ftpd uses superuser credentials for active mode sockets X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 03:45:20 -0000 Hi! When an active IPv4 TCP connection between localIP:localport and remoteIP1:remoteport1 exists, it is not possible for local non-root user to create outgoing TCP connection from localIP:localport to remoteIP2:remoteport2. Why? It prevents http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/65928 from resolving. Eugene Grosbein From owner-freebsd-arch@FreeBSD.ORG Fri May 7 23:28:14 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5E2016A4D1 for ; Fri, 7 May 2004 23:28:14 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 8612A43D54 for ; Fri, 7 May 2004 23:28:13 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 52690 invoked by uid 1000); 8 May 2004 06:28:15 -0000 Date: Fri, 7 May 2004 23:28:15 -0700 (PDT) From: Nate Lawson To: arch@freebsd.org Message-ID: <20040507231846.F52653@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: acpi@freebsd.org Subject: New ACPI blacklist format X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 06:28:14 -0000 I have extracted a set of known-broken tables/versions from various sources. Since. as far as I know, C does not allow variable length initializers, I've settled on the following format: struct acpi_table_desc { char *signature; char *oem_id; char *oem_table_id; char *oem_rev_op; char *oem_revision; char *creator_id; char *creator_rev_op; char *creator_revision; }; struct acpi_blacklist { int quirk; struct acpi_table_desc *match; }; #define ACPI_BROKEN 0x1 static struct acpi_table_desc Abit_BP6[] = { { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, }; static struct acpi_table_desc AMI_INT[] = { /* 01/18/00 */ { "FACP", "AWARD", "", "<=", "10", "", "", "" }, { "DSDT", "", "", "<=", "5", "", "", "" }, }; static struct acpi_table_desc Compaq_ViperII[] = { { "FACP", "COMPAQ", "VIPER II", "<=", "06040000", "PTL", "<=", "000F4240" }, }; static struct acpi_blacklist acpi_blacklist_table[] = { { ACPI_BROKEN, Abit_BP6 }, { ACPI_BROKEN, AMI_INT }, { ACPI_BROKEN, Compaq_ViperII }, }; Each entry in acpi_table_desc lists a table ID and then a set of strings to match against the table. Multiple tables may be matched for a given system (i.e. AMI_INT above). The op values will be "<=", "=", and ">=". The quirk associated with each system will be a bitmask returned from the quirk matching function. In English, the last entry means, "Check the table named 'FACP' for an OEM ID of 'COMPAQ' and table ID of 'VIPER II' and OEM revision <= '06040000' ..." Substring matches will work too (e.g., "COMPA"). Is there any better way to compact this? -Nate From owner-freebsd-arch@FreeBSD.ORG Fri May 7 23:50:12 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ECEC16A4CE; Fri, 7 May 2004 23:50:12 -0700 (PDT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D80643D39; Fri, 7 May 2004 23:50:11 -0700 (PDT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 70D3B1FFDD3; Sat, 8 May 2004 08:50:09 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 84BBD1FFDC1; Sat, 8 May 2004 08:50:07 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 038B31566B; Sat, 8 May 2004 06:40:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 00C1F154E2; Sat, 8 May 2004 06:40:41 +0000 (UTC) Date: Sat, 8 May 2004 06:40:41 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Eugene Grosbein In-Reply-To: <20040508034514.GA937@grosbein.pp.ru> Message-ID: References: <20040508034514.GA937@grosbein.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: arch@freebsd.org cc: yar@freebsd.org cc: net@freebsd.org Subject: Re: bin/65928: [PATCH] stock ftpd uses superuser credentials for active mode sockets X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 06:50:12 -0000 On Sat, 8 May 2004, Eugene Grosbein wrote: Hi, > When an active IPv4 TCP connection between > localIP:localport and remoteIP1:remoteport1 exists, > it is not possible for local non-root user to create outgoing > TCP connection from localIP:localport to remoteIP2:remoteport2. > > Why? It prevents http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/65928 > from resolving. to do it with other wording: if in active mode data is send to remote, the server uses ftp-data as port (which is 20 [ftp(21)-1]) and you are running into creating a socket in the privileged port range: net.inet.ip.portrange.reservedlow to net.inet.ip.portrange.reservedhigh which "only may be opened by root-owned processes" [ip(4)]. -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/ From owner-freebsd-arch@FreeBSD.ORG Sat May 8 06:23:59 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3924316A4D2; Sat, 8 May 2004 06:23:59 -0700 (PDT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7E0B43D3F; Sat, 8 May 2004 06:23:57 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i48DNu3F046266; Sat, 8 May 2004 17:23:56 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i48DNtvn046265; Sat, 8 May 2004 17:23:55 +0400 (MSD) (envelope-from yar) Date: Sat, 8 May 2004 17:23:54 +0400 From: Yar Tikhiy To: "Bjoern A. Zeeb" Message-ID: <20040508132354.GB44214@comp.chem.msu.su> References: <20040508034514.GA937@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: arch@freebsd.org cc: Eugene Grosbein cc: net@freebsd.org Subject: Re: bin/65928: [PATCH] stock ftpd uses superuser credentials for active mode sockets X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 13:23:59 -0000 On Sat, May 08, 2004 at 06:40:41AM +0000, Bjoern A. Zeeb wrote: > > > When an active IPv4 TCP connection between > > localIP:localport and remoteIP1:remoteport1 exists, > > it is not possible for local non-root user to create outgoing > > TCP connection from localIP:localport to remoteIP2:remoteport2. > > > > Why? It prevents http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/65928 > > from resolving. > > to do it with other wording: > > if in active mode data is send to remote, the server uses ftp-data > as port (which is 20 [ftp(21)-1]) and you are running into creating > a socket in the privileged port range: > net.inet.ip.portrange.reservedlow to net.inet.ip.portrange.reservedhigh > which "only may be opened by root-owned processes" [ip(4)]. Not exactly. The right to bind a socket to a priviliged port is verified against the process credentials, with suser() and at a different point in the code. Eugene is talking about socket credentials, so_cred, and their use in preventing port stealth. It's a different thing, it applies to any port number. The code in question is in file sys/netinet/in_pcb.c, function in_pcbbind(): if (so->so_cred->cr_uid != 0 && !IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) { t = in_pcblookup_local(inp->inp_pcbinfo, sin->sin_addr, lport, prison ? 0 : INPLOOKUP_WILDCARD); if (t && ... My investigation shows that the problem is somewhat tangled. On the one hand, it has to do with the way in_pcblookup_local() is invoked to check for possible port stealth. The function takes the last on/off argument "wild_okay" instructing it whether to consider connected sockets along with unconnected ones. This argument is set to 1 by the code in question unless we're in jail. Consequently, the function can match established connections. On the other hand, "wild_okay" can't just be set to constant 0 there because in this case in_pcblookup_local() would not match connections with the local wildcard address. Perhaps, yet another "if" needs to be added to check if the existing inpcb found is not connected yet. Another point to note here is that for a UDP inpcb having the foreign address set to something different from INADDR_ANY doesn't mean the inpcb is actually connected. -- Yar From owner-freebsd-arch@FreeBSD.ORG Sat May 8 09:43:35 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E0AA16A4CE; Sat, 8 May 2004 09:43:35 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF6E443D1F; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i48GhY6D027241; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i48GhYSa003257; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i48GhYuP003256; Sat, 8 May 2004 09:43:34 -0700 (PDT) (envelope-from marcel) Date: Sat, 8 May 2004 09:43:34 -0700 From: Marcel Moolenaar To: Nate Lawson Message-ID: <20040508164334.GA3217@dhcp01.pn.xcllnt.net> References: <20040507231846.F52653@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040507231846.F52653@root.org> User-Agent: Mutt/1.4.2.1i cc: acpi@freebsd.org cc: arch@freebsd.org Subject: Re: New ACPI blacklist format X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 16:43:35 -0000 On Fri, May 07, 2004 at 11:28:15PM -0700, Nate Lawson wrote: *snip* > static struct acpi_table_desc Abit_BP6[] = { > { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, > }; > static struct acpi_table_desc AMI_INT[] = { /* 01/18/00 */ > { "FACP", "AWARD", "", "<=", "10", "", "", "" }, > { "DSDT", "", "", "<=", "5", "", "", "" }, > }; > static struct acpi_table_desc Compaq_ViperII[] = { > { "FACP", "COMPAQ", "VIPER II", "<=", "06040000", "PTL", "<=", "000F4240" }, > }; *snip* > Each entry in acpi_table_desc lists a table ID and then a set of strings > to match against the table. Multiple tables may be matched for a given > system (i.e. AMI_INT above). The op values will be "<=", "=", and ">=". > The quirk associated with each system will be a bitmask returned from the > quirk matching function. > > In English, the last entry means, "Check the table named 'FACP' for an OEM > ID of 'COMPAQ' and table ID of 'VIPER II' and OEM revision <= '06040000' > ..." Substring matches will work too (e.g., "COMPA"). > > Is there any better way to compact this? If space is a concern, you can enable (i.e. compile-in) quirks by using kernel options, like: options ACPI_QUIRK_ABIT_BP6 and #ifdef ACPI_QUIRK_ABIT_BP6 static struct acpi_table_desc Abit_BP6[] = { { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, }; #endif You put all three of them in GENERIC and people can add or remove them from their own kernel configuration to fit their needs (and save space). If the quirks are in MI files, then this also avoids that i386 quirks end up in amd64 or ia64 kernels. Just a thought, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-arch@FreeBSD.ORG Sat May 8 11:37:27 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DBFC16A4CF for ; Sat, 8 May 2004 11:37:27 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 0C68D43D4C for ; Sat, 8 May 2004 11:37:26 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 58715 invoked by uid 1000); 8 May 2004 18:37:26 -0000 Date: Sat, 8 May 2004 11:37:26 -0700 (PDT) From: Nate Lawson To: "M. Warner Losh" In-Reply-To: <20040508.054429.99235478.imp@bsdimp.com> Message-ID: <20040508113421.R58706@root.org> References: <20040507231846.F52653@root.org> <20040508.054429.99235478.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: acpi@freebsd.org cc: arch@freebsd.org Subject: Re: New ACPI blacklist format X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 18:37:27 -0000 On Sat, 8 May 2004, M. Warner Losh wrote: > In message: <20040507231846.F52653@root.org> > Nate Lawson writes: > : I have extracted a set of known-broken tables/versions from various > : sources. Since. as far as I know, C does not allow variable length > : initializers, I've settled on the following format: > > It does. > > : struct acpi_table_desc { > : char *signature; > : char *oem_id; > : char *oem_table_id; > : char *oem_rev_op; > : char *oem_revision; > : char *creator_id; > : char *creator_rev_op; > : char *creator_revision; > : }; > : > : struct acpi_blacklist { > : int quirk; > : struct acpi_table_desc *match; > : }; > : > : #define ACPI_BROKEN 0x1 > : > : static struct acpi_table_desc Abit_BP6[] = { > : { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, > : }; > > { .signature = "FACP", .oem_id="AWARD", .oem_table_id="AWARDACPI", > .oem_rev_op = "<=", } > > :The op values will be "<=", "=", and ">=". > > These are likely better as a enum. > > : Is there any better way to compact this? > > Using shorter structure names would get it all onthe same line. Sure, good comments. What I meant by compacting was to get a variable number of acpi_table_desc elements in a single blacklist entry without defining a separate static. Something like this: static struct acpi_blacklist blacklist[] = { { .quirk = ACPI_BROKEN, { { "FACP", ... }, { "DSDT", ... } } }, { .quirk = ... } }; The compiler didn't allow this. -Nate From owner-freebsd-arch@FreeBSD.ORG Sat May 8 12:30:31 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A23C516A4CE; Sat, 8 May 2004 12:30:31 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28AE543D49; Sat, 8 May 2004 12:30:31 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 08323ACADB; Sat, 8 May 2004 21:30:29 +0200 (CEST) Date: Sat, 8 May 2004 21:30:28 +0200 From: Pawel Jakub Dawidek To: Nate Lawson Message-ID: <20040508193028.GH24376@darkness.comp.waw.pl> References: <20040507231846.F52653@root.org> <20040508.054429.99235478.imp@bsdimp.com> <20040508113421.R58706@root.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aUiDxsG/XgXmoT1Q" Content-Disposition: inline In-Reply-To: <20040508113421.R58706@root.org> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: acpi@freebsd.org cc: arch@freebsd.org Subject: Re: New ACPI blacklist format X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2004 19:30:31 -0000 --aUiDxsG/XgXmoT1Q Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 08, 2004 at 11:37:26AM -0700, Nate Lawson wrote: +> > : struct acpi_table_desc { +> > : char *signature; +> > : char *oem_id; +> > : char *oem_table_id; +> > : char *oem_rev_op; +> > : char *oem_revision; +> > : char *creator_id; +> > : char *creator_rev_op; +> > : char *creator_revision; +> > : }; +> > : +> > : struct acpi_blacklist { +> > : int quirk; +> > : struct acpi_table_desc *match; +> > : }; +> > : +> > : #define ACPI_BROKEN 0x1 +> > : +> > : static struct acpi_table_desc Abit_BP6[] =3D { +> > : { "FACP", "AWARD", "AWRDACPI", "<=3D", "30302e31", "", "", "" }, +> > : }; [...] +> [...] What I meant by compacting was to get a variable +> number of acpi_table_desc elements in a single blacklist entry without +> defining a separate static. Something like this: +>=20 +> static struct acpi_blacklist blacklist[] =3D { +> { +> .quirk =3D ACPI_BROKEN, +> { +> { "FACP", ... }, +> { "DSDT", ... } +> } +> }, +> { +> .quirk =3D ... +> } +> }; +>=20 +> The compiler didn't allow this. Because you have to do something like this: struct acpi_blacklist { int quirk; struct acpi_table_desc match[DEFINED_SIZE]; }; --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --aUiDxsG/XgXmoT1Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAnTVUForvXbEpPzQRAoW9AJ9hWdkTTe+soNgPkdyVK/gbe9+ZewCgmWL5 NhfFNRrpUdQUKc8BirDpYlM= =IdJH -----END PGP SIGNATURE----- --aUiDxsG/XgXmoT1Q--