Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
a135d895
Commit
a135d895
authored
Sep 27, 2017
by
yonghong-song
Committed by
GitHub
Sep 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1363 from navytux/y/probe-read-const
bpf_probe_read*: src argument should be const void *.
parents
fca66074
2dc7daad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
docs/reference_guide.md
docs/reference_guide.md
+2
-2
src/cc/compat/linux/bpf.h
src/cc/compat/linux/bpf.h
+1
-1
src/cc/compat/linux/virtual_bpf.h
src/cc/compat/linux/virtual_bpf.h
+1
-1
src/cc/export/helpers.h
src/cc/export/helpers.h
+2
-2
No files found.
docs/reference_guide.md
View file @
a135d895
...
...
@@ -235,7 +235,7 @@ Examples in situ:
### 1. bpf_probe_read()
Syntax: ```int bpf_probe_read(void *dst, int size, void *src)```
Syntax: ```int bpf_probe_read(void *dst, int size,
const
void *src)```
Return: 0 on success
...
...
@@ -247,7 +247,7 @@ Examples in situ:
### 2. bpf_probe_read_str()
Syntax: ```int bpf_probe_read_str(void *dst, int size, void *src)```
Syntax: ```int bpf_probe_read_str(void *dst, int size,
const
void *src)```
Return:
- \> 0 length of the string including the trailing NUL on success
...
...
src/cc/compat/linux/bpf.h
View file @
a135d895
...
...
@@ -244,7 +244,7 @@ union bpf_attr {
* int bpf_map_delete_elem(&map, &key)
* Return: 0 on success or negative error
*
* int bpf_probe_read(void *dst, int size, void *src)
* int bpf_probe_read(void *dst, int size,
const
void *src)
* Return: 0 on success or negative error
*
* u64 bpf_ktime_get_ns(void)
...
...
src/cc/compat/linux/virtual_bpf.h
View file @
a135d895
...
...
@@ -245,7 +245,7 @@ union bpf_attr {
* int bpf_map_delete_elem(&map, &key)
* Return: 0 on success or negative error
*
* int bpf_probe_read(void *dst, int size, void *src)
* int bpf_probe_read(void *dst, int size,
const
void *src)
* Return: 0 on success or negative error
*
* u64 bpf_ktime_get_ns(void)
...
...
src/cc/export/helpers.h
View file @
a135d895
...
...
@@ -200,7 +200,7 @@ static int (*bpf_map_update_elem)(void *map, void *key, void *value, u64 flags)
(void *) BPF_FUNC_map_update_elem;
static int (*bpf_map_delete_elem)(void *map, void *key) =
(void *) BPF_FUNC_map_delete_elem;
static int (*bpf_probe_read)(void *dst, u64 size, void *unsafe_ptr) =
static int (*bpf_probe_read)(void *dst, u64 size,
const
void *unsafe_ptr) =
(void *) BPF_FUNC_probe_read;
static u64 (*bpf_ktime_get_ns)(void) =
(void *) BPF_FUNC_ktime_get_ns;
...
...
@@ -208,7 +208,7 @@ static u32 (*bpf_get_prandom_u32)(void) =
(void *) BPF_FUNC_get_prandom_u32;
static int (*bpf_trace_printk_)(const char *fmt, u64 fmt_size, ...) =
(void *) BPF_FUNC_trace_printk;
static int (*bpf_probe_read_str)(void *dst, u64 size, void *unsafe_ptr) =
static int (*bpf_probe_read_str)(void *dst, u64 size,
const
void *unsafe_ptr) =
(void *) BPF_FUNC_probe_read_str;
int bpf_trace_printk(const char *fmt, ...) asm("
llvm
.
bpf
.
extra
");
static inline __attribute__((always_inline))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment