bpftrace permission

Support for security such as Firewalls and securing linux
Post Reply
jimmauro
Posts: 1
Joined: 2020/02/11 00:06:04

bpftrace permission

Post by jimmauro » 2020/02/11 00:10:39

I used snap to install bpftrace. I get the following errors when attempting to use bpftrace:

# bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }'
Error creating map: '@': Operation not permitted
Error creating printf map: Operation not permitted
Creation of the required BPF maps has failed.
Make sure you have all the required permissions and are not confined (e.g. like
snapcraft does). `dmesg` will likely have useful output for further troubleshooting

Based on my research so far, this looks like kernel lockdown. Kernel version and CentOS release information below.
I seek advice on how to open permission so I can effectively use bpftrace.

Thanks
Jim

# uname -r
4.20.0-1.el7.elrepo.x86_64
# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

User avatar
TrevorH
Forum Moderator
Posts: 27727
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: bpftrace permission

Post by TrevorH » 2020/02/11 13:38:30

Try it with the distro kernel.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Security Support”