From owner-cvs-sys Sun Oct 15 09:59:45 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA02197 for cvs-sys-outgoing; Sun, 15 Oct 1995 09:59:45 -0700 Received: (from phk@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA02169 ; Sun, 15 Oct 1995 09:59:38 -0700 Date: Sun, 15 Oct 1995 09:59:38 -0700 From: Poul-Henning Kamp Message-Id: <199510151659.JAA02169@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/pccard pcic.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk phk 95/10/15 09:59:37 Modified: sys/pccard pcic.c Log: Make LKM entry consisten with tradition: pcic_mod(). From owner-cvs-sys Sun Oct 15 11:03:52 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA04813 for cvs-sys-outgoing; Sun, 15 Oct 1995 11:03:52 -0700 Received: (from phk@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA04799 ; Sun, 15 Oct 1995 11:03:44 -0700 Date: Sun, 15 Oct 1995 11:03:44 -0700 From: Poul-Henning Kamp Message-Id: <199510151803.LAA04799@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/i386 support.s Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk phk 95/10/15 11:03:43 Modified: sys/i386/i386 support.s Log: Pull all of libkern.a in (though not mcount) so the LKM's don't come out shorthanded. Makes the idea of libkern pretty void now... From owner-cvs-sys Sun Oct 15 11:50:13 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA05468 for cvs-sys-outgoing; Sun, 15 Oct 1995 11:50:13 -0700 Received: from GndRsh.aac.dev.com (GndRsh.aac.dev.com [198.145.92.241]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id LAA05463 ; Sun, 15 Oct 1995 11:50:08 -0700 Received: (from rgrimes@localhost) by GndRsh.aac.dev.com (8.6.12/8.6.12) id LAA14583; Sun, 15 Oct 1995 11:50:06 -0700 From: "Rodney W. Grimes" Message-Id: <199510151850.LAA14583@GndRsh.aac.dev.com> Subject: Re: cvs commit: src/sys/i386/i386 support.s To: phk@freefall.freebsd.org (Poul-Henning Kamp) Date: Sun, 15 Oct 1995 11:50:05 -0700 (PDT) Cc: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org In-Reply-To: <199510151803.LAA04799@freefall.freebsd.org> from "Poul-Henning Kamp" at Oct 15, 95 11:03:44 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 533 Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk > > phk 95/10/15 11:03:43 > > Modified: sys/i386/i386 support.s > Log: > Pull all of libkern.a in (though not mcount) so the LKM's don't come > out shorthanded. Makes the idea of libkern pretty void now... Not totally void. It still saves me from compiling those functions N times when I am building kernels for N different machines at the same time. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Reliable computers for FreeBSD From owner-cvs-sys Sun Oct 15 16:43:24 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA15693 for cvs-sys-outgoing; Sun, 15 Oct 1995 16:43:24 -0700 Received: (from se@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA15672 ; Sun, 15 Oct 1995 16:43:10 -0700 Date: Sun, 15 Oct 1995 16:43:10 -0700 From: Stefan Esser Message-Id: <199510152343.QAA15672@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/isa pcibus.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk se 95/10/15 16:43:09 Modified: sys/i386/isa pcibus.c Log: Go back to separate tests for configuration mechanism 1 and mechanism 2. Require the state of the configuration enable bits to be OFF assuming that the BIOS left them that way, as it should anyway to avoid bad things to happen. The tests themselves are copied from the previous release, with the exception of CONF1_ENABLE_MSK1 having the LSB set. This bit should be read back as '0', since only DWORD addresses are legal. From owner-cvs-sys Sun Oct 15 17:47:24 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA21102 for cvs-sys-outgoing; Sun, 15 Oct 1995 17:47:24 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id RAA21086 ; Sun, 15 Oct 1995 17:47:17 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id KAA03806; Mon, 16 Oct 1995 10:45:39 +1000 Date: Mon, 16 Oct 1995 10:45:39 +1000 From: Bruce Evans Message-Id: <199510160045.KAA03806@godzilla.zeta.org.au> To: phk@freefall.freebsd.org, rgrimes@gndrsh.aac.dev.com Subject: Re: cvs commit: src/sys/i386/i386 support.s Cc: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk >> Modified: sys/i386/i386 support.s >> Log: >> Pull all of libkern.a in (though not mcount) so the LKM's don't come >> out shorthanded. Makes the idea of libkern pretty void now... >Not totally void. It still saves me from compiling those functions N >times when I am building kernels for N different machines at the >same time. Compiling the non-nprofiled libkern objects takes only 17 seconds, while compiling a kernel takes 1400 seconds here. The saving is hardly worth having. My kernel compile time has increased from about 1200 seconds since I added full prototyping and a few options, and from about 540 seconds for 1.1. Bruce From owner-cvs-sys Sun Oct 15 22:32:34 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26215 for cvs-sys-outgoing; Sun, 15 Oct 1995 22:32:34 -0700 Received: (from swallace@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26204 ; Sun, 15 Oct 1995 22:32:24 -0700 Date: Sun, 15 Oct 1995 22:32:24 -0700 From: Steven Wallace Message-Id: <199510160532.WAA26204@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/ibcs2 ibcs2_stat.c ibcs2_utsname.h Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk swallace 95/10/15 22:32:22 Modified: sys/i386/ibcs2 ibcs2_stat.c ibcs2_utsname.h Log: Do a better fake for uname information returned in utssys() call. Currently, the emulator defaults to returning "FreeBSD" as the system name, release "3.2", and version "2.0". Some programs want to make sure they are on a SYSV 3.2 system and check for 3.X release number. Use the following defines to override the defaults: IBCS2_UNAME_SYSNAME IBCS2_UNAME_RELEASE IBCS2_UNAME_VERSION (should be string) for system name, release, and version, respectively. This allows someone to compile the emulator into the kernel so it can pretend to be a specific system if needed. From owner-cvs-sys Sun Oct 15 22:45:55 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26638 for cvs-sys-outgoing; Sun, 15 Oct 1995 22:45:55 -0700 Received: (from dyson@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26628 ; Sun, 15 Oct 1995 22:45:51 -0700 Date: Sun, 15 Oct 1995 22:45:51 -0700 From: John Dyson Message-Id: <199510160545.WAA26628@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/vm vm_glue.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk dyson 95/10/15 22:45:50 Modified: sys/vm vm_glue.c Log: Remove an unnecessary tsleep in the swapin code. This tsleep can defer swapping in processes and is just not the right thing to do. From owner-cvs-sys Sun Oct 15 22:52:58 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26894 for cvs-sys-outgoing; Sun, 15 Oct 1995 22:52:58 -0700 Received: (from swallace@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA26883 ; Sun, 15 Oct 1995 22:52:56 -0700 Date: Sun, 15 Oct 1995 22:52:56 -0700 From: Steven Wallace Message-Id: <199510160552.WAA26883@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/ibcs2 ibcs2_fcntl.c ibcs2_other.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk swallace 95/10/15 22:52:55 Modified: sys/i386/ibcs2 ibcs2_fcntl.c ibcs2_other.c Log: Add a hack to emulator to emulat spx device for local X connections. This is truly a hack. The idea is taken from the Linux ibcs2 emulator. To use this feature, you must use the option, options SPX_HACK in your config. Also, in /compat/ibcs2/dev, you must do: lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx Do NOT use old socksys driver as that has been removed. This hack needs /compat/ibcs2/dev/spx to be any device that does NOT exist/configured (so the now non-existant spx major/minor works fine). When an open() is called, the error ENXIO is checked and then the path is checked. If spx open detected, then a unix socket is opened to the hardcoded path "/tmp/.X11-unix/X0". As the Linux hacker author mentioned, the real way would be to detect the getmsg/putmsg through /dev/X0R and /dev/spx. Until this true solution is implemented (if ever), I think this hack is important enough to be put into the tree, even though I don't like it dirtying up my clean code (which is what #ifdef SPX_HACK is for). From owner-cvs-sys Mon Oct 16 07:45:52 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA10026 for cvs-sys-outgoing; Mon, 16 Oct 1995 07:45:52 -0700 Received: from miller.cs.uwm.edu (miller.cs.uwm.edu [129.89.9.13]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id HAA10014 ; Mon, 16 Oct 1995 07:45:38 -0700 Received: (from james@localhost) by miller.cs.uwm.edu (8.6.10/8.6.10) id JAA16277; Mon, 16 Oct 1995 09:45:37 -0500 Date: Mon, 16 Oct 1995 09:45:37 -0500 From: Jim Lowe Message-Id: <199510161445.JAA16277@miller.cs.uwm.edu> To: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, bde@zeta.org.au, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/isa spigot.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk > Date: Sat, 14 Oct 1995 18:00:57 +1000 > From: Bruce Evans > To: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, > cvs-sys@freefall.freebsd.org > Subject: Re: cvs commit: src/sys/i386/isa spigot.c > > > Modified: sys/i386/isa spigot.c > > Log: > > Don't allow i/o operations for non-root users. > > This change should probably be in 2.1. I'm not sure what the spigot > driver and the encumbered libraries for it do, but they shouldn't > be allowed to de-scure the rest of the system. > > /dev/spigot is created with owner root.wheel and permissions 444. This > was previously a security hole. Now it is probably just bogus since > probably only root will be able to use the device. Perhaps the correct > fix was to change /dev/spigot to owner root.kmem permissions 440. Then > it would be as (in)secure as /dev/io. Granting i/o permission is more > dangerous than granting read-only permission for /dev/kmem, so there > should be a separate group and stronger enforcement of kern.securelevel > for it. /dev/mem should probably be in the same group, since reading > device registers may cause output. > > Bruce > At the time I wrote the spigot stuff, this seemed the only way to make things work. On many systems, making people run as root to capture video is far more insecure than granting them access to the IO page, but this is a matter of judgement. In my case, running a video capture program as root would basically be the same thing as giving every user on that system root priv since they use the system to capture video. This doesn't sound like a reasonable solution either. The correct solution would be to map the 4 bytes of i/o space (read-only) into user space. With the current vm functions available, I didn't see any way of doing this. It seemed that one had to map all of i/o space or none at all. Is there a way of mapping one word of I/O space read-only into user space without allowing them access to the whole I/O page? -Jim From owner-cvs-sys Mon Oct 16 11:21:53 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA16247 for cvs-sys-outgoing; Mon, 16 Oct 1995 11:21:53 -0700 Received: (from wollman@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA16202 ; Mon, 16 Oct 1995 11:21:31 -0700 Date: Mon, 16 Oct 1995 11:21:31 -0700 From: "Garrett A. Wollman" Message-Id: <199510161821.LAA16202@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/netinet ip_output.c tcp_output.c tcp_subr.c tcp_var.h Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk wollman 95/10/16 11:21:29 Modified: sys/netinet ip_output.c tcp_output.c tcp_subr.c tcp_var.h Log: The ability to administratively change the MTU of an interface presents a few new wrinkles for MTU discovery which tcp_output() had better be prepared to handle. ip_output() is also modified to do something helpful in this case, since it has already calculated the information we need. From owner-cvs-sys Mon Oct 16 12:11:18 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA17657 for cvs-sys-outgoing; Mon, 16 Oct 1995 12:11:18 -0700 Received: (from wollman@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA17617 ; Mon, 16 Oct 1995 12:09:44 -0700 Date: Mon, 16 Oct 1995 12:09:44 -0700 From: "Garrett A. Wollman" Message-Id: <199510161909.MAA17617@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/net route.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk wollman 95/10/16 12:09:43 Modified: sys/net route.c Log: When adding a route fails because there is already a route with the same (mask,value) in the tree, don't immediately return EEXIST. Instead, check to see if the pre-existing route was generated by protcol-cloning. If so, then it is OK to simply blow away the old route and re-attempt the insertion. If not, then fall back to the same error code as before. From owner-cvs-sys Mon Oct 16 13:43:20 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA20328 for cvs-sys-outgoing; Mon, 16 Oct 1995 13:43:20 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA20317 ; Mon, 16 Oct 1995 13:43:08 -0700 Date: Mon, 16 Oct 1995 13:43:08 -0700 From: David Greenman Message-Id: <199510162043.NAA20317@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/vm vm_glue.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/16 13:43:07 Branch: sys/vm RELENG_2_1_0 Modified: sys/vm vm_glue.c Log: Brought in changes from rev 1.28: remove unnecessary tsleep that could result in processes not being swapped in when they were supposed to be. From owner-cvs-sys Mon Oct 16 13:54:11 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA20813 for cvs-sys-outgoing; Mon, 16 Oct 1995 13:54:11 -0700 Received: (from wollman@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA20800 ; Mon, 16 Oct 1995 13:53:58 -0700 Date: Mon, 16 Oct 1995 13:53:58 -0700 From: "Garrett A. Wollman" Message-Id: <199510162053.NAA20800@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/net route.h Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk wollman 95/10/16 13:53:57 Modified: sys/net route.h Log: Change signature of rt->rt_output() so that it is compatible with ifp->if_output() functions. This way, initial implementations of rt_output functionality can just lazily use if_output until customized versions are written. From owner-cvs-sys Mon Oct 16 15:32:16 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA25891 for cvs-sys-outgoing; Mon, 16 Oct 1995 15:32:16 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id PAA25864 ; Mon, 16 Oct 1995 15:32:01 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id XAA16665; Mon, 16 Oct 1995 23:09:46 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id XAA23353; Mon, 16 Oct 1995 23:09:46 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) id XAA27001; Mon, 16 Oct 1995 23:09:04 +0100 From: J Wunsch Message-Id: <199510162209.XAA27001@uriah.heep.sax.de> Subject: Re: cvs commit: src/sys/net route.c To: wollman@freefall.freebsd.org (Garrett A. Wollman) Date: Mon, 16 Oct 1995 23:09:03 +0100 (MET) Cc: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199510161909.MAA17617@freefall.freebsd.org> from "Garrett A. Wollman" at Oct 16, 95 12:09:44 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 865 Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk As Garrett A. Wollman wrote: > > wollman 95/10/16 12:09:43 > > Modified: sys/net route.c > Log: > When adding a route fails because there is already a route with the same > (mask,value) in the tree, don't immediately return EEXIST. Instead, check > to see if the pre-existing route was generated by protcol-cloning. If so, > then it is OK to simply blow away the old route and re-attempt the insertion. > If not, then fall back to the same error code as before. > Is there a chance to get this one into 2.1, David? I'm more than willing to apply this fix to our ISP's machine which is suffering a great pain from just this bug. This would provide for a good reality test. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-cvs-sys Mon Oct 16 19:52:49 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA05458 for cvs-sys-outgoing; Mon, 16 Oct 1995 19:52:49 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id TAA05452 ; Mon, 16 Oct 1995 19:52:30 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id MAA20755; Tue, 17 Oct 1995 12:49:59 +1000 Date: Tue, 17 Oct 1995 12:49:59 +1000 From: Bruce Evans Message-Id: <199510170249.MAA20755@godzilla.zeta.org.au> To: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, bde@zeta.org.au, cvs-sys@freefall.freebsd.org, james@miller.cs.uwm.edu Subject: Re: cvs commit: src/sys/i386/isa spigot.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk >> > Modified: sys/i386/isa spigot.c >> > Log: >> > Don't allow i/o operations for non-root users. >> ... >> /dev/spigot is created with owner root.wheel and permissions 444. This >> was previously a security hole. Now it is probably just bogus since >> probably only root will be able to use the device. Perhaps the correct >At the time I wrote the spigot stuff, this seemed the only way to make >things work. On many systems, making people run as root to capture video >is far more insecure than granting them access to the IO page, but this >is a matter of judgement. >In my case, running a video capture program as root would basically >be the same thing as giving every user on that system root priv since >they use the system to capture video. This doesn't sound like a >reasonable solution either. Couldn't there be a server like the X server, or secure (ha!) setuid capture programs? >The correct solution would be to map the 4 bytes of i/o space >(read-only) into user space. With the current vm functions available, >I didn't see any way of doing this. It seemed that one had to map all >of i/o space or none at all. The current way is actually to allow use of some privileged instructions, including i/o instructions and disabling interrupts. Interrupts would have to be disabled to stop the standard drivers from getting control when when you subvert them :-). >Is there a way of mapping one word of I/O space read-only into user space >without allowing them access to the whole I/O page? Not yet. Bruce From owner-cvs-sys Tue Oct 17 07:11:23 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id HAA26049 for cvs-sys-outgoing; Tue, 17 Oct 1995 07:11:23 -0700 Received: from miller.cs.uwm.edu (miller.cs.uwm.edu [129.89.9.13]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id HAA26044 ; Tue, 17 Oct 1995 07:10:59 -0700 Received: (from james@localhost) by miller.cs.uwm.edu (8.6.10/8.6.10) id JAA15571; Tue, 17 Oct 1995 09:10:58 -0500 Date: Tue, 17 Oct 1995 09:10:58 -0500 From: Jim Lowe Message-Id: <199510171410.JAA15571@miller.cs.uwm.edu> To: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, bde@zeta.org.au, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/isa spigot.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk > Date: Tue, 17 Oct 1995 12:49:59 +1000 > From: Bruce Evans > To: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, > bde@zeta.org.au, cvs-sys@freefall.freebsd.org, james@miller.cs.uwm.edu > Subject: Re: cvs commit: src/sys/i386/isa spigot.c > > >> > Modified: sys/i386/isa spigot.c > >> > Log: > >> > Don't allow i/o operations for non-root users. > >> ... > >> /dev/spigot is created with owner root.wheel and permissions 444. This > >> was previously a security hole. Now it is probably just bogus since > >> probably only root will be able to use the device. Perhaps the correct > > >At the time I wrote the spigot stuff, this seemed the only way to make > >things work. On many systems, making people run as root to capture video > >is far more insecure than granting them access to the IO page, but this > >is a matter of judgement. > > >In my case, running a video capture program as root would basically > >be the same thing as giving every user on that system root priv since > >they use the system to capture video. This doesn't sound like a > >reasonable solution either. > > Couldn't there be a server like the X server, or secure (ha!) setuid > capture programs? There could be, but you have to understand how much data video capture transfers. If there would be a suid server program, then that would require at least 2 memory copies -- one from the board to the server and one from the server to the client -- and probably one from the client to X. When you are talking about 640x480x2x30 bytes, this is a little unrealistic. I know that the ISA bus really can't run this fast, but depending on how fast one is willing to drive it, you are looking at atleast 4 meg/sec. The client must have direct access to the data without memory copies otherwise you will loose frames. That would mean the every video capture program would have to be suid - ugh! > > >The correct solution would be to map the 4 bytes of i/o space > >(read-only) into user space. With the current vm functions available, > >I didn't see any way of doing this. It seemed that one had to map all > >of i/o space or none at all. > > The current way is actually to allow use of some privileged instructions, > including i/o instructions and disabling interrupts. Interrupts would > have to be disabled to stop the standard drivers from getting control > when when you subvert them :-). What I really need is the ability to do inb/outb for setting up the card from user land and reading 4 bytes from shared i/o memory. I wouldn't have to do the inb/outb if I could put the code into the driver, but then alas, non-disclosure. > > >Is there a way of mapping one word of I/O space read-only into user space > >without allowing them access to the whole I/O page? > > Not yet. Here lies the problem... > > Bruce > -Jim From owner-cvs-sys Tue Oct 17 08:23:29 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA28191 for cvs-sys-outgoing; Tue, 17 Oct 1995 08:23:29 -0700 Received: (from se@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA28177 ; Tue, 17 Oct 1995 08:23:19 -0700 Date: Tue, 17 Oct 1995 08:23:19 -0700 From: Stefan Esser Message-Id: <199510171523.IAA28177@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/isa pcibus.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk se 95/10/17 08:23:17 Modified: sys/i386/isa pcibus.c Log: At least the ASUS Triton motherboards don't disable the PCI bus configuration accesses after the BIOS bus scan. The previous revision made the assumption, that every PCI motherboard did ... Change the test on the initial value of the CONF1_ADDR_PORT register in a way that makes the probe succeed on triton based motherboards, without breaking the EISA motherboard that has some non-PCI register at the same address. From owner-cvs-sys Tue Oct 17 16:30:24 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA13356 for cvs-sys-outgoing; Tue, 17 Oct 1995 16:30:24 -0700 Received: (from se@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA13343 ; Tue, 17 Oct 1995 16:30:15 -0700 Date: Tue, 17 Oct 1995 16:30:15 -0700 From: Stefan Esser Message-Id: <199510172330.QAA13343@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/isa pcibus.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk se 95/10/17 16:30:13 Modified: sys/i386/isa pcibus.c Log: Make CONF1_ENABLE_MSK1 even less restriktive: Ignore slot ID ... From owner-cvs-sys Wed Oct 18 01:40:29 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA05594 for cvs-sys-outgoing; Wed, 18 Oct 1995 01:40:29 -0700 Received: (from sos@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA05580 ; Wed, 18 Oct 1995 01:40:14 -0700 Message-Id: <199510180840.BAA05580@freefall.freebsd.org> Subject: Re: cvs commit: src/sys/i386/isa syscons.c To: bde@zeta.org.au (Bruce Evans) Date: Wed, 18 Oct 1995 01:40:10 -0700 (PDT) Cc: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, cvs-sys@freefall.freebsd.org In-Reply-To: <199510140747.RAA05831@godzilla.zeta.org.au> from "Bruce Evans" at Oct 14, 95 05:47:41 pm From: sos@FreeBSD.org Reply-to: sos@FreeBSD.org X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 957 Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk In reply to Bruce Evans who wrote: > > > Modified: sys/i386/isa syscons.c > > Log: > > Don't allow i/o operations for non-root users. > > This change should probably be in 2.1, but I'm not sure if it breaks > anything. pcvt has restricted i// privilege to root for a long time. > > i/o privilege should never have been granted in devices other than > /dev/io. /dev/io has its own permissions which can be used to grant > i/o privilege to a more selective group than root || { anyone that > can talk to a ttyv }. Strange, I havn't been able to use I/O ports on my system as a regular user for ages now (I think it change when we switched to the lite tree). I thought this had been fixed somewhere else in the system, very strange endeed.... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Schmidt (sos@FreeBSD.org | sos@login.dknet.dk) FreeBSD Core Team So much code to hack -- so little time From owner-cvs-sys Thu Oct 19 12:16:07 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA29014 for cvs-sys-outgoing; Thu, 19 Oct 1995 12:16:07 -0700 Received: (from swallace@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA29005 ; Thu, 19 Oct 1995 12:16:02 -0700 Date: Thu, 19 Oct 1995 12:16:02 -0700 From: Steven Wallace Message-Id: <199510191916.MAA29005@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/sys signal.h signalvar.h Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk swallace 95/10/19 12:16:02 Modified: sys/kern kern_sig.c sys/sys signal.h signalvar.h Log: Implement SA_NODEFER sa_flag for sigaction(): Add SA_NODEFER define to signal.h Add ps_nodefer field to struct sigacts in signalvar.h. Add code to kern_sig.c to handle SA_NODEFER. If flag is set, when the signal is delivered, it is not masked automatically from receiving the same signal again. Reviewed by: wollman, bde From owner-cvs-sys Thu Oct 19 12:20:23 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA29204 for cvs-sys-outgoing; Thu, 19 Oct 1995 12:20:23 -0700 Received: (from swallace@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA29184 ; Thu, 19 Oct 1995 12:20:19 -0700 Date: Thu, 19 Oct 1995 12:20:19 -0700 From: Steven Wallace Message-Id: <199510191920.MAA29184@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/ibcs2 ibcs2_signal.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk swallace 95/10/19 12:20:18 Modified: sys/i386/ibcs2 ibcs2_signal.c Log: Use sa_flag option SA_NODEFER in sigsys() emulation because SVR3 does not automatically mask signal upon delivery. From owner-cvs-sys Thu Oct 19 14:35:17 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA02859 for cvs-sys-outgoing; Thu, 19 Oct 1995 14:35:17 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA02850 ; Thu, 19 Oct 1995 14:35:06 -0700 Date: Thu, 19 Oct 1995 14:35:06 -0700 From: David Greenman Message-Id: <199510192135.OAA02850@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/vm vnode_pager.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/19 14:35:05 Modified: sys/vm vnode_pager.c Log: Fix initialization of "bsize" in vnode_pager_haspage(). It must happen after the check for the mount point still existing or else the system will panic if someone forcibly unmounted the filesystem. From owner-cvs-sys Thu Oct 19 16:48:34 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA06217 for cvs-sys-outgoing; Thu, 19 Oct 1995 16:48:34 -0700 Received: (from dyson@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA06199 ; Thu, 19 Oct 1995 16:48:28 -0700 Date: Thu, 19 Oct 1995 16:48:28 -0700 From: John Dyson Message-Id: <199510192348.QAA06199@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/kern vfs_bio.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk dyson 95/10/19 16:48:27 Modified: sys/kern vfs_bio.c Log: If we clear the B_CACHE flag because a buffer isn't composed fully of valid bytes, we must also clear the B_DONE flag. Some filesystems depend on this (incl NFS) and is probably the cause of the biodone error and subsequent crash. Anyway this change needs to be made. From owner-cvs-sys Fri Oct 20 15:13:08 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA22352 for cvs-sys-outgoing; Fri, 20 Oct 1995 15:13:08 -0700 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA22343 ; Fri, 20 Oct 1995 15:13:00 -0700 Date: Fri, 20 Oct 1995 15:13:00 -0700 From: David Greenman Message-Id: <199510202213.PAA22343@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/isa pcibus.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/20 15:12:58 Branch: sys/i386/isa RELENG_2_1_0 Modified: sys/i386/isa pcibus.c Log: Kill unnecessary outl (CONF1_DATA_PORT, 0) that was killing some non-PCI machines. Submitted by: Stefan Esser From owner-cvs-sys Fri Oct 20 17:55:47 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA27229 for cvs-sys-outgoing; Fri, 20 Oct 1995 17:55:47 -0700 Received: (from phk@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA27216 ; Fri, 20 Oct 1995 17:55:38 -0700 Date: Fri, 20 Oct 1995 17:55:38 -0700 From: Poul-Henning Kamp Message-Id: <199510210055.RAA27216@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/pccard pccard.c pcic.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk phk 95/10/20 17:55:37 Modified: sys/i386/i386 autoconf.c sys/i386/isa if_ed.c sio.c wd.c sys/pccard pccard.c pcic.c Log: A mixed bag of changes, relating to getting the state in "lsdev" right, and pccard support to work sensibly. Better by far, but still not good. From owner-cvs-sys Fri Oct 20 19:12:43 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA28592 for cvs-sys-outgoing; Fri, 20 Oct 1995 19:12:43 -0700 Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA28575 ; Fri, 20 Oct 1995 19:12:25 -0700 Date: Fri, 20 Oct 1995 19:12:25 -0700 From: David Greenman Message-Id: <199510210212.TAA28575@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/netinet raw_ip.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/20 19:12:23 Modified: sys/netinet raw_ip.c Log: Fix panic caused by PRU_CONTROL not being dealt with properly. Bug pointed out by David Maltz , but this fix is by me. From owner-cvs-sys Fri Oct 20 20:03:04 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA00184 for cvs-sys-outgoing; Fri, 20 Oct 1995 20:03:04 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA00173 ; Fri, 20 Oct 1995 20:02:57 -0700 Date: Fri, 20 Oct 1995 20:02:57 -0700 From: David Greenman Message-Id: <199510210302.UAA00173@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/netinet raw_ip.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/20 20:02:56 Branch: sys/netinet RELENG_2_1_0 Modified: sys/netinet raw_ip.c Log: Brought in fix from rev 1.23: handle PRU_CONTROL to prevent a panic. From owner-cvs-sys Fri Oct 20 20:44:49 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA01334 for cvs-sys-outgoing; Fri, 20 Oct 1995 20:44:49 -0700 Received: (from julian@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA01321 ; Fri, 20 Oct 1995 20:44:36 -0700 Date: Fri, 20 Oct 1995 20:44:36 -0700 From: Julian Elischer Message-Id: <199510210344.UAA01321@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/netipx - New directory Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk julian 95/10/20 20:44:35 src/sys/netipx - New directory From owner-cvs-sys Fri Oct 20 22:02:08 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA03471 for cvs-sys-outgoing; Fri, 20 Oct 1995 22:02:08 -0700 Received: (from swallace@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id WAA03459 ; Fri, 20 Oct 1995 22:01:59 -0700 Date: Fri, 20 Oct 1995 22:01:59 -0700 From: Steven Wallace Message-Id: <199510210501.WAA03459@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/ibcs2 ibcs2_signal.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk swallace 95/10/20 22:01:58 Modified: sys/i386/ibcs2 ibcs2_signal.c Log: sigset() should have sa_flags cleared to sig is maked before calling handler (remove SA_NODEFER). On the other hand, signal() case should set sa_flags to SA_NODEFER as in previous change. In addition, added #ifdef'd code for signal() to or in SA_RESETHAND flag for when that compatability is implemented. From owner-cvs-sys Sat Oct 21 01:38:28 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA16971 for cvs-sys-outgoing; Sat, 21 Oct 1995 01:38:28 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA16928 ; Sat, 21 Oct 1995 01:38:14 -0700 Date: Sat, 21 Oct 1995 01:38:14 -0700 From: David Greenman Message-Id: <199510210838.BAA16928@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/kern kern_descrip.c kern_exec.c subr_rlist.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/21 01:38:14 Modified: sys/kern kern_descrip.c kern_exec.c subr_rlist.c Log: Killed a few gratuitous #include's. From owner-cvs-sys Sat Oct 21 02:11:05 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA20909 for cvs-sys-outgoing; Sat, 21 Oct 1995 02:11:05 -0700 Received: (from peter@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA20898 ; Sat, 21 Oct 1995 02:10:53 -0700 Date: Sat, 21 Oct 1995 02:10:53 -0700 From: Peter Wemm Message-Id: <199510210910.CAA20898@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/isa si.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk peter 95/10/21 02:10:52 Modified: sys/i386/isa si.c Log: Remove bogus #include , and the bogus instances of "struct device" and the bogus unit number mentioned in the error message. Some other minor cleanups, all trivial. From owner-cvs-sys Sat Oct 21 02:19:07 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA21203 for cvs-sys-outgoing; Sat, 21 Oct 1995 02:19:07 -0700 Received: (from bde@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA21164 ; Sat, 21 Oct 1995 02:18:50 -0700 Date: Sat, 21 Oct 1995 02:18:50 -0700 From: Bruce Evans Message-Id: <199510210918.CAA21164@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/kern kern_resource.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk bde 95/10/21 02:18:48 Modified: sys/kern kern_resource.c Log: Avoid overflow in calcru(). Fixes PR 788. Submitted by: imdave@synet.net (Dave Bodenstab) From owner-cvs-sys Sat Oct 21 10:42:36 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA08088 for cvs-sys-outgoing; Sat, 21 Oct 1995 10:42:36 -0700 Received: (from dyson@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA08079 ; Sat, 21 Oct 1995 10:42:30 -0700 Date: Sat, 21 Oct 1995 10:42:30 -0700 From: John Dyson Message-Id: <199510211742.KAA08079@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/vm vm_mmap.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk dyson 95/10/21 10:42:30 Modified: sys/vm vm_mmap.c Log: Implement mincore system call. From owner-cvs-sys Sat Oct 21 12:50:07 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA10590 for cvs-sys-outgoing; Sat, 21 Oct 1995 12:50:07 -0700 Received: (from bde@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA10580 ; Sat, 21 Oct 1995 12:50:02 -0700 Date: Sat, 21 Oct 1995 12:50:02 -0700 From: Bruce Evans Message-Id: <199510211950.MAA10580@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk bde 95/10/21 12:50:01 Modified: sys/kern sysv_msg.c sysv_sem.c sysv_shm.c Log: Start including to get the correct args structs and prototypes for all syscalls. The args structs are still declared in comments as in VOP implementation functions. I don't like the duplication for this, but several more layers of changes are required to get it right. First we need to catch up with 4.4lite2, which uses macros to handle struct padding. Then we need to catch up with NetBSD, which passes the args correctly (as void *). Then we need to handle varargs functions and struct padding better. I think all the details can be hidden in machine-generated functions so that the args structs and verbose macros to reference them don't have to appear in the core sources. Add prototypes. Add bogus casts to hide the evil type puns exposed by the previous steps. &uap[1] was used to get at the args after the first. This worked because only the first arg in *uap was declared. This broke when the machine- genenerated args struct declared all the args (actually it declares extra args in some cases and depends on the user stack having some accessible junk after the last arg, not to mention the user args being on the stack. It isn't possible to declare a correct args struct for a varargs syscall). The msgsys(), semsys() and shmsys() syscall interfaces are BAD because they multiplex several syscalls that have different types of args. There was no reason to duplicate this sysv braindamage but now we're stuck with it. NetBSD has reimplemented the syscalls properly as separate syscalls #220-231. Declare static functions as static in both their prototype and their implementation (the latter is optional, and this misfeature was used). Remove gratuitous #includes. Continue cleaning up new init stuff. From owner-cvs-sys Sat Oct 21 13:33:53 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA11505 for cvs-sys-outgoing; Sat, 21 Oct 1995 13:33:53 -0700 Received: (from swallace@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA11496 ; Sat, 21 Oct 1995 13:33:46 -0700 Date: Sat, 21 Oct 1995 13:33:46 -0700 From: Steven Wallace Message-Id: <199510212033.NAA11496@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/ibcs2 ibcs2_signal.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk swallace 95/10/21 13:33:45 Modified: sys/i386/ibcs2 ibcs2_signal.c Log: In bsd_to_ibcs2_sigaction(), flag for ibcs2 system should be IBCS2_SA_NOCLDSTOP and not SA_NOCLDSTOP. Submitted by: bde From owner-cvs-sys Sat Oct 21 16:04:24 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA15887 for cvs-sys-outgoing; Sat, 21 Oct 1995 16:04:24 -0700 Received: from meter.eng.uci.edu (root@meter.eng.uci.edu [128.200.85.3]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id QAA15856 ; Sat, 21 Oct 1995 16:04:08 -0700 Received: from newport.ece.uci.edu by meter.eng.uci.edu (8.7) id QAA18749; Sat, 21 Oct 1995 16:04:02 -0700 (PDT) Received: from localhost by newport.ece.uci.edu (8.7) id QAA06180; Sat, 21 Oct 1995 16:04:01 -0700 (PDT) Message-Id: <199510212304.QAA06180@newport.ece.uci.edu> To: Bruce Evans cc: CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, hackers@freebsd.org Subject: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c] In-reply-to: Your message of "Sat, 21 Oct 1995 12:50:02 PDT." <199510211950.MAA10580@freefall.freebsd.org> Date: Sat, 21 Oct 1995 16:04:00 -0700 From: Steven Wallace Sender: owner-cvs-sys@freebsd.org Precedence: bulk > to get it right. First we need to catch up with 4.4lite2, which uses > macros to handle struct padding. Then we need to catch up with NetBSD, I hate that SCARG macro. It makes looking at the code harder to understand. Perhaps if we did something like: read(struct proc *p, void *v, int retval[]) { struct read_args /* { int fd; char *buf; u_int nbyte; } */ *uap = v; int fd = SCARG(uap, fd); char *buf = SCARG(uap, buf); u_int nbyte = SCARG(uap, nbyte); ... } That way we don't have SCARG all over the place, and this would prepare us for your static function idea. > which passes the args correctly (as void *). Then we need to handle > varargs functions and struct padding better. I think all the details > can be hidden in machine-generated functions so that the args structs > and verbose macros to reference them don't have to appear in the core > sources. I agree. I don't like SCARG references all over the place. I take it you are refering to your static inline idea. Why don't we just go for that? Or should we do something like my example in the interim? > semsys() and shmsys() syscall interfaces are BAD because they > multiplex several syscalls that have different types of args. > There was no reason to duplicate this sysv braindamage but now > we're stuck with it. NetBSD has reimplemented the syscalls properly > as separate syscalls #220-231. > I agree. This is yucky! I hereby request a plea of help from all you FreeBSD hackers! We need a better way to handle these syscall subcodes (as SYSV calls 'em). I would not call the NetBSD reimplementation as "proper", but it is nicer than what we got right now. Oh, I agree, for new programs compiled it should use those separate syscalls #220-231, but for compatability, the old syscalls will still have to handle the subcodes, and this would still be nasty if left the same. I have run into the same prob with subcodes implementing the ibcs2 emulation. What we need is a new, automatically generated, method of handling subcodes without a nasy if (code == SYS_xxx) ... One idea I have is to use special case for the number of parms. If it is < 0 then special handling should be taken. case -1: Get code from next parameter. case -2: Get code from next parameter (quad_t). case -3: code = (code >> 8) & 0xff; (for ibcs2 xenix emulation) Then use the function pointer as a pointer to a new sysent, and do it all over again (making sure no recursion). I think this solution makes everything generic, without a penalty in performance for normal syscalls. I would like to hear what you guys think and any other ideas you may have towards a "real" solution (if that is ever possible). Steven From owner-cvs-sys Sat Oct 21 16:13:16 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA16213 for cvs-sys-outgoing; Sat, 21 Oct 1995 16:13:16 -0700 Received: (from phk@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA16204 ; Sat, 21 Oct 1995 16:13:13 -0700 Date: Sat, 21 Oct 1995 16:13:13 -0700 From: Poul-Henning Kamp Message-Id: <199510212313.QAA16204@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/scsi cd.c scsiconf.h sd.c st.c worm.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk phk 95/10/21 16:13:12 Modified: sys/scsi cd.c scsiconf.h sd.c st.c worm.c Log: Make a lot of things static. From owner-cvs-sys Sat Oct 21 16:56:16 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA17584 for cvs-sys-outgoing; Sat, 21 Oct 1995 16:56:16 -0700 Received: from precipice.shockwave.com (precipice.shockwave.com [171.69.108.33]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id QAA17577 ; Sat, 21 Oct 1995 16:56:10 -0700 Received: from localhost (localhost [127.0.0.1]) by precipice.shockwave.com (8.6.12/8.6.12) with SMTP id QAA00601; Sat, 21 Oct 1995 16:54:53 -0700 Message-Id: <199510212354.QAA00601@precipice.shockwave.com> To: Steven Wallace cc: Bruce Evans , CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, hackers@freebsd.org Subject: Re: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c] In-reply-to: Your message of "Sat, 21 Oct 1995 16:04:00 PDT." <199510212304.QAA06180@newport.ece.uci.edu> Date: Sat, 21 Oct 1995 16:54:51 -0700 From: Paul Traina Sender: owner-cvs-sys@freebsd.org Precedence: bulk From: Steven Wallace Subject: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c s >>ysv_shm.c] > which passes the args correctly (as void *). Then we need to handle > varargs functions and struct padding better. I think all the details > can be hidden in machine-generated functions so that the args structs > and verbose macros to reference them don't have to appear in the core > sources. I agree. I don't like SCARG references all over the place. I take it you are refering to your static inline idea. Why don't we just go for that? Or should we do something like my example in the interim? This brings up a point I wanted to mention... While I realize this is a bit against the philosophy that some of the team members hold, which is that we should not rely on gcc-type functionality, I'd actually prefer to see things like SCARG and prototype-glue done as static inlines where appropriate. The reason being is that with a static inline, as you can enforce type checking with: static inline struct rntype * rt2rn (struct rttype *rt) { return (rntype *) rt; } as opposed to #define RT2RN(x) ((rntype *) (x)) I don't like relying on gcc, but if I wanted to draw a line in the sand, I'd much prefer to draw a line based upon gcc than pcc. The idea that folks are even still today coding variables with the 'register' tag* and trying to hand-optimize register utilization by re-using symbols** instead of letting the compiler do that sort of thing (it's almost always better than us) is pretty silly. Just a random comment prompted by this discussion. Paul * every time you use the register tag, your're strongly encouraging gcc to reserve a register for use by that variable. gcc, unlike pcc, already understands when it should and shouldn't use registers and can do this far better than we can, so it's a bad idea to hamstring gcc by stealing its registers away...if something should be kept in a register, it will be kept there **e.g: radix.c (I know, not out fault) register int temp_integer; temp_integer = foo << 3 + bar; y = temp_integer * something else; . . . temp_integer = bzork * fnord; temp_integer = temp_integer << gazook; instead of: int middle, end; middle = foo << 3 + bar; y = middle * something else; . . . end = bzork * fnord; end = end << gazook; In the later case, gcc is smart enough to allocate register storage for middle and end, when they are needed, but can free up that register for use elsewhere between those two sections of code. Not to mention that you can then used "useful" names instead of x, y, and/or temp. :-) From owner-cvs-sys Sat Oct 21 18:38:59 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id SAA20397 for cvs-sys-outgoing; Sat, 21 Oct 1995 18:38:59 -0700 Received: from time.cdrom.com (time.cdrom.com [192.216.222.226]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id SAA20387 ; Sat, 21 Oct 1995 18:38:55 -0700 Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.6.12/8.6.9) with SMTP id SAA26927; Sat, 21 Oct 1995 18:37:16 -0700 To: Paul Traina cc: Steven Wallace , Bruce Evans , CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, hackers@freebsd.org Subject: Re: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c] In-reply-to: Your message of "Sat, 21 Oct 1995 16:54:51 PDT." <199510212354.QAA00601@precipice.shockwave.com> Date: Sat, 21 Oct 1995 18:37:16 -0700 Message-ID: <26924.814325836@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-cvs-sys@freebsd.org Precedence: bulk > While I realize this is a bit against the philosophy that some of the > team members hold, which is that we should not rely on gcc-type > functionality, I'd actually prefer to see things like SCARG and Just FYI, it's never been mine. I routinely use structure initializers that only gcc grocks, and have even been known to do the occasional: { char foo[n]; .. } To do the job of alloca.. Not that I use the latter construct very often - I generally just use alloca directly, but the point is that if it's especially convenient to use gcc features, I use them. gcc now enjoys the deserved or undeserved privilege (take your pick) of being ubiquitous. I can't imagine porting to (or being interested in) any platform that did not support gcc, and if it did not then porting gcc would be my first task anyway! I say if advanced features make the code demonstrably cleaner, use them. Jordan From owner-cvs-sys Sat Oct 21 19:59:59 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA22424 for cvs-sys-outgoing; Sat, 21 Oct 1995 19:59:59 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA22409 ; Sat, 21 Oct 1995 19:59:51 -0700 Date: Sat, 21 Oct 1995 19:59:51 -0700 From: David Greenman Message-Id: <199510220259.TAA22409@freefall.freebsd.org> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/i386/i386 pmap.c Sender: owner-cvs-sys@FreeBSD.org Precedence: bulk davidg 95/10/21 19:59:50 Modified: sys/i386/i386 pmap.c Log: Simplified some expressions. From owner-cvs-sys Sat Oct 21 23:29:51 1995 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA26768 for cvs-sys-outgoing; Sat, 21 Oct 1995 23:29:51 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA26742 ; Sat, 21 Oct 1995 23:29:37 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id QAA22831; Sun, 22 Oct 1995 16:27:01 +1000 Date: Sun, 22 Oct 1995 16:27:01 +1000 From: Bruce Evans Message-Id: <199510220627.QAA22831@godzilla.zeta.org.au> To: pst@shockwave.com, swallace@ece.uci.edu Subject: Re: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c] Cc: CVS-commiters@freefall.freebsd.org, bde@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, hackers@freebsd.org Sender: owner-cvs-sys@freebsd.org Precedence: bulk >While I realize this is a bit against the philosophy that some of the >team members hold, which is that we should not rely on gcc-type >functionality, I'd actually prefer to see things like SCARG and >prototype-glue done as static inlines where appropriate. 4.4lite already uses `static inline' extensively for vnode ops. I'd still like everything to work on non-gcc compilers. When `static' is defined to nothing, `static inline' should at most waste a lot of space and a little time... >The reason >being is that with a static inline, as you can enforce type checking >with: > static inline struct rntype * > rt2rn (struct rttype *rt) > { > return (rntype *) rt; > } >as opposed to > #define RT2RN(x) ((rntype *) (x)) ..or waste a lot of time if a lot of little functions like that aren't inlined :-). I would call that defeating type checking. You'll only get a warning if x has an incompatible type, not for the bogus cast. For syscall args I want something more like: static inline struct rntype * rt2rn (struct rttype *rt) { /* * Machine generated code to do the conversion. * Do not edit. */ #ifdef rt2rn_type_pun_works return (rntype *) rt; #else struct rntype rn = somealloc(sizeof *rn); rn->rn_foo = rt->rt_foo; rn->rn_bar = rt->rt_bar; return rn; #endif } >* every time you use the register tag, your're strongly encouraging > gcc to reserve a register for use by that variable. gcc, unlike pcc, > already understands when it should and shouldn't use registers and > can do this far better than we can, so it's a bad idea to hamstring I don't think use of `register' makes any difference for gcc for variables that can go in registers (i.e., auto variables whose address isn't taken). Bruce