dds [Mon, 20 Oct 2003 13:52:22 +0000 (13:52 +0000)]
Bring the description of st_[cma]time modification conditions a bit
closer to reality. More work remains to be done. st_mtime should
be the most complete based on IEEE Std 1003.1, 2003 Edition, a
review of ufs_vnops.c, and some experimentation.
tjr [Mon, 20 Oct 2003 10:38:48 +0000 (10:38 +0000)]
Fix some security bugs in the SVR4 emulator:
- Return NULL instead of returning memory outside of the stackgap
in stackgap_alloc() (FreeBSD-SA-00:42.linux)
- Check for stackgap_alloc() returning NULL in svr4_emul_find(),
and clean_pipe().
- Avoid integer overflow on large nfds argument in svr4_sys_poll()
- Reject negative nbytes argument in svr4_sys_getdents()
- Don't copy out past the end of the struct componentname
pathname buffer in svr4_sys_resolvepath()
- Reject out-of-range signal numbers in svr4_sys_sigaction(),
svr4_sys_signal(), and svr4_sys_kill().
- Don't malloc() user-specified lengths in show_ioc() and
show_strbuf(), place arbitrary limits instead.
- Range-check lengths in si_listen(), ti_getinfo(), ti_bind(),
svr4_do_putmsg(), svr4_do_getmsg(), svr4_stream_ti_ioctl().
imp [Mon, 20 Oct 2003 10:26:54 +0000 (10:26 +0000)]
Update to using a 56k modem connection, plus add some verbage about
what the entry does for people that are not used to reading
/etc/remote files every day. Keep arpavax, because it is a cool name,
but remove the phone number listed. arpavax hasn't been answering
that number for a while :-)
phk [Mon, 20 Oct 2003 07:04:09 +0000 (07:04 +0000)]
When a driver successfully created a device on demand, we can directly
pick up the DEVFS inode number from the dev_t and find our directory
entry from that, we don't need to scan the directory to find it.
This also solves an issue with on-demand devices in subdirectories.
marcel [Mon, 20 Oct 2003 05:34:10 +0000 (05:34 +0000)]
Put the RSE backing store at a fixed address. This change is triggered
by libguile that needs to know the base of the RSE backing store. We
currently do not export the fixed address to userland by means of a
sysctl so user code needs to hardcode it for now. This will be revisited
later.
The RSE backing store is now at the bottom of region 4. The memory stack
is at the top of region 4. This means that the whole region is usable
for the stacks, giving a 61-bit stack space.
silby [Sun, 19 Oct 2003 23:05:19 +0000 (23:05 +0000)]
Fix a problem where m_defrag would allocate a new mbuf to replace the
chain passed into dc_encap, which dc_start was unaware of. This caused
the old (now invalid) mbuf to be passed to BPF_MTAP.
phk [Sun, 19 Oct 2003 22:12:23 +0000 (22:12 +0000)]
Add a testcase which validates that the same buffer can be passed to
rijndael_blockDecrypt() as both input and output.
This property is important because inside rijndael we can get away
with allocating just a 16 byte "work" buffer on the stack (which
is very cheap), whereas the calling code would need to allocate the
full sized buffer, and in all likelyhood would have to do so with
an expensive malloc(9).
iedowse [Sun, 19 Oct 2003 21:49:44 +0000 (21:49 +0000)]
Change the default mode for lost+found from 01777 to 0700. The
original intention of the less restrictive permissions was to allow
users to move or delete recovered files that they own. However, it
is better to not create world-writable directories by default; the
administrator can always pre-create lost+found if different permissions
are desired.
ume [Sun, 19 Oct 2003 21:28:34 +0000 (21:28 +0000)]
- revert to old rijndael code. new rijndael code broke gbde.
- since aes-xcbc-mac and aes-ctr require functions in new
rijndael code, aes-xcbc-mac and aes-ctr are disabled for now.
dwmalone [Sun, 19 Oct 2003 20:41:07 +0000 (20:41 +0000)]
falloc allocates a file structure and adds it to the file descriptor
table, acquiring the necessary locks as it works. It usually returns
two references to the new descriptor: one in the descriptor table
and one via a pointer argument.
As falloc releases the FILEDESC lock before returning, there is a
potential for a process to close the reference in the file descriptor
table before falloc's caller gets to use the file. I don't think this
can happen in practice at the moment, because Giant indirectly protects
closes.
To stop the file being completly closed in this situation, this change
makes falloc set the refcount to two when both references are returned.
This makes life easier for several of falloc's callers, because the
first thing they previously did was grab an extra reference on the
file.
alc [Sun, 19 Oct 2003 20:39:06 +0000 (20:39 +0000)]
- Add vm object locking to vfs_clean_pages() and vfs_bio_set_validclean().
This is to synchronize access to the vm page's valid field by
vm_page_set_validclean().
cognet [Sun, 19 Oct 2003 02:09:36 +0000 (02:09 +0000)]
Fix broken su -m behaviour :
chshell must return 0 if the shell is not a standard shell, or else it is
possible to use an account without a valid shell.
davidxu [Sun, 19 Oct 2003 00:57:10 +0000 (00:57 +0000)]
Use npxdrop in cpu_thread_exit to save some cycles.
Clear FPU pcb flags for new upcall thread, these flags needn't
be inherited, the new thread should start from clean FPU status.
gshapiro [Sun, 19 Oct 2003 00:31:50 +0000 (00:31 +0000)]
Before trying to restart/stop the MTA or MSP queue runner, make sure
we are configured to use an MTA or MSP queue runner. Otherwise the
script used to complain about the missing PID file.
gshapiro [Sun, 19 Oct 2003 00:03:13 +0000 (00:03 +0000)]
Adding WorkAroundBrokenAAAA seems a necessity even in the submit.mc given
the number of broken DNS servers out there in the world. Since we are
diverging from the sendmail.org submit.mc, it's time to make our own
freebsd.submit.mc.
njl [Sat, 18 Oct 2003 22:25:07 +0000 (22:25 +0000)]
Add the cpu_idle_hook() function pointer so that other idlers can be
hooked at runtime. Make C1 sleep (e.g., HLT) be the default. This
prepares the way for further ACPI sleep states.
alc [Sat, 18 Oct 2003 21:09:21 +0000 (21:09 +0000)]
- Increase the object lock's scope in vm_contig_launder() so that access
to the object's type field and the call to vm_pageout_flush() are
synchronized.
- The above change allows for the eliminaton of the last parameter
to vm_pageout_flush().
- Synchronize access to the page's valid field in vm_pageout_flush()
using the containing object's lock.
alc [Sat, 18 Oct 2003 18:48:17 +0000 (18:48 +0000)]
Corrections to revision 1.305
- Specifying VM_MAP_WIRE_HOLESOK should not assume that the start
address is the beginning of the map. Instead, move to the first
entry after the start address.
- The implementation of VM_MAP_WIRE_HOLESOK was incomplete. This
caused the failure of mlockall(2) in some circumstances.
imp [Sat, 18 Oct 2003 15:22:43 +0000 (15:22 +0000)]
Transition to using bus_space macros rather than the inb/outb/etc.
Use EP_{READ,WRITE}{,_MULTI}_{1,2,4} instead. I've had several people
submit patches like this over the years of varying qualities, markm
being the last. The names were chosen in consulation with mdodd on
irc.
I've tested this with only PCMCIA cards: 3CCE589EC and 3CCSH572BT.
I've not tried with my more extensive ISA, EISA and cbus collection.
markm [Sat, 18 Oct 2003 09:58:39 +0000 (09:58 +0000)]
Remove a GCC specifig CFLAG. We should be using WARNS=? for this.
WARNS=? is not added here at this point, because I've not tested
it on enough platforms, and I don't want to break builds.
phk [Sat, 18 Oct 2003 09:03:15 +0000 (09:03 +0000)]
The size and contents of the DEV_STRATEGY() macro has progressed to
the point where it being a macro is no longer sensible, and it will
only be more so in days to come.
BIO_STRATEGY() is now only used from DEV_STRATEGY() and should not
be used directly anymore.
Put the contents of both in the new function dev_strategy() and
make DEV_STRATEGY() call that function.
In addition, this allows us to make the rather magic bufdonebio()
helper function static.
This alse saves hunderedandsome bytes of code in a typical kernel.
simokawa [Sat, 18 Oct 2003 05:41:31 +0000 (05:41 +0000)]
Add SBP-II target mode driver.
Though this is still incomplete and has some missing features such as
exclusive login and event notification, it may be enough for someone
who wants to play with it.
This driver is supposed to work with firewire(4), targ(4) of CAM(4)
and scsi_target(8) which can be found in /usr/share/example/scsi_target.
This driver doesn't require sbp(4) which implements initiator mode.
Sample configuration:
Kernel: (you can use modules as well)
device firewire
device scbus
device targ
device sbp_targ
After reboot:
# mdconfig -a -t malloc -s 10m
md0
# scsi_target 0:0:0 /dev/md0
(Assuming sbp_targ0 on scbus0)
You should find the 10MB HDD on FreeBSD/MacOS X/WinXP or whatever connected
to the target using FireWire.
simokawa [Sat, 18 Oct 2003 04:59:47 +0000 (04:59 +0000)]
- Call sbp_reset_start() for mgm timeout.
- Change type of target->luns to allocate an array of LUNs dynamically.
This allows targets to change their number of LUNs after each bus reset.
- Serialize ORB POINTER command for each LUN.
- Improve debug messages.
rwatson [Sat, 18 Oct 2003 02:13:39 +0000 (02:13 +0000)]
Add a new cn_flags fields to struct consdev, the low-level console
definition structure. Define one flag, CN_FLAG_NODEBUG, which
indicates the console driver cannot be used in the context of the
debugger. This may be used, for example, if the console device
interacts with kernel services that cannot be used from the
debugger context, such as the network stack. These drivers are
skipped over for calls to cn_checkc() and cn_putc(), and the
calling function simply moves on to the next available console.