Commit graph

5149 commits

Author SHA1 Message Date
Pavel Chupin
f68fac8c00 x86_64: Fix sys/stat.h
Add 64-bit stat structure mapping 64-bit stat syscall.

Change-Id: Ice517616391bee1d556b6c03e7f5ee610050e6c6
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-18 13:24:25 -07:00
Elliott Hughes
e9797ac675 Merge "Fix clone.S for x86_64." 2013-10-18 05:54:28 +00:00
Elliott Hughes
938f38daee Fix clone.S for x86_64.
We need to pull the arguments off the child stack and put them into the
registers they're expected to be in.

Change-Id: I064b3258cdd89d513c632857cabb46e52492af2b
2013-10-17 22:22:31 -07:00
Elliott Hughes
8ea3453719 Merge "Add missing aliases for off64_t functions in 64-bit land." 2013-10-18 04:42:09 +00:00
Elliott Hughes
88dcfb5eba Merge "Add ffs and memcmp16 to x86_64." 2013-10-18 04:33:29 +00:00
Elliott Hughes
8ca530e559 Add ffs and memcmp16 to x86_64.
Change-Id: I652c1356f1c7c52299977181c2cf154386979380
2013-10-17 17:03:22 -07:00
Elliott Hughes
a6519d6306 Add missing aliases for off64_t functions in 64-bit land.
See the comment in SYSCALLS.TXT for an explanation.

Change-Id: I33d4056e84160c3cca74b7b588e9924a569753ed
2013-10-17 16:56:40 -07:00
Elliott Hughes
5b19160437 Merge "Add SOCK_CLOEXEC and SOCK_NONBLOCK socket flags." 2013-10-17 20:44:07 +00:00
Andrei Emeltchenko
43d2137af0 Add SOCK_CLOEXEC and SOCK_NONBLOCK socket flags.
SOCK_CLOEXEC is used to atomically set close-on-exec flag for the new
descriptor(s), and SOCK_NONBLOCK is used to mark descriptor(s) as
non-blocking.

Change-Id: I8ba6a70543d23759e3ddcc7ff9c21b567184d681
2013-10-17 13:32:32 -07:00
Elliott Hughes
70cf207761 Merge "Build the linker with the same -std flags as the rest of bionic." 2013-10-17 20:15:41 +00:00
Elliott Hughes
2258347f3b Build the linker with the same -std flags as the rest of bionic.
Change-Id: I5bdb28ecfdf78a90f6b072077a1c5ffd63f5d2ae
2013-10-17 13:06:20 -07:00
Elliott Hughes
41b87c6512 Merge "x86_64: Add R_X86_64_64 relocation handling" 2013-10-17 19:51:11 +00:00
Elliott Hughes
922e2af432 Merge "O_CLOEXEC is always defined for arm, mips, x86, and x86_64." 2013-10-17 19:45:35 +00:00
Elliott Hughes
e989399dc2 O_CLOEXEC is always defined for arm, mips, x86, and x86_64.
I built all four, just to be sure.

Change-Id: I5c818575c8142fccfc8fb163468832807a535e90
2013-10-17 11:45:22 -07:00
Elliott Hughes
967cd1bcaf Merge "Fix sigaction(3) for 64-bit." 2013-10-17 18:38:31 +00:00
Elliott Hughes
c7e9b23317 Fix sigaction(3) for 64-bit.
Also clean up <signal.h> and revert the hacks that were necessary
for 64-bit in linker/debugger.cpp until now.

Change-Id: I3b0554ca8a49ee1c97cda086ce2c1954ebc11892
2013-10-17 11:36:55 -07:00
Ben Cheng
f89f1eaa60 Merge "Refresh libc/kernel/common/linux/auxvec.h" 2013-10-16 23:52:17 +00:00
Ben Cheng
76b795a8ba Refresh libc/kernel/common/linux/auxvec.h
Change-Id: If9bb50a2f233cdb60e91bd979876edb917e0f66d
2013-10-16 16:50:14 -07:00
Ben Cheng
3fdd6b8337 Merge "Add processed uapi kernel headers (common and aarch64-specific)" 2013-10-16 23:17:52 +00:00
Ben Cheng
655a7c081f Add processed uapi kernel headers (common and aarch64-specific)
Change-Id: If0be7b83bd8fe7cb02472d173f7c452aabf61124
2013-10-16 16:09:24 -07:00
Elliott Hughes
bffe261a1f Merge "Sort the syscalls.mk files, give all generated files the same header." 2013-10-16 23:06:48 +00:00
Ben Cheng
f0447ddb04 Merge "Tweaked the cleanup scripts to handle uapi and aarch64 headers." 2013-10-16 22:32:12 +00:00
Ben Cheng
8bea2b6fac Tweaked the cleanup scripts to handle uapi and aarch64 headers.
The processed uapi directory is now placed at libc/kernel/uapi as
opposed to libc/kernel/common/uapi as it contains
architectural-dependent headers now.

Change-Id: I53f814704a4d231b452fde398cd94257a0fb2eea
2013-10-16 15:28:56 -07:00
Elliott Hughes
103ccde8fe Sort the syscalls.mk files, give all generated files the same header.
No non-comment changes to the .S files.

Change-Id: Iafcfd004c3ea92b64268f80ab16df615b97cefac
2013-10-16 14:27:59 -07:00
Elliott Hughes
1f29c2f510 Merge "Switch sigpending over to rt_sigpending." 2013-10-16 21:10:00 +00:00
Elliott Hughes
40d105ccb3 Switch sigpending over to rt_sigpending.
Change-Id: I7b28984796b5fb343cfbcc47e0afc3a84293d417
2013-10-16 14:07:01 -07:00
Pavel Chupin
c075c18537 x86_64: Add R_X86_64_64 relocation handling
Change-Id: I86ffc56fa6a9053bed44e92a579530c2beb8eb2c
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-10-16 19:13:58 +04:00
Elliott Hughes
26242bf266 Merge "Remove support for the useless 'custom' option in SYSCALLS.TXT." 2013-10-16 02:51:35 +00:00
Elliott Hughes
c9da332cce Remove support for the useless 'custom' option in SYSCALLS.TXT.
This cruft dates from a time when bionic would only output syscall
contants for the syscalls mentioned in SYSCALLS.TXT. I fixed that
a long time ago, but never followed through with the removal of what
was then confusingly called "stub" and was recently renamed "custom".

Change-Id: I8f3872a200b2dc8325e357cc5ee505ea4212ef95
2013-10-15 18:18:58 -07:00
Elliott Hughes
608c65f695 Merge "Fix sigsuspend to use rt_sigsuspend on all platforms." 2013-10-16 01:16:00 +00:00
Elliott Hughes
1f5af926fa Fix sigsuspend to use rt_sigsuspend on all platforms.
Change-Id: I981c1a66d35480d4457a0a08a1b042dac94daa5b
2013-10-15 18:15:19 -07:00
Elliott Hughes
c100a10069 Merge "'Avoid confusing "read prevented write" log messages' 2." 2013-10-16 00:31:20 +00:00
Elliott Hughes
68b67113a4 'Avoid confusing "read prevented write" log messages' 2.
This time it's assembler.

Change-Id: Iae6369833b8046b8eda70238bb4ed0cae64269ea
2013-10-15 17:17:05 -07:00
Elliott Hughes
d9913b0b0d Merge "Make pthread_create report sched_setscheduler failures on LP64." 2013-10-16 00:09:54 +00:00
Elliott Hughes
7672521440 Merge "Avoid confusing "read prevented write" log messages." 2013-10-15 23:53:45 +00:00
Elliott Hughes
d16391bb88 Merge "Fix indentation in sched_getaffinity." 2013-10-15 23:53:25 +00:00
Elliott Hughes
98624c3746 Make pthread_create report sched_setscheduler failures on LP64.
We couldn't fix this for 32-bit because there's too much broken
code out there. (Pretty much everyone asks for real-time
scheduling for all their threads, and the kernel says "don't be
stupid".)

Change-Id: I43c5271e6b6bb91278b9a19eec08cbf05391e3c4
2013-10-15 16:51:17 -07:00
Elliott Hughes
0cfc95e010 Fix indentation in sched_getaffinity.
Change-Id: I966852149a0255ca132cd7a15f135a875ce400d0
2013-10-15 16:49:49 -07:00
Elliott Hughes
d1eda33f01 Avoid confusing "read prevented write" log messages.
Moving to a "function: message" style avoids ambiguity.

Change-Id: If9d590e50265c61725d3673bd03796e65edd2d5e
2013-10-15 16:49:28 -07:00
Christopher Ferris
dc9d8d050a Merge "Modify prefetch for krait memcpy." 2013-10-15 21:12:31 +00:00
Elliott Hughes
22b83da476 Merge "Clean up the sigprocmask/pthread_sigmask implementation." 2013-10-15 21:10:21 +00:00
Christopher Ferris
c3c58fb560 Modify prefetch for krait memcpy.
I originally modified the krait mainloop prefetch from cacheline * 8 to * 2.
This causes a perf degradation for copies bigger than will fit in the cache.
Fixing this back to the original * 8. I tried other multiples, but * 8 is th
sweet spot on krait.

Bug: 11221806

Change-Id: I1f75fad6440f7417e664795a6e7b5616f6a29c45
2013-10-15 12:10:06 -07:00
Elliott Hughes
19e62325c2 Clean up the sigprocmask/pthread_sigmask implementation.
Let's have both use rt_sigprocmask, like in glibc. The 64-bit ABIs
can share the same code as the 32-bit ABIs.

Also, let's test the return side of these calls, not just the
setting.

Bug: 11069919
Change-Id: I11da99f85b5b481870943c520d05ec929b15eddb
2013-10-15 11:23:57 -07:00
Stephen Hines
abeafbd6d5 Merge "Wrap sprintf()/snprintf() macros to prevent expansion errors." 2013-10-11 23:28:32 +00:00
Stephen Hines
8704ada3d8 Merge "Fix clang warnings in bionic." 2013-10-11 23:27:40 +00:00
Stephen Hines
6c7b3cb056 Fix clang warnings in bionic.
This fixes a few diverse issues that clang warns on in bionic. First,
it specifies the appropriate converted types for format specifiers.
The "h" and "hh" modifiers specify that the user is passing a short or
char respectively. We were passing int deliberately in both cases and
relying on the compiler to implicitly downcast to the smaller type.
We also remove the non-standard "d" suffix from our double-precision
floating point constant. This is an extension for gcc that clang does
not implement. The third fix is to mark the c1 variable as unused,
since it truly is neither read nor written.

Change-Id: I4793352b9d3e58f1f4cac9e7581ef4b2a70b43c7
2013-10-11 16:20:08 -07:00
Stephen Hines
6e38072add Wrap sprintf()/snprintf() macros to prevent expansion errors.
Previously, FORTIFY_SOURCE used single macros to define these standard
functions for use with clang. This can cause conflicts with other macros used
to call these functions, particularly when those macros expand the number of
arguments to the function. This change wraps our macro definitions, so that
expansion properly takes place for programmer arguments first.

Change-Id: I55929b1fd2a643b9d14a17631c4bcab3b0b712cf
2013-10-11 12:14:49 -07:00
Nick Kralevich
eda2679e30 Merge "FORTIFY_SOURCE: fortify read()" 2013-10-10 04:11:48 +00:00
Elliott Hughes
39385aa78c Merge "Clean up the cpuacct cruft." 2013-10-10 04:08:44 +00:00
Nick Kralevich
b036b5ca36 FORTIFY_SOURCE: fortify read()
Change-Id: Ic7de163fe121db13e00560adb257331bc709814d
2013-10-09 20:17:03 -07:00