With a regular x86 kernel we are always able to get 32
min bits for mmap randomization.
However to emulate 16KB for x86 app developers the kernel
can only provide 30 bits for the randomization due the to
larger page size (PAGE_SHIFT =+ 2).
Allow the min rand bits to be (32 - (PAGE_SHIFT - 12)) in
order to generically support larger than 4KB page sizes.
This should be a no-op change for all devices, except the
x86 16KB emulator, since they will always be able to get
32 random bits.
Bug: 309816695
Test: Boot test 4k x86 device
Test: Boot test emulated 16k x86 device
Change-Id: I48d47d56ac3aecb71a9e0093a7033bb60b89c2b7
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Framework or applications can try to find userdata dm target from "/proc/mounts"
which gives "/dev/block/mapper/userdata".
That causes breaking the assumption in all the places.
Bug: 311165039
Change-Id: I9ea1b4589cdd52021d9807f7240c2e4b6d6d05ef
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
For log messages like the following it is not possible to derive why
this message has been logged:
E libprocessgroup: AddTidToCgroup failed to write '3949'; fd=55: Operation not supported on transport endpoint
Hence include the cgroup path and the tid type in the log message.
Change-Id: I057711fe576b82f6454456b7284186ddeece33c3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
When attempting to remove a cgroup, a ENOENT means this cgroup is
already removed. Treat such errno as success for idempotency.
Test: th
Bug: 308900853
Change-Id: I6ef3c25f03d185194205b3845784d284fdc4d444
This allows system_server to access these devices.
Note: This also matches existing ueventd rules used by any
device which followed the Sensor HAL's dynamic sensor README.
Bug: 303522222
Test: ls -l /dev/hidraw0
Change-Id: I0830aca77422d6cab64af05dba1554667737760c
No need partition verification when device boots on snapshot without
slot switch.
This also saves couple of seconds of boot time.
Bug: 299011882
Test: Boot device on snapshot, OTA on Pixel
Change-Id: I5b781de7e0f745bbfe9646f88ca912139b2d853e
Signed-off-by: Akilesh Kailash <akailash@google.com>
Since these functions are used across both parser and writer, updating
it as inline functions in cow_format.
Test: cow_api_test
Change-Id: I9824684e3b9b48947accce935335d4019d745ae0
If any of the read-only partitions are mounted off dm-user
then certainly update is in-progress.
Bug: 308900853
Test: OTA on Pixel, reboot during OTA.
Change-Id: I36121e1d99ec7c1f1110a65fc67996190875af18
Signed-off-by: Akilesh Kailash <akailash@google.com>
We want to add a resume_point_count in the header to represent how many
resume points we've written. In the case that we've written less than
resume_buffer_size, we only want to read the valid resume points.
without these changes incremental OTA runs into segfault or have faulty
data when trying to FindResumeOp() as our resume points contain invalid
entries
Test: full ota followed by inc ota on cuttlefish
Change-Id: I0a8971955439639f2d0f39d9d518c1145ae15c3d
Update FindResumeOp to take in a uint64_t to match the value of the
caller function
Test: ota with following CL
Change-Id: I19568d119b7ebd75ea9e98970b311ae7da92ff0e
Cow size should just be wherever the last data position is written. In
v3 we no longer have a footer, so this calculation is simple. This
function is used by cow estimator
Test: cow_api_test
Change-Id: I08204e2d560b120450019a529baa41de9b8e66d5
The attached test data is a 4096 length byte run that gz compresses to
exactly 4096 bytes. This exposes an edge case in CowReader::ReadData
with v2 snapshot files.
Bug: 310191184
Test: cow_api_test
Change-Id: I35e8d7e939d607d1dc118285ebc2f636c2291a20
This is a change for some system apps that have /data/user_de/0/ in the
package list, but it's easier to reason about and more consistent to
always go down the same path.
Bug: http://b/308990322
Test: treehugger
Change-Id: I479485655c61e8a31fb23f779c66d54b0bb476c0
Add resume space to cow v3. Resume buffer goes after header and scratch
space, and is currently set to contain 4 resume points. When AddLabel is
called, the oldest label is replaced with newest one.
Parser will parse up until the last resumable op from a given label.
Test: cow_api_test
Change-Id: Ie072f245721776887d59c96dad296965ad31a5cc
Ensure that cow was written by v3 writer for the data_length check to
work. All ops written by v2 writer should go through the decompressor
path if a compressor was used.
Test: cow_api_test
Change-Id: I053d6fdaf29ef7001e68f43b45d5a3ff1a36b1c3