Commit Graph

12557 Commits

Author SHA1 Message Date
Yabin Cui
70ad54d8c0 am 2d988187: am 11829be3: Merge "Add test about pthread_mutex_t owner tid limit."
* commit '2d988187712f52773b89421d139b266c8b58f769':
  Add test about pthread_mutex_t owner tid limit.
2015-02-03 22:40:46 +00:00
Yabin Cui
2d98818771 am 11829be3: Merge "Add test about pthread_mutex_t owner tid limit."
* commit '11829be3e1a9e9e2271ba64a78c327bde6e044eb':
  Add test about pthread_mutex_t owner tid limit.
2015-02-03 22:34:58 +00:00
Yabin Cui
11829be3e1 Merge "Add test about pthread_mutex_t owner tid limit." 2015-02-03 22:28:56 +00:00
Nick Kralevich
3ce62609f2 am 72c3071d: am f00f484c: Merge "Ensure raw fchmod/fchmodat syscalls are hidden."
* commit '72c3071d548ee3bf3711abf13dce25042ccc3cea':
  Ensure raw fchmod/fchmodat syscalls are hidden.
2015-02-03 20:32:59 +00:00
Nick Kralevich
72c3071d54 am f00f484c: Merge "Ensure raw fchmod/fchmodat syscalls are hidden."
* commit 'f00f484cb59c1d599242daecbf833397aa3ba5d8':
  Ensure raw fchmod/fchmodat syscalls are hidden.
2015-02-03 20:24:53 +00:00
Yabin Cui
140f3678f0 Add test about pthread_mutex_t owner tid limit.
Bug: 19216648
Change-Id: I7b12955bdcad31c13bf8ec2740ff88ba15223ec0
2015-02-03 12:20:46 -08:00
Nick Kralevich
f00f484cb5 Merge "Ensure raw fchmod/fchmodat syscalls are hidden." 2015-02-03 20:17:33 +00:00
Nick Kralevich
00490ae3f3 Ensure raw fchmod/fchmodat syscalls are hidden.
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
2015-02-03 12:10:30 -08:00
Neil Fuller
f0e556a2f9 am 4177bd8d: Fixes to the update-tzdata.py tool
* commit '4177bd8d16e0dc2d0d541fc54f81518c57651e55':
  Fixes to the update-tzdata.py tool
2015-02-03 15:00:20 +00:00
Neil Fuller
d3ef8fbdf7 am 700eb048: Update tzdata to tzdata2015a
* commit '700eb048fb6df8805245097d73a87384108fdf67':
  Update tzdata to tzdata2015a
2015-02-03 15:00:18 +00:00
Hans Boehm
da3a449043 am 0cddad0f: am d57bf449: Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>."
* commit '0cddad0fd17274575abe2e25484c909def51d7e3':
  Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
2015-02-03 02:53:31 +00:00
Hans Boehm
0cddad0fd1 am d57bf449: Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>."
* commit 'd57bf449fe6c2dcf35d90d6e4098038ac8a24ecb':
  Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
2015-02-03 02:48:20 +00:00
Hans Boehm
d57bf449fe Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>." 2015-02-03 02:42:53 +00:00
Elliott Hughes
ea31751e4b am aa916c8d: am c5999c1e: Merge "Clean up SEEK_SET definitions."
* commit 'aa916c8db85b01389b929f060f232b3e06448e79':
  Clean up SEEK_SET definitions.
2015-02-03 01:31:08 +00:00
Elliott Hughes
aa916c8db8 am c5999c1e: Merge "Clean up SEEK_SET definitions."
* commit 'c5999c1e0382c40286cc631c6a53e7781bc03154':
  Clean up SEEK_SET definitions.
2015-02-03 01:25:23 +00:00
Elliott Hughes
c5999c1e03 Merge "Clean up SEEK_SET definitions." 2015-02-03 01:21:17 +00:00
Yabin Cui
86fc96f733 Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
Bug: 17574456
Change-Id: I5ce3d3dc07e804e9ce55c42920f47531b56e04de
2015-02-02 15:00:01 -08:00
Nick Kralevich
4c8a50ba5d am 0cb8abc6: am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
* commit '0cb8abc6207d7484ecbc9698064c1f24b9b668d5':
  Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:10:53 +00:00
Nick Kralevich
0cb8abc620 am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
* commit 'd80ec66121b5af96c6b3d07ba34353b3d517f5b3':
  Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:07:35 +00:00
Nick Kralevich
d80ec66121 Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support" 2015-02-02 22:03:41 +00:00
Elliott Hughes
1ed337dbdf Clean up SEEK_SET definitions.
If we lose the #ifndef, the compiler will tell us if the definitions
of SEEK_SET and friends ever get out of sync.

Change-Id: I357cabec7c9cd451c604342344f210bba20fb6bc
2015-02-02 14:02:09 -08:00
Nick Kralevich
3cbc6c627f Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
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 .

Change-Id: I1eba0cdb2c509d9193ceecf28f13118188a3cfa7
2015-02-02 13:17:17 -08:00
Elliott Hughes
671b7eb288 am 815fc9bc: am c57b5c50: Merge "Small logging cleanup."
* commit '815fc9bc9ecf96dd478c0800fdb9c4e9200320be':
  Small logging cleanup.
2015-02-02 20:54:27 +00:00
Elliott Hughes
815fc9bc9e am c57b5c50: Merge "Small logging cleanup."
* commit 'c57b5c5094f915ff975a256e086d58e2e7cfedf1':
  Small logging cleanup.
2015-02-02 20:46:39 +00:00
Elliott Hughes
c57b5c5094 Merge "Small logging cleanup." 2015-02-02 20:36:29 +00:00
Elliott Hughes
42084a2653 Small logging cleanup.
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
2015-02-02 12:24:46 -08:00
Elliott Hughes
c8820e61d1 am 6c1252de: am 530aaecc: Merge "Explicitly check that the reason fortify tests abort is fortify."
* commit '6c1252decba273087411cd9e480d0422eabec6ef':
  Explicitly check that the reason fortify tests abort is fortify.
2015-02-02 19:40:41 +00:00
Elliott Hughes
6c1252decb am 530aaecc: Merge "Explicitly check that the reason fortify tests abort is fortify."
* commit '530aaeccd875f708918f59cd5ff8b076c156adab':
  Explicitly check that the reason fortify tests abort is fortify.
2015-02-02 19:32:44 +00:00
Elliott Hughes
530aaeccd8 Merge "Explicitly check that the reason fortify tests abort is fortify." 2015-02-02 19:25:58 +00:00
Elliott Hughes
d036e94bb3 Explicitly check that the reason fortify tests abort is fortify.
Change-Id: I95291e2febf7b497c1d9f37fd7fa9acdd21e86a4
2015-02-02 11:18:58 -08:00
Elliott Hughes
2e02769aa1 am 5f7819d6: am 7f0f30c6: Merge "Fix clang build."
* commit '5f7819d6f1b2cb706d818e3083d45337e35d386b':
  Fix clang build.
2015-02-02 18:50:43 +00:00
Elliott Hughes
5f7819d6f1 am 7f0f30c6: Merge "Fix clang build."
* commit '7f0f30c6e20c1bf04bec05077eef2d779e7a32df':
  Fix clang build.
2015-02-02 18:36:22 +00:00
Elliott Hughes
7f0f30c6e2 Merge "Fix clang build." 2015-02-02 18:23:28 +00:00
Elliott Hughes
30fbf5f44c Fix clang build.
Change-Id: I863137b5d35602267b4ef3a74399cf394c9994d6
2015-02-02 10:21:39 -08:00
Neil Fuller
575bceb281 am 0a302e01: am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
* commit '0a302e0174da4432da4a6ad5ce126dc27e4a86de':
  Fixes to the update-tzdata.py tool
2015-02-02 18:03:11 +00:00
Elliott Hughes
5372b83eab am 20f2e4f7: am 5940f98a: Merge "Fortify poll and ppoll."
* commit '20f2e4f7ad9d9f816be13f6509e602d4344a018d':
  Fortify poll and ppoll.
2015-02-02 18:03:10 +00:00
Neil Fuller
0a302e0174 am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
* commit 'd514d9bbae354da72fcb43349f0157378e52004d':
  Fixes to the update-tzdata.py tool
2015-02-02 17:57:22 +00:00
Elliott Hughes
20f2e4f7ad am 5940f98a: Merge "Fortify poll and ppoll."
* commit '5940f98a35d64f9ca249536bb8cdcdbfe43e9bc3':
  Fortify poll and ppoll.
2015-02-02 17:57:21 +00:00
Neil Fuller
4177bd8d16 Fixes to the update-tzdata.py tool
We build one too many times. Creating a missing directory
is sufficient.

The tz2icu needs some files in the CWD. Added symlinks.

Bug: 19230091
(cherry-pick of commit 0662c3e5b3)
Change-Id: Ie21d848f1b776ec745473b9122e003fdf0acf105
2015-02-02 17:53:19 +00:00
Neil Fuller
d514d9bbae Merge "Fixes to the update-tzdata.py tool" 2015-02-02 17:52:48 +00:00
Elliott Hughes
5940f98a35 Merge "Fortify poll and ppoll." 2015-02-02 17:51:50 +00:00
Neil Fuller
0662c3e5b3 Fixes to the update-tzdata.py tool
We build one too many times. Creating a missing directory
is sufficient.

The tz2icu needs some files in the CWD. Added symlinks.

Bug: 19230091
Change-Id: I58f9817af68b229f48139e56503f50a2b6dbb4fe
2015-02-02 17:42:41 +00:00
Elliott Hughes
4674e3899a Fortify poll and ppoll.
And remove the test for FD_ZERO fortification, which never made much
sense anyway.

Change-Id: Id1009c5298d461fa4722189e8ecaf22f0c529536
2015-02-02 09:15:19 -08:00
Neil Fuller
700eb048fb Update tzdata to tzdata2015a
Time Zone Data v. 2015a (Released 2015-01-29)
http://www.iana.org/time-zones/repository/releases/tzdata2015a.tar.gz

Information from NEWS:

Release 2015a - 2015-01-29 22:35:20 -0800

  Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.

  Changes affecting code

    tzalloc now scrubs time zone abbreviations compatibly with the way
    that tzset always has, by replacing invalid bytes with '_' and by
    shortening too-long abbreviations.

    tzselect ports to POSIX awk implementations, no longer mishandles
    POSIX TZ settings when GNU awk is used, and reports POSIX TZ
    settings to the user.  (Thanks to Stefan Kuhn.)

  Changes affecting build procedure

    'make check' now checks for links to links in the data.
    One such link (for Africa/Asmera) has been fixed.
    (Thanks to Stephen Colebourne for pointing out the problem.)

  Changes affecting commentary

    The leapseconds file commentary now mentions the expiration date.
    (Problem reported by Martin Burnicki.)

    Update Mexican Library of Congress URL.

Bug: 19212588
Change-Id: Idc07ac862901500d4a1dbd0f4aadcfd0aa9d10b8
2015-02-02 11:32:10 +00:00
Elliott Hughes
a5d743a6bf am 9843afd6: am ffbda83b: Merge "Add the fortify tests back into the glibc tests."
* commit '9843afd62982516974fdc3c4481d36007527825a':
  Add the fortify tests back into the glibc tests.
2015-02-02 06:07:15 +00:00
Elliott Hughes
9843afd629 am ffbda83b: Merge "Add the fortify tests back into the glibc tests."
* commit 'ffbda83b302e3c3970135013d2bb92402e040fe5':
  Add the fortify tests back into the glibc tests.
2015-02-02 06:01:10 +00:00
Elliott Hughes
ffbda83b30 Merge "Add the fortify tests back into the glibc tests." 2015-02-02 05:56:27 +00:00
Elliott Hughes
b6e3e800d2 Add the fortify tests back into the glibc tests.
Change-Id: I4426d0c7c1bfe3b0028a674f72d1c3b9d883d6af
2015-01-31 21:32:10 -08:00
Elliott Hughes
9b96dd6b17 am d2d63740: am 21cdd22f: Merge "Include <malloc.h> for struct mallinfo."
* commit 'd2d63740b78459a414e293efdb16e7a9ac089d5c':
  Include <malloc.h> for struct mallinfo.
2015-01-31 07:49:25 +00:00
Elliott Hughes
a26423f22c am fd10c019: am 09c33824: Merge "Break two incorrect transitive includes."
* commit 'fd10c019fab50c06f391b6a765b0904ce477d3b7':
  Break two incorrect transitive includes.
2015-01-31 07:49:24 +00:00