ANDROID: 16K: Avoid conflicting __PAGE_SIZE in bpf/core
Android uses __PAGE_SIZE for larger than 4KB base page size emulation on x86_64. Undef this to avoid conflicts with bpf core's usage of __PAGE_SIZE. Bug: 383389337 Bug: 383389337 Change-Id: Iae21f4bc7d0541687c98f0ac75ac93a6ed341bc7 Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
committed by
Carlos Llamas
parent
778a447513
commit
1022438243
@@ -89,6 +89,15 @@ void *bpf_internal_load_pointer_neg_helper(const struct sk_buff *skb, int k, uns
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Android uses __PAGE_SIZE for larger than 4KB base page size emulation
|
||||||
|
* on x86_64. Undef this to avoid conflicts with bpf core's usage of
|
||||||
|
* __PAGE_SIZE in this compilation unit.
|
||||||
|
*/
|
||||||
|
#ifdef __PAGE_SIZE
|
||||||
|
#undef __PAGE_SIZE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* tell bpf programs that include vmlinux.h kernel's PAGE_SIZE */
|
/* tell bpf programs that include vmlinux.h kernel's PAGE_SIZE */
|
||||||
enum page_size_enum {
|
enum page_size_enum {
|
||||||
__PAGE_SIZE = PAGE_SIZE
|
__PAGE_SIZE = PAGE_SIZE
|
||||||
|
|||||||
Reference in New Issue
Block a user