Commit Graph

124513 Commits

Author SHA1 Message Date
Olivier Houchard
27b45ae819 Don't enable the FIQ in enable_interrupts() if F32_bit is not specified.
This has been committed by mistake.

Reported by:	ssouhlal
2006-06-01 16:17:44 +00:00
Maxim Konovalov
d230fe5161 o Record a file offset for a last successfully parsed group file line.
If the initial buffer size (1KB) for the given group line is not big
enough, reset the offset.  It helps to do not miss this line when
getrg() reallocates the larger buffer and tries to parse the line again.

PR:		bin/52433, kern/55031, bin/83696, misc/97640, misc/98111
Submitted by:	bsw71@mail.ru, Philip M. Gollucci, Justin Erenkrantz
Glanced at:	nectar
MFC after:	1 month
2006-06-01 15:45:06 +00:00
Christian S.J. Peron
7737a00f64 Check to see if the rootdir is the same as the current working directory.
If it is, and the pathname was relative, do not separate the componenets
with a '/' character.

Obtained from:	TrustedBSD Project
2006-06-01 15:38:30 +00:00
Maxim Konovalov
bb0aa1a544 o Better be safe than sorry: check return code from setuid(2),
setgid(2), setlogin(2) and initgroups(3).  In theory they could
fail for root with some third party mac(4) policies.

Submitted by:	Kostik Belousov
MFC after:	1 month
2006-06-01 15:03:06 +00:00
Maxim Konovalov
332a76f71b o Document the fact truncate(2) has no effect for !VDIR or !VREG files.
Submitted by:	ceri
2006-06-01 14:20:43 +00:00
Christian S.J. Peron
0f7163d304 Since NIS is an RPC based service, add a note that when adjusting access
controls in NIS, similar access controls should be considered for the
rpcbind as well.
2006-06-01 14:14:58 +00:00
Diomidis Spinellis
132142c572 Move conditional preprocessing out from the IEEE80211_DPRINTF macro
invocation.  Per C99 6.10.3 paragraph 11 preprocessing directives
appearing as macro arguments yield undefined behavior.
2006-06-01 14:06:32 +00:00
Andrew Thompson
55ba40bfe2 Add rc.d/bridge which is invoked when a new interface arrives and can
automaticly add it to an Ethernet bridge. This is intended for applications
such as qemu, vmware, openvpn, ... which open tap interfaces and need them
bridged with the hosts network adapter, the user can set up a glob for
interfaces to be automatically added (eg tap*).
2006-06-01 11:01:54 +00:00
Matt Jacob
5fe76ab861 Add scottl to maintainers to ask for Pre-commit review on all busdma
changes. I was unaware of Scott's claim in this area and was abruptly
so informed. Let's put such an interest in some visible place.
2006-06-01 05:06:54 +00:00
Mike Silbersack
f25d341cfb After much discussion with mjacob and scottl, change bus_dmamem_alloc so
that it just warns the user with a printf when it misaligns a piece
of memory that was requested through a busdma tag.

Some drivers (such as mpt, and probably others) were asking for alignments
that could not be satisfied, but as far as driver operation was concerned,
that did not matter.  In the theory that other drivers will fall into
this same category, we agreed that panicing or making the allocation
fail will cause more hardship than is necessary.  The printf should
be sufficient motivation to get the driver glitch fixed.
2006-06-01 04:49:29 +00:00
Craig Rodrigues
829b898c7c mount_msdosfs.c:
- remove call to getmntopts(), and just pass -o options to
    nmount().  This removes some confusion as to what options
    msdosfs can parse, by pushing the responsibility of option parsing
    to the VFS and FS specific code in the kernel.

msdosfs_vfsops.c:
  - add "force" and "sync" to msdosfs_opts.  They used to be specified
    in mount_msdosfs.c, so move them here.  It's not clear whethere these
    options should be placed into global_opts in vfs_mount.c or not.

Motivated by:	marcus
2006-06-01 02:25:00 +00:00
Alan Cox
d49e4d3f55 Introduce pmap_enter_locked() and use it to reimplement pmap_enter_quick().
Tested by: cognet@
2006-06-01 01:31:07 +00:00
Andrew Thompson
f3b90d48bb Announce all interfaces to devd on attach/detach. This adds a new devctl
notification so all interfaces including pseudo are reported. When netif
creates the clones at startup devctl_disable has not been turned off yet so the
interfaces will not be initialised twice, enforce this by adding an explicit
order between rc.d/netif and rc.d/devd.

This change allows actions to taken in userland when an interface is cloned
and the pseudo interface will be automatically configured if a ifconfig_<int>=""
line exists in rc.conf.

Reviewed by:		brooks
No objections on:	net
2006-06-01 00:41:07 +00:00
Bruce A. Mah
cd6816b327 Swing URLs to security advisories over to security.FreeBSD.org. 2006-05-31 23:49:51 +00:00
Bruce A. Mah
3bdb6fcac1 New release notes: SA-06:15, SA-06:16.
Note: We should swing the URLs for all the older security advisories
mentioned here over to the new location on security.FreeBSD.org.
2006-05-31 23:36:15 +00:00
Paul Saab
4cbb1c1aaa Fix minidumps to include pages allocated via pmap_map on amd64.
These pages are allocated from the direct map, and were not previous
tracked.  This included the vm_page_array and the early UMA bootstrap
pages.

Reviewed by:	peter
2006-05-31 22:55:23 +00:00
Colin Percival
72f6a0fa7a Enable inadvertantly disabled "securenet" access controls in ypserv. [1]
Correct a bug in the handling of backslash characters in smbfs which can
allow an attacker to escape from a chroot(2). [2]

Security:	FreeBSD-SA-06:15.ypserv [1]
Security:	FreeBSD-SA-06:16.smbfs [2]
2006-05-31 22:32:22 +00:00
Ceri Davies
4ec07c5e93 Bring the "just copy" hit list closer to date.
Approved by:	jhb
MFC after:	1 month
2006-05-31 19:16:34 +00:00
Ceri Davies
04e273bfb1 Update the location of the kernel for upgrades.
I considered leaving /boot/kernel out of the chflags noschg line, but I
seem to remember that there was a period where /boot/kernel was schg, so
have left it in for safety's sake.

Approved by:	jhb
MFC after:	1 month
2006-05-31 19:15:20 +00:00
Maxim Konovalov
e680b88a3d o Rearrange and remove incorrect comments.
Requested by:	bde
2006-05-31 15:55:52 +00:00
Olivier Houchard
c7f17eb45c Avoid a LOR by unlocking the vm_page_queue_mtx before calling uma_zalloc,
and freeing the allocated memory if another thread already did the same.
2006-05-31 15:52:11 +00:00
Olivier Houchard
4cd3385ee3 If our buffer is not aligned on the cache line size, write back/invalidate
the first and last cache line in PREREAD, and just invalidate the cache
lines in POSTREAD, instead of write-back/invalidating in POSTREAD, which
could lead to stale data overriding what has been transfered by DMA.
2006-05-31 15:50:33 +00:00
Matt Jacob
866fcf84ba Fix missing update to reflect change in scsi_inquiry data structure. 2006-05-31 14:33:23 +00:00
Diomidis Spinellis
23efd78d03 Remove two locking assertion entries that:
a) were incorrectly written and therefore never compiled into
assertions, and
b) were incorrectly specified and when compiled resulted in a
failed assertion.
2006-05-31 14:06:06 +00:00
Maxim Konovalov
e3243f2bf4 o Correct URL to ELF header documantation.
PR:		kern/98213
Submitted by:	Robert Gogolok
2006-05-31 13:47:32 +00:00
Maxim Konovalov
3593da9e81 o According to POSIX, the result of ftruncate(2) is unspecified
for file types other than VREG, VDIR and shared memory objects.
We already handle VREG, VLNK and VDIR cases.  Silently ignore
truncate requests for all the rest.  Adjust comments.

PR:		kern/98064
Submitted by:	bde
Security:	local DoS
Regress. test:	regression/fifo/fifo_misc
MFC after:	2 weeks
2006-05-31 13:15:29 +00:00
Olivier Houchard
c712f1ef5b Ooops arm10 is armv5, not armv4.
Submitted by:	kevlo
2006-05-31 13:06:08 +00:00
Olivier Houchard
87adbb81cc Include machine/cpuconf.h in pmap.h in order to get ARM_NMMUS defined,
to appease -Wundef.
2006-05-31 11:57:37 +00:00
Maxim Konovalov
326c421e09 Output directory has gone, remove it from Makefile. 2006-05-31 11:22:15 +00:00
Maxim Konovalov
884fb9ccdd Fix test for empty interpreter. 2006-05-31 11:15:16 +00:00
Maxim Konovalov
393e6ede9e o Add various regression tests for execve(2) syscall.
Obtained from:	NetBSD
2006-05-31 11:13:10 +00:00
Ian Dowse
9c0ce099e6 Increment the disk block offset after writing, not before. This
fixes filesystem corruption when nextboot.conf is located after
cylinder 1023. The bug appears to have been introduced at the time
bd_read was copied to create bd_write.

PR:		bin/98005
Reported by:	yar
MFC after:	1 week
2006-05-31 09:05:49 +00:00
Maxim Konovalov
fd447da171 o Let getopt(3) report errors in command line arguments.
o If something is wrong with options, then output short usage help message.
o Output errstr returned from strtonum(3).

PR:		bin/98141
Submitted by:	Andrey Simonenko
2006-05-31 08:10:34 +00:00
Greg Lehey
a176b8d333 Correct previous commit. We don't want to suppress an entry because
it runs into the following month.  Instead adjust month and day,
wrapping round into next year where necessary.

MFC after: 14 days
2006-05-31 01:30:50 +00:00
Matt Jacob
87ba3ce6f4 Since it's to all intents and purposes identical
code to amd64 && i386, match the recent changes
to bus_dmamem_alloc here.
2006-05-31 00:38:53 +00:00
Matt Jacob
aa57a87a56 Turn the panic on not being able to meet alignment constraints
in bus_dmamem_alloc into the more reasonable EINVAL return.

Also, reclaim memory allocated but then not used if we had
an error return.
2006-05-31 00:37:56 +00:00
Matt Jacob
5a4c2d0e02 Pick reasonable alignment constraints so that we
don't ask too much of bus_dmamem_alloc/malloc.

Replace the device_printf calls in the memalloc
function mpt_prt.
2006-05-31 00:35:44 +00:00
Xin LI
631574e7dc Explicitly request pre-zeroed memory instead of memset'ing our
own.

Ok'ed by:	davidxu
2006-05-31 00:31:38 +00:00
David Xu
f1c313bff2 Clear invalid bits only if CPU supports SSE, otherwise, some fields in
struct save87 will be cleared unexpectly.
2006-05-31 00:17:29 +00:00
Olivier Houchard
1dbb640331 Protect the mapping used for pmap_copy_page/pmap_zero_page with a
mutex.
2006-05-30 23:50:45 +00:00
David Xu
afedf1a7f1 Use the method described in IA-32 Intel Architecture Software Developer's
Manual chapter 11.6.6 to get valid mxcsr bits, use the mxcsr mask to clear
invalid bits passed by user code.

Reviewed by: bde
2006-05-30 23:44:21 +00:00
Matt Jacob
4e359f5ad1 Handle some of the inquiry flags that have come into
usage as of SPC2r20. Specifically, handle the BQueue
flag which will indicate that a device supports the
Basic Queueing model (no Head of Queue or Ordered tags).
When this flag is set, SID_CmdQueue is clear. This has
causes FreeBSD to assume that the device did not support
tagged operations.

MFC after:	1 month
2006-05-30 22:44:00 +00:00
Warner Losh
8cb2906936 Add a define for the Standard SD Host Controller Base Peripheral. 2006-05-30 21:36:12 +00:00
Olivier Houchard
b64b87c8bd To avoid problems, invalidate the data cache and disable the MMU once
we're done uncompressing the kernel.
2006-05-30 21:13:47 +00:00
Diomidis Spinellis
44d6e87b07 - Add two checks for syntax errors
- Improve error reporting
- Remove redundant conditionals
2006-05-30 21:13:28 +00:00
Diomidis Spinellis
f69ec7af12 Assertion code specifications are introduced using special character
sequences that are distinct from comments. %% is used for argument
locks; %! for pre- and post-conditions.
2006-05-30 20:49:54 +00:00
Mohan Srinivasan
64c3892747 Kris Kennaway found that for '/' NFS mounts, the MPSAFE mount flag was
not being set, which means Giant would be acquired for these mounts.
2006-05-30 20:32:44 +00:00
Diomidis Spinellis
b1b4282160 Remove incorrect lock validation specifications that caused
failed assertions with DEBUG_VFS_LOCKS.
We should reinstate them with correct specifications, possibly
after extendng vnode_if.awk

Noted by: truckman@
2006-05-30 20:21:51 +00:00
Marius Strobl
fa67ebf9bb Revert the (int *) -> (intptr_t *) conversion done as part of rev. 1.59
for IOCTLs where casting data to intptr_t * isn't the right thing to do
as _IO() isn't used for them but _IOR(..., int)/_IOW(..., int) are (i.e.
for all IOCTLs except VMIO_SIOCSIFFLAGS), fixing tap(4) on big-endian
LP64 machines.

PR:		sparc64/98084
OK'ed by:	emax
MFC after:	1 week
2006-05-30 20:08:12 +00:00
Ruslan Ermilov
293c06a186 Fix -Wundef warnings. 2006-05-30 19:24:01 +00:00