Joseph Koshy [Fri, 19 Jun 1998 08:34:52 +0000 (08:34 +0000)]
Fixes per PR 2850:
(a) Note that the default securelevel value is -1, in -current and -stable.
(b) Mention kernel sysctl variable that controls securelevel.
(c) Add warning the `fsck' will fail if securelevel >= 2.
(d) Suggest end of /etc/rc as the right place to raise securelevel.
Brian Somers [Thu, 18 Jun 1998 22:43:18 +0000 (22:43 +0000)]
Don't assume that all ttys support carrier detect. If we're
passing our controlling terminal, always record our pid so
that the receiving ppp knows who to HUP.
Peter Wemm [Thu, 18 Jun 1998 18:35:04 +0000 (18:35 +0000)]
ELF versions of __warn_references() and __weak_reference(). Note that this
doesn't work with libc/net/res_stubs.c since gas wants the weak reference
to take place in the same context as the real definition, presumably so
that it can get hold of the symbol typing etc.
However, this doesn't matter for libc/elf since we don't have binaries
that use the old symbol names.
Bruce Evans [Thu, 18 Jun 1998 15:32:09 +0000 (15:32 +0000)]
Changed the type of an isa/general interrupt handler to take a
`void *' arg. Fixed or hid most of the resulting type mismatches.
Handlers can now be updated locally (except for reworking their
global declarations in isa_device.h).
John Birrell [Wed, 17 Jun 1998 22:29:12 +0000 (22:29 +0000)]
Don't allow a SIGCHLD to wake up a thread if the process has the default
signal handler installed for SIGCHLD. The ACE MT_SOCK_Test was hanging
as the result of being interrupted when it didn't expect to be.
Bruce Evans [Wed, 17 Jun 1998 16:59:30 +0000 (16:59 +0000)]
Renambed sbintr to sb_intr to avoid a conflict with the (now
unconditionally declared although it can't be configured together
with snd) extern function sbintr.
Bruce Evans [Wed, 17 Jun 1998 15:16:53 +0000 (15:16 +0000)]
Don't generate declarations for isa device structs in "ioconf.h".
Don't generate declarations for isa interrupt handlers at all.
Isa interrupt handlers are now declared in <i386/isa/isa_device.h>
but should be converted take a `void *' arg and staticized as
soon as possible.
Updated CONFIGVERS. New configs are very incompatible with
previous versions.
Bruce Evans [Wed, 17 Jun 1998 14:58:04 +0000 (14:58 +0000)]
Don't declare isa device structs or isa interrupt handlers in <sys/conf>,
and don't depend on them being declared there. This will cause lots of
warnings for a few minutes until config is updated. Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
Bruce Evans [Wed, 17 Jun 1998 14:13:15 +0000 (14:13 +0000)]
Added used include of "ioconf.h" - don't depend on pollution in
<sys/conf.h>. I'm fixing isa interrupt handler configuration and
this is just a quick fix to keep SCSI configuration unharmed.
Bruce Evans [Wed, 17 Jun 1998 14:01:00 +0000 (14:01 +0000)]
Include <i386/isa/pnp.h> after including its prerequisite
<i386/isa/isa_device.h> - don't depend on pollution in <sys/conf.h>
including the prerequisite earlier.
Bruce Evans [Wed, 17 Jun 1998 09:34:42 +0000 (09:34 +0000)]
Added yacc to the bootstrap tools. It is needed very early to
build at least compile_et and lex, and although almost any version
of yacc could work, the version in -stable doesn't actually work
with -current makefiles because it doesn't support -o.
John Birrell [Wed, 17 Jun 1998 03:53:16 +0000 (03:53 +0000)]
If a thread is waiting on a child process to complete, the SIGCHLD
signal can arrive before the thread is woken from it's wait4. In this
case, don't return an EINTR, just set the thread state to running and
the wait4 wrapper will loop and get the exit status of the process.
Brian Somers [Tue, 16 Jun 1998 19:40:42 +0000 (19:40 +0000)]
Change some log levels. ALERTs are only logged when
something that can't happen happens or when everyone
needs to know. ERRORs are only logged when something
unexpected happens.
Bruce Evans [Tue, 16 Jun 1998 14:55:27 +0000 (14:55 +0000)]
Backed out rev.1.183, which had nothing to do with its log message.
It was to support a half-baked optimization of certain long long
divisions in gcc-2.8 and/or egcs. We now avoid these divisions.
Bruce Evans [Tue, 16 Jun 1998 14:36:40 +0000 (14:36 +0000)]
Use copyout() instead of bcopy() to copy the image to user space.
bcopy() caused panics under heavy paging (not quite as suspected -
the kernel stack seemed to get corrupted).
Bruce Evans [Tue, 16 Jun 1998 11:05:59 +0000 (11:05 +0000)]
Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).
Discard events on going-away devices too. Endless loops may have
been possible when an active pccard was removed.
Brian Somers [Tue, 16 Jun 1998 07:15:11 +0000 (07:15 +0000)]
o Don't dump core with ~m in term mode.
o Always put a '\r' before a '\n' at the end of a line
in prompt_vPrintf() in term mode, and make prompt_Printf()
use prompt_vPrintf().
o Fix ~? message.
Brian Somers [Mon, 15 Jun 1998 19:06:58 +0000 (19:06 +0000)]
o De-staticise things that don't need to be static.
o Bring the static ``ttystate'' into struct prompt so that
the tilde context is per prompt and not global.
o Comment the remaining static variables so that it's
clear why they're static.
o Add some XXX comments suggesting that our interface list
and our hostname should be re-generated after a signal
(say SIGUSR1) so that a machine with PCCARDs has a chance.
Brian Somers [Mon, 15 Jun 1998 19:06:25 +0000 (19:06 +0000)]
Fix a rather nasty use of `static'. This caused a SEGV
when running ``link * load label'' as we ended up recursing
back into command_Interpret after nuking our command arg list.
Brian Somers [Mon, 15 Jun 1998 19:05:27 +0000 (19:05 +0000)]
Make `close lcp' just close the LCP layer and not hangup. This is
useful for slirp users that wish to get their shell back after the
ppp session. `close' with no args still hangs up as expected.
Required by: jmz
Correct use of .Nm. Use .Bl/.El for enumerating options. Use .An. Correct
formatting of rcsid. Remove unused #includes. Do not use memory after
freeing it.
Amancio Hasty [Sun, 14 Jun 1998 20:05:27 +0000 (20:05 +0000)]
Reviewed by: Amancio
Submitted by: Randall Hopper <rhh@ct.picker.com>
The patch supports using the X10 Mouse Remote in both stand-alone and
pass-through configurations, so you can plug your mouse and remote into the
same serial port, use the mouse for X, and use the remote for other apps
like Fxtv. For instance, we can now control fxtv via the remote control
just like a TV : change channels, mute, increase volume, zoom video,
freeze frame 8)
The mouse events are channeled through the syscons/sysmouse I/F like
normal, and the remote buttons are "syphoned off" to a UNIX-domain stream
socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a
remote-aware app to grab and use.
For further info on the X10 Mouse Remote see:
http://www.x10.com/products/x10_mk19a.htm
Bruce Evans [Sun, 14 Jun 1998 16:04:20 +0000 (16:04 +0000)]
Complete the switch to using gcc-2.4 features to declare fpos_t ,
as threatened in the 4-5 year old comment. Most of the change is
in <machine/ansi.h>; this commit just removes cruft for the strict
ANSI case. 64-bit types couldn't actually be defined using
__attribute__(()) in gcc-2.4, since attribute names in the
implementation namespace only became available in gcc-2.7. I've
probably just broken gcc-2.6 support by using the gcc-2.7 names
unconditionally.
Bruce Evans [Sun, 14 Jun 1998 15:52:00 +0000 (15:52 +0000)]
Avoid an egcs pessimization for 64-bit signed division on i386's.
Pre-2.8 versions of gcc generate a call to __divdi3() for all 64-bit
signed divisions, but egcs optimizes them to a shift and fixup when
the divisor is a constant power of 2. Unfortunately, it generates
a call to __cmpdi2() for the fixup, although all except possibly
ancient versions of gcc and egcs do ordinary 64-bit comparisons
inline.
Bruce Evans [Sun, 14 Jun 1998 14:08:21 +0000 (14:08 +0000)]
Define 64-bit types in terms of __int64_t and __uint64_t.
Define an unsigned version of off_t (uoff_t) if KERNEL is defined.
This is useful for micro-optimizing expressions involving off_t's
where you know that the values are non-negative but the compiler
doesn't know it.
Bruce Evans [Sun, 14 Jun 1998 14:00:47 +0000 (14:00 +0000)]
Added typedefs for __int64_t and __uint64_t. These will be used to avoid
explicit use of `[unsigned] long long' and `[u]quad_t'.
Fixed disorder of and lack of comments for the types added in the previous
two commits. Improved some comments. The comments should be elswhere
(not duplicated in every MD file).
Doug Rabson [Sun, 14 Jun 1998 13:53:12 +0000 (13:53 +0000)]
[Add missing files from previous commit]
Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
attached children.
* Support dynamically extendable interfaces for drivers to replace
both the function pointers in driver_t and bus_ops_t (which has been
removed entirely. Two system defined interfaces have been defined,
'device' which is mandatory for all devices and 'bus' which is
recommended for all devices which support attached children.
* In addition, the alpha port defines two simple interfaces 'clock'
for attaching various real time clocks to the system and 'mcclock'
for the many different variations of mc146818 clocks which can be
attached to different alpha platforms. This eliminates two more
function pointer tables in favour of the generic method dispatch
system provided by the device framework.
Future device interfaces may include:
* cdev and bdev interfaces for devfs to use in replacement for specfs
and the fixed interfaces bdevsw and cdevsw.
* scsi interface to replace struct scsi_adapter (not sure how this
works in CAM but I imagine there is something similar there).
* various tailored interfaces for different bus types such as pci,
isa, pccard etc.
Doug Rabson [Sun, 14 Jun 1998 13:46:10 +0000 (13:46 +0000)]
Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
attached children.
* Support dynamically extendable interfaces for drivers to replace
both the function pointers in driver_t and bus_ops_t (which has been
removed entirely. Two system defined interfaces have been defined,
'device' which is mandatory for all devices and 'bus' which is
recommended for all devices which support attached children.
* In addition, the alpha port defines two simple interfaces 'clock'
for attaching various real time clocks to the system and 'mcclock'
for the many different variations of mc146818 clocks which can be
attached to different alpha platforms. This eliminates two more
function pointer tables in favour of the generic method dispatch
system provided by the device framework.
Future device interfaces may include:
* cdev and bdev interfaces for devfs to use in replacement for specfs
and the fixed interfaces bdevsw and cdevsw.
* scsi interface to replace struct scsi_adapter (not sure how this
works in CAM but I imagine there is something similar there).
* various tailored interfaces for different bus types such as pci,
isa, pccard etc.
Bruce Evans [Sun, 14 Jun 1998 13:40:01 +0000 (13:40 +0000)]
Don't define away __attribute__() for the non-gcc and old-gcc cases.
Using __attribute__() in non-ifdefed code is just wrong if it changes
the semantics, and there is no way to ignore __attribute__() only in
the benign cases.
Don't use __attribute__ in non-ifdefed code here. It was a benign
case, but we already have a macro (__unused) for this case.
Expanded comment about gotchas for __CONCAT() in the non-ANSI case.
Bruce Evans [Sun, 14 Jun 1998 12:53:39 +0000 (12:53 +0000)]
Avoid a 64-bit division in procfs_readdir(). Fixed related overflows.
Check args using the same expression as in fdesc and kernfs. The check
was actually already correct, modulo overflow. It could be tightened
up to either allow huge (aligned) offsets, treating them as EOF, or
disallow all offsets beyond EOF.
Didn't fix invalid address calculation &foo[i] where i may be out of
bounds.
Didn't fix shooting of foot using a private unportable dirent struct.
Peter Wemm [Sun, 14 Jun 1998 11:25:46 +0000 (11:25 +0000)]
Don't compile in the use of poll() when building libc_r. This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.
Brian Somers [Sun, 14 Jun 1998 01:21:24 +0000 (01:21 +0000)]
Deal with PROTO_IGMP and PROTO_IPIP packets correctly.
Submitted by: Mark Tinguely <tinguely@plains.NoDak.edu>
This change will allow a PPP host enabled with the "-alias" option to
run mrouted. This does not intend to forward the IGMP nor tunneled packets
to another host on the far side if the tun0 interface.
Brian Somers [Sun, 14 Jun 1998 00:56:13 +0000 (00:56 +0000)]
o Pass our negotiated number of VJ slots into
sl_uncompress_tcp() and drop packets with
slot numbers that are out of range.
o Drop packets that want to use a slot that still
has an IP header length of 0 (ie, the requested
slot number is bogus again).
Without this code, if the other side mis-behaves (and
sends us garbage slot numbers), we happily ``adjust''
a memset(..., '\0', ...) TCP/IP header and promptly
cr*p all over the stack before returning.... quickly
followed by a SIGBUS.
Dodgy ISP used by, and help locating the problem from: jmz
Problem also seen by: Mourad de Riche <omnibus@image.dk>
There's still a link lockup after this happens, but my
bets are on the other side (who has already started sending
rubbish) being to blame.
Peter Wemm [Sat, 13 Jun 1998 17:20:03 +0000 (17:20 +0000)]
Merge changes from vendor branch;
- connector selection values (should fix aui/bnc),
- non-shifting version of crc calculation using a table,
- interrupt mask adjustments,
- add some brackets where a #ifdef could break an if(),
- don't reset the card unless it's up.
Peter Wemm [Sat, 13 Jun 1998 11:55:57 +0000 (11:55 +0000)]
Make -V expand it's arguments. This means that instead of 'make -V OBJS'
printing something useless (to a shell) like: ${SRCS:N*.h:R:S/$/.o/g}
it will instead print the actual ${OBJS} value.
Julian Elischer [Sat, 13 Jun 1998 02:27:10 +0000 (02:27 +0000)]
Allow a protocol to specify that it does NOT want to be looped back
even if it looks like it should (backwards compatibility with
old broken code) should get rid of some annoying messags.
Peter Wemm [Sat, 13 Jun 1998 02:03:36 +0000 (02:03 +0000)]
join(1) is used by lorder, add it to build-tools. (otherwise, things get
ugly when an a.out /usr/bin/join sees the elf LD_LIBRARY_PATH from a
'make world' and it's a.out ld.so tries to load the elf libc.so.)