Commit Graph

15398 Commits

Author SHA1 Message Date
wiz
e62237163a New sentence, new line. Bump date for previous. 2011-12-20 16:43:14 +00:00
reinoud
d131102a3b Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
calls from the mapped region. This can be used for emulation perposed or for
extra security in the case of generated code.

Its implemented by adding mapping-attributes to each uvm_map_entry. These can
then be queried when needed.

Currently the MAP_NOSYSCALLS is only implemented for x86 but other
architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
Port maintainers are encouraged to add them for their processor ports too.
When this feature is not yet implemented for an architecture the
MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..
2011-12-20 15:39:35 +00:00
riastradh
dade315727 Fix error reporting in puffs_framev_enqueue_waitevent and callers.
ok christos
2011-12-19 15:36:26 +00:00
apb
f93996848b Use mktime(3) instead of hand-coded equivalent.
Don't treat negative results as errors (we should be able
to handle years before 1970).

XXX: This still fails on 1969-12-31 23:59:59.
2011-12-17 19:14:10 +00:00
joerg
41a3b9d2d6 Request always_inline for rumpclient__dofork, it won't work correctly
for vfork otherwise. Also give it the returns twice attribute to ensure
that the stack tainting is done recursively.
2011-12-16 23:19:28 +00:00
drochner
cb4d5f3dcb support ECDSA keys used by recent ssh 2011-12-16 17:37:14 +00:00
drochner
2462eb040a disallow empty passphrases per default, and implement the "nullok"
option to allow it if the administator wishes, from FreeBSD
2011-12-16 17:35:09 +00:00
drochner
705315cdf8 -remove remainders of the misguided changes in revs 1.5-1.9
-iron out more unnecessary differences to FreeBSD
2011-12-16 17:30:12 +00:00
manu
ac705b5bee Do not tell about specific errno, as all xattr copying function
retuenrs error from extattr_list_file and extattr_get_file.
2011-12-16 15:21:13 +00:00
wiz
a107b19ebf Split extattr(3) into two man pages to get rid of ugly duplicate Nd.
Work done by Abhinav Upadhyay with minimal cleanup.
2011-12-16 12:46:00 +00:00
manu
71a2942b6b Rework puffs_framebuf management toremove leaks and abusive reuses. On
exchange error, the puffs_framebuf is now freed immediatly, before
requeuing outstanding requests.
2011-12-16 05:34:54 +00:00
njoly
973e485533 Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
2011-12-12 19:11:21 +00:00
joerg
a5a75c0cc8 Mark rumphijack_dlsym explicitly as weak to prevent optimisations based
on pointer (non-)identity of it and rumpclient__dlsym.
2011-12-12 16:53:53 +00:00
joerg
c7d626a65f Don't use K&R syntax 2011-12-12 15:21:32 +00:00
joerg
eb47f1619a Use a constant array for the MIB. Newer LLVM decided that mib[] warranted
stack protections, with the obvious crash after the setup was done.
As a positive side effect, code size shrinks a bit.
2011-12-08 02:27:14 +00:00
skrll
79fb68b068 Deal with __MACHINE_STACK_GROWS_UP machines.
constify the other psize while I'm here.

Thanks to Christos for looking.
2011-12-06 21:15:39 +00:00
wiz
6533efb150 Do not xref to itself. 2011-12-05 10:27:40 +00:00
jym
f3effc5ec2 Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
2011-12-04 21:08:37 +00:00
drochner
7babedb72c remove the option to build this against openssl - this hasn't been used
in the NetBSD build
since the libc version of MD5Final zeroes out the context, replace
the bzero introduced in the previous commit by comments telling that
2011-11-29 17:27:10 +00:00
drochner
487c0196f3 zero out hash context after use, to avoid traces in RAM
(hint from "Solar Designer")
2011-11-29 13:18:52 +00:00
drochner
fc3deeb5d7 fix minor typo 2011-11-29 13:17:04 +00:00
joerg
93a30e6d6f Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.
2011-11-28 12:44:18 +00:00
tls
f27d6532f5 Remove arc4random() and arc4randbytes() from the kernel API. Replace
arc4random() hacks in rump with stubs that call the host arc4random() to
get numbers that are hopefully actually random (arc4random() keyed with
stack junk is not).  This should fix some of the currently failing anita
tests -- we should no longer generate duplicate "random" MAC addresses in
the test environment.
2011-11-28 08:05:05 +00:00
manu
55557eb9ac - Add missing ENOENT or ESTALL when accessing deleted node
- Fix a warning, fix style (80 chars for a line)
2011-11-28 05:33:33 +00:00
christos
3552fa1ee9 - consistency with types
- prefer sizeof(*var)
2011-11-26 23:42:27 +00:00
rmind
fc9011aa1d Add _npf_config_setsubmit() function. 2011-11-26 23:11:19 +00:00
joerg
b05af17f87 If we have to cast, do it properly. 2011-11-25 17:48:22 +00:00
dholland
51d1d7e7c4 Rename struct ufs_quota_entry -> struct quotaval. 2011-11-25 16:55:05 +00:00
dholland
58632c2b81 Use CHAR_BIT; don't hardwire 8. Fix logic slightly to work with arbitrary
CHAR_BIT. Compiler output unchanged (on amd64).
2011-11-25 16:46:56 +00:00
manu
154cec5236 Rollback previous change as it breaks autmates tests 2011-11-25 15:02:02 +00:00
tron
de9ace2de1 Add explicit casts to make lint happy and fix the NetBSD/i386 build. 2011-11-25 09:00:51 +00:00
joerg
d22a7f54f9 In wcscspn and wcspbrk, handle set size of 0 and 1 explicitly.
For larger sets, use a bloom filter to avoid the inner loop for most of
the input. The current implementation uses a simple modular hash as
first function (well suited for input e.g. in ISO Latin character sets)
and a more complex multiplicative hash as second function with a filter
size of 512 Bit. This reduces the typical run time to O(n+m).
2011-11-24 18:44:25 +00:00
manu
bd5d68a6d1 Documentation fix
Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:59:25 +00:00
manu
77ac17e5c3 Remove files specified in pcn.
When remove files using name from pnode, another link on this file
can be unlinked. E.g. "touch 1; ln 1 2; rm 2" will remove file named
"1". Thus puffs_null_node_remove should remove directory entry which
name is provided by pcn (as said in puffs_ops.3). Caller should
provide appropriately initialized pcn.

From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:58:52 +00:00
manu
a1beaff4aa Set eofflag in puffs_fuse_node_readdir() from librefuse.
From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:56:22 +00:00
manu
c068d4996c Remove pnode of overwritten file.
When puffs_null_node_rename() overwrites existing file, its pnode
must be removed, because src pnode already represents this file.

From Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:55:33 +00:00
joerg
6133e96c53 Add TLS support for m68k. 2011-11-22 15:25:28 +00:00
joerg
64680c6b13 Handle simple cases (strlen(charset) <= 1) more efficiently. 2011-11-22 00:37:09 +00:00
chs
452fee2663 gcc 4.5 on vax creates PLT stubs with an entry mask of 0xffc
rather than 0 like gcc 4.1 did, so the sneaky assembly functions
that "ret" without really returning now clobber their registers.
adjust these functions to avoid this problem.
2011-11-21 16:17:48 +00:00
joerg
7e173c1846 Clean up a bit in preparation for more serious changes 2011-11-21 15:02:48 +00:00
mlelstv
86bf846403 one more error path that didn't free a lock. 2011-11-21 09:46:19 +00:00
dholland
c60360c18d Reshuffle decls among the quota headers so everything is in the place
it should be:
   - stuff for the proplib interface goes in <quota/quotaprop.h>
   - stuff for userlevel only goes in <quota/quota.h>
   - stuff shared between user and kernel goes in <sys/quota.h>

Note that <quota/quota.h> and <quota/quotaprop.h> are expected to be
moved or removed later on... one thing at a time.

Update include directives in other files as needed.
2011-11-20 21:43:34 +00:00
tnozaki
1c5f19ca24 add comment about r1.6 -> r1.7 change. 2011-11-20 07:43:52 +00:00
tnozaki
7119b42a87 fix memory leak, pointed by nonaka-san(again^3). 2011-11-19 18:48:39 +00:00
tnozaki
c0a2d6e78c remove useless free(), pointed by nonaka-san(again^2). 2011-11-19 18:43:40 +00:00
tnozaki
25c06e6322 return EINVAL when module validation failed, pointed by nonaka-san(again). 2011-11-19 18:34:21 +00:00
tnozaki
a750734d28 remove unused variable, pointed by nonaka-san, thanks. 2011-11-19 18:20:13 +00:00
christos
13f82b913b document MNT_RELATIME 2011-11-18 21:04:21 +00:00
joerg
d7796dcc07 Exploit hidden __cerror 2011-11-18 20:43:01 +00:00
christos
ae5295ee5d Add coverity annotations about unreachable code (Kamil Dudka) 2011-11-18 20:39:18 +00:00