-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'selftests/bpf: BTF-based kernel data display'
Alan Maguire says: ==================== Resolve issues in bpf selftests introduced with BTF-based kernel data display selftests; these are - a warning introduced in snprintf_btf.c; and - compilation failures with old kernels vmlinux.h ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
- Loading branch information
Showing
4 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright (c) 2020, Oracle and/or its affiliates. */ | ||
/* "undefine" structs in vmlinux.h, because we "override" them below */ | ||
#define btf_ptr btf_ptr___not_used | ||
#define BTF_F_COMPACT BTF_F_COMPACT___not_used | ||
#define BTF_F_NONAME BTF_F_NONAME___not_used | ||
#define BTF_F_PTR_RAW BTF_F_PTR_RAW___not_used | ||
#define BTF_F_ZERO BTF_F_ZERO___not_used | ||
#include "vmlinux.h" | ||
#undef btf_ptr | ||
#undef BTF_F_COMPACT | ||
#undef BTF_F_NONAME | ||
#undef BTF_F_PTR_RAW | ||
#undef BTF_F_ZERO | ||
|
||
struct btf_ptr { | ||
void *ptr; | ||
__u32 type_id; | ||
__u32 flags; | ||
}; | ||
|
||
enum { | ||
BTF_F_COMPACT = (1ULL << 0), | ||
BTF_F_NONAME = (1ULL << 1), | ||
BTF_F_PTR_RAW = (1ULL << 2), | ||
BTF_F_ZERO = (1ULL << 3), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters