| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
alignment.
Differential Revision: https://reviews.freebsd.org/D4708
|
|
|
|
|
|
|
|
|
|
| |
aligned on a int64_t boundary. However, when we allocate the array of
these structures, we use ALIGNBYTES which defaults to sizeof(int) on
arm, i386 and others. The i386 stuff can handle unaligned accesses
seemlessly. However, arm cannot. Take this into account when creating
the array of FILEs, and add some comments about why.
Differential Revision: https://reviews.freebsd.org/D4708
|
|
|
|
|
|
|
| |
MFC after: 3 days
X-MFC with: r292004
Submitted by: bde
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
| |
for intmax_t
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4434
Reported by: cppcheck
Reviewed by: jhb
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
| |
X-MFC with: r285140
MFC after: 3 weeks (need to evaluate whether or not r285140 can be MFCed)
Sponsored by: EMC / Isilon Storage Division
|
| |
|
|
|
|
|
|
|
|
|
| |
immediatelly as old code does, now for append modes too.
Real use case for such fallback is impossible (unless specially crafted).
2) Remove now unneded include I forgot to remove in prev. commits.
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
| |
In some edge cases fp->_p can be changed in _sseek(), recalculate.
PR: 204156
MFC after: 1 week
|
|
|
|
|
| |
PR: 204156
MFC after: 1 week
|
|
|
|
|
|
| |
Rewrite O_APPEND flag checking using new __S2OAP flag.
MFC after: 3 weeks
|
|
|
|
|
|
| |
the stream (if mode had 'a' as the first character).
MFC after: 1 week
|
|
|
|
|
|
|
| |
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().
MFC after: 3 weeks
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
| |
This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.
Reviewed by: wblock, jilles, jhb, pjd
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D2697
|
|
|
|
|
|
|
| |
Computing Technologies LLC to Hudson River Trading LLC.
Approved by: Hudson River Trading LLC (who owns ACT LLC)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add VCREAT flag to indicate when a new file is being created
* Add VVERIFY to indicate verification is required
* Both VCREAT and VVERIFY are only passed on the MAC method vnode_check_open
and are removed from the accmode after
* Add O_VERIFY flag to rtld open of objects
* Add 'v' flag to __sflags to set O_VERIFY flag.
Submitted by: Steve Kiernan <stevek@juniper.net>
Obtained from: Juniper Networks, Inc.
GitHub Pull Request: https://github.com/freebsd/freebsd/pull/27
Relnotes: yes
|
|
|
|
|
|
|
| |
These were found by gcc 5.0 on Dragonfly BSD, however I
made no attempt to silence the false positives.
Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b)
|
|
|
|
|
|
|
|
|
|
|
|
| |
_p and _w are adjusted to account for the partial write (if any).
However, _p and _w should not be unconditionally adjusted and should only
be changed when we actually wrote some bytes, or the accumulated accounting
error will eventually result in a heap buffer overflow.
Reported by: adrian and alfred (Norse Corporation)
Security: FreeBSD-SA-14:27.stdio
Security: CVE-2014-8611
|
| |
|
| |
|
|
|
|
|
|
|
| |
number for non-std* descriptors, but close old file and retry.
Obtained from: inspired by Apple's change from pfg@
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
For consistency with r268985 for fputs.c, assign iov_len
first, avoiding the cast to uio_resid (int in stdio)
from degrading the value.
We currently don't support lengths higher than INT_MAX so
this change is little more than cosmetic.
MFC after: 3 days
|
|
|
|
|
| |
value now, like Apple does, but avoid their __sflush physical write
performance degradation as much as possible.
|
|
|
|
| |
it can't be used in this field at all.
|
|
|
|
| |
only, so works for only special fdopen() case. Add real O_APPEND too.
|
|
|
|
|
|
|
|
| |
Check for __SAPP flag before calling sflush. This avoids
performance degradation compared to the previous approach.
Submitted by: ache
MFC after: 2 weeks
|
|
|
|
|
|
| |
In fputs() avoid implcit casting on iov.iov_len.
MFC after: 3 days
|
|
|
|
|
|
| |
Obtained from: Apple Inc. (Libc 997.90.3)
Phabric: D442
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
Required by POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/functions/rewind.html
Obtained from: Apple Inc. (Libc 997.90.3)
MFC after: 1 week
|
|
|
|
|
|
| |
Obtained from: Apple Inc. (Libc 997.90.3)
Phabric: D442
MFC after: 1 week
|
|
|
|
|
| |
Obtained from: Apple Inc. (Libc 997.90.3)
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Use EBADF instead of EINVAL when working around incorrect O_ACCMODE.
Phabric: D442
Obtained from: Apple Inc. (Libc 997.90.3)
Reviewed by: jilles
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
This has small changes to what Apple uses for compliance
with SUSv3. The changes cause no secondary effects in the
gnulib tests (we pass them).
Obtained from: Apple Inc. (Libc 997.90.3 with changes)
Reviewed by: bde
Phabric: D440
|
|
|
|
|
| |
PR: 191174
Submitted by: Franco Fichtner <franco at lastsummer.de>
|
|
|
|
|
|
|
|
|
|
| |
Update the manpage to reflect this change.
- Always set the current position to the first null-byte when opening in append
mode. This makes the implementation compatible with glibc's. Update the test
suite.
Reported by: pho
Approved by: cognet
|
|
|
|
|
|
|
|
|
| |
An execute-only fd (opened with O_EXEC) allows neither read() nor write()
and is therefore incompatible with all stdio modes. Therefore, the [EINVAL]
error applies.
Also adjust the similar check in freopen() with a NULL path, even though
this checks an fd which is already from a FILE.
|
|
|
|
|
|
| |
Architecture
MFC After: 3 days
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reported by: swildner@dragonflybsd.org
|
|
|
|
|
|
|
|
|
|
| |
Austin Group issue #411 requires 'e' to be accepted before and after 'x',
and encourages accepting the characters in any order, except the initial
'r', 'w' or 'a'.
Given that glibc accepts the characters after r/w/a in any order and that
diagnosing this problem may be hard, change our libc to behave that way as
well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures strerror() and friends continue to work correctly even if a
(non-PIE) executable linked against an older libc imports sys_errlist (which
causes sys_errlist to refer to the executable's copy with a size fixed when
that executable was linked).
The executable's use of sys_errlist remains broken because it uses the
current value of sys_nerr and may access past the bounds of the array.
Different from the message "Using sys_errlist from executables is not
ABI-stable" on freebsd-arch, this change does not affect the static library.
There seems no reason to prevent overriding the error messages in the static
library.
|
|
|
|
|
| |
These are like mkstemp() and mkstemps() but allow passing open(2) flags like
O_CLOEXEC.
|
| |
|