# Allocate >8 concurrent buffers in an 8KB mmap (>90% of 4KB async space) to transition
# RangeAllocator from ArrayRangeAllocator to TreeRangeAllocator, trigger oneway spam
# detection, and free buffers to exercise RBTree coalescing.

r0 = openat$binderfs(0xffffffffffffff9c, &AUTO='./binderfs/binder0\x00', 0x0, 0x0)
ioctl$BINDER_SET_CONTEXT_MGR(r0, AUTO, AUTO)
mmap$binder(&(0x7f00000a0000/0x2000)=nil, AUTO, AUTO, AUTO, r0, 0x0)
r1 = openat$binderfs(0xffffffffffffff9c, &AUTO='./binderfs/binder0\x00', 0x0, 0x0)
mmap$binder(&(0x7f00000c0000/0x2000)=nil, AUTO, AUTO, AUTO, r1, 0x0)
ioctl$BINDER_ENABLE_ONEWAY_SPAM_DETECTION(r1, AUTO, &AUTO=0x1)
ioctl$BINDER_WRITE_READ(r1, AUTO, &AUTO={AUTO, AUTO, &AUTO=[@transaction_sg={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x8, &AUTO={@raw_ptr={AUTO, AUTO, &AUTO=""/256, AUTO, AUTO, AUTO}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, &AUTO={0x0, 0x0, 0x0}}, 0x400}, @transaction_sg={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x8, &AUTO={@raw_ptr={AUTO, AUTO, &AUTO=""/256, AUTO, AUTO, AUTO}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, &AUTO={0x0, 0x0, 0x0}}, 0x400}, @transaction_sg={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x8, &AUTO={@raw_ptr={AUTO, AUTO, &AUTO=""/256, AUTO, AUTO, AUTO}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, &AUTO={0x0, 0x0, 0x0}}, 0x400}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}, @transaction={AUTO, {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, AUTO, 0x0, &AUTO={@flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}, @flat=@binder={AUTO, 0x0, 0x0, 0x0}}, 0x0}}], AUTO, AUTO, &AUTO=@transaction={AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x0, AUTO}, ""/184}})
ioctl$BINDER_WRITE_READ(r0, AUTO, &AUTO={AUTO, AUTO, &AUTO=[@enter_looper={AUTO}], AUTO, AUTO, &AUTO=@transaction={AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, <r2=>0x0, AUTO}, ""/184}})
ioctl$BINDER_WRITE_READ(r0, AUTO, &AUTO={AUTO, AUTO, &AUTO=[@free_buffer={AUTO, r2}], AUTO, AUTO, &AUTO=@transaction={AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, <r3=>0x0, AUTO}, ""/184}})
ioctl$BINDER_WRITE_READ(r0, AUTO, &AUTO={AUTO, AUTO, &AUTO=[@free_buffer={AUTO, r3}], 0x0, AUTO, 0x0})
