| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The .note.android.ident section is only used by GDB, which doesn't
care what section type the section is, but it would be convenient
for readelf -n to be able to find the section too.
The old way of getting the .note.android.ident section to be of type
SH_NOTE involved compiling from .c to .s using gcc, running sed to
change progbits to note, and then compiling from .s to .o using gcc.
Since crtbrand.c only contains a section containing data, a
crtbrand.S can be checked in that will compile on all platforms,
avoiding the need for sed.
Also add crtbrand.o to crtbegin_so.o so that libraries also get
the note, and to the crt workaround in arm libc.so.
Change-Id: Ica71942a6af4553b56978ceaa288b3f4c15ebfa2
|
| |
|
|
|
|
|
|
|
|
|
|
| |
crtbrand.c was compiled to a .s file, run through a sed script
to translate a %progbits to %note, and the compiled to .o.
However, when the sed command was copied from the original source
it was not updated to use the new name of the section (.note.ABI-tag
to .note.android.ident), so it didn't modify the file. Since the
section has been generated with type %progbits instead of %note for
two years, just delete the whole sed step.
Change-Id: Id78582e9b43b628afec4eed22a088283132f0742
|
| |\ |
|
| | |
| |
| |
| |
| | |
Bug: 17574458
Change-Id: Ic7f79861df4fe751cfa6c6b20b71123cc31e7114
|
| | |
| |
| |
| | |
Change-Id: Id948ae37a91dadd9d40e91de97f18774bdccfc78
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | | |
Bug: 18930951
Change-Id: If2ea3633ac6dfd4ec975c0f16bdf3dd58e05c614
|
| |/ /
| |
| |
| | |
Change-Id: I04b834e65c26c5821b952f78a0de7f92527cbdba
|
| |\ \ |
|
| | |/
| |
| |
| |
| | |
Bug: 17572887
Change-Id: If66851ba9b831cdd698b9f1303289bb14448bd03
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | | |
Bug: 19216648
Change-Id: I7b12955bdcad31c13bf8ec2740ff88ba15223ec0
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In https://android-review.googlesource.com/#/c/127908/5/libc/SYSCALLS.TXT@116
Elliott said:
for LP64 these will be hidden. for LP32 we were cowards and left
them all public for compatibility (though i don't think we ever
dremeled to see whether it was needed). we don't have an easy
way to recognize additions, though, so we can't prevent adding
new turds.
Add a mechanism to prevent the adding of new turds, and use that
mechanism on the fchmod/fchmodat system calls.
Bug: 19233951
Change-Id: I98f98345970b631a379f348df57858f9fc3d57c0
|
| |\ \ \
| |/ / |
|
| | | |
| | |
| | |
| | |
| | | |
Bug: 17574456
Change-Id: I5ce3d3dc07e804e9ce55c42920f47531b56e04de
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Many libc functions have an option to not follow symbolic
links. This is useful to avoid security sensitive code
from inadvertantly following attacker supplied symlinks
and taking inappropriate action on files it shouldn't.
For example, open() has O_NOFOLLOW, chown() has
lchown(), stat() has lstat(), etc.
There is no such equivalent function for chmod(), such as lchmod().
To address this, POSIX introduced fchmodat(AT_SYMLINK_NOFOLLOW),
which is intended to provide a way to perform a chmod operation
which doesn't follow symlinks.
Currently, the Linux kernel doesn't implement AT_SYMLINK_NOFOLLOW.
In GLIBC, attempting to use the AT_SYMLINK_NOFOLLOW flag causes
fchmodat to return ENOTSUP. Details are in "man fchmodat".
Bionic currently differs from GLIBC in that AT_SYMLINK_NOFOLLOW
is silently ignored and treated as if the flag wasn't present.
This patch provides a userspace implementation of
AT_SYMLINK_NOFOLLOW for bionic. Using open(O_PATH | O_NOFOLLOW),
we can provide a way to atomically change the permissions on
files without worrying about race conditions.
As part of this change, we add support for fchmod on O_PATH
file descriptors, because it's relatively straight forward
and could be useful in the future.
The basic idea behind this implementation comes from
https://sourceware.org/bugzilla/show_bug.cgi?id=14578 , specifically
comment #10.
Change-Id: I1eba0cdb2c509d9193ceecf28f13118188a3cfa7
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't send the trailing NUL bytes to the logger, call strlen if we already
know the length, or cast more specifically than we need to.
Change-Id: I68c9388a22bddea49120a1022dda8db8991360c1
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: I863137b5d35602267b4ef3a74399cf394c9994d6
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
And remove the test for FD_ZERO fortification, which never made much
sense anyway.
Change-Id: Id1009c5298d461fa4722189e8ecaf22f0c529536
|
| |/ /
| |
| |
| |
| |
| | |
GCC doesn't seem to care, but clang does.
Change-Id: I9884820339a9e6f142862928c357f1a538184ae0
|
| |/
|
|
|
| |
Bug: 19180923
Change-Id: If4912d01db43c72ef12f4b04270ddb5d76d09462
|
| |
|
|
| |
Change-Id: Ibf549266a19a67eb9158d341a69dddfb654be669
|
| |
|
|
|
|
| |
Bug: 17574610
Change-Id: I653f2aa4b5b38dbdaffe4a6c3deccfe6ad3b0e74
|
| |
|
|
|
|
|
| |
Move various mips-only things into the arch-mips directory. As soon as mips
writes assembler replacements, we can remove these.
Change-Id: Ia7308559bc361f5c8df3e1d456b381865e060b93
|
| |
|
|
| |
Change-Id: I4ed7af3c5b104f86550120401f773150c460f37b
|
| |
|
|
|
|
|
| |
Interestingly, this mostly involves cleaning up our implementation of
various <string.h> functions.
Change-Id: Ifaef49b5cb997134f7bc0cc31bdac844bdb9e089
|
| |
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=79170
Change-Id: Id91765fac45124545e2674a5b2c814707c1a448b
|
| |
|
|
|
|
| |
<signal.h> shouldn't drag in all of <string.h>.
Change-Id: I57aea36dad5e89ea2f9541c35594ca6225e532be
|
| |
|
|
|
|
|
| |
I suspect we can simplify this code, but I don't know enough about it
to get involved now.
Change-Id: I1c39761ae31beb70d41ffa6f0e396a4f17529d46
|
| |
|
|
|
|
| |
A couple of dodgy cases where we cast away const, but otherwise pretty boring.
Change-Id: Ibc39ebd525377792b5911464be842121c20f03b9
|
| |
|
|
|
|
|
|
|
| |
If pthread_detach() is called while the thread is in pthread_exit(),
it takes the risk that no one can free the pthread_internal_t.
So I add PTHREAD_ATTR_FLAG_ZOMBIE to detect this, maybe very rare, but
both glibc and netbsd libpthread have similar function.
Change-Id: Iaa15f651903b8ca07aaa7bd4de46ff14a2f93835
|
| |
|
|
|
| |
Bug: 18908062
Change-Id: I7037ac8273ebe54dd19b1561c7a376819049124c
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: Iff2c52dc630eb83b931a78fdebc4494d69462db7
|
| |/
|
|
|
|
| |
Patch for https://android-review.googlesource.com/#/c/120844/.
Change-Id: Idca5ccd7b28e8f07f1d2d1b6e3bba6781b62f0e0
|
| |\ |
|
| | |
| |
| |
| |
| | |
Bug: 18830897
Change-Id: I1ba4aaeaf66a7ff99c5d82ad45469011171b0a3b
|
| |/
|
|
|
|
|
| |
<signal.h> shouldn't get you the contents of <errno.h>, and <fcntl.h>
shouldn't get you the contents of <unistd.h>.
Change-Id: I347499cd8671bfee98e6b8e875a97cab3a3655d3
|
| |
|
|
| |
Change-Id: I6c0c71d30fe9d5b888752a4204abd95d5149bb96
|
| |
|
|
|
|
|
|
|
| |
Add name to mmaped regions.
Add pthread benchmark code.
Allocate pthread_internal_t on regular stack.
Bug: 16847284
Change-Id: Id60835163bb0d68092241f1a118015b5a8f85069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found by the toybox id(1) which calls both getpwuid(3) and getgrgid(3) before
looking at either result. The use of a shared buffer in this code meant that
even on a single thread, the data for any of the passwd functions would be
clobbered by the data for any of the group functions (or vice versa).
This might seem like an insufficient fix, but POSIX explicitly says (for
getpwnam) that the result "might be overwritten by a subsequent call to
getpwent(), getpwnam(), or getpwuid()" and likewise for other members of
that group, plus equivalent text for the group-related functions.
Change-Id: I2272f47e91f72e043fdaf7c169fa9f6978ff4370
|
| |
|
|
|
| |
Bug: 18723085
Change-Id: Iba2c834b350e4cdba0b2d771b221560a3e5df952
|
| |
|
|
|
|
| |
Be safe by default.
Change-Id: I6c4a3f1fd4eee3a651b3162ce95b7e873de57521
|
| |\ |
|
| | |
| |
| |
| |
| | |
Bug: 18489947
Change-Id: I2e834d68bc10ca5fc7ebde047b517a3074179475
|
| | |
| |
| |
| | |
Change-Id: I7a8dbb74bd622693c9fef60bd779687207517b7d
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Several cache related queries are added, such as
_SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE and etc. For the
moment, we always return 0 for these queries.
Change-Id: I36f67af8128672d8c1eef49d6f2431cca5a94719
|
| | | |
| | |
| | |
| | |
| | | |
Bug: 18472477
Change-Id: I8183de6c281acf69ed5f7f88351b056b9827b162
|