ru [Tue, 14 Aug 2001 15:19:35 +0000 (15:19 +0000)]
From ChangeLog:
: 2001-08-13 Ruslan Ermilov <ru@FreeBSD.org>
:
: * tmac/doc.tmac (Rv): Implement support for 0 or more than 1
: argument.
: * tmac/groff_tmac.man: Updated.
All of the following are now valid:
.Rv -std f1
.Rv -std f1 f2
.Rv -std f1 f2 f3
.Rv -std
The last form is useful where the standard return behavior is applicable
to all of the functions described in this particular manpage. Look, for
example, at the stat(2), setresuid(2), and utimes(2) manpages.
The form with >1 functions is useful in a mixed environment. See the
fhopen(2) manpage for an example.
imp [Tue, 14 Aug 2001 07:31:47 +0000 (07:31 +0000)]
For TI12xx and newer, clear register 0x84. This is the "Multimedia"
register. It enables Zoom Video. It appears that on at least one
card that Monzoon is using sets these bits by default. Nothing works
when these bits are set, everything works when they are clear.
Add commentary on some of the ti bits. Make code a little clearer.
Also remove a call to pcic_pci_pd6729 which was prematurely added in
the last commit.
phk [Tue, 14 Aug 2001 06:42:32 +0000 (06:42 +0000)]
linux ls fails on DEVFS /dev because linux_getdents fails because
linux_getdents uses VOP_READDIR( ..., &ncookies, &cookies ) instead of
VOP_READDIR( ..., NULL, NULL ) because it seems to need the offsets for
linux_dirent and sizeof(dirent) != sizeof(linux_dirent)...
PR: 29467
Submitted by: Michael Reifenberger <root@nihil.plaut.de>
Reviewed by: phk
dd [Tue, 14 Aug 2001 05:50:19 +0000 (05:50 +0000)]
Sync the code that sucks in rc.conf and friends with what's in
rc.firewall6. Specifically, don't do anything
if [ -z ${source_rc_confs_defined} ]. Not doing this leads to a problem
with dependencies: chkdepend will set, e.g., portmap_enable to YES if
some service that needs portmap is enabled, but rc.network sources
rc.firewall, which used to source defaults/rc.conf unconditionally,
which would result in portmap_enable being set back to NO.
imp [Tue, 14 Aug 2001 05:31:56 +0000 (05:31 +0000)]
Try to support the Cirrus Logic PD6833 better in pci mode. This is
done from the datasheets since I'm ahving problems with my laptop that
has the 6833 in it...
Minor rework of TI code. Should be the same as before.
jhb [Mon, 13 Aug 2001 22:44:55 +0000 (22:44 +0000)]
In prom_halt(), set the halt restart flags on the current CPU, not the
boot CPU. This was the reason reboots on SMP systems could result in
weird hangs. Unlike the x86, we do not need to switch back to the boot
CPU in order to reboot the machine. See Section 3.4.5 of Part III
(Console Interface Architecture) from the Alpha Architecture Reference
Manual (aka the Brown Book) for more info.
peter [Mon, 13 Aug 2001 21:48:44 +0000 (21:48 +0000)]
Rip out the old __stdin/out/err stuff. It was completely 100% useless. :-(
It was foiled because of dynamic copy relocations that caused compile-time
space to be reserved in .bss and at run time a blob of data was copied to
that space and everything used the .bss version.. The problem is that
the space is reserved at compile time, not runtime... So we *still* could
not change the size of FILE. Sigh. :-(
Replace it with something that does actually work and really does let us
make 'FILE' extendable. It also happens to be the same as Linux does in
glibc, but has the slight cost of a pointer. Note that this is the
same cost that 'fp = fopen(), fprintf(fp, ...); fclose(fp);' has.
Fortunately, actual references to stdin/out/err are not all that common
since we have implicit stdin/out/err-using versions of functions
(printf() vs. fprintf()).
peter [Mon, 13 Aug 2001 21:21:13 +0000 (21:21 +0000)]
Revert part of the 1.11->1.11.1p1 change. Put the blank line back in
the beginning of constructed log messages being passed to $EDITOR. This
is where folks start typing.
semenu [Mon, 13 Aug 2001 18:37:31 +0000 (18:37 +0000)]
Fix an bug in FreeBSD attach routine - attaching MII interfaces before doing
common_attach is wrong as common attach initialize some fileds used by
mediainit routine. This was hard to notify because loading driver as kld
lead to mediainit routine being called after common_attach, though probe_phy
is called before.
bde [Mon, 13 Aug 2001 13:22:50 +0000 (13:22 +0000)]
Use interrupt gates instead of trap gates for breakpoint and trace
traps, so that ddb can keep control (almost) no matter how it is
entered. This breaks time-critical interrupts while the system is
stopped in ddb, but I haven't noticed any significant problems except
that applications become confused about the time. Lost time will be
adjusted for later. Anyway, the half-baked disabling of interrupts in
Debugger() gives the same problems for the usual way of entering ddb.
bde [Mon, 13 Aug 2001 12:42:13 +0000 (12:42 +0000)]
Removed he BPTTRAP() macro and its use. It was intended for restoring
bug for bug compatibility to ddb trap handlers after fixing the debugger
trap gates to be interrupt gates, but the fix was never committed. Now
I want the fix to apply to ddb.
mike [Mon, 13 Aug 2001 05:56:27 +0000 (05:56 +0000)]
Fix some bogus strncpy(3) to strlcpy(3) changes I made in the previous
revision. <utmp.h> structures don't leave room for a NUL character.
Also fix "UNKNOWN" which should have just been UNKNOWN.
iedowse [Sun, 12 Aug 2001 21:08:34 +0000 (21:08 +0000)]
Update io(4) to match reality following revision 1.42 of
sys/i386/i386/mem.c: only the super-user may open /dev/io
regardless of the device permissions (just 4 years late!).
Also, add cross-reference to i386_{get,set}_ioperm(2).
mharo [Sun, 12 Aug 2001 20:32:37 +0000 (20:32 +0000)]
Remove whitespace after %. The whitespace was causing strfile to not see
the % string section break and thus fortune was producing a rather large
multi-fortune fortune message.
markm [Sun, 12 Aug 2001 18:47:56 +0000 (18:47 +0000)]
Remove the WANT_INSECURE_OPIE option - it is now a default. This is not
nearly as ominous as it sounds, and it allows OPIE to be used over SSH
and on xterms.
mike [Sun, 12 Aug 2001 17:54:49 +0000 (17:54 +0000)]
o Replace occurrences of strncpy(3) with strlcpy(3); most of
the uses of it were wrong anyway.
o Always check for NULL returns on strdup(3).
o Fix a possible buffer overflow in strcpy(3).
o Fix a format string vulnerability.
o t->ty_type in stypeof() could be NULL and eventually cause
a segmentation fault in setenv(3), so check for that.
Eyeballed by: kris
Reviewed by: murray
MFC after: 3 days
iwasaki [Sun, 12 Aug 2001 08:37:39 +0000 (08:37 +0000)]
Fix some trivial bugs.
- fix segment limit mis-calculation for GCODE_SEL, GDATA_SEL, GPRIV_SEL,
LUCODE_SEL and LUDATA_SEL.
- move `loader(8) metadata' related printf() after cninit().
- use atop macro (address to pages) for segment limit calculation
instead of i386_btop macro (bytes to pages).
- fix style bugs for the declarations of ints.
ume [Sat, 11 Aug 2001 15:01:12 +0000 (15:01 +0000)]
Fill _res.sort_list with harmless entry. sortlist for IPv6/IPv4
is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in
_res.sort_list for backward compatibility. However, both sort_list's
are maintaind by just one index _res.nsort. So, when IPv6 address is
specified to sortlist, empty entry was created in _res.sort_list. It
broke sortlist facility of gethostbyname().
Discussed on users@jp.ipv6.org.
markm [Sat, 11 Aug 2001 12:37:55 +0000 (12:37 +0000)]
Fix:
/usr/src/lib/libpam/modules/pam_ssh/pam_ssh.c has couple of bugs which cause:
1) xdm dumps core
2) ssh1 private key is not passed to ssh-agent
3) ssh2 RSA key seems not handled properly (just a guess from source)
4) ssh_get_authentication_connectionen() fails to get connection because of
SSH_AUTH_SOCK not defined.
rwatson [Fri, 10 Aug 2001 23:57:43 +0000 (23:57 +0000)]
o Reduce the number of offered security profiles, as we now have a more
conservative default, and actually prompt specifically for inetd rather
than handling it as a side effect of the security profile. Update the
help file to reflect this change.
o Rename "Fascist" to "Extreme" in the source code, to match the names
presented to the user.
o Remove portmap and inetd from profile management. Portmap is now
disabled by default, but automatically turned on if a feature requires
it (such as NFS, etc).
This is an MFC candidate for 4.4-RELEASE.
Reviewed by: freebsd-arch@FreeBSD.org
Approved by: re@FreeBSD.org
MFC after: 2 days
julian [Fri, 10 Aug 2001 23:17:22 +0000 (23:17 +0000)]
Make the protoswitch definitiosn checkable in the same way that
cdevsw entries have been for a long time.
Discover that we now have two version sof the same structure.
I will shoot one of them shortly when I figure out why someone thinks
they need it. (And I can prove they don't)
(netinet/ipprotosw.h should GO AWAY)
wpaul [Fri, 10 Aug 2001 23:15:13 +0000 (23:15 +0000)]
Fix some of the GDB linkage setup. The l_name member of the gdb linkage
structure is always free()ed yet only sometimes malloc()ed. In particular,
it was simply set to point to l_filename from the a linker_file_t in
link_elf_link_preload_finish(). The l_filename had been malloc()ed inside
the kern_linker.c module and was being free()ed twice: once by
link_elf_unload_file() and again by linker_file_unload(), leading to
a panic.
How to duplicate the problem:
- Pre-load a kernel module from the loader, i.e. if_sis.ko
- Boot system
- Attempt to unload module with kldunload if_sis
- Bewm
The problem here is that the case where the module was loaded with kldload
after system boot would work correctly, so this bug went unnoticed until
I stubbed my toe on it just now. (Also, you can only trip this bug if
you compile a kernel with options DDB, but that's the default now.)
Fix: remember to malloc() a separate copy of the module name for the
l_name member of the gdb linkage structure in three places where the
linkage structure can be initialized.
jhb [Fri, 10 Aug 2001 23:00:07 +0000 (23:00 +0000)]
Add an optimization where we check hte PS_ASTPENDING and PS_NEEDRESCHED
flags with interrupts disabled to see if we should call ast() during
doreti. This was mostly submitted by Bruce, but his original patch did
the looping in ast() in assembly rather than in the ast() function itself.
Once we've actually called into the ast() function, it's cheaper to just
loop inside the function rather than returning from the function,
performing the check, and then calling the function again. However, we
can optimize the first check to avoid calling the function at all.
Other architectures may choose to implement this optimization if they
wish but it is not required for correct operation.
jhb [Fri, 10 Aug 2001 22:53:32 +0000 (22:53 +0000)]
- Close races with signals and other AST's being triggered while we are in
the process of exiting the kernel. The ast() function now loops as long
as the PS_ASTPENDING or PS_NEEDRESCHED flags are set. It returns with
preemption disabled so that any further AST's that arrive via an
interrupt will be delayed until the low-level MD code returns to user
mode.
- Use u_int's to store the tick counts for profiling purposes so that we
do not need sched_lock just to read p_sticks. This also closes a
problem where the call to addupc_task() could screw up the arithmetic
due to non-atomic reads of p_sticks.
- Axe need_proftick(), aston(), astoff(), astpending(), need_resched(),
clear_resched(), and resched_wanted() in favor of direct bit operations
on p_sflag.
- Fix up locking with sched_lock some. In addupc_intr(), use sched_lock
to ensure pr_addr and pr_ticks are updated atomically with setting
PS_OWEUPC. In ast() we clear pr_ticks atomically with clearing
PS_OWEUPC. We also do not grab the lock just to test a flag.
- Simplify the handling of Giant in ast() slightly.
iedowse [Fri, 10 Aug 2001 22:14:18 +0000 (22:14 +0000)]
Arbitrarily limit to 64k the number of bytes that can be read at
a time using the ogetdirentries() compatibility syscall. This is a
hack to ensure that rediculous values don't get passed to MALLOC().
jhb [Fri, 10 Aug 2001 21:08:56 +0000 (21:08 +0000)]
Work around a race between msleep() and endtsleep() where it was possible
for endtsleep() to be executing when msleep() resumed, for endtsleep()
to spin on sched_lock long enough for the other process to loop on
msleep() and sleep again resulting in endtsleep() waking up the "wrong"
msleep.
jhb [Fri, 10 Aug 2001 21:06:59 +0000 (21:06 +0000)]
Change callout_stop() to return an integer. If callout_stop() succeeds in
removing the callout entry, return 1. If callout_stop() fails to remove
the callout entry because it is currently executing or has already been
executed, then the function returns 0. The idea was obtained from BSD/OS,
however, BSD/OS changed untimeout(), and I've just changed callout_stop()
to be more conservative.
markm [Fri, 10 Aug 2001 19:24:34 +0000 (19:24 +0000)]
Clean up this module very extensively. Fix the logging, the coding
standards and the option handling. This module is now much more easy
to maintain as a part of the FreeBSD tree.