Commit graph

95298 commits

Author SHA1 Message Date
Mike Silbersack a10c0e4574 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.

Spotted by:	Kenjiro Cho <kjc@csl.sony.co.jp>
2003-10-19 23:05:19 +00:00
Mike Silbersack 5d5b5d0f99 Add a new macro M_ASSERTVALID which ensures that the mbuf in question
is non-free.  (More checks can/should be added in the future.)

Use M_ASSERTVALID in BPF_MTAP so that we catch when freed mbufs are
passed in, even if no bpf listeners are active.

Inspired by a bug in if_dc caught by Kenjiro Cho.
2003-10-19 22:33:41 +00:00
Poul-Henning Kamp 0513e13e31 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).
2003-10-19 22:12:23 +00:00
Ian Dowse d6ad008082 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.

Reviewed by:	mckusick
2003-10-19 21:49:44 +00:00
Hajimu UMEMOTO 9132d5071c - 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.
2003-10-19 21:28:34 +00:00
David Malone e1419c08e2 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.

Reviewed by:	iedowse
Idea run past:	jhb
2003-10-19 20:41:07 +00:00
Alan Cox 48ae2dddac - 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().
2003-10-19 20:39:06 +00:00
Poul-Henning Kamp d1b8bf476c Remove KASSERT check for negative bio_offsets, add "normal" EIO
error return for same.
2003-10-19 19:06:54 +00:00
Bruce A. Mah ac42a2c196 The re(4) driver works on CURRENT/alpha.
Reported by:	naddy@mips.inka.de (Christian Weisgerber) on alpha@
2003-10-19 18:35:40 +00:00
Bruce A. Mah ffe837c393 Modified release notes: Fixed minor grammatical bugs in atkbd(4) bug
and safe(4).
2003-10-19 18:32:48 +00:00
Warner Losh 0f08d52a60 Finish the removal of the bst/bsh confusion. 2003-10-19 17:38:04 +00:00
Maxime Henrion 6fb826df1c Remove debug printf(). 2003-10-19 14:33:00 +00:00
Olivier Houchard faf1e14786 Implement partially /proc/<pid>/maps.
It looks enough to make SImics run.

Reviewed by:	des
2003-10-19 14:13:51 +00:00
Dag-Erling Smørgrav 79ef1f32da Various NFS-related bug fixes (mostly related to using variable_get()
instead of variable_cmp() to test boolean rc.conf variables).

Submitted by:	hmp
2003-10-19 13:37:12 +00:00
Hiroki Sato 5834974f39 Modified release note:
Fix a typo in IP_ONESBCAST item.

MFC noted:
	ipfw(4) limit rule processing fix.
2003-10-19 12:58:57 +00:00
Yoshihiro Takahashi a1f83c968f MFi386: revision 1.577. 2003-10-19 11:35:44 +00:00
Poul-Henning Kamp f59d5f7a9b s/5.0-CURRENT/FreeBSD 5.x/ 2003-10-19 10:24:59 +00:00
Bruce M Simpson 3eb4d8a3bc Fix LINT build by correcting a missed change. 2003-10-19 09:31:07 +00:00
Nate Lawson 5539804740 Disable irqs before entering the power-off state. This is not known
to fix any problems but is similar to how Linux implements this
function.
2003-10-19 05:56:59 +00:00
Peter Wemm 68d86cf1e2 Tidy up loose ends in the idle process. Call the MI cpu_idle() function
for all platforms now.

XXX alpha/sparc64/powerpc should fill in the function.

Submitted by:  bde
2003-10-19 02:43:57 +00:00
Peter Wemm 1b03813f65 Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is a
MI declared function so it should be everywhere.
2003-10-19 02:36:07 +00:00
Olivier Houchard f6a43a2b50 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.

Reviewed by:	des
2003-10-19 02:09:36 +00:00
David Xu d5e1f581ff 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.
2003-10-19 00:57:10 +00:00
Gregory Neil Shapiro 93227805ff 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.

PR:		conf/57075
Submitted by:	Jonathan Chen <jonc@chen.org.nz>
MFC after:	2 weeks
2003-10-19 00:31:50 +00:00
Gregory Neil Shapiro 1f9b7c9633 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.

PR:		conf/57733
Reviewed by:	nork
MFC after:	2 weeks
2003-10-19 00:03:13 +00:00
Warner Losh 38e7cb26d4 Don't confuse tags and handles. 2003-10-19 00:03:10 +00:00
Alan Cox 1b26eb10ff - Synchronize access to a vm page's valid field using the containing
vm object's lock.
 - Reduce the scope of the vm page queues lock in two places.
2003-10-19 00:01:56 +00:00
Simon L. B. Nielsen 7044867f83 Note that PAE has been MFC'd into RELENG_4 and will appear in FreeBSD
4.9.
2003-10-18 22:54:45 +00:00
Nate Lawson 4c3655b418 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.
2003-10-18 22:25:07 +00:00
Alan Cox 8b575f6c28 - Synchronize access to the page's valid field in
vnode_pager_generic_getpages() using the containing object's lock.
2003-10-18 21:30:29 +00:00
Alan Cox 7a93508274 - 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.
2003-10-18 21:09:21 +00:00
Bruce M Simpson fc1cbf4331 Fix a typo. The module has the EISA front-end commented out, therefore the
error may not have been picked up right away.

Reviewed by:	mdodd
Submitted by:	Stuart Walsh
2003-10-18 20:44:23 +00:00
Poul-Henning Kamp 2d6a9d0747 Initialize b_iooffset before calling VOP_[SPEC]STRATEGY 2003-10-18 19:49:46 +00:00
Poul-Henning Kamp 01758670e9 Initialize b_iooffset before calling strategy 2003-10-18 19:48:21 +00:00
Poul-Henning Kamp 427823d576 Only automatically create an 'a' partition when there is nothing
but a 'c' partition.
2003-10-18 19:32:35 +00:00
Alan Cox cbef13d877 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.
2003-10-18 18:48:17 +00:00
Hiroki Sato e51287e850 New release note:
Fix ipfw(4) limit rule processing.
2003-10-18 18:18:17 +00:00
Poul-Henning Kamp 220c6cb3fa Retire b_pblkno which was an alias for a bio field which is for
device drivers only.
2003-10-18 18:17:55 +00:00
Poul-Henning Kamp 0efedd8864 Don't report b_pblkno, it is going away. 2003-10-18 17:59:02 +00:00
Poul-Henning Kamp 06a259faf6 Do not initialize bp->b_pblkno, it is going away. 2003-10-18 17:57:48 +00:00
Poul-Henning Kamp 3916828f7b Retire bio_blkno entirely.
bio_offset is the field drivers should use.
bio_pblkno remains as a convenient place to store the number of
the device drivers.
2003-10-18 17:53:34 +00:00
Poul-Henning Kamp b52b7f465d Eliminate use bio_blkno. 2003-10-18 17:51:26 +00:00
Hajimu UMEMOTO 2d0e1cf17a rtfree() must be called in lock context.
Reported by:	jhay
2003-10-18 17:46:23 +00:00
Poul-Henning Kamp 91a50fa4a5 Discontinue bio_blkno usage. 2003-10-18 17:45:45 +00:00
Poul-Henning Kamp c4f832d118 Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
Poul-Henning Kamp 0eac610fd7 Eliminate reporting of bio_blkno. 2003-10-18 17:28:36 +00:00
Poul-Henning Kamp 1ad9172f6b Report bio_pblkbo instead of bio_blkno. 2003-10-18 17:27:10 +00:00
Poul-Henning Kamp 24730dd78a Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
Poul-Henning Kamp 3a71ca7daa No need to initialize bio_pblkno from bio_blkno, disksort uses bio_offset. 2003-10-18 17:24:51 +00:00
Poul-Henning Kamp 4cb4df483c Make bioq_disksort() sort on the bio_offset field instead of bio_pblkno. 2003-10-18 15:50:56 +00:00