Commit Graph

3092 Commits

Author SHA1 Message Date
christos
48c5746230 Don't play stupid pet tricks with alignments and simplify the code not
to allocate/copy.
2012-10-22 04:35:17 +00:00
christos
83ff0d3d9d missed a const commit 2012-10-22 01:21:57 +00:00
christos
2f6d4dae96 - fix alignment issues in ipmon
- protoize ipmon.c, use void *, size_t instead of char *, int.
2012-10-21 22:57:48 +00:00
riastradh
d9310ec72a Use 0 for MS_NOMNTTAB since we have no mnttab anyway. 2012-10-20 22:11:38 +00:00
joerg
fdd8614af9 Hack to avoid missing macro to unbuild the tree. 2012-10-20 11:37:37 +00:00
riastradh
0041a2c6fe Let's try that again without the static... 2012-10-19 22:19:15 +00:00
riastradh
e75d983bfe Add omitted secpolicy_vnode_utime_modify, for zfs. 2012-10-19 19:58:33 +00:00
riastradh
4797828821 Back out accidental commit of errno kludge for rmdir(".") &c.
Solaris returns EEXIST, whereas we want to return ENOTEMPTY (POSIX
allows both), but this got included in an unrelated commit and should
be separated into a common commit for other related error code fixes.
2012-10-18 14:29:44 +00:00
riastradh
2111fc7126 Take a first whack at making zfs permissions work.
zfs_access uses secpolicy_vnode_access, so it makes no sense for the
latter to call VOP_ACCESS!

Everything seems to return EACCES instead of EPERM, probably because
that's what kauth returns.  This should be fixed, but that may
require some nontrivial surgery to zfs's calls to secpolicy_*, which
is where kauth gets involved.

This commit imports some code from illumos to implement the routine
secpolicy_vnode_setattr.  This shouldn't be outside dist/, but for
now it is expedient to do so.  We ought to fix that, along with all
the other CDDL code outside dist/, when we next import a newer
version of zfs.
2012-10-18 14:22:57 +00:00
riastradh
8e972045d7 Restore _PC_NO_TRUNC in zfs_netbsd_pathconf.
Accidentally clobbered it in a previous commit while moving patches
around between source trees -- oops.
2012-10-16 00:04:15 +00:00
riastradh
6d6cb07bff Fail lookup of .. in a deleted directory with ENOENT.
Don't try to zget the parent, whose znode id may have been recycled
by now.

It's not clear to me how Solaris avoids this, but maybe I'm just
missing something obvious.
2012-10-15 23:51:11 +00:00
riastradh
1baf22d09c Fix various issues in zfs life cycle, locking, and vop protocol.
- Restore some zfs locking and unlocking that got lost randomly.

- Enable use of the BSD vnode lock.  Lock order: all BSD vnode locks
are taken before all zfs internal locks.  There remains an issue with
O_EXCL, to be solved later (famous last words).  KASSERT the locking
scheme up the wazoo.

- Take our cruft out of zfs_lookup and move it to zfs_netbsd_lookup.
Restore much of the way zfs_lookup looked to make merging future
versions easier.  Disable use of the namecache for now because its
locking dance is too scary to contemplate.

- Implement BSD semantics for rename, to appease our tests.  This is
a provisional kludge; eventually we need VOP_RENAME to take a flag
specifying whether to use BSD semantics or POSIX semantics.

- Simplify zfs_netbsd_reclaim and make it work.  Now that getnewvnode
never tries to vclean anything itself, we need not worry about
recursion of ZFS_OBJ_MUTEX locks.

- Clarify and fix genfs node initialization and destruction.

zfs passes most of our atf vfs tests now, including the rename races.

Still to do:

- fix the impedance mismatch between our permissions model and zfs's;
- fix O_EXCL (nontrivial);
- throw dirconc at it and see how badly it explodes;
- find why zpool sometimes wedges itself during mkfs; and
- find why pool caches sometimes seem to get corrupted.
2012-10-15 23:08:19 +00:00
riastradh
1b44cf7c91 secpolicy_vnode_access must be called with the vnode lock held.
Don't unlock the vnode and then tell the caller about what the world
was like while the vnode was locked.  The world changes fast.
2012-10-15 22:50:25 +00:00
riastradh
2ea30100de Simplify zfs dirlock reference counting.
No need to pass dzp around; dl has a pointer to it.
2012-10-15 22:43:50 +00:00
riastradh
b2ba8fafaa Do reference counting for zfs range lock waiters.
Avoid cv_broadcast(&cv); cv_destroy(&cv); which works in Solaris only
by abuse of the condvar abstraction.

There are parts of this code that should be factored into smaller
subroutines, mainly range lock allocation and initialization, but
that would make it harder to merge newer versions of zfs, so for now
I've just expanded those parts further in-line.
2012-10-15 14:15:59 +00:00
riastradh
f1e3330bc7 Do reference counting for zfs dirlock waiters.
Solaris relies on cv_broadcast(&cv); cv_destroy(&cv) working, but
that hoses our cv_wait, which needs to continue using cv after it is
woken.  Solaris's idiom is an abuse of the condvar abstraction, but
we can get the same effect with reference counting.
2012-10-15 14:03:06 +00:00
msaitoh
237b58e244 Remove OLD manunal to install correct manual. 2012-10-12 18:41:59 +00:00
njoly
172b16130f No need to include files more than once. 2012-10-11 08:01:23 +00:00
christos
5d98f59f2d Apply P4:
3383.  [security]      A certain combination of records in the RBT could
                       cause named to hang while populating the additional
                       section of a response. [RT #31090]
2012-10-09 22:55:39 +00:00
christos
5d936c3691 EXP-TLS server: Fix TLS Message Length validation:
http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;\
    h=586c446e0ff42ae00315b014924ec669023bd8de

http://www.pre-cert.de/advisories/PRE-SA-2012-07.txt
2012-10-08 14:03:09 +00:00
jkoshy
e64c806987 Style fix: keep lists of names sorted.
Reviewed by:	christos
2012-10-08 01:45:11 +00:00
christos
b8fa3219d0 merge v1.0 2012-10-08 00:03:20 +00:00
christos
111b9fd8ca from hostap.epitest.fi 2012-10-07 23:46:57 +00:00
joerg
5af64d5574 PR 46978: ICE on spilling MMX registers
GCC/i386 has code to lower the required alignment for long long to 32bit
as the CPU doesn't need more. It is also using the same mode for setting
up the MMX registers and in turn, the stack slots reserved for spilling
require 32bit alignment. The actual vector types used keep the original
64bit alignment, so when the compiler wants to spill a MMX register, it
hits an assertion. Fix this by using the vector type as raw type for MMX
registers.
2012-10-06 14:10:46 +00:00
christos
fda8fa0063 - add more debugging
- don't return memory we did not allocate, which the caller will then free!
2012-10-03 22:28:20 +00:00
gsutre
544994c48c Enable GLX DRI2 support. 2012-10-03 21:50:14 +00:00
njoly
6b1609c666 Add _PC_NO_TRUNC support in zfs_netbsd_pathconf(). 2012-10-01 18:19:18 +00:00
mlelstv
82d607b6ed Treat LUNs as 64bit numbers that they are.
Don't use broken 48bit accesses for ISID either.

This fixes the LUN ghosting problem on big-endian systems.

LUN handling is still incorrect because it assumes a LUN value < 256
and doesn't parse the 64bit LUN for extended formats.
2012-09-29 07:18:21 +00:00
joerg
fa51ffa63a now sense -> no sense 2012-09-26 23:27:34 +00:00
matt
04774ae728 This needs to have an #else clause 2012-09-26 05:57:45 +00:00
matt
40f28e9944 Fix _SOFT_FLOAT_ -> _SOFT_FLOAT 2012-09-26 05:38:29 +00:00
taca
c6e31784a4 Fix setsockopt(2) error on 64bit environment (amd64).
Reported by PR lib/46693 by me and OK'ed by dholland@.
2012-09-24 14:17:56 +00:00
joerg
2b3d1ee8a7 Update LLVM/Clang snapshot to r164464. This adopts the GCC options for
the SSP parameters and a not-yet-default rewrite of SROA.
2012-09-23 17:22:22 +00:00
martin
b5a8984a94 Define ISCSI_HTONLL6 and ISCSI_NTOHLL6 (6 byte network byte order accessor
macros) dependend on host endianess.
Spotted by mhitch, unfortunately not enough to fix iscsi-target problems
on sparc64.
2012-09-19 08:42:52 +00:00
mrg
e8ae3e9a41 regen mknative files for GCC 4.5.4.
XXX: earm didn't build.
2012-09-18 19:45:46 +00:00
mrg
2c3eff6b3a regen mknative files for GCC 4.5.4. 2012-09-18 08:13:03 +00:00
mrg
67b559efa6 regen mknative files for GCC 4.5.4. 2012-09-18 07:44:34 +00:00
skrll
9378dd0cd5 Update for gcc 4.5.4 2012-09-18 07:05:15 +00:00
skrll
7ae732f19e Resolve conflicts. 2012-09-18 07:04:39 +00:00
skrll
a9d89c3b8a Import of gcc 4.5.4. The (possibly incomplete) list of fixed bugs is
50617 [4.5/4.6/4.7 Regression] ICE: RTL flag check: INSN_ANNULLED_BRANCH_P used with unexpected rtx code 'simplify_immed_subreg' in output_bb, at config/pa/pa.c:6631
  45383 [4.5 Regression] Implicit conversion to pointer does no longer automatically generate operator== and operator!=.
  45606 [4.5 Regression] match a method prototyped a typedef alias with the original type (using stdlib)
  47398 [4.5 Regression] tree check: accessed elt 10 of tree_vec with 9 elts in tsubst, at cp/pt.c:10500
  49951 [4.5/4.6/4.7 Regression] Debug stepping behavior regarding g++ Class destructor has changed for the worse starting at gcc 4.5.0
  43190 [4.4 Regression] Used pointer typedefs eliminated from debug info
  43866 [4.4 Regression] wrong code with -fbounds-check -funswitch-loops
  43897 [4.4 Regression] IA-64 asm clobbers are ignored
  44777 [4.4 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
  46985 [4.5 Regression] ICE: SIGSEGV in is_gimple_min_invariant (gimple.c:2742) with -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre
  47780 [4.5 Regression] -fcompare-debug failure with -O -fgcse -fgcse-las -fstack-protector-all
  47858 [4.5/4.6/4.7 Regression] IPA-SRA decreases quality of debug info
  47903 [4.5 Regression] var-tracking.c: valgrind error
  48685 [4.5 Regression] ICE in gimplify_expr, at gimplify.c:7034
  52139 [4.5 Regression] ICE: in remove_insn, at emit-rtl.c:3960 with -O -fPIC -fno-tree-dominator-opts -fno-tree-fre
  48046 [4.5 Regression] Expected diagnostic "reference to 'type' is ambiguous" not given for function-local static declaration
  51406 [4.5/4.6/4.7 Regression][c++0x] Incorrect result of static_cast to rvalue reference to base class.
  43949 [4.4 Regression] bogus warning: array subscript is above array bounds
  45982 [4.4 Regression] PTA does not track integers
  48172 [4.5 Regression] incorrect vectorization of loop in GCC 4.5.* with -O3
  49115 [4.5 Regression] invalid return value optimization (?) when exception is thrown and caught
  49279 [4.5 Regression] Optimization incorrectly presuming constant variable inside loop in g++ 4.5 and 4.6 with -O2 and -O3 for x86_64 targets
  50189 [4.5 Regression] Wrong code error in -O2 [-fstrict-enums] compile, target independent
  48660 [4.5/4.6 Regression] ARM ICE in expand_expr_real_1
  23656 Cross-compilation with newlib fails in libiberty
  37985 [4.5/4.6/4.7/4.8 Regression] unsigned char shift lacks "statement with no effect" warning
  38292 [4.5/4.6/4.7/4.8 Regression] corrupted profile info with -O[23] -fprofile-use
  40778 [4.5 Regression] Mudflap instrumentation missing in cloned function.
  40992 [4.4 Regression] cunroll ignoring asm size
  48306 [4.4 Regression] presence of gcc subdir with . in PATH causes breakdown
  49651 [4.4 Regression] nested lambdas and -O3 produced incorrect integer variable increments
  52223 [4.5/4.6 Regression] libffi's man page install breaks with multilibs and overridden mandir
  53418 [4.5 Regression] ICE at gimplify.c:7773
  53138 [4.7 Regression] spaceship operator miscompiled
  50091 [4.5/4.6/4.7 Regression] -fstack-check generates wrong assembly
  50979 architecture mismatch: "mul32" not enabled for "smul" or "umul"
  51187 miscompilation of genrecog.c at -O2 for --target=avr
  52717 thunk referenced in discarded section when building samba with -flto
  48742 [4.5 Regression] Internal error in gimplify_expr
  49120 [4.5 Regression] bogus "value computed is not used" warning (variable-length array in compound statement)
  49161 [4.5 Regression] Fix VRP on switch stmts
  49619 [4.5 Regression] ICE in simplify_subreg, at simplify-rtx.c:5362
  49621 [4.5 regression] ICE in trunc_int_for_mode, at explow.c:57
  49644 [4.5 Regression] post-increment of promoted operand is incorrect.
  51767 [4.5 Regression] ICE with degenerated asm goto
  51768 [4.5 Regression] ICE with invalid asm goto
  52736 [4.5/4.6/4.7/4.8 Regression] miscompilation: store to aliased __m128d is 8 Bytes off
  49440 [4.6 regression] Invalid dynamic_cast for unnamed namespace
  50565 [4.5/4.6/4.7 Regression] initializer element is not computable at load time
  52294 [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
  41159 [LTO] ICE in insert_value_copy_on_edge, at tree-outof-ssa.c:225
  48822 [4.5 Regression] G++ gets stucks and never finishes compilation when enabling -O2/3 optimization options.
  50162 [4.5 Regression] Wrong vectorization
  49381 Unresolved symbols in libgcjgc.a when linking gctest
  45786 [4.5 Regression] Relational operators .eq. and == are not recognized as equivalent
  48708 Invalid V2DI vector set insn generated
  50464 Using -Ofast -march=bdver1 results in internal compiler error: in extract_insn, at recog.c:2109
  51821 [4.5/4.6/4.7 Regression] 64bit > 32bit conversion produces incorrect results with optimizations
  52698 -maddress-mode=long doesn't work
  53228 [4.6/4.7/4.8 Regression] target attributes in libcpp/lex.c cause illegal instructions to be used elsewhere
  42082 [C++0x] ICE on probably invalid with "canonical types differ for identical types"
  42652 vectorizer created unaligned vector insns
  42856 [4.4 Regression] FAIL: gcc.dg/torture/pr41555.c -O0 (test for excess errors)
  47733 psignal (int, const? char*) in libiberty/strsignal.h
  48743 -march=native mis-detects AMD K6-2+ / K6-3 as Athlon - compiled C fails with "illegal instruction"
  49038 [4.5/4.6/4.7 Regression] -ftree-vectorise introduces reads past end of array
  49448 arm-tab-linux-gnu-eabi enableds big endian when it should not
  49461 boehm-gc and gcj incompatible with pie
  50875 O3 and -mavx lead to internal compiler error: in find_reloads
  51161 [C++0x] Illegal static_cast to rvalue reference to ambiguous base class
  51393 Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  51444 [4.4 Regression]: Spurious "is used uninitialized" warning for structure with bitfields
  51835 ARM EABI violation when passing arguments to helper floating functions like __aeabi_d2iz
  52894 [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  53310 [4.5/4.6/4.7/4.8 Regression] EOSHIFT leaks memory
  53744 gcov version oscillates between 407* and 407p on branches
  52335 [4.4/4.5/4.6/4.7 Regression] I/O: -std=f95 rejects valid DELIM= in OPEN
  46192 [4.5/4.6/4.7 regression] wrong code for renaming of volatile packed array with address clause
  44581 [4.5/4.6/4.7 Regression] internal compiler error: in simplify_subreg
  49307 [4.5/4.6/4.7 Regression] ICE in spill_failure, at reload1.c:2113
  50163 [4.4/4.5/4.6/4.7 Regression] ICE: initialization expression
  50273 [4.5/4.6/4.7 Regression] -Walign-commons no longer effective
  52022 [4.5/4.6/4.7 Regression] Wrong-code with procedures passed as actual argument
  52452 [4.5/4.6/4.7/4.8 Regression] INTRINSIC cannot be applied to gfortran's ETIME
  25973 [4.5/4.6/4.7/4.8 Regression] Wrong warning: control reaches end of non-void function
  53521 [4.5/4.6/4.7/4.8 Regression] Memory leak with zero-sized array constructor
2012-09-18 06:09:45 +00:00
mrg
b2458df459 re-run mknative.
- i386 tested
- m68k gomp tls reverted by hand
- powerpc softfloat added (un-reverted) by hand
2012-09-18 05:31:32 +00:00
tls
ae06293860 Take wiz's suggestion. 2012-09-16 22:08:17 +00:00
wiz
a08950765e New sentence, new line.
Sort option descriptions.
Comment out partial sentence.
Sort SEE ALSO and remove trailing comma.
Use more markup.
2012-09-16 21:33:30 +00:00
tls
e6ea0ca4b6 *Sigh* provide, by default, the dumb "allocate 64K on the stack" variant
of the lzf_compress API by default.  This is because there is evidently
code floating around out there in the world with broken autoconf scripts that
don't check for LZF_STATE_ARG in the lzf header files and just assume the
dumb version of the API.

We rename the sane API to lzf_compress_r and implement the dumb API in
terms of it.  Consequently, bump liblzf major version number.  This is
fine because nothing used our liblzf with the old API.

Add lzf(1) utility from LZF distribution.  Add manual page for lzf(1).
2012-09-16 18:59:24 +00:00
msaitoh
6fdd74c593 Fix gcc bugid 51408 for arm.
Fixes PR#46972.
2012-09-16 07:26:30 +00:00
plunky
eb32d0353f WPA_TRACE_REF() provides optional content, potentially leaving an extra
semicolon within the struct declarator list. This is not permitted
according to C99 "6.7.2.1 Structure and union specifiers", so instead
have the macro provide the semicolon as required.
2012-09-15 18:37:27 +00:00
plunky
2bcdfeae54 install example rules from the 5.1.2 distribution in external/bsd/ipf/dist
rather than the old one..  "mediaone" does not seem to exist though, so
mark it obsolete
2012-09-15 17:33:27 +00:00
plunky
80f5e4f0af the result of the construct
#define FOO	defined(BAR)

#if FOO
 [conditional code]
#endif

is "undefined", according to C99 6.10.1 note 4. So, change code like
that to use the following paradigm

#if defined(BAR)
#define FOO	1
#else
#define FOO	0
#endif

#if FOO
 [conditional code]
#endif
2012-09-15 16:56:05 +00:00
joerg
af71fc1536 Fix GCC to correctly implement the i386 psABI on NetBSD.
This consists of two parts:
- for NetBSD/i386 and NetBSD/AMD64 with -m32, use a default stack
  alignment of 23bit as specified by the ABI
- ensure that double and long long variables on the stack are by default
  only aligned to 32bit, if there is nothing else in the function
  needing a larger stack alignment

The combination ensures that SSE variables on the stack trigger the
realignment logic, but just using double or long long doesn't.
2012-09-14 13:00:01 +00:00
joerg
ed602fb487 Don't use const foo const as type, one const is enough. 2012-09-13 21:44:49 +00:00