Commit Graph

642 Commits

Author SHA1 Message Date
Robert Watson
8f0738756c Fix bde'isms in acl/extattr syscall interface, renaming syscalls to
prettier (?) names, adding some const's around here, et al.

Reviewed by:	bde
2000-01-19 06:07:34 +00:00
Boris Popov
1e77d7a17d Check if module was compiled without SMP support and running on
an SMP system.
2000-01-15 08:35:48 +00:00
Boris Popov
6cca21b14d Add VT_NWFS tag. 2000-01-15 08:28:03 +00:00
Bruce Evans
f9ad65b0f2 Forward declare some structs so that this header is more self-suifficent. 2000-01-14 19:54:42 +00:00
Bruce Evans
d3efeb2865 Use MALLOC_DECLARE when it is #defined, not when a (wrong) test of
__FreeBSD_version succeeds.
2000-01-14 19:47:07 +00:00
Poul-Henning Kamp
200988017c remove check now done in vn_isdisk(). 2000-01-10 12:24:36 +00:00
Poul-Henning Kamp
ba4ad1fcea Give vn_isdisk() a second argument where it can return a suitable errno.
Suggested by:	bde
2000-01-10 12:04:27 +00:00
Boris Popov
37713edc2d Treat negative uio_offset value as eof (idea by: bde).
Prevent overflows by casting uio_offset to uoff_t.
Return correct error number if directory entry is broken.

Reviewed by:	bde
2000-01-08 10:45:54 +00:00
Poul-Henning Kamp
e90d68c69c Return ENXIO if there is no device. 2000-01-02 15:16:17 +00:00
Boris Popov
70852092e8 Fix the mess with signed/unsigned longs and ints (inspired by bde).
Fix potential bug with directory reading.
Explicitly limit file size to 4GB (msdos can't handle larger files).
Slightly reorganize msdosfs_read() to reduce number of 'if's.
2000-01-02 03:30:42 +00:00
Peter Wemm
c447342094 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
Boris Popov
687fce0361 Avoid to write garbage if uiomove fails. 1999-12-28 16:14:54 +00:00
Boris Popov
dc22f85f34 Fix an overflow in the msdosfs_read() function which exposed on the files
with size > 2GB.

PR:		15639
Submitted by:	Tim Kientzle <kientzle@acm.org>
Reviewed by:	phk
1999-12-28 15:34:23 +00:00
Boris Popov
499d3ffa94 It is possible that number of sectors specified in the BPB
will exceed FAT capacity. This will lead to kernel panic while other
systems just limit number of clusters.

PR:		4381, 15136
Reviewed by:	phk
1999-12-28 15:27:39 +00:00
Peter Wemm
e0f9d2869a Fix typo "," vs ";"
PR:		15696
Submitted by:	Takashi Okumura <taka@cs.pitt.edu>
1999-12-27 16:03:38 +00:00
Chris Costello
1b900f573c Fix a typo that was doing something kind of silly, and that is initializing
the creation time for files to the uninitialized value:

	vap->va_ctime = vap->va_ctime;

Changed to what was intended, assigning it to the modification time (thus
making all three values of access time, modification time and creation time
the same thing).

Reviewed by:	grog
1999-12-21 06:29:00 +00:00
Eivind Eklund
a6b174a83b Include vm/vm_extern.h to get at prototypes 1999-12-20 18:26:58 +00:00
Robert Watson
91f37dcba1 Second pass commit to introduce new ACL and Extended Attribute system
calls, vnops, vfsops, both in /kern, and to individual file systems that
require a vfsop_ array entry.

Reviewed by:	eivind
1999-12-19 06:08:07 +00:00
Eivind Eklund
762e6b856c Introduce NDFREE (and remove VOP_ABORTOP) 1999-12-15 23:02:35 +00:00
Peter Wemm
fc6e400716 Fix pointer problem for the Alpha 1999-12-12 21:10:53 +00:00
Boris Popov
6f6da2f326 Bump local version number to 1.3.4. 1999-12-12 05:53:02 +00:00
Eivind Eklund
6bdfe06ad9 Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
  return value: LK_EXCLOTHER, when the lock is held exclusively by another
  process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
  locked/unlocked.

This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.

Discussed with:	grog, mch, peter, phk
Reviewed by:	peter
1999-12-11 16:13:02 +00:00
Peter Wemm
99b30c79b0 Don't simulate a pseudo address-space beyond VM_MAXUSER_ADDRESS that
maps onto the upages.  We used to use this extensively, particularly
for ps and gdb.  Both of these have been "fixed".  ps gets the p_stats
via eproc along with all the other stats, and gdb uses the regs, fpregs
etc files.

Once apon a time the UPAGES were mapped here, but that changed back
in January '96.  This essentially kills my revisions 1.16 and 1.17.
The 2-page "hole" above the stack can be reclaimed now.
1999-12-11 10:21:34 +00:00
Semen Ustimenko
daabca392e First version of HPFS stuff. 1999-12-09 19:10:13 +00:00
Poul-Henning Kamp
5ecdb702b0 Remove unused #includes.
Obtained from:	http://bogon.freebsd.dk/include
1999-12-08 08:59:40 +00:00
Søren Schmidt
cb2a8dffa0 Commit the kernel part of our DVD support. Nothing much to say really,
its just a number of new ioctl's, the rest is done in userland.
1999-12-07 22:25:28 +00:00
Semen Ustimenko
b17f083b0f Merged NetBSD version, as they have done improvements:
1. ntfs_read*attr*() functions now accept
	uio structure to eliminate one data copying.
	2. found and removed deadlock caused
	by 6 concurent ls -lR.
	3. started implementation of nromal
	Unicode<->unix recodeing.

Obtained from:	NetBSD
1999-12-03 20:37:40 +00:00
Kirk McKusick
e9cc475851 Collect read and write counts for filesystems. This new code
drops the counting in bwrite and puts it all in spec_strategy.
I did some tests and verified that the counts collected for writes
in spec_strategy is identical to the counts that we previously
collected in bwrite. We now also get read counts (async reads
come from requests for read-ahead blocks). Note that you need
to compile a new version of mount to get the read counts printed
out. The old mount binary is completely compatible, the only
reason to install a new mount is to get the read counts printed.

Submitted by:	Craig A Soules <soules+@andrew.cmu.edu>
Reviewed by:	Kirk McKusick <mckusick@mckusick.com>
1999-12-01 02:09:30 +00:00
Boris Popov
cb815af365 Remove abuse of struct nameidata.
Pointed by:	Eivind Eklund
1999-11-27 17:46:04 +00:00
Poul-Henning Kamp
a8704f8999 Add a sysctl to control if argv is disclosed to the world:
kern.ps_argsopen
It defaults to 1 which means that all users can see all argvs in ps(1).

Reviewed by:	Warner
1999-11-26 08:27:16 +00:00
Poul-Henning Kamp
a9e0361b4a Introduce the new function
p_trespass(struct proc *p1, struct proc *p2)
which returns zero or an errno depending on the legality of p1 trespassing
on p2.

Replace kern_sig.c:CANSIGNAL() with call to p_trespass() and one
extra signal related check.

Replace procfs.h:CHECKIO() macros with calls to p_trespass().

Only show command lines to process which can trespass on the target
process.
1999-11-21 19:03:20 +00:00
Boris Popov
4a22b7e60e Remove race condition under SMP.
Noted by:	Denis Kalinin <denis@mail.rbc.ru>
1999-11-21 16:35:29 +00:00
Poul-Henning Kamp
da654d9070 s/p_cred->pc_ucred/p_ucred/g 1999-11-21 12:38:21 +00:00
Sean Eric Fagan
13baacebcb A process should be able to examine itself. 1999-11-20 18:22:14 +00:00
Poul-Henning Kamp
0429e37ade struct mountlist and struct mount.mnt_list have no business being
a CIRCLEQ.  Change them to TAILQ_HEAD and TAILQ_ENTRY respectively.

This removes ugly  mp != (void*)&mountlist  comparisons.

Requested by:   phk
Submitted by:   Jake Burkholder jake@checker.org
PR:             14967
1999-11-20 10:00:46 +00:00
Peter Wemm
ac09d23cfa Fix an unused variable warning. 1999-11-18 09:07:30 +00:00
Peter Wemm
6224a63b8b Fix a warning. 1999-11-18 08:47:10 +00:00
Poul-Henning Kamp
6153cb2048 Make proc/*/cmdline use the cached argv if available.
Submitted by:   Paul Saab <paul@mu.org>
Reviewed by:    phk
1999-11-17 21:35:07 +00:00
Poul-Henning Kamp
3cf5d0fd07 The function `procfs_getattr()' in procfs doesn't set the value of
vap->va_fsid, so we cannot get valid information about procfs.

Submitted by:   SAWADA Mizuki miz@pa.aix.or.jp
Reviewed by:    phk
PR:     1654
1999-11-17 21:33:25 +00:00
Eivind Eklund
dd8c04f4c7 Remove WILLRELE from VOP_SYMLINK
Note: Previous commit to these files (except coda_vnops and devfs_vnops)
that claimed to remove WILLRELE from VOP_RENAME actually removed it from
VOP_MKNOD.
1999-11-13 20:58:17 +00:00
Eivind Eklund
edfe736df9 Remove WILLRELE from VOP_RENAME 1999-11-12 03:34:28 +00:00
Poul-Henning Kamp
698f9cf828 Next step in the device cleanup process.
Correctly lock vnodes when calling VOP_OPEN() from filesystem mount code.

Unify spec_open() for bdev and cdev cases.

Remove the disabled bdev specific read/write code.
1999-11-09 14:15:33 +00:00
Alan Cox
b561683329 Passing "0" or "FALSE" as the fourth argument to vm_fault is wrong. It
should be "VM_FAULT_NORMAL".
1999-11-09 01:44:28 +00:00
Poul-Henning Kamp
e89fecb4d8 remove a confusing and stale comment. 1999-11-08 13:52:57 +00:00
Poul-Henning Kamp
b454088b82 Oops, a bit too hasty there. 1999-11-08 13:08:02 +00:00
Poul-Henning Kamp
0ed43ec68c Various cleanups. 1999-11-08 09:59:34 +00:00
Sean Eric Fagan
75bd443641 Explain why Warner is right, and I am wrong, in the removing of the
file object.  Also explain some possible directions to re-implement it --
I'm not sure it should be, given the minimal application use.  (Other
than having the debugger automatically access the symbols for a process,
the main use I'd found was with some minor accounting ability, but _that_
depends on it being in the filesystem space; an ioctl access method would
be useless in that case.)

This is a code-less change; only a comment has been added.
1999-11-08 05:13:54 +00:00
Peter Wemm
1949905f8b Update for fileops.fo_stat() addition. Note, this would panic if
it saw a DTYPE_PIPE.  This isn't quite right but should stop a crash.
1999-11-08 03:36:29 +00:00
Poul-Henning Kamp
f7ee7bbb21 Use vop_panic() instead of spec_badop(). 1999-11-07 15:09:59 +00:00
Poul-Henning Kamp
be8479a836 Remove the iskmemdev() function. Make it the responsibility of the mem.c
drivers to enforce the securelevel checks.
1999-11-07 12:01:32 +00:00