| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
r306349 (by pfg):
hash(3): protect in-memory page when using cross-endianness.
When writing out pages in the "other endian" format, make a copy
instead of trashing the in-memory one.
Obtained from: NetBSD (CVS rev. 1.29)
|
|
|
|
|
|
| |
btree(3): don't shortcut closing if the metadata is dirty.
Obtained from: NetBSD (from krb5 tree)
|
|
|
|
|
|
|
|
| |
The last argument of dbm_open() should be a mode_t according to POSIX;
not an int.
Reviewed by: pfg, kib
Differential Revision: https://reviews.freebsd.org/D6650
|
|
|
|
|
|
|
|
|
| |
According to POSIX, it should use void *, not char *. Unfortunately, the
dsize field also has the wrong type. It should be size_t. I'm not going
to change that, as that will break the ABI.
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D6647
|
|
|
|
|
| |
We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
|
|
|
|
|
| |
rounddown2 tends to produce longer lines than the original code but
still it makes the code more readable.
|
|
|
|
|
|
| |
According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
|
|
|
|
|
|
|
|
|
| |
While here also cleanup some surrounding code; particularly
drop some malloc() casts.
Found with devel/coccinelle.
Reviewed by: bde (previous version - all new bugs are mine)
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a major performance regression when reading db files such as
the pw database during a 'pkg install'.
MFC after: 1 week
Tested by: bapt
Reviewed by: bapt
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5868
|
|
|
|
|
|
|
| |
WITHOUT_SYMVER necessarily implies building a system without symver
backwards compatability.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
There is also a small portability crutch, also present in NetBSD,
to allow compiling on a system that doesn't define O_CLOEXEC.
Approved by: rpaulo (mentor)
Obtained from: NetBSD (r1.17, r1.18)
Differential Revision: https://reviews.freebsd.org/D5549
|
|
|
|
|
|
| |
While here also drop a malloc cast.
Obtained from: NetBSD (CVS Rev. 1.18 - 1.20)
|
|
|
|
| |
Obtained from: NetBSD (CVS Rev. 1.20)
|
|
|
|
|
|
|
|
|
| |
make sure the changes are on disk. The people at pfSense noticed that
it didn't always make it to the disk soon enough with soft updates.
Differential Revision: https://reviews.freebsd.org/D5186
Reviewed by: garga, vangyzen, bapt, se
MFC after: 1 week
|
|
|
|
|
|
|
| |
pointers.
Obtained from: CheriBSD (e3a69027cc5a384431156d61c90d4304387a9b9d)
Sponsored by: DARPA, AFRL
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are aliases for the syscall stubs and are plt-interposed, to the
libc-private aliases of internally interposed sigprocmask() etc.
Since e.g. _sigaction is not interposed by libthr, calling signal()
removes thr_sighandler() from the handler slot etc. The result was
breaking signal semantic and rtld locking.
The added __libc_sigprocmask and other symbols are hidden, they are
not exported and cannot be called through PLT. The setjmp/longjmp
functions for x86 were changed to use direct calls, and since
PIC_PROLOGUE only needed for functional PLT indirection on i386, it is
removed as well.
The PowerPC bug of calling the syscall directly in the setjmp/longjmp
implementation is kept as is.
Reported by: Pete French <petefrench@ingresso.co.uk>
Tested by: Michiel Boland <boland37@xs4all.nl>
Reviewed by: jilles (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
|
|
|
|
| |
Reported by: Clang static analyzer
Obtained from: NetBSD
|
|
|
|
|
|
|
|
|
|
|
|
| |
"The dbm_store() and dbm_delete() functions shall return 0 when they
succeed and a negative value when they fail."
Reference:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html
PR: 42422
Suggested by: delphij
MFC after: 3 days
|
|
|
|
|
|
|
| |
While here, update the comment above with all the accepted flags.
Reviewed by: silence on hackers@
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.
A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.
Obtained from: Juniper Networks, Inc.
|
| |
|
|
|
|
|
|
| |
In particular, a hash db is used by getpwnam() and getpwuid().
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.
I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.
MFC after: 1 month
|
|
|
|
| |
Approved by: philip (mentor)
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
r212438, repectively.
Approved by: keramida (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
PR: 150030
Submitted by: Janne Snabb snabb at epipe com
Patch by: Janne Snabb
Approved by: keramida (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix mostly matters after r206129 that made it possible for
st_blksize to be greater than 4K. For this reason, this change should
be MFC-ed before r206129.
Also, it seems that all FreeBSD uitlities that use db(3) hash databases
and create new databases in files, specify their own block size value
and thus do not depend on block size autotuning.
PR: bin/144446
Submitted by: Peter Jeremy <peterjeremy@acm.org>
MFC after: 5 days
|
|
|
|
|
|
| |
PR: bin/144446
Submitted by: Peter Jeremy <peterjeremy@acm.org>
MFC after: 3 days
|
|
|
|
|
| |
a historical behavior that has been changed by revision 190491, and has seen
to break exim.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This does not include the new hash routines since they will cause problems
when reading old hash files.
Since mpool(3) has been changed, provide a compatibility shim for older
binaries.
Obtained from: OpenBSD
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
|
|
|
|
| |
open(). The previous logic only initializes the database when O_CREAT is
set, but as long as we can open and write the database, and the database
is empty, we should initialize it anyway.
Obtained from: OpenBSD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an invariant (actually, an ugly hack) to fail, and all Hell would break
loose.
When deleting a big key, the offset of an empty page should be bsize, not
bsize-1; otherwise an insertion into the empty page will cause the new key to
be elongated by 1 byte.
Make the packing more dense in a couple of cases.
- fix NULL dereference exposed on big bsize values;
Obtained from: NetBSD via OpenBSD
|
|
|
|
|
|
| |
information.
Obtained from: OpenBSD
|
|
|
|
|
|
|
| |
LRU page.
- Fix for sequential retrieval failure when using large key/data pairs.
Obtained from: OpenBSD
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
|
|
| |
pairs, not onto a page containing the end of a big pair.
Obtained from: NetBSD via OpenBSD
|
| |
|
|
|
|
|
|
| |
in one more case.
Obtained from: NetBSD via OpenBSD
|
|
|
|
| |
Obtained from: NetBSD via OpenBSD
|
|
|
|
|
|
|
|
|
| |
if the result is truncated.
db/hash/hash_page.c: use the same way to create temporary file as
bt_open.c; check snprintf() return value.
Obtained from: OpenBSD
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
all; before freeing memory, zero out them before we release it as free
heap. This will eliminate some potential information leak issue.
While there, remove the PURIFY option. There is a slight difference between
the new behavior and the old -DPURIFY behavior, with the latter initializes
memory with 0xff's. The difference between old and new approach does not
generate observable difference.
Obtained from: OpenBSD (partly).
|