| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| | |
am: 3ae28a202f
am: b8a466afd4
Change-Id: Ie06a6071c83e0596a3d130053a0c3d9c8be017d8
|
| | |\
| | |
| | |
| | |
| | |
| | | |
am: 3ae28a202f
Change-Id: I7ac3ecc4b254f56fa98962f4c09b8f7c33b414a5
|
| | | |\
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 6f73fbb3a0
Change-Id: Ib577d2959588e0e1cd6301fcf129d3347c1f3f6f
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 2af4ba42b5e3e9e16765979d169c7c6fe49e603d.
Reason for revert: APF uses a mix of 2-space and 4-space indentation,
and clang-format doesn't support this. Re-indenting the entire
codebase would interferes with 'git blame' and cause annoying merge
conflicts.
Change-Id: If77e4e2f189549cfd0635b52a32c89f14b8f99cf
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: ee8232b1c0
Change-Id: I7bd1d151e9791c09ad2e77986b64f246823778e7
|
| | |\| |
| | | |
| | | |
| | | |
| | | | |
Bug: 126125118
Change-Id: I9ad60eb896816eb533b0c364d3cb34b23aee28e5
|
| | | |\ \
| | | | |
| | | | |
| | | | | |
stage-aosp-master
|
| | | | |\ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: 120848293
Change-Id: I5c91808a99e0412fd00de3b2a6ab0428417abd97
|
| |\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
39492ba12d
am: 98acc3d25c
Change-Id: Iea9148ec580b54b28736d2ac7583caa90e122252
|
| | |\| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
am: 39492ba12d
Change-Id: I03bde339794a63f5625687381fbbf2d01d32ade7
|
| | | |\ \ \ \
| | | |/ / /
| | |/| | /
| | | | |/
| | | |/|
| | | | | |
am: 2af4ba42b5
Change-Id: I62ba263cd1c12ed1ae678c361c4086175f30f2b6
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Ia98bf4f7e030541e1062effb8ba2ab8fd6e6050e
|
| |\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
am: 87a315aff4
Change-Id: I1a7f254bf42a8b4939fbbf39e946cf862f1bccc4
|
| | |\| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
am: adf9750f28
Change-Id: I898b468a2ed6bde1c8546bd74d7f091de01fc606
|
| | | |\| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
am: d0174a67d8
Change-Id: I2e879d7f42469f98efaa7ba6aadb63fa8ddef268
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This adds a --trace option to apf_run which dumps the PC and register
content during execution. This is a big aid in debugging misbehaving
APF programs.
It should be easy to disassemble the current instruction inline if we
refactor apf_disassembler to extract its body to a separate function.
Another easy feature would be dumping the memory locations that were
modified by the previous instruction.
Test: apf_run --trace --program <program> --packet <packet> --data <data>
Change-Id: I2a24bdfb84ce4e86409542332ee32082988a7698
|
| |\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
am: 71413c43c6
Change-Id: I1e500c6de4b07508041b70de924d13fe9b7bfeeb
|
| | |\| | |
| | |_|/
| |/| |
| | | |
| | | |
| | | | |
am: 49b916a860
Change-Id: Idb29fb501066048ead2e378969de2bc19edba7e3
|
| | | |\|
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 5698836c72
Change-Id: I3ca8d27fd11721660bae27698367106d6488b86f
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Test: build/make/tools/checkowners.py hardware/google/apf/OWNERS
Change-Id: Ie6c815257523666740d0c648761083b357dd4cac
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: f03e5d7819
Change-Id: Ie33ffe7d1a8f57c7d8c4cf0f1383a889e2748fb9
|
| | |\| |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 30f80adf19
Change-Id: I4fd77f33d97ed63925e06467255a099e120281d2
|
| | | |\|
| | | |
| | | |
| | | |
| | | |
| | | | |
am: b7af00686b
Change-Id: I79587649dd8cd9b2f9ed999e2abb9b2d76c29431
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix build break since libpcap did not enable for darwin
Test: tried disable on linux and change target to darwin
Change-Id: Iadc463cfa96190cbc8e44f084fb81e8a71050d18
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 23d87f3407
Change-Id: I289adaefcb03913abfadfcab0a4d980c7d6cec81
|
| | |\| |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: fa912162e9
Change-Id: Ic0bd4b458888f4f4d871795a08924e8ad70fed2a
|
| | | |\|
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 5ef76bdf49
Change-Id: Id3ea967990f2efdafa1d3816bfe5fe22e8be1b8f
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To read a pcap file and run the packets through APF program.
Bug: 114458629
Test: make apf_run works
Change-Id: I7e5dddf3092d787f6191e4a51afb165cd9dd71c4
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: f909992a6a
Change-Id: Ia3d7f1719e3af2600cbb3be37be24c77422bf062
|
| | |\| |
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 6e7165dc37
Change-Id: I9ffe31b341f721178c1c1cbb123b8eba901a17b0
|
| | | |\|
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 4810da91a8
Change-Id: I3d399b0130c9f44bce7fa8ac3c746a982d7f3592
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See build/soong/README.md for more information.
Test: cd hardware/google/apf; mma
Change-Id: I67e3ac7199cc70126504436c8b47beb6f9d292ad
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
MERGE am: 391faa08ae -s ours am: 17ef19c8db -s ours
am: 206d13eab4 -s ours
Change-Id: I3e53b5d6615a8dc5857eb432e339b1b6d1671ee9
|
| | |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
MERGE am: 391faa08ae -s ours
am: 17ef19c8db -s ours
Change-Id: I4189b242f7f2fb52102d8ee6f34ae39afaefe911
|
| | | |\|
| | | |
| | | |
| | | |
| | | |
| | | | |
am: 391faa08ae -s ours
Change-Id: I5f84ff35631cb4ce704ac84ca9d570b1cb33250e
|
| | | | |\
| | | | |
| | | | |
| | | | | |
Change-Id: I3c812f8d29d5015eef934d5715dc1162ec51a1ae
|
| |\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
MERGE am: fd5fb62d48 -s ours
am: 241050616c -s ours
Change-Id: Ie3efd893f024ca041712bf065877a99aee6d9421
|
| | |\| | |
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
MERGE
am: fd5fb62d48 -s ours
Change-Id: I17796c43f3728ed90c35df5cb5ef63bb4cd55f9c
|
| | |/| |
| | |/
| | |
| | | |
Change-Id: I4ff02b0d0ad342d8e00e81e590993f97ba47a9c3
|
| | | |\
| | | |
| | | |
| | | | |
Change-Id: I41f644223454c399aa11065fb959f58440db94f2
|
| | | |\ \
| | | | |
| | | | |
| | | | | |
Change-Id: If50a0682e77085adb03ddd990f75b682683927ad
|
| |\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
am: 18d719278e
Change-Id: Ie17fa21211448832774d43f7bc5bd28163b60f37
|
| | |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
am: 256a9a6aa6
Change-Id: I4b229a8653dfb346e9de25b918c5ceaff959f2c3
|
| | |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
am: 0079f424fb
Change-Id: I5325d397676074d81a4cf70f6a2f19ba962fefd1
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Also remove the per-file line for Android.bp because it upsets the
preupload checks:
remote: error: unknown: build.master@android.com at OWNERS:1
I have no idea why it was added, but I assume it's cruct since there
are no Android.bp files in this repo, and build.master@android.com is
not mentioned anywhere else.
Change-Id: I44664503bfaa48a978091819db2e3e46ef1e2e7f
Test: how would I test an OWNERS file?
|
| |\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
am: 237dc2ad02
Change-Id: I16e3f232882852227ba9a7123628f6e0fd088943
|
| | |\ \ \ \ \
| | | |_|_|/
| | |/| | |
| | | | | |
| | | | | |
| | | | | | |
am: d2cc2b74f1
Change-Id: I6099c2f5cdcaa771725fe934924929e76fd063e6
|
| | | | |_|/
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
After releasing APFv3, we realized that addressing memory from the top
could be simplified by adjusting a few details:
1) The APF interpreter now receives a single unified buffer containing
both the program bytecode and the data segment, unambiguously matching
the memory layout seen by installApfPacketFilter() and
readApfPacketFilter().
2) Data address zero coincides with the beginning of the APF program,
thus decoupling data addresses from the length of the program (which
could change between invokations of installApfPacketFilter()). This
simplifies the ApfGenerator by not requiring a data relocation step
similar to jump relocation.
3) For convenience, the interpreter pre-fills one volatile memory slot
with the total size of the APF buffer. The APF program can load this
value into a register to efficiently write near the end of the data
segment, thus allowing the program-data boundary to shift freely.
4) Negative addresses wrap around the end of the data buffer, such that
address -1 coincides with the last byte of the buffer.
5) The immediate offet of LDDW and SDDW are now sign-extended, such that
small negative offsets can be encoded as a 1-byte immediate. This,
combined with the modular addressing at (4), can be used to address
memory cells near the end of the data region with 2-byte opcodes.
Overall, the above changes allow building a simple 32bit counter with
a sequence more or less like this:
2 li R1, -4 ; R1 = -4 (last 32bit word of data)
1 lddw R0, [R1 + 0] ; R0 = old counter value
2 add R0, 42 ; Increment counter by some value
1 stdw R0, [R1 + 0] ; Write back the new value
Total: 6 bytes. Note how the above bytecode is independent of the actual
size of the program and data segments. To reduce bytecode size,
the counter increment sequence can be moved to an "IncrementAndDrop"
trampoline, taking only 2 bytes more than a direct jump to DROP:
2 li R1, -12 ; R0 = counter offset (third to last counter)
3 jmp CountAndDrop ; (could be 2 bytes if jumping nearby)
...
CountAndDrop:
1 lddw R0, [R1+0] ; R0 = old counter value
2 add R0, 1 ; Increment counter
1 stdw R0, [R1+0] ; Write back updated value
3 jmp DROP ; cya!
Adding a 1-byte INC instruction would make things a little nicer.
Change-Id: Ia9b25e49e127a48d7344ddc60b17c93d6421ab7d
Bug: 73804303
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
(cherry picked from commit 17c1fbc9e98e380e508fa83d0f927bc742a5161b)
|
| |\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
am: ffd9610c17
Change-Id: If911942d594bcfb43ccda7d72fe1a3dfac8e0eb0
|
| | |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
am: 091ea8c192
Change-Id: Id238d258f5895cb8b389c05c738f28fe09006eae
|