1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
4 #include <bpf/bpf_helpers.h>
5 #define vm_flags vm_start
7 char _license[] SEC("license") = "GPL";
13 static long write_vma(struct task_struct *task, struct vm_area_struct *vma,
14 struct callback_ctx *data)
16 /* writing to vma, which is illegal */
17 vma->vm_start = 0xffffffffff600000;
22 SEC("raw_tp/sys_enter")
23 int handle_getpid(void)
25 struct task_struct *task = bpf_get_current_task_btf();
26 struct callback_ctx data = {};
28 bpf_find_vma(task, 0, write_vma, &data, 0);