Commit graph

37122 commits

Author SHA1 Message Date
Almaz Mingaleev
a52a0daf84 Set TZDEFAULT to NULL.
TZDEFAULT not applicable to bionic as there is no file per time
zone mapping.

Bug: 25413083

Test: CtsLibcoreTestCases
Test: CtsLibcoreOjTestCases
Test: CtsBionicTestCases
Change-Id: Ie489b5b2cda6c6f623f32e5413da77ec5eaa823f
2022-06-07 10:00:16 +01:00
Almaz Mingaleev
5411aff6bb Bump tzcode from 2016g to 2022a*.
Upstream has renamed tzsetlcl to tzset_unlocked. As bionic's
implementation of tzset_unlock differs from upstream, these changes were
skipped.

Also, upstream has removed constants (SECSPERMIN, etc) from tzfile.h. As
they are used in strptime.c, I've decided to leave them in tzfile.h and
to not bring them into strptime.c.

HAVE_TZNAME and USG_COMPAT flags semantics were updated, thus setting
their values to 2 in Android.bp file. See
1a27ec76bc

* 4742526b7e
and 0e8f0b06ac
were picked up, which are not part of 2022a.

Changes were applied using following commands:
  1) Checkout tzcode repo
  2) Prepare patches for all tzcode file using
    git diff 2016g 2021e -- <file-name> > <file-name-patch>
  3) Apply these patches to files in bionic using
    patch -p1 <file-name> <file-name-patch>

Bug: 25413083
Test: CtsLibcoreTestCases
Test: CtsLibcoreOjTestCases
Test: CtsBionicTestCases

Change-Id: I9aba4cbeab30171a32f94d20c8e4057804a4c01f
2022-06-07 09:59:16 +01:00
Treehugger Robot
edbe60ffb5 Merge "Mention O_CREAT and O_TMPFILE in both open(2) fortify messages." am: 4fc8b0555f am: 35f3957ec4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2117848

Change-Id: I2c2ee31f310b32b2abcf7f7f8a71252e2982bef4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 03:11:44 +00:00
Treehugger Robot
35f3957ec4 Merge "Mention O_CREAT and O_TMPFILE in both open(2) fortify messages." am: 4fc8b0555f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2117848

Change-Id: If9ad0a7c7b590c5972146c16cb7e7d27178c2a2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 02:46:21 +00:00
Treehugger Robot
4fc8b0555f Merge "Mention O_CREAT and O_TMPFILE in both open(2) fortify messages." 2022-06-07 02:26:48 +00:00
Elliott Hughes
900a9890e4 Mention O_CREAT and O_TMPFILE in both open(2) fortify messages.
Spotted while reading gbiv's forthcoming "how fortify works"
documentation.

Test: treehugger
Change-Id: I89827bc9afa8e445de8361e938075fabf73ac518
2022-06-06 23:50:34 +00:00
Treehugger Robot
c88c2c773b Merge "memtag_stack: vfork and longjmp support." am: 4ebdeebef7 am: cabe057f2b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097258

Change-Id: I53a3658f5ffee64ab4529e86ee1b0433f557025d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 23:56:31 +00:00
Treehugger Robot
cabe057f2b Merge "memtag_stack: vfork and longjmp support." am: 4ebdeebef7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097258

Change-Id: I169579ec60e4f00562fc9a7c1273c7272421e266
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 23:33:26 +00:00
Treehugger Robot
4272430523 Merge "Revert "Update to v5.18 kernel headers."" am: 6cfefe5842 am: 542a242cff
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2106941

Change-Id: Ic3c8118335344d93df123bae088e85ee8e7e82d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 23:19:22 +00:00
Treehugger Robot
4ebdeebef7 Merge "memtag_stack: vfork and longjmp support." 2022-05-27 23:12:43 +00:00
Treehugger Robot
542a242cff Merge "Revert "Update to v5.18 kernel headers."" am: 6cfefe5842
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2106941

Change-Id: I9da75f9026a9999388370490e637008aac05038e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 22:58:40 +00:00
Treehugger Robot
6cfefe5842 Merge "Revert "Update to v5.18 kernel headers."" 2022-05-27 22:40:37 +00:00
Greg Kaiser
55b5639cca Revert "Update to v5.18 kernel headers."
Revert "Update to v5.18 kernel headers."

Revert submission 2106847-kernel_update

Reason for revert: b/234125620
Reverted Changes:
I5844ca1fc:Update to v5.18 kernel headers.
I5700813ee:Update to v5.18 kernel headers.
Bug: 234125620

Change-Id: I07a39aa9c01939455b5a2a9da5fc04be497ca399
2022-05-27 20:41:14 +00:00
Evgenii Stepanov
3031a7e45e memtag_stack: vfork and longjmp support.
With memtag_stack, each function is responsible for cleaning up
allocation tags for its stack frame. Allocation tags for anything below
SP must match the address tag in SP.

Both vfork and longjmp implement non-local control transfer which
abandons part of the stack without proper cleanup. Update allocation
tags:
* For longjmp, we know both source and destination values of SP.
* For vfork, save the value of SP before exit() or exec*() - the only
  valid ways of ending the child process according to POSIX - and reset
  tags from there to SP-in-parent.

This is not 100% solid and can be confused by a number of hopefully
uncommon conditions:
* Segmented stacks.
* Longjmp from sigaltstack into the main stack.
* Some kind of userspace thread implementation using longjmp (that's UB,
  longjmp can only return to the caller on the current stack).
* and other strange things.

This change adds a sanity limit on the size of the tag cleanup. Also,
this logic is only activated in the binaries that carry the
NT_MEMTAG_STACK note (set by -fsanitize=memtag-stack) which is meant as
a debugging configuration, is not compatible with pre-armv9 CPUs, and
should not be set on production code.

Bug: b/174878242
Test: fvp_mini with ToT LLVM (more test in a separate change)

Change-Id: Ibef8b2fc5a6ce85c8e562dead1019964d9f6b80b
2022-05-27 13:19:34 -07:00
Treehugger Robot
fd1c45a8df Merge "Basic support for MTE stack tagging." am: 39de8b944e am: 28d564cf3e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097257

Change-Id: I40c9cfc291aef3bb344c815bfca239e74690b179
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 02:55:15 +00:00
Treehugger Robot
28d564cf3e Merge "Basic support for MTE stack tagging." am: 39de8b944e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097257

Change-Id: I33f87f048a4d1aecc6b8a18b641d93e47c092b03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 02:36:59 +00:00
Treehugger Robot
39de8b944e Merge "Basic support for MTE stack tagging." 2022-05-27 02:15:53 +00:00
Evgenii Stepanov
f9fa32acf3 Basic support for MTE stack tagging.
Map all stacks (primary, thread, and sigaltstack) as PROT_MTE when the
binary requests it through the ELF note.

For the reference, the note is produced by the following toolchain changes:
https://reviews.llvm.org/D118948
https://reviews.llvm.org/D119384
https://reviews.llvm.org/D119381

Bug: b/174878242
Test: fvp_mini with ToT LLVM (more tests in a separate change)

Change-Id: I04a4e21c966e7309b47b1f549a2919958d93a872
2022-05-26 16:18:53 -07:00
Christopher Ferris
838b116a1f Merge "Update to v5.18 kernel headers." am: a92074cb01 am: 274b51d28a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2106847

Change-Id: Ia7c3aed2d9131a232fea8b9a66564842ad61716c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 02:48:04 +00:00
Christopher Ferris
274b51d28a Merge "Update to v5.18 kernel headers." am: a92074cb01
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2106847

Change-Id: Ia5965e10682bd082ee79ec85bdff269d730ee185
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 02:20:33 +00:00
Christopher Ferris
a92074cb01 Merge "Update to v5.18 kernel headers." 2022-05-26 00:42:21 +00:00
Christopher Ferris
5d3679612f Update to v5.18 kernel headers.
Kernel headers coming from:

Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-5.18

Test: Builds.
Test: All bionic unit tests pass on a coral device.
Change-Id: I5700813eec0fb0db55bee4d75b129400b7a239bd
2022-05-25 14:30:25 -07:00
Colin Cross
4f73f46b89 Merge "Disable close_range test for musl" am: 98edc0c14e am: 9f375bbb49
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2103348

Change-Id: I2c1b4f65ea955d66b72a395eeb2d21b344f5334d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 15:55:11 +00:00
Colin Cross
9f375bbb49 Merge "Disable close_range test for musl" am: 98edc0c14e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2103348

Change-Id: I6e073eb23709d8c8266e72f32ac5d4abe68bb911
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 15:28:23 +00:00
Colin Cross
98edc0c14e Merge "Disable close_range test for musl" 2022-05-24 15:08:13 +00:00
Colin Cross
1b8ebeab1c Disable close_range test for musl
Musl doesn't have close_range, skip the test.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: I7ed485f2d0ec08358c856430b7c4c45fbe45a39f
2022-05-23 16:07:22 -07:00
Treehugger Robot
1e1cf38cac Merge "Fix it to call the lambda function" am: 5c36810f5e am: 68f5e8222d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097963

Change-Id: I41ab61099a945014bed210841e88b9eb4052c80a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 22:54:00 +00:00
Treehugger Robot
68f5e8222d Merge "Fix it to call the lambda function" am: 5c36810f5e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097963

Change-Id: Iba1a9a0a061c29b63c68650a7b7b747e58cb3030
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 22:34:13 +00:00
Treehugger Robot
5c36810f5e Merge "Fix it to call the lambda function" 2022-05-23 22:03:02 +00:00
Christopher Ferris
a1574d56e4 Merge "Add options to only backtrace specific sizes." am: 08f98b6734 am: 8853da98be
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097385

Change-Id: If0ab34b79c6633d1b34f51d9539e6f96e54d08a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 18:05:09 +00:00
Christopher Ferris
8853da98be Merge "Add options to only backtrace specific sizes." am: 08f98b6734
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097385

Change-Id: I55145c6b3473fead2de0da7eeac59316a55271b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 17:34:18 +00:00
Christopher Ferris
08f98b6734 Merge "Add options to only backtrace specific sizes." 2022-05-19 16:32:29 +00:00
Suchang Woo
119765415a Fix it to call the lambda function
The lambda function is converted to bool instead of being called. So,
get_transparent_hugepages_supported() returns always true.

Test: check whether /sys/kernel/mm/transparent_hugepage/enabled is
accessed via strace.
Bug: http://b/233137490
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
Change-Id: I88b0d18d8ceb2300482043391eed4ae7041866ca
2022-05-19 02:13:39 +00:00
Elliott Hughes
6ea61e4990 Merge "Remove the KSM hack in mmap()." am: f2d59f93e6 am: 7fb7ec2d9f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2100544

Change-Id: I7d7593a3167d2e85d1a588f15f703a96b6dda60e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 00:54:51 +00:00
Christopher Ferris
551390aced Merge "Make the unit tests isolated." am: c7b31befbf am: 9619877a0c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097387

Change-Id: I9079c0ab3b1fbc89104605dc9e5dcb91ad5cc133
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 00:54:42 +00:00
Christopher Ferris
a383648d3a Add options to only backtrace specific sizes.
Add backtrace_size for only backtracing a single size.
Add backtrace_min_size to set the minimum value of size to backtrace.
Add backtrace_max_size to set the maximum value of size to backtrace.

Documented the new options.

Test: New unit test pass.
Change-Id: I1a773737910cd4bc2af9546547b3a2740bbcb22b
2022-05-18 17:05:05 -07:00
Elliott Hughes
7fb7ec2d9f Merge "Remove the KSM hack in mmap()." am: f2d59f93e6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2100544

Change-Id: I307deb12dd67e9fe9e9869b25c0c7ffb4f4f2bcc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 23:23:57 +00:00
Elliott Hughes
f2d59f93e6 Merge "Remove the KSM hack in mmap()." 2022-05-18 23:15:47 +00:00
Christopher Ferris
9619877a0c Merge "Make the unit tests isolated." am: c7b31befbf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2097387

Change-Id: Icf18186b7d815a14bf3a3487e486485212fa0d33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 23:15:05 +00:00
Christopher Ferris
c7b31befbf Merge "Make the unit tests isolated." 2022-05-18 22:53:27 +00:00
Florian Mayer
1ca52a7c95 Merge "Remove unused function." am: fb42de4449 am: e35b67eae1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2100584

Change-Id: I68c88725e821a7caa73f53c1d6e30cb468ae0513
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 18:45:43 +00:00
Florian Mayer
e35b67eae1 Merge "Remove unused function." am: fb42de4449
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2100584

Change-Id: Ieb702d53e138705f1c7e09c33e8915289321536f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 18:32:05 +00:00
Florian Mayer
fb42de4449 Merge "Remove unused function." 2022-05-18 18:09:40 +00:00
Automerger Merge Worker
ebba2d1091 Merge "Merge "Merge "Merge "Merge "mntent_test: don't assume /proc isn't the first mount." into android10-tests-dev am: 0462cfb766" into android11-tests-dev am: 0a5cc21c42" into android12-tests-dev am: 46871c040d" into android12L-tests-dev am: e6fb091bba" am: f4b3e6c408 am: a65b18197c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2098734

Change-Id: I782349aa09d19879a60c805affc15f6fe724b81c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 02:22:12 +00:00
Christopher Ferris
5046a2d092 Merge "Use new AndroidLocalUnwinder." am: 6f54ff6ca1 am: d310153a1b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2046505

Change-Id: I64cf15eb6a47533ef57770ab250fccf920dd918e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 02:21:59 +00:00
Automerger Merge Worker
a65b18197c Merge "Merge "Merge "Merge "Merge "mntent_test: don't assume /proc isn't the first mount." into android10-tests-dev am: 0462cfb766" into android11-tests-dev am: 0a5cc21c42" into android12-tests-dev am: 46871c040d" into android12L-tests-dev am: e6fb091bba" am: f4b3e6c408
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2098734

Change-Id: I143f90c0521dacecbf9241f4317f9fd87dc68789
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 01:54:50 +00:00
Christopher Ferris
d310153a1b Merge "Use new AndroidLocalUnwinder." am: 6f54ff6ca1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2046505

Change-Id: I1a3e32d696839e250748e3a6520985567941789f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 01:54:28 +00:00
Automerger Merge Worker
f4b3e6c408 Merge "Merge "Merge "Merge "Merge "mntent_test: don't assume /proc isn't the first mount." into android10-tests-dev am: 0462cfb766" into android11-tests-dev am: 0a5cc21c42" into android12-tests-dev am: 46871c040d" into android12L-tests-dev am: e6fb091bba" 2022-05-18 01:29:27 +00:00
Automerger Merge Worker
57ce2d6520 Merge "Merge "Merge "Merge "mntent_test: don't assume /proc isn't the first mount." into android10-tests-dev am: 0462cfb766" into android11-tests-dev am: 0a5cc21c42" into android12-tests-dev am: 46871c040d" into android12L-tests-dev am: e6fb091bba
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2098734

Change-Id: I00dfbcd763718b10c473f4cf8fe41a6ac2dc99d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 01:29:24 +00:00
Automerger Merge Worker
e6fb091bba Merge "Merge "Merge "Merge "mntent_test: don't assume /proc isn't the first mount." into android10-tests-dev am: 0462cfb766" into android11-tests-dev am: 0a5cc21c42" into android12-tests-dev am: 46871c040d" into android12L-tests-dev 2022-05-18 01:11:09 +00:00