Commit Graph

86723 Commits

Author SHA1 Message Date
Johan Karlsson
6fb6bfcbad Remove unused variable to make badsect WARNS=2 clean. 2003-02-22 21:33:42 +00:00
Dave Zarzycki
a23c6aee4d Apple PR-2449102: getdomainname() doesn't document that it is NIS/YP specific 2003-02-22 19:02:23 +00:00
Johan Karlsson
484251e7c4 Use strlcpy instead of strncpy.
Submitted by:	imp
Reviewed by:	silence on -audit
2003-02-22 18:08:34 +00:00
Robert Watson
90623e1a9e Don't panic when enumerating SYSCTL_NODE() nodes without any children
nodes.

Submitted by:	green, Hiten Pandya <hiten@unixdaemons.com>
2003-02-22 17:58:06 +00:00
Bosko Milekic
fd18f292bd Make xl use m_getcl() to allocate an mbuf and a cluster in one shot,
as opposed to one after the other.  This is faster in both -CURRENT
and -STABLE.  Additionally, there is less code duplication for
error-checking.

One thing to note is that this code seems to return(1) when no buffers
are available; perhaps ENOBUFS should be the correct return value?

Partially submitted & tested by: Hiten Pandya <hiten@unixdaemons.com>
MFC after: 1 week
2003-02-22 14:46:31 +00:00
Poul-Henning Kamp
4209510904 It is pretty evident that nobody loves this file anymore, so retire it
to the Attic from where it can be picked up again, should it ever again
become fashionable to run an alpha simulator.
2003-02-22 13:52:38 +00:00
Christian Brueffer
81c4ddbf5e Packages have been in .tbz format for some time now, thus s/tgz/tbz/
X-MFC after:	re-approval
2003-02-22 11:57:09 +00:00
Poul-Henning Kamp
d9af634109 Use DISKFLAG_OPEN rather than maintaining our own flag.
Use nullclose() rather than now empty twed_close().
2003-02-22 10:42:21 +00:00
Poul-Henning Kamp
89f8bb39da Use nullclose(), not noclose(). 2003-02-22 10:40:36 +00:00
Poul-Henning Kamp
1c7d84ed3c Don't use mbuf allocator flags for malloc(9). 2003-02-22 10:35:37 +00:00
Poul-Henning Kamp
3eb309c55e Use the standard DISKFLAG_OPEN instead of implementing our own.
Use noclose() instead now that our close method is empty.
2003-02-22 10:10:12 +00:00
Poul-Henning Kamp
3512c1b386 Use system noioctl() instead of homerolled. 2003-02-22 10:02:05 +00:00
Poul-Henning Kamp
c3dbde2864 NO_GEOM cleanup: unifdef -UNO_GEOM 2003-02-22 09:36:40 +00:00
Poul-Henning Kamp
d0083ea9ce NO_GEOM cleanup:
Move to "struct disk *" centric use of disk_* API.

Remove NOOP ioctl, spl*() and some debug printfs.
2003-02-22 09:32:57 +00:00
Mike Silbersack
375386e284 Add the ability to limit the number of IP fragments allowed per packet,
and enable it by default, with a limit of 16.

At the same time, tweak maxfragpackets downward so that in the worst
possible case, IP reassembly can use only 1/2 of all mbuf clusters.

MFC after: 	3 days
Reviewed by:	hsu
Liked by:	bmah
2003-02-22 06:41:47 +00:00
Mike Makonnen
750a91d8b1 Remove a comment which hasn't been true since rev. 1.158
Approved by:	jhb, markm (mentor)(implicit)
2003-02-22 05:59:48 +00:00
Robert Watson
838a6d03e8 Export the name of the device used to mount the root file system as
kern.rootdev.  If rootdev is undefined (NFS mount, etc), export an
empty string.

Desired by:	peter
2003-02-22 05:01:12 +00:00
Kirk McKusick
5bb651cb72 This patch fixes a deadlock between the bufdaemon and a process taking
a snapshot. As part of taking a snapshot of a filesystem, the kernel
builds up a list of the filesystem metadata (such as the cylinder
group bitmaps) that are contained in the snapshot. When doing a
copy-on-write check, the list is first consulted. If the block being
written is found on the list, then the full snapshot lookup can be
avoided. Besides providing an important performance speedup this
check also avoids a potential deadlock between the code creating
the snapshot and the bufdaemon trying to cleanup snapshot related
buffers. This fix creates a temporary list containing the key
metadata blocks that can cause the deadlock. This temporary list
is used between the time that the snapshot is first enabled and the
time that the fully complete list is built.

Reported by:	Attila Nagy <bra@fsn.hu>
Sponsored by:   DARPA & NAI Labs.
2003-02-22 00:59:34 +00:00
Kirk McKusick
37e2ebfdba This patch fixes a bug on an active filesystem on which a snapshot
is being taken from panicing with either "freeing free block" or
"freeing free inode". The problem arises when the snapshot code
is scanning the filesystem looking for inodes with a reference
count of zero (e.g., unlinked but still open) so that it can
expunge them from its view. If it encounters a reclaimed vnode
and has to restart its scan, then it will panic if it encounters
and tries to free an inode that it has already processed. The fix
is to check each candidate inode to see if it has already been
processed before trying to delete it from the snapshot image.

Sponsored by:   DARPA & NAI Labs.
2003-02-22 00:29:51 +00:00
Kirk McKusick
d60682c239 This patch fixes a bug in the logical block calculation macros so
that they convert to 64-bit values before shifting rather than
afterwards. Once fixed, they can be used rather than inline expanded.

Sponsored by:   DARPA & NAI Labs.
2003-02-22 00:19:26 +00:00
Tim J. Robbins
60bf07bd33 Fix a bad free() call that would occur if some #if 0'd code was used. 2003-02-22 00:06:05 +00:00
Bruce A. Mah
c8536c503e Add a variety of new devices culled from recent (?) commits, affecting
the ata(4), asr(4), aac(4), trm(4), and vr(4) drivers.
2003-02-21 23:36:00 +00:00
Bruce A. Mah
c2d1d1eda7 New release notes: i386 HTT (+MFC) [1], privileged port sysctls,
ata(4) has more SiS support, cd(4) update, rand(3) bugfix [2],
srandom(3) better seeding [2], sysinstall(8) can install XFree86
components again.

Clues provided by:	jhb [1], kris [2]
2003-02-21 23:34:41 +00:00
Poul-Henning Kamp
ad3467e1fc NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"
as "this" handle.
2003-02-21 23:25:43 +00:00
Poul-Henning Kamp
d25ecb917b - m = m_gethdr(M_NOWAIT, MT_HEADER);
+       m = m_gethdr(M_DONTWAIT, MT_HEADER);

'nuff said.
2003-02-21 23:17:12 +00:00
Ruslan Ermilov
e20f30f755 Allow for boolean make options (``makeoptions NO_MODULES'').
Fixed the potential bug in rmopt().
2003-02-21 23:17:00 +00:00
Bosko Milekic
acc769b2ec Nuke EPIC_MGETCLUSTER entirely. Since 1.60 we don't use it anymore and
instead use our optimized m_getcl().

Submitted by: Hiten Pandya <hiten@unixdaemons.com>
MFC After: 1 week
2003-02-21 23:12:32 +00:00
Ruslan Ermilov
dba36bb912 Fixed synopsis.
Mention that md(4) should be active (from release(7)).
Yet, this has nothing to do with bsd.prog.mk.
2003-02-21 22:37:18 +00:00
Peter Wemm
86bb731626 Missing M_TRYWAIT from so_upcall third argument. 2003-02-21 22:23:40 +00:00
Crist J. Clark
718b17bb6a Document the net.inet.ip.portrange.reserved{high,low} sysctl knobs
added in sys/netinet/in_pcb.c 1.120.

Prodded by:	ru
2003-02-21 21:09:35 +00:00
Hiroki Sato
d27daa276e Merge the following from the English version:
1.496 -> 1.500	relnotes/common/new.sgml
2003-02-21 21:06:28 +00:00
David Schultz
36a15bd526 Let everyone know when to send the gifts.
Reviewed by:	mike (mentor)
2003-02-21 19:25:39 +00:00
Thomas Quinot
f3a9f7841a Hostname specifications must allow commas in the value. They are
used to separate multiple host names.

Noted by:	Dan Nelson <dnelson@allantgroup.com>
Reviewed by:	roberto
2003-02-21 19:02:31 +00:00
Poul-Henning Kamp
2c6b49f6af NO_GEOM cleanup:
Retire the "d_dump_t" and use the "dumper_t" type instead.

Dumper_t takes a void * as first arg which is more general than the
dev_t taken by d_dump_t.  (Remember: we could have net-dumpers if
somebody wrote us one!)

Define the convention for GEOM controlled disk devices to be that the
first argument to the dumper function is the struct disk pointer.

Change device drivers accordingly.
2003-02-21 19:00:48 +00:00
Makoto Matsushita
a9f39f60e0 Push UFS_ACL back for i386. We have 11kbytes of free space on kern.flp.
If we have no UFS_ACL kernel, users who already uses UFS1/2 attributes
get confused since no access control is performed for an update install.

Still, pc98 and alpha doesn't have UFS_ACL since I don't know about them.

Nyan-san, if kern.flp on tatsu has enough spaces (4k or more spaces),
please back UFS_ACL for pc98 also.

Data collected from: 5.0-CURRENT-20030221-JPSNAP on snapshots.jp.FreeBSD.org
2003-02-21 18:07:24 +00:00
Bosko Milekic
812c95c8f3 Some style fixes.
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-02-21 16:24:49 +00:00
Poul-Henning Kamp
b82ff75854 NO_GEOM cleanup:
Change the argument to disk_destroy() to be the same struct disk * as
disk_create() takes.

This enables drivers to ignore the (now) bogus dev_t which disk_create()
returns.
2003-02-21 15:13:26 +00:00
Alexey Zelkin
e859833529 Mention that dlerror() is also applicable to retrieve error message after
dladdr() and dlinfo() functions calls.
2003-02-21 13:43:41 +00:00
Ruslan Ermilov
9a9c78bd69 Respect ``makeoptions NO_MODULES'' specified in the kernel config file. 2003-02-21 11:19:25 +00:00
Ruslan Ermilov
73b893a720 Overhaul the targets and hope this is now much more readable.
This adds some orthodox kernel-* and modules-* targets and
retires harmful ``clobber''.

Now, do we really want to keep the ``modules'' target here?
2003-02-21 11:02:49 +00:00
Doug Barton
f2883df60d Don't try to deal with vi.recover if the directory doesn't exist
PR:		conf/24515
Submitted by:	Jeroen C. van Gelderen <jeroen@systemics.com>
2003-02-21 09:37:20 +00:00
Tim J. Robbins
ca78e3fb20 Remove "sleeper" nonsense. 2003-02-21 08:46:44 +00:00
Dag-Erling Smørgrav
249834de3d Don't omit --update on 9ball. 2003-02-21 07:33:41 +00:00
David Xu
34ada4b3bb If UTS kernel is calling kse_wakeup for itself, do nothing. 2003-02-21 07:11:38 +00:00
Kenneth D. Merry
56eac725a3 Fix ATAPI/USB/Firewire CDROM drive handling in cd(4) and hopefully fix
a number of related problems along the way.

 - Automatically detect CDROM drives that can't handle 6 byte mode
   sense and mode select, and adjust our command size accordingly.
   We have to handle this in the cd(4) driver (where the buffers are
   allocated), since the parameter list length is different for the
   6 and 10 byte mode sense commands.

 - Remove MODE_SENSE and MODE_SELECT translation removed in ATAPICAM
   and in the umass(4) driver, since there's no way for that to work
   properly.

 - Add a quirk entry for CDROM drives that just hang when they get a 6
   byte mode sense or mode select.  The reason for the quirk must be
   documented in a PR, and all quirks must be approved by
   ken@FreeBSD.org.  This is to make sure that we fully understand why
   each quirk is needed.  Once the CAM_NEW_TRAN_CODE is finished, we
   should be able to remove any such quirks, since we'll know what
   protocol the drive speaks (SCSI, ATAPI, etc.) and therefore whether
   we should use 6 or 10 byte mode sense/select commands.

 - Change the way the da(4) handles the no_6_byte sysctl.  There is
   now a per-drive sysctl to set the minimum command size for that
   particular disk.  (Since you could have multiple disks with
   multiple requirements in one system.)

 - Loader tunable support for all the sysctls in the da(4) and cd(4)
   drivers.

 - Add a CDIOCCLOSE ioctl for cd(4) (bde pointed this out a long
   time ago).

 - Add a media validation routine (cdcheckmedia()) to the cd(4)
   driver, to fix some problems bde pointed out a long time ago.  We
   now allow open() to succeed no matter what, but if we don't detect
   valid media, the user can only issue CDIOCCLOSE or CDIOCEJECT
   ioctls.

 - The media validation routine also reads the table of contents off
   the drive.  We use the table of contents to implement the
   CDIOCPLAYTRACKS ioctl using the PLAY AUDIO MSF command.  The
   PLAY AUDIO TRACK INDEX command that we previously used was
   deprecated after SCSI-2.  It works in every SCSI CDROM I've tried,
   but doesn't seem to work on ATAPI CDROM drives.  We still use the
   play audio track index command if we don't have a valid TOC, but
   I suppose it'll fail anyway in that case.

 - Add _len() versions of scsi_mode_sense() and scsi_mode_select() so
   that we can specify the minimum command length.

 - Fix a couple of formatting problems in the sense printing code.

MFC after: 	4 weeks
2003-02-21 06:19:38 +00:00
Crist J. Clark
b0d226932e The ancient and outdated concept of "privileged ports" in UNIX-type
OSes has probably caused more problems than it ever solved. Allow the
user to retire the old behavior by specifying their own privileged
range with,

  net.inet.ip.portrange.reservedhigh  default = IPPORT_RESERVED - 1
  net.inet.ip.portrange.reservedlo    default = 0

Now you can run that webserver without ever needing root at all. Or
just imagine, an ftpd that can really drop privileges, rather than
just set the euid, and still do PORT data transfers from 20/tcp.

Two edge cases to note,

  # sysctl net.inet.ip.portrange.reservedhigh=0

Opens all ports to everyone, and,

  # sysctl net.inet.ip.portrange.reservedhigh=65535

Locks all network activity to root only (which could actually have
been achieved before with ipfw(8), but is somewhat more
complicated).

For those who stick to the old religion that 0-1023 belong to root and
root alone, don't touch the knobs (or even lock them by raising
securelevel(8)), and nothing changes.
2003-02-21 05:28:27 +00:00
David E. O'Brien
0bc8118778 Some things don't build for PowerPC yet.
List from:	benno
2003-02-21 02:30:51 +00:00
Hidetoshi Shimokawa
41dc7a9831 Oops, forgot to put back debug level. 2003-02-21 02:27:13 +00:00
David E. O'Brien
4f53948a1a Don't try to build devd when NO_CXX is set. 2003-02-21 02:16:35 +00:00
Hidetoshi Shimokawa
559dfd9b55 remove unused code. 2003-02-21 02:14:00 +00:00