Commit Graph

34287 Commits

Author SHA1 Message Date
Adam Lesinski 0d4fcc5fc9 Merge "libziparchive: Use ReadAtOffset exclusively" am: a0360ad6a3
am: 67a3a88c24

Change-Id: Iaf778d8cbc1081844e753130a623cb7a463535f5
2017-07-25 22:33:44 +00:00
Lennart Wieboldt 8a8b97b271 Merge "Remove LOCAL_CLANG and clang: true" am: 80ec81cf4b
am: f7b315c985

Change-Id: Id5ebeb3271a36f21bf28c186f7ec227d31bb10ac
2017-07-25 22:33:27 +00:00
Adam Lesinski 67a3a88c24 Merge "libziparchive: Use ReadAtOffset exclusively"
am: a0360ad6a3

Change-Id: Ic6804698ca4c612f8f619c2684b1d2010e1ba024
2017-07-25 22:29:13 +00:00
Lennart Wieboldt f7b315c985 Merge "Remove LOCAL_CLANG and clang: true"
am: 80ec81cf4b

Change-Id: Ia7f79d8e25ee9870fe44d198568d0e5dabdff811
2017-07-25 22:28:56 +00:00
Adam Lesinski a0360ad6a3 Merge "libziparchive: Use ReadAtOffset exclusively" 2017-07-25 22:22:21 +00:00
Treehugger Robot 80ec81cf4b Merge "Remove LOCAL_CLANG and clang: true" 2017-07-25 22:20:23 +00:00
Siarhei Vishniakou a0e5e3abce Merge "Add thread safety analysis annotations." am: e7ce8c8485
am: f23f21a231

Change-Id: Icbe910717db9805c06d761e79c435bb33d21d1cf
2017-07-25 21:46:53 +00:00
Siarhei Vishniakou f23f21a231 Merge "Add thread safety analysis annotations."
am: e7ce8c8485

Change-Id: I4963b623b6e5a190bfee1dcfec01fe009ba0e94f
2017-07-25 21:42:54 +00:00
Treehugger Robot e7ce8c8485 Merge "Add thread safety analysis annotations." 2017-07-25 21:37:27 +00:00
Wei Wang 34e13498dc Merge "Do not umount roofs even if it is R/W." am: 43567e39dc
am: 22782a7269

Change-Id: I84024bff22fee8569c0f1193d6f3d8417d3cbc1b
2017-07-25 20:44:21 +00:00
Wei Wang 22782a7269 Merge "Do not umount roofs even if it is R/W."
am: 43567e39dc

Change-Id: I89bfb662469c28559eb628e48aee1ecb262ad2ee
2017-07-25 20:41:19 +00:00
Treehugger Robot 43567e39dc Merge "Do not umount roofs even if it is R/W." 2017-07-25 20:35:50 +00:00
Steve Muckle eb7db75c28 Merge "init: add support for global seccomp boot option" am: 9f1980e2fc
am: 5a79972238

Change-Id: Ide7500d4ff4d9eebf2fea1d81ff77044a6d63c57
2017-07-25 20:30:30 +00:00
Steve Muckle 5a79972238 Merge "init: add support for global seccomp boot option"
am: 9f1980e2fc

Change-Id: I35532202b360ef32cdb21c048cd3d2e1139b7d67
2017-07-25 20:26:29 +00:00
Treehugger Robot 9f1980e2fc Merge "init: add support for global seccomp boot option" 2017-07-25 20:18:51 +00:00
Adam Lesinski de117e4a49 libziparchive: Use ReadAtOffset exclusively
The use of ReadAtOffset is meant to allow concurrent access
to the zip archive once it has been loaded. There were places
where this was the case, and some places that did a seek + read
combination, which could lead to data races.

NOTE: On Windows, we are not using pread as the implementation of
ReadAtOffset, therefore the guarantees on Windows are weaker.

On Linux, pread allows the file descriptor to be read at a specific
offset without changing the read pointer. This allows inherited fd's
and duped fds to be read concurrently.

On Windows, we use the ReadFile API, which allows for an atomic seek +
read operation, but modifies the read pointer. This means that any mix
use of ReadAtOffset and Read will have races. Just using ReadAtOffset is
safe.

For the Windows case, this is fine as the libziparchive code now only
uses ReadAtOffset.

Bug: 62184114
Bug: 62101783
Test: make ziparchive-tests (existing tests pass)
Change-Id: Ia7f9a30af2216682cdd9d578d26e84bc46773bb9
2017-07-25 18:12:12 +00:00
Wei Wang a01c27eef8 Do not umount roofs even if it is R/W.
Latest device has rootfs instead of "/system" mount point

Bug: 37737296
Test: adb remount, reboot, and check log
Change-Id: I315ecf71e85255fc55c3a80619920b456bad0956
2017-07-25 10:55:10 -07:00
Lennart Wieboldt cd15fc7ba8 Remove LOCAL_CLANG and clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-07-25 14:29:50 +02:00
Wei Wang fc2f0a0ce7 Merge "init: Fire shutdown trigger for thermal shutdown" am: 603cae8b48
am: b0a6129c43

Change-Id: I3f88302f280809e9df98dc55dd2ca6ebd269e7bb
2017-07-24 22:17:50 +00:00
Wei Wang b0a6129c43 Merge "init: Fire shutdown trigger for thermal shutdown"
am: 603cae8b48

Change-Id: I0bbd26f22887afcf7b2145b78239c9f8e2c45047
2017-07-24 22:15:20 +00:00
Treehugger Robot 603cae8b48 Merge "init: Fire shutdown trigger for thermal shutdown" 2017-07-24 22:09:37 +00:00
Steve Muckle af1a9bfb8f init: add support for global seccomp boot option
Setting androidboot.seccomp=global on the kernel command line shall
enable seccomp for all processes rather than just in zygote. Doing
this has a performance impact, for now it shall just be used to audit
syscall usage during testing.

Bug: 37960259
Change-Id: I6b9fc95e9bec5e2bcfe6ef0b4343a5b422e30152
2017-07-24 13:33:54 -07:00
Wei Wang 1be2212319 init: Fire shutdown trigger for thermal shutdown
Recent change in init has bring normal shutdown sequence in
thermal-shutdown condition. This CL will make sure init fire shutdown
trigger where holds custom shutdown actions for vendor SoC/platform.

Bug: 63686426
Test: adb shell setprop sys.powerctl thermal-shutdown
Change-Id: Ieb8579fdf9c30c1a81d60466a7375c9784f3ca98
2017-07-24 13:12:22 -07:00
Tom Cherry d78477cf59 Merge "init: use delegating constructor for Service" am: ce3b2de809
am: 9549d6889a

Change-Id: I5b2c03c405b8261a2613905d8597c58b73ca4bb9
2017-07-24 16:33:03 +00:00
Tom Cherry 9549d6889a Merge "init: use delegating constructor for Service"
am: ce3b2de809

Change-Id: Ic9bd63b44f57b505b1cd379948786349e92c0c45
2017-07-24 16:27:35 +00:00
Tom Cherry ce3b2de809 Merge "init: use delegating constructor for Service" 2017-07-24 16:19:46 +00:00
Siarhei Vishniakou 4e5b69134b Add thread safety analysis annotations.
Enable thread safety analysis annotations for clang.
See https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
for instructions on using these in the source code.

Bug: 28094863
Test: annotated
frameworks/native/services/inputflinger/InputDispatcher.cpp
and enabled '-Werror' and '-Wthread-safety' clang
compiler flags in Android.bp for inputflinger.
Observed compiler errors when accessing
instance attributes without holding a lock. Also added
a compile test Mutex_test.cpp, which can be build using
m libutils_tests and run using
/data/nativetest64/libutils_tests/libutils_tests

Change-Id: I24ce111241cc339901bc45dda8b446df5299af4a
2017-07-21 13:25:42 -07:00
Keun-young Park 29a5cc174c Merge "fs_mgr:Add filter condition to make sure that the super block is correct." am: 9dd1a12b1e
am: bc4c5032fc

Change-Id: I8c0504873552f9f1cf1f1af44ed0e245172e22bf
2017-07-21 20:13:52 +00:00
Keun-young Park bc4c5032fc Merge "fs_mgr:Add filter condition to make sure that the super block is correct."
am: 9dd1a12b1e

Change-Id: I8947564ee32cd90ea8f3a7c986426b9c3dbd70af
2017-07-21 20:11:52 +00:00
Keun-young Park 9dd1a12b1e Merge "fs_mgr:Add filter condition to make sure that the super block is correct." 2017-07-21 20:04:15 +00:00
Tom Cherry 5d17d044c7 init: use delegating constructor for Service
Test: init unit tests
Change-Id: Ida0be6195a3675bfca3d979db03855b45417b11e
2017-07-21 12:42:07 -07:00
Jin Qian 998de96766 Merge changes from topic 'mke2fs_2' am: 176827e166
am: 3f531ac5cf

Change-Id: Ic83be85a8955df27adf84e9ab9a2c5e40c0166e5
2017-07-21 19:10:35 +00:00
Jin Qian 3f531ac5cf Merge changes from topic 'mke2fs_2'
am: 176827e166

Change-Id: I933e0d96d9c81c5800e4cf406582277b140f3e2b
2017-07-21 19:06:03 +00:00
Treehugger Robot 176827e166 Merge changes from topic 'mke2fs_2'
* changes:
  fastboot: add mke2fs and e2fsdroid to build package
  fastboot: call mke2fs tools to generate ext4 image
  fs_mgr: call format_f2fs correctly with -f
  init: require e2fsdroid and mke2fs when building init
  init: rename mke2fs tools with _static suffix
2017-07-21 19:00:46 +00:00
Jin Qian 3fdf5eca70 fastboot: add mke2fs and e2fsdroid to build package
Bug: 23686092
Bug: 63849632
Change-Id: Iff0d92b7174597d43ee646847888aedc2080052a
(cherry picked from commit 6ce78321a2)
2017-07-21 12:00:16 -07:00
Jin Qian 4afba66781 fastboot: call mke2fs tools to generate ext4 image
Set MKE2FS_CONFIG to empty to use mke2fs default configs

Test: fastboot --wipe-and-use-fbe
Bug: 35219933
Change-Id: Ibc97bb125899e1f1fe820d53709fdb2ab291c171
(cherry picked from commit d14d7c14cb)
2017-07-21 12:00:16 -07:00
katao 4e8d73fa0c fs_mgr:Add filter condition to make sure that the super block is correct.
Because full disk encryption make surper block is not except contents. Only
judge the magic number can prevent most of encrypted surper block.
In particular, magic number plaintext may be equal ciphertext. In order to
avoid this situation, we add the judgment of adaptive situation of the
s_rev_level, s_log_block_size and EXT4_INODE_SIZE.

Test: 1. Config fstab,userdata add flags: forceencrypt=footer,reservedsize=128M
      2. build a new target files, and flash all image.
      3. Config encrypt userdata surperblock,set magic number is 0xEF53
      4. reboot system and check log of fs_mgr.
Change-Id: I925584d58f17afabbb3aa91f8be2302518172bb2
Signed-off-by: katao <katao@xiaomi.com>
2017-07-21 11:35:35 +08:00
Jaegeuk Kim c0d88edfec fs_mgr: call format_f2fs correctly with -f
This patch formats f2fs with -f option.

Change-Id: I3fc415f35d81f22cbf1eadebc619465d36205927
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit 0331c2cf77)
2017-07-20 11:54:47 -07:00
Jin Qian 00456978a2 init: require e2fsdroid and mke2fs when building init
init calls fs_mgr to format ext4 partitions. This requires
e2fsdroid and mke2fs in /system/bin/

Bug: 35219933
Change-Id: Ia32fe438cd9b9332f8e18e0cbe7f61bd050adcb1
(cherry picked from commit 041f849548)
2017-07-20 11:54:02 -07:00
Jin Qian 278b15c84c init: rename mke2fs tools with _static suffix
We build a static version for recovery mode. Give them
different names to avoid conflicts with regular version
in /system/bin/

Bug: 35219933
Change-Id: I738655ad9b9ad71c63ae604d9a4d659b0b671121
(cherry picked from commit a2421041bf)
2017-07-20 11:53:44 -07:00
Christopher Ferris 8c632cb59a Merge "Cleanup the libbacktrace interface a bit." am: e3d470b81d
am: 011f61f39d

Change-Id: Ib48f1f649de9cc660838d0883d9051d18ec0c2b9
2017-07-20 03:59:45 +00:00
Christopher Ferris fade4fc5c6 Merge "Speed up StepIfSignalHandler path." am: c6dd6e8a79
am: df8362bae6

Change-Id: Icc16e28e36b88609e20cb5c479c387a2e6d6f73f
2017-07-20 03:59:19 +00:00
Christopher Ferris 011f61f39d Merge "Cleanup the libbacktrace interface a bit."
am: e3d470b81d

Change-Id: Iba1db66328410d9f03660ddea89c2689dd938ebf
2017-07-20 03:53:52 +00:00
Christopher Ferris df8362bae6 Merge "Speed up StepIfSignalHandler path."
am: c6dd6e8a79

Change-Id: Ie0d80840db92a7be958979785b75d3bf4077b030
2017-07-20 03:53:22 +00:00
Christopher Ferris e3d470b81d Merge "Cleanup the libbacktrace interface a bit." 2017-07-20 03:45:06 +00:00
Christopher Ferris c6dd6e8a79 Merge "Speed up StepIfSignalHandler path." 2017-07-20 03:43:19 +00:00
Keun-young Park 614ccd7a02 Merge "init: Do full shutdown even for thermal shutdown" am: d5b36f38ef
am: a064892e1a

Change-Id: Ia6ddd5a680caa8283cf9d2a75c1eb49e1c79e413
2017-07-20 03:30:39 +00:00
Keun-young Park a064892e1a Merge "init: Do full shutdown even for thermal shutdown"
am: d5b36f38ef

Change-Id: If0bcd287d2656279a1d364761b0145ca4464299b
2017-07-20 03:27:38 +00:00
Treehugger Robot d5b36f38ef Merge "init: Do full shutdown even for thermal shutdown" 2017-07-20 03:21:41 +00:00
Bowgo Tsai e5de94756b Merge "fs_mgr_verity: allow verification error when the device is unlocked" am: a68f633675
am: 84937296c6

Change-Id: Ia71076213c9a6770ff35b999024b1d223c82bd77
2017-07-20 01:58:05 +00:00