Commit Graph

24873 Commits

Author SHA1 Message Date
Peter Wemm
043cc5a602 Regenerate after rwatson's commit to syscalls.master (rev 1.85) 2001-03-15 04:43:57 +00:00
Matthew N. Dodd
107010e9fe This include file has no business being here. 2001-03-15 03:38:20 +00:00
Robert Watson
70f3685105 o Change the API and ABI of the Extended Attribute kernel interfaces to
introduce a new argument, "namespace", rather than relying on a first-
  character namespace indicator.  This is in line with more recent
  thinking on EA interfaces on various mailing lists, including the
  posix1e, Linux acl-devel, and trustedbsd-discuss forums.  Two namespaces
  are defined by default, EXTATTR_NAMESPACE_SYSTEM and
  EXTATTR_NAMESPACE_USER, where the primary distinction lies in the
  access control model: user EAs are accessible based on the normal
  MAC and DAC file/directory protections, and system attributes are
  limited to kernel-originated or appropriately privileged userland
  requests.

o These API changes occur at several levels: the namespace argument is
  introduced in the extattr_{get,set}_file() system call interfaces,
  at the vnode operation level in the vop_{get,set}extattr() interfaces,
  and in the UFS extended attribute implementation.  Changes are also
  introduced in the VFS extattrctl() interface (system call, VFS,
  and UFS implementation), where the arguments are modified to include
  a namespace field, as well as modified to advoid direct access to
  userspace variables from below the VFS layer (in the style of recent
  changes to mount by adrian@FreeBSD.org).  This required some cleanup
  and bug fixing regarding VFS locks and the VFS interface, as a vnode
  pointer may now be optionally submitted to the VFS_EXTATTRCTL()
  call.  Updated documentation for the VFS interface will be committed
  shortly.

o In the near future, the auto-starting feature will be updated to
  search two sub-directories to the ".attribute" directory in appropriate
  file systems: "user" and "system" to locate attributes intended for
  those namespaces, as the single filename is no longer sufficient
  to indicate what namespace the attribute is intended for.  Until this
  is committed, all attributes auto-started by UFS will be placed in
  the EXTATTR_NAMESPACE_SYSTEM namespace.

o The default POSIX.1e attribute names for ACLs and Capabilities have
  been updated to no longer include the '$' in their filename.  As such,
  if you're using these features, you'll need to rename the attribute
  backing files to the same names without '$' symbols in front.

o Note that these changes will require changes in userland, which will
  be committed shortly.  These include modifications to the extended
  attribute utilities, as well as to libutil for new namespace
  string conversion routines.  Once the matching userland changes are
  committed, a buildworld is recommended to update all the necessary
  include files and verify that the kernel and userland environments
  are in sync.  Note: If you do not use extended attributes (most people
  won't), upgrading is not imperative although since the system call
  API has changed, the new userland extended attribute code will no longer
  compile with old include files.

o Couple of minor cleanups while I'm there: make more code compilation
  conditional on FFS_EXTATTR, which should recover a bit of space on
  kernels running without EA's, as well as update copyright dates.

Obtained from:	TrustedBSD Project
2001-03-15 02:54:29 +00:00
Andrew Gallatin
64007795de remove bogus check -- for kernel threads we fork off of proc0, not curproc
This was causing panics when modules which create kthreads were loaded
after boot.

pointed out by: jake, jhb
2001-03-15 02:32:26 +00:00
Paul Saab
c6fe53998a Don't set the gateway address if the netmask is zero or we're on
the same network.  PXE does not do netmask calculations, so if the
gateway is set it will use it.

Submitted by:	peter & FreeBSD cluster ACLs
2001-03-14 23:53:25 +00:00
John Baldwin
df860c72f9 Use better descriptions (ones invovling words from the English language
anyways) for the accept filter modules.
2001-03-14 21:33:36 +00:00
Jonathan Lemon
3bd07cfd43 Add some performance features to the fxp driver. If the chip is not
a 82557 (e.g.: a newer chip) then:

   + enable MWI, if the PCI configuration indicates the system supports it
   + enable usage of extended TxCB, for better performance
   + enable hardware flow control.  FC frames will be passed up to the
     host only if promiscuous mode is enabled.
2001-03-14 19:50:35 +00:00
Robert Watson
7e9044a636 o In my merge, missed the one-line patch to ufs_vnops.c that removed
the static prototype for ufs_readdir().  Note that ufs_readdir() was
  actually already non-static, the prototype was incorrect.

Submitted by:	jedgar
2001-03-14 18:27:04 +00:00
Daniel C. Sobral
54eb4ada14 Improve comments about the sound drivers.
Correct accf lines.
2001-03-14 17:46:32 +00:00
Søren Schmidt
6c2cfc9203 Minor cleanup to the previous commit:
Print what devices went away and which arrived.

Avoid timeout loop on missing status.
2001-03-14 14:00:09 +00:00
Søren Schmidt
8fab4242e4 Add support for the IOMEGA Clik!
IOMEGA deserves a medal for making the most nonstandard ATAPI
devices, if they are ignorant or just not smart enough I don't
know, but somebody should help them out of their misery...
2001-03-14 12:12:46 +00:00
Søren Schmidt
8ea3ce2aac Refine the detach/attach code.
Proberly fail outstanding bio requests on devices that are detached.

This makes it possible to change between disk/cdrom/dvd/whathaveyou
in a notebook, just by suspending it, changing the device in the
bay (or what you model calls it), unsuspend and the ATA driver
will figure out what disappeared and properly fail those, and attach
any new devices found.
2001-03-14 12:05:44 +00:00
Seigo Tanimura
5ddde3e6fd - Do not touch the Giant.
Requested by:	jhb

- Initialize a mutex prior to locking it.

Spotted by:	dcs
2001-03-14 07:29:47 +00:00
Matthew Dillon
b823bbd6be Fix a lock reversal problem in the VM subsystem related to threaded
programs.   There is a case during a fork() which can cause a deadlock.

From Tor -
The workaround that consists of setting a flag in the vm map that
indicates that a fork is in progress and using that mark in the page
fault handling to force a revalidation failure.  That change will only
affect (pessimize) page fault handling during fork for threaded
(linuxthreads style) applications and applications using aio_*().

Submited by: tegge
2001-03-14 06:48:53 +00:00
Matthew Dillon
1a484d28dd Temporarily remove the vm_map_simplify() call from vm_map_insert(). The
call is correct, but it interferes with the massive hack called
vm_map_growstack().  The call will be returned after our stack handling
code is fixed.

Reported by: tegge
2001-03-14 06:09:42 +00:00
Robert Watson
f5161237ad o Implement "options FFS_EXTATTR_AUTOSTART", which depends on
"options FFS_EXTATTR".  When extended attribute auto-starting
  is enabled, FFS will scan the .attribute directory off of the
  root of each file system, as it is mounted.  If .attribute
  exists, EA support will be started for the file system.  If
  there are files in the directory, FFS will attempt to start
  them as attribute backing files for attributes baring the same
  name.  All attributes are started before access to the file
  system is permitted, so this permits race-free enabling of
  attributes.  For attributes backing support for security
  features, such as ACLs, MAC, Capabilities, this is vital, as
  it prevents the file system attributes from getting out of
  sync as a result of file system operations between mount-time
  and the enabling of the extended attribute.  The userland
  extattrctl tool will still function exactly as previously.
  Files must be placed directly in .attribute, which must be
  directly off of the file system root: symbolic links are
  not permitted.  FFS_EXTATTR will continue to be able
  to function without FFS_EXTATTR_AUTOSTART for sites that do not
  want/require auto-starting.  If you're using the UFS_ACL code
  available from www.TrustedBSD.org, using FFS_EXTATTR_AUTOSTART
  is recommended.

o This support is implemented by adding an invocation of
  ufs_extattr_autostart() to ffs_mountfs().  In addition,
  several new supporting calls are introduced in
  ufs_extattr.c:

    ufs_extattr_autostart(): start EAs on the specified mount
    ufs_extattr_lookup(): given a directory and filename,
                          return the vnode for the file.
    ufs_extattr_enable_with_open(): invoke ufs_extattr_enable()
                          after doing the equililent of vn_open()
                          on the passed file.
    ufs_extattr_iterate_directory(): iterate over a directory,
                          invoking ufs_extattr_lookup() and
                          ufs_extattr_enable_with_open() on each
                          entry.

o This feature is not widely tested, and therefore may contain
  bugs, caution is advised.  Several changes are in the pipeline
  for this feature, including breaking out of EA namespaces into
  subdirectories of .attribute (this is waiting on the updated
  EA API), as well as a per-filesystem flag indicating whether
  or not EAs should be auto-started.  This is required because
  administrators may not want .attribute auto-started on all
  file systems, especially if non-administrators have write access
  to the root of a file system.

Obtained from:	TrustedBSD Project
2001-03-14 05:32:31 +00:00
Matt Jacob
b0bd9b71f2 Clean up usage- ct_reserved is really ct_syshandle now. 2001-03-14 04:14:58 +00:00
Matt Jacob
f5a4462713 First cut of target mode swizzling for non-little endian machines.
It's probably wrong but it's a start.
2001-03-14 04:14:22 +00:00
Matt Jacob
75f7d77928 Mote that how the pad bytes can be divided in half and used by either
the target mode code or outer layers.

Increase cd_tagval to be 32 bits since it will have to now carry 16
bits of parallel SCSI ATIO handle as well as a normal tag (if any).
2001-03-14 04:13:30 +00:00
Matt Jacob
e2ec5cf0f9 In order to save ourselves grief with the SUNPRO compiler under
Solaris (which, for reasons unknown to me, chokes on u_int16_t
as a typedef of unsigned short if used in a transitional (mixed K&R
and ANSI) way), we'll go the extra mile and fully ANSIfy things.
2001-03-14 04:11:56 +00:00
Kenneth D. Merry
f8d98b3493 In xpt_set_transfer_settings(), force async if either the period or the
offset is set to 0.

Re-arrange the DT limiting code so that we don't end up setting the period
to 0xa if the user really wants async.  The previous behavior seemed to
confuse the aic(4) driver.

PR:		kern/22733
Reviewed by:	gibbs
2001-03-13 22:35:28 +00:00
Cameron Grant
9a1ec7ebfd fix a panic triggerable by anyone with read/write access to the audio
devices.  opening /dev/{dsp,dspW,audio}0 and then opening a different device
from that list and closing it resulted in a panic when any operation is
performed on the first fd.

we prevent this happening by denying the second open unless it uses the same
minor device as the first.

PR:		kern/25519
2001-03-13 18:43:22 +00:00
Ruslan Ermilov
206a3274ef RFC768 (UDP) requires that "if the computed checksum is zero, it
is transmitted as all ones".  This got broken after introduction
of delayed checksums as follows.  Some guys (including Jonathan)
think that it is allowed to transmit all ones in place of a zero
checksum for TCP the same way as for UDP.  (The discussion still
takes place on -net.)  Thus, the 0 -> 0xffff checksum fixup was
first moved from udp_output() (see udp_usrreq.c, 1.64 -> 1.65)
to in_cksum_skip() (see sys/i386/i386/in_cksum.c, 1.17 -> 1.18,
INVERT expression).  Besides that I disagree that it is valid for
TCP, there was no real problem until in_cksum.c,v 1.20, where the
in_cksum() was made just a special version of in_cksum_skip().
The side effect was that now every incoming IP datagram failed to
pass the checksum test (in_cksum() returned 0xffff when it should
actually return zero).  It was fixed next day in revision 1.21,
by removing the INVERT expression.  The latter also broke the
0 -> 0xffff fixup for UDP checksums.

Before this change:
: tcpdump: listening on lo0
: 127.0.0.1.33005 > 127.0.0.1.33006:  udp 0 (ttl 64, id 1)
:                          4500 001c 0001 0000 4011 7cce 7f00 0001
:                          7f00 0001 80ed 80ee 0008 0000

After this change:
: tcpdump: listening on lo0
: 127.0.0.1.33005 > 127.0.0.1.33006:  udp 0 (ttl 64, id 1)
:                          4500 001c 0001 0000 4011 7cce 7f00 0001
:                          7f00 0001 80ed 80ee 0008 ffff
2001-03-13 17:07:06 +00:00
John Baldwin
90010f94de - Sync up with stable by adding in the Netgraph and Sound module sections,
the agp module, and the accept filter modules.
- Remove an extraneous blank line.
2001-03-13 16:16:35 +00:00
Ruslan Ermilov
fb9aaba000 Count and show incoming UDP datagrams with no checksum. 2001-03-13 13:26:06 +00:00
Andrey A. Chernov
807ef2d03f Multiply empty lines pasted as single line, fix it 2001-03-13 10:23:01 +00:00
Poul-Henning Kamp
0c8834cea6 Fix a race condition in the transmit path caused by the controller
caching a bit more than we were told initially.

More statistics gathering as well.
2001-03-13 09:29:37 +00:00
Søren Schmidt
b417a1a8c8 Dont call device close and ioctl functions if device has disappeared.
Reviewed by: phk
2001-03-13 08:45:05 +00:00
Peter Wemm
02846353f9 Commit some tweaks I have had laying around my tree for over a year now.
Always set the APM "device" description.  Some minor style tweaks.
2001-03-13 05:56:48 +00:00
Peter Wemm
e793f3a0e0 By convention, the moduledata is static unless there is a reason for it
to not be.
2001-03-13 05:55:43 +00:00
Dag-Erling Smørgrav
df472ea4f3 Don't allow userland to use the RFHIGHPID flag. Its only purpose is to
reserve low pids for system daemons during boot.
2001-03-13 02:55:54 +00:00
Poul-Henning Kamp
503d3c0277 Correctly cleanup in case of failure to bind a pcb.
PR:		25751
Submitted by:	<unicorn@Forest.Od.UA>
2001-03-12 21:53:23 +00:00
Jonathan Lemon
4664a8d5eb Move the fxp driver so it is under the miibus section. 2001-03-12 21:51:07 +00:00
Jonathan Lemon
7cbbb1afee Adjust the fxp module to use the correct directory path, and add a
dependency on miibus.
2001-03-12 21:44:19 +00:00
Jonathan Lemon
68311a93fb Fix a whitespace bogon.
Pointed out by:  ps
2001-03-12 21:42:45 +00:00
Jonathan Lemon
fd272d4a6c Make the miibus'ified the new fxp driver for -current. 2001-03-12 21:41:29 +00:00
Jonathan Lemon
f7788e8e9f Convert the fxp driver to miibus, which involves ripping out the PHY
logic and media bits.  Support for Intel PHYs can now be found in
dev/mii/inphy.c.

Clean up the driver, and add various 82558 and 82559 specific bits.
2001-03-12 21:30:52 +00:00
Kris Kennaway
5ca7924a91 Use CPUTYPE to add appropriate compiler flags to COPTFLAGS for kernel
builds.  This may be disabled using the NO_CPU_COPTFLAGS variable.

Reviewed by:	arch
2001-03-12 07:47:09 +00:00
Assar Westerlund
e4b3e35ff0 change the default mode from adhoc to bss (infrastructure)
Reviewed by:	Brooks Davis <brooks@one-eyed-alien.net>
2001-03-12 06:13:39 +00:00
Assar Westerlund
fd1d7a8a15 change default from adhoc mode to BSS (infrastructure) 2001-03-12 04:49:50 +00:00
Jonathan Lemon
b47ed6cbf6 Eliminate global node types and instead use an operations vector for
each node in order to make it easier to add new entries.

Rewrite the internal directory structure so that it is possible to
have independent subdirectories.  Utilize this to add /proc/net/dev.

Reviewed by:  DES
2001-03-12 03:16:56 +00:00
Jonathan Lemon
1db24ffb98 Unbreak LINT.
Pointed out by: phk
2001-03-12 02:57:42 +00:00
Jonathan Lemon
da3badcd23 Add Intel 82553, 82555 PHY driver. 2001-03-12 02:45:06 +00:00
Jonathan Lemon
f3ce5250e9 Add the Intel PHY driver. 2001-03-12 02:43:03 +00:00
Jonathan Lemon
83a2d3997e Add drivers for Intel 82553 and 82555 PHYs. 2001-03-12 02:41:57 +00:00
Jonathan Lemon
c49993ab73 Regenerate. 2001-03-12 02:27:58 +00:00
Jonathan Lemon
5a3f7e2c9b Add some definitions for Intel 82553 PHYs 2001-03-12 02:27:10 +00:00
Andrey A. Chernov
74f62e12aa Don't require that mouse cursor must be visible before mouse paste.
Paste always happens to current _text_ cursor position independently of
mouse cursor position in any case and old variant force user to press
mouse paste button _two_ times if mouse cursor is invisible.
2001-03-12 01:15:11 +00:00
Andrey A. Chernov
86f7cedfda Update default keyboard (PREV, PASTE) 2001-03-12 00:00:22 +00:00
John Baldwin
0fb8828fe2 - Call fork1() directly instead of calling rfork() so that it doesn't mask
out RFSTOPPED.
- Lock the child process when settings p_sigparent instead of locking the
  parent.

Pointy-hat to:	me
2001-03-11 23:41:55 +00:00