Commit graph

60588 commits

Author SHA1 Message Date
Yifan Hong
9ca80b1989 Merge "vts_processgroup_validate_test: make deps static" am: d6b307fb15 am: 1e6ff23b6e
Change-Id: I36cb0d0a1363bb4777318dc6c07402537002392e
2020-05-11 19:52:36 +00:00
Yifan Hong
1e6ff23b6e Merge "vts_processgroup_validate_test: make deps static" am: d6b307fb15
Change-Id: Ibd82e15de71d3e94ca708e48b0c4fd1bf5f79ecc
2020-05-11 19:39:32 +00:00
Yifan Hong
d6b307fb15 Merge "vts_processgroup_validate_test: make deps static" 2020-05-11 19:29:39 +00:00
Ruchir Rastogi
147a163fa0 Merge "Use proper platform version checks (libstats)" into rvc-dev am: b797431342
Change-Id: I7c501adef9f366e3bb412267fcb1dc30ba22e87a
2020-05-11 18:00:28 +00:00
Woody Lin
d457f68d0a InitFatalReboot: Trigger panic explicitly for init_fatal_panic am: 8fb6e3fdaf
Change-Id: I09a74dfae2132841d859351bce31ba181d753690
2020-05-11 18:00:19 +00:00
Ruchir Rastogi
b797431342 Merge "Use proper platform version checks (libstats)" into rvc-dev 2020-05-11 17:22:24 +00:00
Lorenzo Colitti
14581de35a Merge "Simplify code that parses ifa_flags." am: cc39283883 am: 6d152b752c
Change-Id: If34b07be9a3d07194a4904e36fe905661eb5f0ff
2020-05-11 15:57:22 +00:00
Lorenzo Colitti
6d152b752c Merge "Simplify code that parses ifa_flags." am: cc39283883
Change-Id: I1b09a1d55de89bc3324c455adb23978be288b12e
2020-05-11 15:43:32 +00:00
Lorenzo Colitti
cc39283883 Merge "Simplify code that parses ifa_flags." 2020-05-11 15:34:10 +00:00
Woody Lin
8fb6e3fdaf InitFatalReboot: Trigger panic explicitly for init_fatal_panic
The exit of init panics the system *after* process context (mm, stack,
...etc.) are recycled, according to Linux kernel's 'do_exit'
implementation. To preserve most init process context for debugging,
triggers the panic via proc-sysrq explicitly.

Note: after this change, there will be no "Attempt to kill init" panic
when androidboot.init_fatal_panic is set.

Test: Insert data abort fault in init, the full process context is
      preserved in memory dump captured after panic.
Bug: 155940351
Change-Id: I3393bd00f99b8cb432cfa19a105b7d636b411764
(cherry picked from commit be1cf9006a)
2020-05-11 14:50:27 +00:00
Lorenzo Colitti
ca282b302b Simplify code that parses ifa_flags. am: c00d57d353
Change-Id: I57208a7308caaa0fa8db6d52d8fd7cfbbefba367
2020-05-11 13:53:43 +00:00
Lorenzo Colitti
077d1ea61b Simplify code that parses ifa_flags.
When parsing an RTM_NEWADDR or RTM_DELADDR, ifaddr is always
present (unless the message is invalid). So ifaddr->ifa_flags is
always known before any attributes are parsed.

Bug: 155005831
Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest continues to apss
Change-Id: Id1998faccca7d81c1b7f3e85e4912aa22919e94a
2020-05-11 22:33:27 +09:00
Lorenzo Colitti
22a7a07894 [automerger skipped] Parse IFA_F_* values above 0x80. am: 3991ca5657 -s ours
am skip reason: Change-Id I723f1106cbcea2186fc6452305942a0f8301fd2a with SHA-1 096fc5351f is in history

Change-Id: I6d5b9396565402ef1ef6ca21499f3ea2549571c5
2020-05-11 08:16:27 +00:00
Lorenzo Colitti
c00d57d353 Simplify code that parses ifa_flags.
When parsing an RTM_NEWADDR or RTM_DELADDR, ifaddr is always
present (unless the message is invalid). So ifaddr->ifa_flags is
always known before any attributes are parsed.

Bug: 155005831
Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest continues to apss
Change-Id: Id1998faccca7d81c1b7f3e85e4912aa22919e94a
2020-05-11 11:37:17 +09:00
Lorenzo Colitti
3991ca5657 Parse IFA_F_* values above 0x80.
In RTM_NEWADDR messages, the first 8 flags are reported in the
ifa_flags field in struct ifaddrmsg, but flags above 0x80 are
reported in the IFA_FLAGS attribute. NetlinkEvent currently only
looks at ifa_flags, so it cannot see higher-value flags such as
IFA_F_STABLE_PRIVACY. Fix this by parsing the IFA_FLAGS
attribute.

Bug: 155005831
Test: makes new test in aosp/1295495 pass
Original-Change: https://android-review.googlesource.com/1295670
Merged-In: I723f1106cbcea2186fc6452305942a0f8301fd2a
Change-Id: I723f1106cbcea2186fc6452305942a0f8301fd2a
2020-05-11 11:29:59 +09:00
Treehugger Robot
1c9e1b2848 Merge changes I57cb2003,I569d2b81,I01a10e36 am: 6153b71aea am: fb2ff0d5a7
Change-Id: I51c70479816b26b6813223d541a3ab0a986d27e3
2020-05-10 18:14:01 +00:00
Treehugger Robot
fb2ff0d5a7 Merge changes I57cb2003,I569d2b81,I01a10e36 am: 6153b71aea
Change-Id: Ifbb5f5767f3277d5cc594bde57528b7760b8ae03
2020-05-10 17:58:09 +00:00
Treehugger Robot
6153b71aea Merge changes I57cb2003,I569d2b81,I01a10e36
* changes:
  libnetutils/packet.c - create socket with close-on-exec
  libnetutils/packet.c - fix a raw socket reception race
  libnetutils/packet.c - fix a socket leak on bind error
2020-05-10 17:29:35 +00:00
Lorenzo Colitti
3ebee49cbe Merge "Parse IFA_F_* values above 0x80." am: b7dd29354f am: 9f9bd9b3a6
Change-Id: I2a02e2c5d1786b581dd0ccc0fb760db443bb582b
2020-05-10 05:53:10 +00:00
Lorenzo Colitti
9f9bd9b3a6 Merge "Parse IFA_F_* values above 0x80." am: b7dd29354f
Change-Id: I4d09aba3c71dff620f0f8873bfc5c413bb7e2919
2020-05-10 05:42:15 +00:00
Lorenzo Colitti
b7dd29354f Merge "Parse IFA_F_* values above 0x80." 2020-05-10 05:29:59 +00:00
Lorenzo Colitti
096fc5351f Parse IFA_F_* values above 0x80.
In RTM_NEWADDR messages, the first 8 flags are reported in the
ifa_flags field in struct ifaddrmsg, but flags above 0x80 are
reported in the IFA_FLAGS attribute. NetlinkEvent currently only
looks at ifa_flags, so it cannot see higher-value flags such as
IFA_F_STABLE_PRIVACY. Fix this by parsing the IFA_FLAGS
attribute.

Bug: 155005831
Test: makes new test in aosp/1295495 pass
Change-Id: I723f1106cbcea2186fc6452305942a0f8301fd2a
2020-05-10 11:36:59 +09:00
Maciej Żenczykowski
39c26d63cd libnetutils/packet.c - create socket with close-on-exec
This prevents fork/exec leaking sockets to child processes.

Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I57cb2003dd75b0bc5528978fd131730273e37a43
2020-05-08 22:34:37 -07:00
Maciej Żenczykowski
0129aaae86 libnetutils/packet.c - fix a raw socket reception race
A socket created bound to a specific protocol can receive packets before
it's bound to a specific interface/mac.

It's best to rely on the bind().

This replicates the way packet sockets are created in external/android-clat.
See: ring.c ring_create() and clatd.c configure_packet_socket()

Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I569d2b81a396f352ab5d1b71bd5ad0d96217aab1
2020-05-08 22:34:37 -07:00
Maciej Żenczykowski
b7f370c014 libnetutils/packet.c - fix a socket leak on bind error
and clean up the code a little bit while at it.

Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I01a10e36f852cde1b93a91f95b51294a434885ab
2020-05-08 22:34:37 -07:00
Christopher Ferris
3e88d36f96 Merge "Fix mac build." am: 5445c73012 am: 6cf64c1218
Change-Id: Ia6117b162ad853f6af94db9038533e1fd42fbbac
2020-05-09 05:23:44 +00:00
Christopher Ferris
6cf64c1218 Merge "Fix mac build." am: 5445c73012
Change-Id: I3ba84fb777d5de85970708aa564569296f0ebe20
2020-05-09 05:04:14 +00:00
Christopher Ferris
5445c73012 Merge "Fix mac build." 2020-05-09 04:49:07 +00:00
Chen Zhu
466c534eee Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev am: 8950624662
Change-Id: I21b780a48aa8e8c77d76556403b1570b3b612c08
2020-05-09 03:01:07 +00:00
Chen Zhu
8950624662 Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev 2020-05-09 02:48:48 +00:00
Woody Lin
6920e58f22 Merge "InitFatalReboot: Trigger panic explicitly for init_fatal_panic" am: c5f0640e48 am: 30820014a5
Change-Id: I199430c4843d2660a0af6076732e53a3c727183a
2020-05-09 02:16:51 +00:00
Woody Lin
30820014a5 Merge "InitFatalReboot: Trigger panic explicitly for init_fatal_panic" am: c5f0640e48
Change-Id: I669fd71b1aa8e948fd35872e10ff5ee35b340653
2020-05-09 02:03:41 +00:00
Woody Lin
c5f0640e48 Merge "InitFatalReboot: Trigger panic explicitly for init_fatal_panic" 2020-05-09 01:51:04 +00:00
Greg Kaiser
1936bc29f3 [automerger skipped] [DO NOT MERGE] Revert "Make libstatssocket a shared_lib" am: 168940f51a -s ours
am skip reason: subject contains skip directive

Change-Id: I4d903541dd5f88b64ddf1a0b78120311fdcc88e6
2020-05-09 00:04:37 +00:00
Chen Zhu
5daea5a6a2 Add test config for adbd_test and apply MainlineTestModuleController to it
to only run the tests when com.google.android.adbd is

installed on device.

Bug: 154845935
Test: m mts && mts-tradefed run mts-adbd
Change-Id: I2f203d25288580a07391703e2b28df54479a69f0
2020-05-08 16:47:07 -07:00
Greg Kaiser
168940f51a [DO NOT MERGE] Revert "Make libstatssocket a shared_lib"
This reverts commit 29512fbf70.

Specifically, we're reverting
https://googleplex-android-review.git.corp.google.com/c/platform/system/core/+/11419425/-1..1

Test: Local 'm -j71 out/soong/.intermediates/frameworks/base/tools/stats_log_api_gen/libstatslog/android_arm64_armv8-a_shared_com.android.bluetooth.updatable/unstripped/libstatslog.so'
Bug: 156091657
Change-Id: I79b4206beaa162078c76f9323a061923ec6ca0c6
2020-05-08 16:34:28 -07:00
Christopher Ferris
8a6dff22dc Fix mac build.
Add an inline for mmap64 to use on mac.

Bug: 156053599

Test: Builds.
Change-Id: Id02e2c2f40acea2bdef604e9b80b70a85a941927
2020-05-08 15:30:21 -07:00
Peter Collingbourne
47a8528992 Merge "Add stack trace coverage to MTE tests." am: 5d97966e8f am: 3a52bfc30d
Change-Id: Ic204af9387f2ee92c5877fa40d019fbe4bd88c58
2020-05-08 20:05:36 +00:00
Peter Collingbourne
3a52bfc30d Merge "Add stack trace coverage to MTE tests." am: 5d97966e8f
Change-Id: If3c9875007636362220295a90aeb4d7ac82b5492
2020-05-08 19:51:38 +00:00
Peter Collingbourne
5d97966e8f Merge "Add stack trace coverage to MTE tests." 2020-05-08 19:37:07 +00:00
Woody Lin
be1cf9006a InitFatalReboot: Trigger panic explicitly for init_fatal_panic
The exit of init panics the system *after* process context (mm, stack,
...etc.) are recycled, according to Linux kernel's 'do_exit'
implementation. To preserve most init process context for debugging,
triggers the panic via proc-sysrq explicitly.

Note: after this change, there will be no "Attempt to kill init" panic
when androidboot.init_fatal_panic is set.

Test: Insert data abort fault in init, the full process context is
      preserved in memory dump captured after panic.
Bug: 155940351
Change-Id: I3393bd00f99b8cb432cfa19a105b7d636b411764
2020-05-09 01:30:32 +08:00
Peter Collingbourne
bbe6905d7e Add stack trace coverage to MTE tests.
It's impractical to test the contents of the stack trace, but we
should at least test that *a* stack trace is present, which would
have caught the bug fixed by r.android.com/1306754 .

Bug: 135772972
Change-Id: Ic5e0b997caa53c7eeec4e5185df5c043c9d4fe3d
2020-05-08 10:14:47 -07:00
Jiyong Park
f72e8691ea [automerger skipped] Merge "Revert "Make libstatssocket a shared_lib"" am: d427b54c53 -s ours am: 8dd4ad9889 -s ours
am skip reason: Change-Id I5889dd718536f5f2c693b4c2e7331c9cc2eb2ac9 with SHA-1 d78f4dab02 is in history

Change-Id: I0ac2b779a7e977123ad5f17f2301ee10729923d4
2020-05-08 08:43:53 +00:00
Jiyong Park
8dd4ad9889 [automerger skipped] Merge "Revert "Make libstatssocket a shared_lib"" am: d427b54c53 -s ours
am skip reason: Change-Id I5889dd718536f5f2c693b4c2e7331c9cc2eb2ac9 with SHA-1 29512fbf70 is in history

Change-Id: I19b778df1b3d9bea7ac61a5ebf3d357e88f0f930
2020-05-08 08:22:46 +00:00
Jiyong Park
d427b54c53 Merge "Revert "Make libstatssocket a shared_lib"" 2020-05-08 08:11:24 +00:00
Jiyong Park
3e0ec0f7f7 Revert "Make libstatssocket a shared_lib"
This reverts commit 29512fbf70.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Test: m on full-eng

Merged-In: I5889dd718536f5f2c693b4c2e7331c9cc2eb2ac9
Change-Id: If28b7590d4e58e44a24581f3b5891b2441504801
2020-05-08 07:57:09 +00:00
Jiyong Park
b71b653b71 [automerger skipped] Merge "Make libstatssocket a shared_lib" am: d25f5dbba9 am: 5806f7c2b8 -s ours
am skip reason: Change-Id I5889dd718536f5f2c693b4c2e7331c9cc2eb2ac9 with SHA-1 d78f4dab02 is in history

Change-Id: I4e881a4a8d7b67f1577939f5a99fce9e55ea0bf7
2020-05-08 02:48:28 +00:00
Jiyong Park
5806f7c2b8 Merge "Make libstatssocket a shared_lib" am: d25f5dbba9
Change-Id: I6c83f399989f6c4fd9f3fa3a00226fed2ffc7cdc
2020-05-08 02:35:11 +00:00
Jiyong Park
d25f5dbba9 Merge "Make libstatssocket a shared_lib" 2020-05-08 02:12:58 +00:00
TreeHugger Robot
08c434febf [automerger skipped] Merge "first_stage_init: add support to skip module load failures" into rvc-dev am: 1cf1238d4a -s ours
am skip reason: Change-Id I068c631a22c848e45a421b297b1acae1b3deb3c1 with SHA-1 c8907427bc is in history

Change-Id: Ie6f10153ac7cf2410b71dbf46bcbcba311dd6b1f
2020-05-07 22:02:30 +00:00