Revision
9688 -
Directory Listing
-
[select for diffs]
Modified
Sat Dec 16 17:24:42 2017 UTC
(6 years, 4 months ago)
by
laffer1
Diff to
previous 9631
Update libiconv implementation from NetBSD & FreeBSD.
Add compatiblity shim for old binaries (libc_nonshared hack).
Introduce ldscript for libc to allow us to use stack protector on i386 later.
Revision
9631 -
Directory Listing
-
[select for diffs]
Modified
Wed Oct 11 23:42:12 2017 UTC
(6 years, 7 months ago)
by
laffer1
Diff to
previous 9463
move posix_spawn family into fbsd symbol. This fixes backward compatibility with freebsd 9 binaries. The symbol is still present for MNBSD_1.0
Revision
9397 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 21:28:54 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9396
posix_spawn_file_actions_adddup2(3): Document difference with
dup2().
The ability to clear a file descriptor's close-on-exec flag via
posix_spawn_file_actions_adddup2() is in fact proposed in Austin Group issue
#411.
Revision
9396 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 21:28:26 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9390
posix_spawn_file_actions_addopen(3): Correct error for bad file
descriptor.
As per POSIX.1-2008, posix_spawn_file_actions_add* return [EBADF] if a file
descriptor is negative, not [EINVAL]. The bug was only in the manual page;
the code is correct.
Revision
9372 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 20:22:59 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9371
dup(2): Remove incorrect sentence about getdtablesize().
There are no getdtablesize() bounds on the file descriptor to be duplicated;
it only has to be open. If the RLIMIT_NOFILE rlimit was decreased after
opening the file descriptor, it may be greater than or equal to
getdtablesize() but still valid.
Revision
9371 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 20:22:25 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9370
getdtablesize(2): Describe what this function actually does.
getdtablesize() returns the limit on new file descriptors; this says nothing
about existing descriptors
Revision
9368 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 19:53:27 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9324
EINTR in POSIX sem_*.
Document that sem_wait() can fail with [EINTR].
Programs often do not expect an [EINTR] return from sem_wait() and POSIX
only allows it if the signal was installed without SA_RESTART. The timeout
in sem_timedwait() is absolute so it can be restarted normally.
The old POSIX semaphore implementation did this correctly, unlike the new
umtx one.
Specific to 9-stable: UMTX_ABSTIME does not exist and therefore
sem_timedwait() is erroneously not restarted after a SA_RESTART signal
handler.
It may be desirable to avoid [EINTR] completely, which matches the pthread
functions and is explicitly permitted by POSIX. However, the kernel must
return [EINTR] at least for signals with SA_RESTART clear, otherwise pthread
cancellation will not abort a semaphore wait. In this commit, only restore
the 8.x behaviour which is also permitted by POSIX, as far as possible with
the ABI in 9-stable.
Obtained from: FreeBSD
Revision
9004 -
Directory Listing
-
[select for diffs]
Modified
Fri Sep 30 01:37:33 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 9003
add barrier write capability to the VFS buffer interface. it is a disk write request that tells the disk that the buffer being written must be committed to the media before future writes.
Revision
8201 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 15:47:42 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 8189
Using putenv() and later direct pointer contents modification it is possibe
to craft environment variables with similar names like that:
a=1
a=2
...
unsetenv("a") should remove them all to make later getenv("a") impossible.
Fix it to do so (this is GNU autoconf test #3 failure too).
Obtained from: FreeBSD
Revision
8161 -
Directory Listing
-
[select for diffs]
Modified
Sat Sep 17 02:20:13 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 8146
sigaction(2),sigwait(2),sigwaitinfo(2): Remove [EFAULT] error
condition.
Passing an invalid pointer results in undefined behaviour.
The wrappers in libthr access some of the data pointed to by the arguments
in userland, so that an invalid pointer will cause a signal and not an
[EFAULT] error return.
Furthermore, if the [EFAULT] error occurs when the kernel is writing, it is
not a proper error in the sense that the call still commits (changing the
signal disposition or accepting the signal).
Obtained from: FreeBSD
Revision
7917 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 19:48:34 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 7865
Refine the implementation of POSIX_FADV_NOREUSE to perform
POSIX_FADV_DONTNEED requests on the currently accessed portion of the
file on each read(2) or write(2) rather than using direct I/O. This
gives much better performance including read-ahead and write clustering
similar to normal read(2) and write(2) calls.
If subsequent read(2) and write(2) calls are sequential, then the
POSIX_FADV_DONTNEED requests will cover the entire sequentially-accessed
range.
Obtained from: FreeBSD
Revision
7490 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 20 22:18:45 2016 UTC
(8 years, 1 month ago)
by
laffer1
Diff to
previous 7489
Replace access to /dev/random with kernel pseudo random number source KERN_ARND and remove fallback.
POSIX requires rand(3) return values in the 0 to rand max range, but ACM formula we have intranl state in the range 1, 0x7fffffffe so our rand max value is never reached (zero as well)
Make this POSIX friendly.
Don't overflow on big seeds.
Obtained from: FreeBSD 9 stable.
Revision
7140 -
Directory Listing
-
[select for diffs]
Modified
Sat Jul 25 19:03:20 2015 UTC
(8 years, 9 months ago)
by
laffer1
Diff to
previous 6972
Bring in reallocarray(3) from OpenBSD CURRENT.
The reallocarray() function is similar to realloc() except it operates on nmemb members of size size and checks for integer overflow in the calculation nmemb * size.
Revision
6054 -
Directory Listing
-
[select for diffs]
Modified
Fri Nov 29 22:01:59 2013 UTC
(10 years, 5 months ago)
by
laffer1
Diff to
previous 5950
gettext is incompatible with our implementation due to an optimization. Import a patch from FreeBSD Current to resolve this issue
Revision
5949 -
Directory Listing
-
[select for diffs]
Modified
Sat Aug 10 21:31:20 2013 UTC
(10 years, 9 months ago)
by
laffer1
Diff to
previous 5917
Implement clearenv(3)
This never made it into the POSIX standards, but it's popular in some Linux circles and POSIX bindings for Fortran 77 require it.
Revision
4827 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 9 22:11:25 2012 UTC
(12 years, 1 month ago)
by
laffer1
Diff to
previous 4824
expose symbols identically to FreeBSD 7.x. This allows us to maintain binary compatibility with early releases.
Revision
4778 -
Directory Listing
-
[select for diffs]
Modified
Sun Apr 1 01:42:33 2012 UTC
(12 years, 1 month ago)
by
laffer1
Diff to
previous 4748
revert some changes to pthread.h and dirent.h
fixup symbols for libc and add fcntl / __fcntl interface.
remove some of the solaris src hacks for zfs.
Revision
4637 -
Directory Listing
-
[select for diffs]
Modified
Sun Feb 12 21:14:24 2012 UTC
(12 years, 3 months ago)
by
laffer1
Diff to
previous 4482
Introduce support for preinit, init and fini arrays per the ELF standard.
This patch is based on work by John Marino for DragonFly. This makes us the second BSD to support this feature.
From his comments:
For the main executable file, the .init_array and .fini_array sections
are handled by crt1, just like .init and .fini are. In the case of
a statically linked binary, the .preinit_array section is also handled
by crt1. The real-time linker handles the .init_array and .fini_array
sections for dynamically shared objects (libraries) and .preinit_array
for dynamically-linked binaries. There are no .preinit_array sections
in the DSOs per standard.
These sections are described by the System V Application Binary Interface
http://www.sco.com/developers/gabi/latest/ch4.sheader.html#special_sections
In order for this patch to work, we also introduced several items from NetBSD needed for newer versions of GCC as well as some features used in this patch. (cdefs.h)
Finally, we're also through in manpages for cpu set which is totally unrelated, but an obmission from a previous patch for ULE.
Revision
4215 -
Directory Listing
-
[select for diffs]
Modified
Sat Oct 15 20:18:31 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4062
Introduce CPU Affinity in MidnightBSD.
The ULE scheduler is now default on i386 and amd64 architectures.
cpuset(1) allows the user to limit a process to a group of CPU cores to run on using new system calls.
32bit versions of the system calls were also added to support 32bit binaries running on amd64 boxes. libc's
symbol map was modified to include the cpuset* system calls to expose them to userland.
This is based on work by Jeff Roberson from FreeBSD 7.1.
Revision
3955 -
Directory Listing
-
[select for diffs]
Modified
Sat May 28 19:11:40 2011 UTC
(12 years, 11 months ago)
by
laffer1
Diff to
previous 3579
This is a VERY ugly hack. It allows us to run *some* binaries from FreeBSD 7.1 including newer versions of Opera.
Revision
3576 -
Directory Listing
-
[select for diffs]
Modified
Fri Dec 10 00:52:05 2010 UTC
(13 years, 5 months ago)
by
laffer1
Diff to
previous 3533
When reopening a stream backed by an open file descriptor, do not close
the existing file descriptor. Instead, let dup2() atomically close the
old file descriptor when assigning the newly opened file to the same
descriptor. This closes a race in a multithreaded application where a
concurrent open() could allocate the existing file descriptor in between
the calls to close() and dup2().
Obtained from: FreeBSD
Revision
3531 -
Directory Listing
-
[select for diffs]
Modified
Fri Oct 8 16:33:29 2010 UTC
(13 years, 7 months ago)
by
laffer1
Diff to
previous 3456
A recently security vulnerability was reported in glob memory limit handling. It allows for remote dos attacks on ftp and sftp servers among other things.
Add new limits based on a patch from DragonFly and NetBSD.
Note there are still issues here:
1. No man page changes yet.
2. sftp has not been fully patched yet.
Revision
3456 -
Directory Listing
-
[select for diffs]
Modified
Sun Aug 15 04:28:26 2010 UTC
(13 years, 9 months ago)
by
laffer1
Diff to
previous 3455
Add an internal _once() method that works like pthread_once(3) but safe for libc routines. This is safe to use in single threaded and multithreaded processes.
Obtained from: FreeBSD (SVN 200649)
Revision
3406 -
Directory Listing
-
[select for diffs]
Modified
Thu May 27 13:55:02 2010 UTC
(13 years, 11 months ago)
by
laffer1
Diff to
previous 3287
The nfsclient didn't validate the length of the path passed to it. This could cause code execution particularly when users are allowed to mount file systems.
Revision
3287 -
Directory Listing
-
[select for diffs]
Modified
Wed Feb 10 01:33:40 2010 UTC
(14 years, 3 months ago)
by
laffer1
Diff to
previous 3286
Fix stats printing of the amount of memory currently consumed by huge
allocations. [1]
Fix calculation of the number of arenas when 'n' is specified via
MALLOC_OPTIONS.
Clean up various style inconsistencies.
Obtained from: [1] NetBSD, FreeBSD
Revision
3226 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 10 18:29:20 2010 UTC
(14 years, 4 months ago)
by
laffer1
Diff to
previous 3199
Create a new MidnightBSD symbol namespace. This will include additions and extensions not found in the legacy FBSD_1.0 space. Unless we happen to add symbols for compatibility with newer freebsd 7.x versions, this old FBSD stuff should not be used. I have not created a private symbol yet.
Add posix spawn related functions to libc. posix_spawn(3) and friends can replace fork and exec in some situations and have been in the specification since 1999. Many operating systems do not yet implement them as they do not provide any benefit in terms of performance when systems use MMU. glibc implements them as well as FreeBSD 8, DragonFly current, Mac OS X Snow Leopard. It's time.
We've used the FreeBSD 8 versions with little change here. This is one of the many requirements for libdispatch. (mostly for test suite apps)
Revision
3199 -
Directory Listing
-
[select for diffs]
Modified
Sat Nov 28 22:44:36 2009 UTC
(14 years, 5 months ago)
by
laffer1
Diff to
previous 3196
Import OpenBSD's sysctl sensors framework. This is based on work by Constantine A. Murenin for the 2007 Google summer of code for FreeBSD.
Includes:
sample config file for sensord
rc scripts
documentation fixes and updates
sys/kern/kern_sensors.c
sys/sensors.h
This is compatible with OpenBSD 4.1 and 4.2 in terms of the userland bits.
Revision
3196 -
Directory Listing
-
[select for diffs]
Modified
Fri Nov 27 20:51:25 2009 UTC
(14 years, 5 months ago)
by
laffer1
Diff to
previous 3157
Add the pthread_condattr_init and pthread_condattr_destroy symbols to libc. This will be required for future versions of dbus to function properly on MidnightBSD.
Based on a FreeBSD patch by Joe Marcus Clarke.
Revision
3047 -
Directory Listing
-
[select for diffs]
Modified
Fri Oct 2 13:20:11 2009 UTC
(14 years, 7 months ago)
by
laffer1
Diff to
previous 2953
pthread_mutexattr_settype is failing for many cases due to an incorrect stub in libc.
Obtained from: FreeBSD, Joe Marcus Clarke
Revision
2622 -
Directory Listing
-
[select for diffs]
Modified
Mon Mar 16 16:23:37 2009 UTC
(15 years, 2 months ago)
by
laffer1
Diff to
previous 2482
Fix information leakage. Some jackass didn't use -DPURIFY which lets the code run memset. So uninitialized memory is written to db files all over the system.
Revision
1939 -
Directory Listing
-
[select for diffs]
Modified
Thu Oct 30 20:39:11 2008 UTC
(15 years, 6 months ago)
by
laffer1
Diff to
previous 1935
This commit was generated by cvs2svn to compensate for changes in r1938,
which included commits to RCS files with non-trunk default branches.
Revision
1571 -
Directory Listing
-
[select for diffs]
Modified
Mon May 12 03:16:01 2008 UTC
(16 years ago)
by
laffer1
Diff to
previous 1570
Do not read away the target directory entry when encountering deleted
files after a seekdir().
The seekdir shall set the position for the next readdir operation.
When the _readdir_unlocked() encounters deleted entry, dd_loc is
already advanced. Continuing the loop leads to premature read of
the target entry.
Submitted by: Marc Balmer <mbalmer at openbsd org>
Obtained from: OpenBSD
Revision
1440 -
Directory Listing
-
[select for diffs]
Modified
Thu Apr 3 17:47:01 2008 UTC
(16 years, 1 month ago)
by
laffer1
Diff to
previous 1439
Found an additional integer overflow.
This version of the patch comes from NetBSD.
Also limits the range of getnumber to 0x00ffffff to ensure that adding two does not cause an overflow.
Revision
1370 -
Directory Listing
-
[select for diffs]
Modified
Tue Jan 15 18:53:01 2008 UTC
(16 years, 4 months ago)
by
laffer1
Diff to
previous 906
PTY handling patch.
This is text from the FreeBSD advisory on the same issue:
If openpty(3) is called as non-root user the newly created
pseudo-terminal is world readable and writeable. While this is
documented to be the case, script(1) still uses openpty(3) and
script(1) may be used by non-root users [CVE-2008-0217].
The ptsname(3) function incorrectly extracts two characters from the
name of a device node in /dev without verifying that it's actually
operating on a valid pty which the calling user owns. pt_chown uses
the bad result from ptsname(3) to change ownership of a pty to the
user calling pt_chown [CVE-2008-0216].
Revision
886 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 2 00:48:03 2007 UTC
(17 years, 1 month ago)
by
archite
Diff to
previous 876
Importing propolice into MidnightBSD. Propolice is going to
provide us with much greater security and stability in the
long run. If upgrading from a pre-propolice system, please
follow the these instructions:
cd /usr/src/lib/libc && make obj && make && make install
cd /usr/src/gnu/usr.bin/cc && make obj && make && make install
buildworld and kernel
It is adviced that any mports which were installed and/or built
prior to the propolice update also be updated. If any errors
or issue are encounted, please contact security@midnightbsd.org
and we will be sure to investigate and come up with an expeditious
fix.
Revision
349 -
Directory Listing
-
[select for diffs]
Modified
Tue Dec 26 01:20:32 2006 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 311
Fix a typo in __fpu_ftox() that caused long double to long (and long long)
conversion of negative numbers to always result in -1.
Revision
6 -
Directory Listing
-
[select for diffs]
Modified
Sat Feb 25 02:38:42 2006 UTC
(18 years, 2 months ago)
by
laffer1
Diff to
previous 3
This commit was generated by cvs2svn to compensate for changes in r5, which
included commits to RCS files with non-trunk default branches.
Revision
3 -
Directory Listing
-
[select for diffs]
Added
Sat Feb 25 02:29:52 2006 UTC
(18 years, 2 months ago)
by
laffer1
This commit was generated by cvs2svn to compensate for changes in r2, which
included commits to RCS files with non-trunk default branches.