sobomax [Mon, 7 Mar 2005 00:18:06 +0000 (00:18 +0000)]
Handle unimplemented syscall by instantly returning ENOSYS instead of sending
signal first and only then returning ENOSYS to match what real linux does.
sobomax [Sun, 6 Mar 2005 23:03:58 +0000 (23:03 +0000)]
When neither of supported frame type is enabled via kernel options enable
them all, otherwise the driver will be useless and will only confuse user
as manual page says nothing about the need to enable one of those frame
types explicitly in the kernel config.
cognet [Sun, 6 Mar 2005 21:10:31 +0000 (21:10 +0000)]
Make sure ARM_TP_ADDRESS is accessible right now by calling pmap_fault_fixup,
as we can't rely on a trap happening, as it is done normally.
While I'm there, uncomment the call to cpu_dcache_wbinv_range() in
pmap_kenter_internal, as we don't call cpu_dcache_wbinv_all() there anymore.
alc [Sun, 6 Mar 2005 20:09:00 +0000 (20:09 +0000)]
The m_ext reference counts are potentially shared and modified
asynchronously by different threads. Thus, declare as volatile the
reference count that is accessed through m_ext's pointer, ref_cnt.
Revert the previous change, revision 1.144, that casts as volatile a
single dereference of ref_cnt.
Reviewed by: bmilekic, dwhite
Problem reported by: kris
MFC after: 3 days
hrs [Sun, 6 Mar 2005 18:01:05 +0000 (18:01 +0000)]
New release notes:
Beastie boot menu disabled,
acpi(4) turns ACPI and PCI devices off or to a lower
power state in suspend,
acpi_ibm driver added,
ed(4) ALTQ support,
ipfw(4) ucred-based rules can be used with debug.mpsafenet=1,
TCP-MD5 implementation in KAME IPv4 IPsec,
ftpd(8) 212 and 213 status code support,
gvinum checkparity/rebuildparity/setstate subcommand support,
periodic(8) security report now includes blocked packet
counts by pf(4),
ppp(8) NAS-IP-Address/NAS-Identifier options,
pppd(8) incorrect CBCP response fix, and
rescue(8) now includes BSD tar.
Update release notes:
rc.conf(5) network interface renaming support (MFC), and
markup fix in the entry of systat(1) IPv6 support.
cognet [Sun, 6 Mar 2005 13:11:32 +0000 (13:11 +0000)]
Unlike NetBSD's bcopy(), our bcopy allows the two strings to overlap, even in
kernel. So bring in the userland version, instead of just calling memcpy.
imp [Sun, 6 Mar 2005 06:59:15 +0000 (06:59 +0000)]
Back out previous commit. The description didn't match the commit,
and marking this interrupt as fast isn't quite right. It also needs
to be MP Safe, and I've not done that work (yet).
das [Sat, 5 Mar 2005 20:34:45 +0000 (20:34 +0000)]
Work around a gcc bug. This fixes feholdexcept() et al. at -O1.
Symptoms of the problem included assembler warnings and
nondeterministic runtime behavior when a fe*() call that affects the
fpsr is closely followed by a float point op.
The bug (at least, I think it's a bug) is that gcc does not insert a
break between a volatile asm and a dependent instruction if the
volatile asm came from an inlined function. Volatile asms seem to be
fine in other circumstances, even without -mvolatile-asm-stop, so
perhaps the compiler adds the stop bits before inlining takes place.
The problem does not occur at -O0 because inlining is disabled, and it
doesn't happen at -O2 because -fschedule-insns2 knows better.
bmah [Sat, 5 Mar 2005 04:58:55 +0000 (04:58 +0000)]
Fix the truly bewildering sorting order near the middle of the
"Userland Changes" section. I'm pretty sure this is all my
fault...only a native English^H^H^H^H^H^H^HAmerican speaker could mess
it up this badly.
davidxu [Fri, 4 Mar 2005 22:46:31 +0000 (22:46 +0000)]
The td_waitset is pointing to a stack address when thread is waiting
for a signal, because kernel stack is swappable, this causes page fault
in kernel under heavy swapping case. Fix this bug by eliminating unneeded
code.
marius [Fri, 4 Mar 2005 22:23:21 +0000 (22:23 +0000)]
- sparc64/fhc/fhc.c:
Change fhc(4) to use IRQ numbers instead of RIDs for allocating the
IRQs of children. This works similar to e.g. sbus(4), i.e. add the
IRQ resources as fully specified to the resource lists of the children,
allocate them like normal. When establishing the interrupt search the
interrupt maps of the children for a matching INO to determine which
map we need to write the fully specified interrupt number to and to
enable the mapping (before the RID was used to indicate which interrupt
map to use).
- dev/puc/puc.c:
Revert rev. 1.38, with the above change fhc(4) no longer needs special
treatment for allocating IRQs.
hrs [Fri, 4 Mar 2005 19:52:34 +0000 (19:52 +0000)]
New release notes:
vkbd(4) added,
acpi_snc added,
gx(4) removed,
old vinum(4) removed,
libxpg4 removed,
a separate directory for named(8) dynamic zones added,
rm(1) SUSv3 conformance,
strftime(3) GNU extensions added, and
rc.conf(5) variables: tmpmfs_flags and varmfs_flags.
Update release notes:
Fix a typo (s/machine-indepedent/machine-independent/).
njl [Fri, 4 Mar 2005 18:59:54 +0000 (18:59 +0000)]
On i386 platforms at least, ACPI throttling is accomplished by the chipset
modulating the STPCLK# pin based on the duty cycle. Since p4tcc uses the
same mechanism (but internal to the CPU), we triggered a hang on some
systems at low frequencies when both were in use. Now, disable
acpi_throttle when p4tcc is also present.
marius [Fri, 4 Mar 2005 16:01:57 +0000 (16:01 +0000)]
Minor changes:
- Use FBSDID.
- Remove unused macro.
- Use auto-generated typedefs for the prototypes of the bus and device
interface functions.
- Terminate the output of device_printf(9) with a newline char.
- Honour the return values of malloc(), OF_getprop(), etc.
- Use __func__ instead of hardcoded function names.
- Print the physical slot number and the board model on attach.
marius [Fri, 4 Mar 2005 15:17:05 +0000 (15:17 +0000)]
Minor changes:
- Use FBSDID.
- Remove an unused include.
- Use auto-generated typedefs for the prototypes of the device interface
functions.
- Terminate the output of device_printf(9) with a newline char.
- Honour the return value of malloc(3).
scottl [Fri, 4 Mar 2005 06:11:00 +0000 (06:11 +0000)]
Fix the ioctl path by ensuring that amr_start1() gets called for commands
with no associated data. Also revert previous changes that allocate off
of the stack instead of using malloc, as it's not needed. Many thanks to
LSI for investigating and fixing these problems.
iedowse [Fri, 4 Mar 2005 00:53:03 +0000 (00:53 +0000)]
Allocate and map a 12k data buffer such that it is contiguous in
both the kernel and vm86 virtual address spaces. Use this to increase
the maximum VESA save state size we can handle.
wpaul [Thu, 3 Mar 2005 17:35:05 +0000 (17:35 +0000)]
Recently, it was reported to me that you could provoke a double fault
panic with the NDISulator if you did "ifconfig ndis0 10.0.0.1/24,"
whereas "ifconfig ndis0 10.0.0.1/24 up" worked fine. The double fault
was caused by the ifconfig thread running out of kernel stack space.
(This was partly due to the NDIsulator using a couple of big buffers on
the stack, but even after fixing that the double fault persisted.)
It turns out that ndis_init() is called in both cases, but in the first
case the code path passes through ieee80211_ioctl(), and it turns out
ieee80211_ioctl() consumes a whopping 2400 bytes of stack space.
Apparently, gcc -O2 causes the ieee80211_ioctl_get80211() routine to
be inlined into ieee80211_ioctl(), and for some reason which I do not
fully understand, this causes ieee80211_ioctl() to consume an extra 2K
of stack space.
To prevent this overly agressive optimization, ieee80211_ioctl_get80211()
is now declared with __attribute__ ((noinline)). With this change,
ieee80211_ioctl() now only reserves about 200 bytes of stack instead of 2400.
alfred [Thu, 3 Mar 2005 17:20:36 +0000 (17:20 +0000)]
Change fix a bug where the length of data written by snprintf was
being mishandled by using accumulation (into an uninitialized
variable) instead of direct assignment.
sobomax [Thu, 3 Mar 2005 16:57:55 +0000 (16:57 +0000)]
In linux emulation layer try to detect attempt to use linux_clone() to
create kernel threads and call rfork(2) with RFTHREAD flag set in this case,
which puts parent and child into the same threading group. As a result
all threads that belong to the same program end up in the same threading
group.
This is similar to what linuxthreads port does, though in this case we don't
have a luxury of having access to the source code and there is no definite
way to differentiate linux_clone() called for threading purposes from other
uses, so that we have to resort to heuristics.
Allow SIGTHR to be delivered between all processes in the same threading
group previously it has been blocked for s[ug]id processes.
This also should improve locking of the same file descriptor from different
threads in programs running under linux compat layer.
glebius [Thu, 3 Mar 2005 11:01:05 +0000 (11:01 +0000)]
Cisco uses milliseconds for uptime. This is stupid. Nobody cares of such
precision when IP packet may travel through internet for several seconds.
Also uptime measured in milliseconds overflows every 48+ days.
But we have to do same to keep compatibility with Cisco and flow-tools.
Make a macro MILLIUPTIME, which does overflowable multiplication to 1000.
harti [Thu, 3 Mar 2005 10:46:23 +0000 (10:46 +0000)]
Fix parsing of archives: in System V archive format the member names
is terminated with a slash. Although we are not System V, ar has
been configured to put that slash in. This format allows filenames
with trailing spaces.
wpaul [Thu, 3 Mar 2005 03:51:02 +0000 (03:51 +0000)]
MAXPATHLEN is 1024, which means NdisOpenFile() and ndis_find_sym() were
both consuming 1K of stack space. This is unfriendly. Allocate the buffers
off the heap instead. It's a little slower, but these aren't performance
critical routines.
Also, add a spinlock to NdisAllocatePacketPool(), NdisAllocatePacket(),
NdisFreePacketPool() and NdisFreePacket(). The pool is maintained as a
linked list. I don't know for a fact that it can be corrupted, but why
take chances.
marcus [Thu, 3 Mar 2005 03:06:37 +0000 (03:06 +0000)]
Fix a problem in the Skinny ALG where a specially crafted packet could cause
a libalias application (e.g. natd, ppp, etc.) to crash. Note: Skinny support
is not enabled in natd or ppp by default.
Approved by: secteam (nectar)
MFC after: 1 day
Secuiryt: This fixes a remote DoS exploit
delphij [Thu, 3 Mar 2005 02:17:20 +0000 (02:17 +0000)]
If a user or group is not known, report the problem user/group, rather than
the first user/group. Caused huge fun in error messages from large script.
Old: pgrep -u root,NoSuchUser,daemon -> pgrep: unknown user `root'
Now: pgrep -u root,NoSuchUser,daemon -> pgrep: unknown user `NoSuchUser'
Obtained from: NetBSD (rev. 1.8)
MFC After: 1 week (if re@ would have approved this)
marius [Thu, 3 Mar 2005 01:26:40 +0000 (01:26 +0000)]
Remove the transition aid for the change of the sparc64 default system
call vector which was added in rev. 1.52. This change was done way before
sparc64 switched to a 64-bit time_t so all binaries are expected to have
been recompiled by now.
marius [Thu, 3 Mar 2005 01:25:33 +0000 (01:25 +0000)]
Remove COMPAT_FREEBSD4 again. It was added in rev. 1.41 as a transition
aid for ABI breakages caused by system call changes. These changes were
done way before sparc64 switched to a 64-bit time_t so all binaries are
expected to have been recompiled by now.
mux [Thu, 3 Mar 2005 00:22:59 +0000 (00:22 +0000)]
Fix the panic recently reported on -current@ occuring when configuring
a vlan interface attached to a fxp(4) card when it has not been
initialized yet. We now set the links from our internel TX descriptor
structure to the TX command blocks at attach time rather than at init
time. While I'm here, slightly improve the style in fxp_attach().
jhb [Wed, 2 Mar 2005 22:46:07 +0000 (22:46 +0000)]
Rework how we layout the CD/DVD ISO images for releases. Note that this
is only the first stage and does not yet handle packages (which will move
to their own disc(s)).
- By default, include the live filesystem on disc1, so that disc1 is now
both an install disc and a fixit disc. The images can still be split
into two separate discs by specifying SEPARATE_LIVEFS=yes.
- Remove /usr/ports from the live filesystem disc as the merged images
do not fit on even i386 otherwise. Also, the merged image already
contains a tarball of the entire ports tree, so /usr/ports was a
duplicate anyway.
- Stop building port READMES for the release sinc they are no longer used
(/usr/ports in the live filesystem was the last remaining user).
- Split cdrom.1 into three targets. cdrom.1 builds the live filesystem
image. cdrom.2 builds the disc1 image. Note that if SEPARATE_LIVEFS
is not specified these both write to the same area. cdrom.3 builds
the bootonly image and the UFS miniroot.
- The various distribution directories are now in a <buildname>
subdirectory of disc1 rather than being in the root so that the merged
image's root is not quite as cluttered.
- The disc1 image is now called disc1.iso and we no longer build a
miniinst.iso image. If CD_EXTRA_BITS is defined, then the iso.1 target
will simply include those bits in the disc1 image that it builds.
jhb [Wed, 2 Mar 2005 22:27:22 +0000 (22:27 +0000)]
- Fix a bug in sysinstall related to mounting CD-ROMs. If mount(2) fails
with EBUSY and a cdrom is not mounted at /cdrom, sysinstall fails to
treat it as an error and thinks that the disk mounted ok. However, it
doesn't find a cdrom.inf file so it complains. Later when it tries to
unmount the disk due to a mediaClose() umount(2) returns an error, and it
never clears its internal mounted flag. The fix here is to properly
handle EBUSY as an error if there isn't a CD already mounted at /cdrom.
- Add a new CDROMInitQuiet variable that can be used to shut up the dialog
box about the mount(2) system call failing when trying to mount a CD-ROM.
This is used by the feature described below.
- When using a fixit CD, first try to see if we can mount the disc in the
drive now and use it as a fixit CD. If not, then prompt the user to
insert the disc and try again. If we do succeed on the first "silent"
probe then we don't ask the user to eject the disk after leaving fixit
mode.
- Add a simple file existence test to make sure that the disc that we mount
really is a livefs disc.
- Explicitly switch back to ttyv0 when using the standard console after
the fixit shell dies. Previously this behavior worked accidentally
because all the fixit modes popped up a dialog box which contained a
hidden switch to ttyv0.
jmg [Wed, 2 Mar 2005 21:59:39 +0000 (21:59 +0000)]
fix a bug where bpf would try to wakeup before updating the state.. This
was causing kqueue not to see the correct state and not wake up a process
that is waiting...