Skip to content

Commit

Permalink
Merge pull request #142 from mariux64/allow-cpu-event-access-by-users
Browse files Browse the repository at this point in the history
Allow cpu event access by users
  • Loading branch information
pmenzel authored Nov 30, 2020
2 parents 1976f94 + 82d2618 commit c7e9a67
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ done
install_symlink /usr/bin/prun "$DESTDIR$usrlocal_prefix/package/bin/prun"
install_symlink /usr/bin/ptype "$DESTDIR$usrlocal_prefix/package/bin/ptype"
install_symlink /usr/bin/pman "$DESTDIR$usrlocal_prefix/package/bin/pman"
install_data misc_etc_files/sysctl.conf "$DESTDIR$sysconfdir/sysctl.conf"

postinstall
exit
47 changes: 47 additions & 0 deletions misc_etc_files/sysctl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# alloc() - return NULL when no more memory can be allocated..
#
vm.overcommit_memory = 2
vm.overcommit_ratio = 100

#
# some network pimping..
#
net.ipv4.ipfrag_low_thresh = 524288
net.ipv4.ipfrag_high_thresh = 524288

# You should consider increasing this number to at least 256k for nfsd.
#net.core.rmem_default = 262144
#net.core.rmem_max = 262144

# likely not enough, nfs4 problems in cluster
# rpc-srv/tcp: nfsd: sent only 949168 when sending 1048640 bytes - shutting down socket
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_mem = 16777216 16777216 16777216
net.ipv4.route.flush = 1

# exploit fix for linux < 2.6.32rc6
# vm.mmap_min_addr = 4096


# don't arp reply on all interfaces
net.ipv4.conf.all.arp_filter = 1

# disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1

# on user request increase the number of inode watches.
# 256k should be fine. (default is 8k)
fs.inotify.max_user_watches = 262144

kernel.shmmax = 34359738368
kernel.shmall = 34359738368

# user request: Allow CPU event access by users without CAP_SYS_ADMIN

kernel.perf_event_paranoid = 1

0 comments on commit c7e9a67

Please sign in to comment.