system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:4286:61: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
^~~~~~~~~~~~~
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2731:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2218:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:1622:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
Test: m checkbuild
Bug: 72331524
Change-Id: Iefc3b4ae6b36ba9f6cb908c03301cbe429ade320
Adiantum is a crypto method Android is supporting for devices
which don't have AES CPU instructions. See the paper
"Adiantum: length-preserving encryption for entry-level processors"
(https://eprint.iacr.org/2018/720.pdf) for more details.
We add Adiantum to our list of supported encryption modes.
Bug: 112010205
Test: Tested on a device
Change-Id: I14a400164803a1e217d378ad9bd8b67a61b8b7d0
The new variant is primarily used in framework. See: go/ag/5780400
for usage. Also add tests, benchmarks and fix several issues found in SysMemInfo
class.
New benchmark results are:
--------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------
BM_ReadMemInfo_old 7726 ns 7696 ns 90201
BM_ReadMemInfo_new 7554 ns 7525 ns 90358
BM_ZramTotal_old 6446 ns 6406 ns 108361
BM_ZramTotal_new 6529 ns 6488 ns 106545
BM_MemInfoWithZram_old 14485 ns 14412 ns 48492
BM_MemInfoWithZram_new 20572 ns 20459 ns 33438
--------------------------------------------------------------
The reason for BM_MemInfoWithZram_new shows worse numbers is because
the new API also tries to find more than 1 zram device (if it exists).
The old implementation hard coded everything to "/sys/block/zram0/"
Test: libmeminfo_test 1
Bug: 114325007
Bug: 111694435
Change-Id: I246d9e9a54986ee9b2542d1eaac79ecf7310b23a
Signed-off-by: Sandeep Patil <sspatil@google.com>
This reverts commit 2f56b1fff8.
Reason for revert: Breaks bionic-unit-tests's dlfcn.dladdr_libc
and x86 CtsJniTestCases' JniStaticTest.test_linker_namespaces.
Bug: 113373927
Bug: 120661824
Change-Id: I9b34bcb240a42bf99c6d8b58db4b18a4f6d36961
This reverts commit d3b0b2708b.
Reason for revert: Regression in USB audio handling
Test: USB audio playback on Crosshatch
Bug: 120795549
Change-Id: Ibd05cd9b419f3e7988ce24a45f800d4bfe91ef6a
When allocating a partition with a size that is unaligned (to the
optimal alignment), the remaining sectors are wasted since they are
never reallocated. This is because the free list is guaranteed to only
contain optimally-aligned regions. Unfortunately this means when a
partition is resized, we are wasting a small amount of space each time.
On a non-A/B device, this could wind up being significant.
For example, with an alignment of 512KiB, a 4KiB partition at offset 0
will waste 508KiB of space. The next extent to be allocated by any
partition will start at the next 512KiB.
To address this, we round up extents to the optimal alignment. This
means partitions may wind up slightly over-allocated, versus before,
where they would waste space by making it unavailable.
Bug: 120434950
Test: liblp_test gtest
Change-Id: I555209b301058555526cc4309f7049ae81cf877d
* changes:
Add procrank2
libmeminfo: defer maps reading only when required for procmeminfo
libmeminfo: Add support to reset workingset without procmeminfo objects
libmeminfo: Add support to fiter accounting based on page flags
libmeminfo: Add support to read zram memory consumption
libmeminfo: Add support for counting swap pages
This will ease the transition in the future to using an Fstab struct
that uses std::string instead of char*.
Bug: 62292478
Test: boot
Change-Id: I170db74c2eb6dc16bd21fe65d7e7c685ce5c8b11
In the same time replace iomanipulators with
::android::base::StringPrintf which makes the output much more readable
and the overall program simpler.
Bug: 114325007
Bug: 111694435
Test: procmem 1
Test: procmem -W 1
Test: procmem -u 1
Test: procmem -p 1
Test: procmem -w 1
Test: procmem -w -u 1
Test: procmem -w -p 1
Change-Id: Ibf7ef59b24dfcb851c78a3b2fad672d96a708b98
Signed-off-by: Sandeep Patil <sspatil@google.com>
Implement procrank using new libmeminfo APIs. procrank2 is functionally
equivalent to procrank except for the part where the old procrank would
print processes under each oomadj level if called with 'procrank -c -o'.
The output format of 'procrank2' is identical to that of 'procrank'.
'procrank2' also gives significant performance boost over 'procrank' but
does cost a more memory as the library is written to 99% use case where
callers almost always want to read the memory usage of hte process.
Bug: 114325007
Bug: 111694435
Test:
# adb push /google/data/ro/users/ss/sspatil/test-memutils.sh /data/local/tmp/
# adb push procmem2 /data/local/tmp && adb push procrank2 /data/local/tmp
# adb root && adb shell
$ cd /data/local/tmp/
$ chmod +x test-memutils.sh
$ ./test-memutils.sh 2>&1 | tee test.log
Test:
procrank:
0m00.43s real 0m00.11s user 0m00.32s system
procrank2:
0m00.42s real 0m00.05s user 0m00.36s system
Change-Id: I37b71a4625248e333ba01801c0d8d7ef348e4cfa
Signed-off-by: Sandeep Patil <sspatil@google.com>
/dev/* nodes referenced in the removed rules are not present on Pixel
devices, i.e. android platform doesn't depend on these nodes. If a
device relies on one of these rules, the rule should be added to the
device-specific ueventd.rc.
Bug: 110962171
Test: boot walleye
Test: init_tests
Change-Id: I3262475d4ff22386e8da0436efaf98b208e4fa1c
Some configurations won't allow ueventd to have CAP_NET_ADMIN, so the
new default size of 16M is not possible for those. Those
configurations also won't need such a large buffer size, so this
change allows devices to customize the SO_RCVBUF(FORCE) size for the
uevent socket.
This is done by adding the line 'uevent_socket_rcvbuf_size <size>' to
your device's ueventd.rc file. <size> is specified as a byte count,
for example '16M' is 16MiB.
The last parsed uevent_socket_rcvbuf_size line is the one that is
used.
Bug: 120485624
Test: boot sailfish
Test: ueventd unit tests
Change-Id: If8123b92ca8a9b089ad50318caada2f21bc94707
The existing APIs will truncate the byte array in case of '\0' in between.
Test: test_drive with atom 103
Change-Id: I104d35b330c6b52e2fdce1f5d4305dca08228f1b
Certain error conditions were getting lost because adb was wrongly
reading DeployAgent's return code as always 0.
Test: mm -j 72
Test: adb install -r --fastdeploy --force-agent --local-agent /mnt/raid/boat-attack-apk/boat-attack-swappy.apk
Bug: 120197330
Change-Id: If835fd6ca2051be8e5ff6c957e08b1e458053989
* changes:
fs_mgr: overlay: use alternate for backing storage
fs_mgr: overlay: split out fs_mgr_overlayfs_create_scratch()
fs_mgr: overlay: split out fs_mgr_overlayfs_make_scratch()