* aosp/upstream: Some util functions to support bpfix Test: make Change-Id: Iea761facbd5045f3b5eaf8da6be2a2c992e89e76